Merge pull request #1 from LilyWonhalf/feature/ddos-welcome-notification

Added welcome message to inform of DDoS attack
This commit is contained in:
aIbatros 2021-07-08 23:34:53 -04:00 committed by GitHub
commit cc223a4598
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 11 deletions

View file

@ -7,6 +7,13 @@
"mod": "" "mod": ""
}, },
"channels": { "channels": {
"staff": "" "appDiscussion": ""
},
"jira": {
"baseUrl": "",
"issueTypes": {
"bug": 10005,
"task": 10002
}
} }
} }

View file

@ -0,0 +1,5 @@
const Guild = require('../../model/guild');
module.exports = async (member) => {
Guild.guildMemberAddHandler(member);
};

View file

@ -15,22 +15,14 @@ const Guild = {
discordGuild: null, discordGuild: null,
/** {TextChannel} */ /** {TextChannel} */
modsReviewChannel: null, appDiscussionChannel: null,
/** {TextChannel} */
speakerReviewChannel: null,
/** {TextChannel} */
officeChannel: null,
/** {Collection} */ /** {Collection} */
messagesCache: new Discord.Collection(), messagesCache: new Discord.Collection(),
init: async () => { init: async () => {
Guild.discordGuild = bot.guilds.cache.find(guild => guild.id === Config.guild); Guild.discordGuild = bot.guilds.cache.find(guild => guild.id === Config.guild);
Guild.modsReviewChannel = Guild.discordGuild.channels.cache.find(channel => channel.id === Config.channels.modsReview); Guild.appDiscussionChannel = Guild.discordGuild.channels.cache.find(channel => channel.id === Config.channels.appDiscussion);
Guild.speakerReviewChannel = Guild.discordGuild.channels.cache.find(channel => channel.id === Config.channels.speakerReview);
Guild.officeChannel = Guild.discordGuild.channels.cache.find(channel => channel.id === Config.channels.office);
}, },
/** /**
@ -164,6 +156,10 @@ const Guild = {
certain, certain,
foundMembers foundMembers
}; };
},
guildMemberAddHandler: (member) => {
Guild.appDiscussionChannel.send(`Welcome, ${member}! Just so you are aware, we are slowly recovering from a DDoS attack. If you are having trouble connecting to the app, please make sure you are on the latest version. If you are still unable to connect, you can note your switches in <#862775075626287176> so that you have them for when the server has recovered. We thank you for your patience!`)
} }
}; };