Added arrow, very glitchy though

This commit is contained in:
ION606
2022-02-17 23:37:48 -05:00
parent b56025e4f4
commit d724bc374b
2 changed files with 29 additions and 2 deletions
+25
View File
@@ -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;
}
}
}
}
+4 -2
View File
@@ -47,8 +47,7 @@ client.on('messageCreate', (message) => {
const args = message.content.slice(prefix.length).split(' '); const args = message.content.slice(prefix.length).split(' ');
const command = args.shift().toLowerCase(); 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 //Check if the user has sufficient permission
//Performes the command //Performes the command
@@ -62,6 +61,9 @@ client.on('messageCreate', (message) => {
case 'links': client.commands.get('links').execute(message, args, Discord); case 'links': client.commands.get('links').execute(message, args, Discord);
break; break;
case 'arrow': client.commands.get('arrow').execute(message, args, Discord);
break;
default: message.channel.send("'" + message.content + "' is not a command!"); default: message.channel.send("'" + message.content + "' is not a command!");
} }
}) })