Commit 189b51e6 authored by Imran Hussain's avatar Imran Hussain
Browse files

Close #6 - Random greeting messages that can easily be added to

parent 133ddd73
......@@ -7,8 +7,6 @@ module.exports = {
execute(client, message, args) {
const amount = parseInt(args[0]) + 1;
console.log(args[0]);
if (isNaN(amount)) {
return message.reply('that doesn\'t seem to be a valid number.');
} else if (amount <= 1 || amount > 100) {
......
/* global process */
const settings = JSON.parse(process.env.SOCS);
module.exports = (client, member) => {
member.send(
`Welcome on the server!`
);
const greetings = [
'Sigh, welcome to the server I guess',
'Oh.... Hello',
'I think you ought to know I\'m feeling very depressed but that\'s how I was made',
'I am at a rough estimate thirty billion times more intelligent than you. But here I am being used to greet people',
'Welcome, pardon me for breathing',
'Just so you know, I hate oceans.',
'You think you’ve got problems. What are you supposed to do if you are a manically depressed robot?',
];
const randomGreeting = greetings[Math.floor(Math.random()*greetings.length)];
const guild = member.guild;
guild.channels.find((channel) =>
channel.name === settings[guild.name.toLowerCase()].default_channel)
.send('<@' + member.id + '> ' + randomGreeting);
};
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment