This repository has been archived by the owner on Aug 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #167 from BanklessDAO/hotfix/1.6.2
Hotfix/1.6.2
- Loading branch information
Showing
11 changed files
with
106 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,26 @@ | ||
import messageCreateOnBountyBoard from './bounty/MessageCreateOnBountyBoard'; | ||
import { Message } from 'discord.js'; | ||
import { DiscordEvent } from '../types/discord/DiscordEvent'; | ||
import MessageCreateOnDEGEN from './chat/MessageCreateOnDEGEN'; | ||
|
||
export default class implements DiscordEvent { | ||
name = 'messageCreate'; | ||
once = false; | ||
|
||
execute(message: Message): Promise<any> { | ||
if(message.author.bot && message.webhookId === null) return; | ||
const greetings = ['Hello', 'Howdy', 'Hey', 'Go Bankless,', 'Nice to meet you,', 'It\'s great to see you,', 'Ahoy,']; | ||
if (message.content.toLowerCase().match('^.*degen$')) { | ||
message.channel.send({ content: `${greetings[Math.floor(Math.random() * greetings.length)]} ${message.author.username}!` }); | ||
try { | ||
if(message.author.bot && message.webhookId === null) return; | ||
|
||
// DEGEN says hello | ||
MessageCreateOnDEGEN(message).catch(e => { | ||
console.error('ERROR: ', e); | ||
}); | ||
// Run for webhook | ||
messageCreateOnBountyBoard(message).catch(e => { | ||
console.error('ERROR: ', e); | ||
}); | ||
} catch (e) { | ||
console.error(e); | ||
} | ||
messageCreateOnBountyBoard(message).catch(e => { | ||
console.error('ERROR: ', e); | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,5 @@ export default class implements DiscordEvent { | |
} catch (e) { | ||
console.error(e); | ||
} | ||
return; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { Message } from 'discord.js'; | ||
|
||
const MessageCreateOnDEGEN = async (message: Message): Promise<any> => { | ||
const greetings = ['Hello', 'Howdy', 'Hey', 'Go Bankless,', 'Nice to meet you,', 'It\'s great to see you,', 'Ahoy,']; | ||
if (message.content.toLowerCase().match('^.*degen$')) { | ||
message.channel.send({ content: `${greetings[Math.floor(Math.random() * greetings.length)]} ${message.author.username}!` }); | ||
} | ||
return; | ||
}; | ||
|
||
export default MessageCreateOnDEGEN; |