mirror of
https://github.com/ION606/selmerBot.git
synced 2026-05-14 21:26:54 +00:00
Added arrow, very glitchy though
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
module.exports = {
|
||||
name: 'arrow',
|
||||
description: 'Engage in a trademarked activity and throw an arrow at a trash can',
|
||||
async execute(message, args) {
|
||||
let counter = 0;
|
||||
arrow = '>';
|
||||
while (true) {
|
||||
arrow = '-' + arrow;
|
||||
message.channel.send(arrow);
|
||||
await message.channel.messages.fetch({limit: 1}).then(messages => {
|
||||
message.channel.bulkDelete(messages);
|
||||
});
|
||||
counter ++;
|
||||
if (counter >= 5) {
|
||||
message.channel.messages.fetch({limit: 1}).then(messages => {
|
||||
message.channel.bulkDelete(messages);
|
||||
});
|
||||
arrow = arrow + '🗑️';
|
||||
message.channel.send(arrow);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -48,7 +48,6 @@ client.on('messageCreate', (message) => {
|
||||
const args = message.content.slice(prefix.length).split(' ');
|
||||
const command = args.shift().toLowerCase();
|
||||
|
||||
//test message (can also use message.channel.send('thing') instead of message.reply('thing))
|
||||
|
||||
//Check if the user has sufficient permission
|
||||
//Performes the command
|
||||
@@ -62,6 +61,9 @@ client.on('messageCreate', (message) => {
|
||||
case 'links': client.commands.get('links').execute(message, args, Discord);
|
||||
break;
|
||||
|
||||
case 'arrow': client.commands.get('arrow').execute(message, args, Discord);
|
||||
break;
|
||||
|
||||
default: message.channel.send("'" + message.content + "' is not a command!");
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user