Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added welcome message and upgrade discord.js
  • Loading branch information
reactivepixel committed Aug 22, 2018
commit d01ca4b1e45d2be5c5ca8e2fa79b62fd24c11126
14 changes: 13 additions & 1 deletion bot/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,31 @@ const client = new Discord.Client();
// Pre-load controllers
const controllers = require('./controllers')();

// Temp Welcome Message
const welcomeMessage = '__**Welcome to the official Full Sail University Armada Discord!**__ \nArmada houses Full Sail University’s official esports teams and gaming communities. Our mission is to unite our school through gaming and esports, igniting the pride that only those who call Full Sail home will know.\nTo get started, we’d love to introduce our bot, @max! Max can help you to assign yourself different roles dependent upon the gaming communities that you would like to participate in. Please first head to our #bot - spam channel to verify your active student status and assign yourself roles. You can do this by typing “!verify yourstudentemail@student.fullsail.edu” - but make sure to use your actual student email. Max will take it from there!\n\nYour Armada Staff Advisors are:\nHoyt Dingus @[Full Sail Armada]MuaDeeb\n\nPlease reach out to our Officers for any questions and concerns, and they can escalate to our Staff Advisors if necessary.\n\nFollow our social channels:\nFacebook: https://www.facebook.com/FullSailArmada/\nTwitter: https://twitter.com/fullsailarmada\nTwitch: https://www.twitch.tv/fullsailarmada\n\nOur Armada Code of Conduct can be found here: https://docs.google.com/document/d/13WZqhZ9SgctEw83SqkKadSgobxPjYkk35B1OGuDx7A8/edit?usp=sharing';

// Alert when ready
client.on('ready', () => {
util.log('Bot Online and Ready', 0);
});

client.on('guildMemberAdd', (memberAddEvent) => {
util.log('~I have sensed a disturbance in the force, a new user is here.', memberAddEvent.user, 0);
memberAddEvent.user.sendMessage(welcomeMessage);
});

client.on('guildMemberRemove', (memberRemoveEvent) => {
util.log('~A user has disappeared into the vapor.', true, 0);
});

// Listen for messages
client.on('message', (message) => {
// Check for ! prefix on message to ensure it is a command
if (message.content.charAt(0) === '!') {
util.log('Command message received', message.content, 0);

// Build basic help string
let helpString = 'v1.4.0 Discovered Commands:\n\n\t**<> - Required Item\t\t[] - Optional Item**';
let helpString = 'v1.5.0 Discovered Commands:\n\n\t**<> - Required Item\t\t[] - Optional Item**';

// Process message against every controller
Object.keys(controllers).forEach((key) => {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "max",
"version": "1.4.0",
"version": "1.5.0",
"description": "",
"main": "bot/client.js",
"engines": {
Expand All @@ -16,7 +16,7 @@
"dependencies": {
"apex-util": "^2.0.3",
"chai": "^4.1.1",
"discord.js": "^11.1.0",
"discord.js": "11.4.0",
"dotenv": "^4.0.0",
"eslint": "^4.3.1",
"eslint-config-airbnb": "^15.1.0",
Expand Down