Added the battle accept system. The game still isn't working though

This commit is contained in:
ION606
2022-05-25 22:33:42 +03:00
parent 7b01151dde
commit a7e5efe360
6 changed files with 187 additions and 27 deletions
+9 -5
View File
@@ -8,11 +8,13 @@ module.exports ={
temp += bot.commands.get('econ').econHelp();
temp += `\n\n(remember to use '${bot.prefix}' before the command!)`;
return message.channel.send(temp);
} else if (args[0] == 'game') {
}
else if (args[0] == 'game') {
let temp = "***Selmer Bot Commands (Games):***\n";
temp += bot.commands.get('game').gameHelp();
temp += bot.commands.get('game').allGames.join(", ");
temp += `\n\n(remember to use '${bot.prefix}' before the command!)`;
return message.channel.send(temp); }
return message.channel.send(temp);
}
let temp = "***Selmer Bot Commands:***\n";
@@ -22,9 +24,11 @@ module.exports ={
if (comm.name != 'verify') {
if (comm.name == 'econ') {
temp += `econ - use _!help econ_\n`;
} else if (comm.name == 'game') {
}
else if (comm.name == 'game') {
temp += `game - use _!help game_\n`;
}else {
}
else {
temp += `${comm.name.toLowerCase()} - _${comm.description}_\n`;
}
}
+6 -2
View File
@@ -5,7 +5,7 @@ module.exports ={
description: ".....",
async execute(message, args, Discord, Client, bot) {
const axios = require('axios');
const cheerio = require('cheerio')
const cheerio = require('cheerio');
const url = args[0];
axios(url)
.then(async response => {
@@ -17,9 +17,13 @@ module.exports ={
// console.log(lyrics);
})
.catch(function(err) {
if (err.message.indexOf('The "url" argument must be of type string.') != -1) {
if (err.message.indexOf('The "url" argument must be of type string') != -1) {
message.reply("The URL should be a string!");
} else {
message.reply("Oops! There's been an error");
}
console.log(err);
});
}
}