Skip to content

Commit

Permalink
Refine message deletion rules
Browse files Browse the repository at this point in the history
  • Loading branch information
saboonikhil committed May 10, 2024
1 parent 7328fc4 commit d02f5f5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ const checkAddress = (address): string | false => {
client.on('message', async (message) => {
// Validate channel
if (message.channel.id !== config.discord.channel_id) return;
if (message.author.id === '1205221932740386896') return;

// Validate message pattern
if (!message.content.startsWith('!ser')) {
if (!message.content.startsWith('!ser') || message.content.length < 50 || message.author.bot) {
message.delete();
return;
}
Expand Down

0 comments on commit d02f5f5

Please sign in to comment.