Skip to content
This repository was archived by the owner on Oct 11, 2018. It is now read-only.

Commit 5152a36

Browse files
committed
oops, fixing bugs
oops, fixing bugs
1 parent 4c23684 commit 5152a36

1 file changed

Lines changed: 89 additions & 28 deletions

File tree

index.js

Lines changed: 89 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ LET'S GO!
3636

3737
console.log(clientonmessage);
3838
client.user.setGame(
39-
"NotABot | BETA | http://BlueMalgeran.com",
39+
`NotABot | ${client.guilds.size} servers | http://BlueMalgeran.com`,
4040
"https://www.twitch.tv/BlueMalgeran"
4141
);
4242
});
@@ -50,7 +50,8 @@ client.on("guildCreate", guild => {
5050
guildMSG.send(`
5151
Hello there! My original name is \`NotABot\`!\n\
5252
This bot created by **Blue Malgeran#3106**\n\
53-
For more info type \`${settings.botPREFIX}help\`!`);
53+
For more info type \`${settings.botPREFIX}help\`!\n\
54+
\`NotABot - Official Server:\` https://discord.gg/KugMg6K`);
5455
});
5556

5657
// Logs of the bot leaves a server
@@ -151,7 +152,7 @@ client.on("message", async message => {
151152
break;
152153

153154
case "weather":
154-
console.log(`${message.author.tag} used the ${settings.botPREFIX}botinfo command!`);
155+
console.log(`${message.author.tag} used the ${settings.botPREFIX}weather command!`);
155156

156157
let apiKey = settings.weatherAPI;
157158
const fetch = require('node-fetch');
@@ -460,15 +461,15 @@ client.on("message", async message => {
460461
case "botping":
461462
console.log(`${message.author.tag} used the ${settings.botPREFIX}botping command!`);
462463

463-
message.reply({embed: {
464+
message.channel.send({embed: {
464465
color: 3447003,
465466
author: {
466467
name: client.user.username,
467468
icon_url: client.user.avatarURL
468469
},
469470
fields: [{
470471
name: "Bot's ping:",
471-
value: client.ping
472+
value: `\`${client.ping}ms\``
472473
}
473474
],
474475
timestamp: new Date(),
@@ -976,7 +977,8 @@ request(botavatar, function (err, res, body) {
976977

977978
if (message.author.id == settings.botPREFIX || message.author.id == "153478211207036929")
978979
{
979-
message.channel.send(botsay);
980+
message.delete();
981+
message.channel.send(botsay);
980982
} else {
981983
message.delete();
982984
message.channel.send(`\`📛\` You don't have permissions to execute that command.`);
@@ -987,7 +989,6 @@ request(botavatar, function (err, res, body) {
987989
console.log(`${message.author.tag} used the ${settings.botPREFIX}translate command!`);
988990

989991
const translate = require('google-translate-api');
990-
const Discord = require('discord.js');
991992

992993
let toTrans = message.content.split(' ').slice(1);
993994
let language;
@@ -1026,6 +1027,63 @@ request(botavatar, function (err, res, body) {
10261027
});
10271028
break;
10281029

1030+
case "animepic":
1031+
console.log(`${message.author.tag} used the ${settings.botPREFIX}animepic command!`);
1032+
1033+
const animesf = require('snekfetch');
1034+
1035+
let res = await animesf.get('http://api.cutegirls.moe/json');
1036+
if (res.body.status !== 200) {
1037+
return message.channel.send('An error occurred while processing this command.');
1038+
}
1039+
let animepicembed = new Discord.RichEmbed()
1040+
.setColor('#f266f9')
1041+
.setTitle('Anime Picture')
1042+
.setImage(res.body.data.image);
1043+
1044+
message.channel.send(animepicembed);
1045+
break;
1046+
1047+
case "caps":
1048+
console.log(`${message.author.tag} used the ${settings.botPREFIX}caps command!`);
1049+
1050+
const sponge = require('spongeuscator');
1051+
1052+
if (message.content.split(' ').slice(1).join(' ').length < 4) {
1053+
return message.channel.send('Please give a message with more than 4 chars');
1054+
}
1055+
message.channel.send(sponge(message.content.split(' ').slice(1).join(' ')));
1056+
break;
1057+
1058+
case "advice":
1059+
console.log(`${message.author.tag} used the ${settings.botPREFIX}advice command!`);
1060+
1061+
const advicesf = require('snekfetch');
1062+
1063+
let r = await advicesf.get('http://api.adviceslip.com/advice');
1064+
1065+
let advice = JSON.parse(r.body).slip.advice;
1066+
1067+
message.channel.send({embed: {
1068+
color: 3447003,
1069+
author: {
1070+
name: client.user.username,
1071+
icon_url: client.user.avatarURL
1072+
},
1073+
fields: [{
1074+
name: "Advice:",
1075+
value: `\`${advice}\``
1076+
}
1077+
],
1078+
timestamp: new Date(),
1079+
footer: {
1080+
icon_url: client.user.avatarURL,
1081+
text: "© NotABot"
1082+
}
1083+
}
1084+
});
1085+
break;
1086+
10291087
// Help commands :)
10301088
case "help":
10311089
console.log(`${message.author.tag} used the ${settings.botPREFIX}help command!`);
@@ -1037,29 +1095,32 @@ request(botavatar, function (err, res, body) {
10371095
fields: [{
10381096
name: "Regular commands",
10391097
value: `**${settings.botPREFIX}help** - This message!\n\
1040-
**${settings.botPREFIX}modhelp** - Send the commands for mods.\n\
1041-
**${settings.botPREFIX}ownerhelp** - Sends the commands to the owner.\n\
1042-
**${settings.botPREFIX}bluehelp** - secret.\n\
1043-
**${settings.botPREFIX}ping** - The bot will reply you with PONG.\n\
1044-
**${settings.botPREFIX}botinfo** - Give you info about the bot.\n\
1045-
**${settings.botPREFIX}8ball** - Ask the bot a (yes/no) question.\n\
1046-
**${settings.botPREFIX}weather** - Send a place in the world... x_x\n\
1047-
**${settings.botPREFIX}invitebot** - The bot will reply with his invite URL.\n\
1048-
**${settings.botPREFIX}coinflip** - Flips a coin! (50/50)\n\
1049-
**${settings.botPREFIX}userinfo** - Mention someone to get information about him.\n\
1050-
**${settings.botPREFIX}avatar** - Mention someone to get his avatar.\n\
1051-
**${settings.botPREFIX}uptime** - See the bot's stats.\n\
1052-
**${settings.botPREFIX}serverinfo** - See a server stats.\n\
1053-
**${settings.botPREFIX}botservers** - See which server the bot is in.\n\
1054-
**${settings.botPREFIX}botping** - How much ping the bot has?\n\
1055-
**${settings.botPREFIX}quote** - Sends a quote by some smart guys.\n\
1056-
**${settings.botPREFIX}notice** - The bot will hug you.\n\
1057-
**${settings.botPREFIX}issue** - Report a bug and help this bot be more cool!\n\
1058-
**${settings.botPREFIX}request** - Request new features from \`Blue Malgeran#3106\`!\n\
1098+
**${settings.botPREFIX}modhelp** - Commands for admins and mods\n\
1099+
**${settings.botPREFIX}ownerhelp** - Owner's commands\n\
1100+
**${settings.botPREFIX}bluehelp** - secret\n\
1101+
**${settings.botPREFIX}ping** - ez reply\n\
1102+
**${settings.botPREFIX}botinfo** - Give you info about the bot\n\
1103+
**${settings.botPREFIX}8ball** - Ask the bot a (yes/no) question\n\
1104+
**${settings.botPREFIX}weather** - Send a place in the world\n\
1105+
**${settings.botPREFIX}invitebot** - Invite the bot\n\
1106+
**${settings.botPREFIX}coinflip** - Flips a coin!\n\
1107+
**${settings.botPREFIX}userinfo** - Mention user for info\n\
1108+
**${settings.botPREFIX}avatar** - Get user's avatar\n\
1109+
**${settings.botPREFIX}uptime** - See the bot's stats\n\
1110+
**${settings.botPREFIX}serverinfo** - See server stats\n\
1111+
**${settings.botPREFIX}botservers** - Bot's servers\n\
1112+
**${settings.botPREFIX}botping** - How much ms?\n\
1113+
**${settings.botPREFIX}quote** - Sends a quote by some smart guys\n\
1114+
**${settings.botPREFIX}notice** - The bot will hug you\n\
1115+
**${settings.botPREFIX}issue** - Report a bug\n\
1116+
**${settings.botPREFIX}request** - Request new features\n\
10591117
**${settings.botPREFIX}roll** - Rolls a random number!\n\
1060-
**${settings.botPREFIX}dick** - Sizing the dick of the user!\n\
1118+
**${settings.botPREFIX}dick** - Sizing the dick of the user\n\
10611119
**${settings.botPREFIX}dog** - Sends a picture of dog!\n\
1062-
**${settings.botPREFIX}translate** - Translates a text`
1120+
**${settings.botPREFIX}translate** - Translates a text\n\
1121+
**${settings.botPREFIX}animepic** - Sends a anime pic\n\
1122+
**${settings.botPREFIX}caps** - Random caps\n\
1123+
**${settings.botPREFIX}advice** - Gives you an advice`
10631124
}
10641125
],
10651126
timestamp: new Date(),

0 commit comments

Comments
 (0)