diff --git a/config.json.sample b/config.json.sample index 35f4d8c..43a655a 100644 --- a/config.json.sample +++ b/config.json.sample @@ -7,6 +7,13 @@ "mod": "" }, "channels": { - "staff": "" + "appDiscussion": "" + }, + "jira": { + "baseUrl": "", + "issueTypes": { + "bug": 10005, + "task": 10002 + } } } \ No newline at end of file diff --git a/event/bot/guild-member-add.js b/event/bot/guild-member-add.js new file mode 100644 index 0000000..63e361d --- /dev/null +++ b/event/bot/guild-member-add.js @@ -0,0 +1,5 @@ +const Guild = require('../../model/guild'); + +module.exports = async (member) => { + Guild.guildMemberAddHandler(member); +}; \ No newline at end of file diff --git a/model/guild.js b/model/guild.js index e051939..8168bc1 100644 --- a/model/guild.js +++ b/model/guild.js @@ -15,22 +15,14 @@ const Guild = { discordGuild: null, /** {TextChannel} */ - modsReviewChannel: null, - - /** {TextChannel} */ - speakerReviewChannel: null, - - /** {TextChannel} */ - officeChannel: null, + appDiscussionChannel: null, /** {Collection} */ messagesCache: new Discord.Collection(), init: async () => { 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.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); + Guild.appDiscussionChannel = Guild.discordGuild.channels.cache.find(channel => channel.id === Config.channels.appDiscussion); }, /** @@ -164,6 +156,10 @@ const Guild = { certain, 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!`) } };