-
Notifications
You must be signed in to change notification settings - Fork 4
Ajout d'un check pour media.discordapp.com #182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -42,6 +42,7 @@ export default class MessageCreateListener extends Listener { | |||||
yield await this._quoteLinkedMessage(message); | ||||||
yield await this._antispamSnippetsChannel(message); | ||||||
yield await this._checkCreationsChannelRules(message); | ||||||
yield await this._checkMediaDiscordapp(message); | ||||||
return false; | ||||||
} | ||||||
|
||||||
|
@@ -92,6 +93,14 @@ export default class MessageCreateListener extends Listener { | |||||
return false; | ||||||
} | ||||||
|
||||||
private async _checkMediaDiscordapp(message: GuildMessage): Promise<boolean> { | ||||||
if (!/media\.discordapp\.net+/.test(message.content)) | ||||||
return false; | ||||||
await message.channel.send(message.content.replace(/media\.discordapp\.net+/, 'cdn.discordapp.com')); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Le There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Stylé stylé, je le fais quand j'suis chez oim. |
||||||
await message.delete(); | ||||||
return false; | ||||||
} | ||||||
|
||||||
private async _handleSuggestion(message: GuildMessage): Promise<boolean> { | ||||||
// Send embed and add reactions in the Suggestion channel. | ||||||
if (message.channel.id === settings.channels.suggestions) { | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.