Skip to content

Commit

Permalink
2.1 PRODUCTION
Browse files Browse the repository at this point in the history
CHANGELOG:
 - Updated slash commands categories.
 - Added donate command
  • Loading branch information
kankajm committed Jul 20, 2021
1 parent f5b0623 commit 9d241d7
Show file tree
Hide file tree
Showing 11 changed files with 44 additions and 4 deletions.
4 changes: 2 additions & 2 deletions config.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"prefix": ".corona",
"version": "2.0 PRODUCTION",
"version": "2.1 PRODUCTION",
"inviteLink": "https://corona-bot.eu/invite",
"APILink": "https://corona.lmao.ninja/",
"embedColor": "#FF6347",
"coronaLogo": "https://ourghtfu.sirv.com/Images/coronabot2.png",
"lastUpdate": "31.6.2021"
"lastUpdate": "20.7.2021"
}
1 change: 1 addition & 0 deletions src/commands/authors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const { embedColor } = require('../../config.json');
module.exports = {
slash: true,
testOnly: false,
category: 'Misc',
description: "Shows authors of the bot!",
callback: async ({}) => {
const embedAuthors = new MessageEmbed()
Expand Down
1 change: 1 addition & 0 deletions src/commands/country.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const { formatNumber } = require('../core/numberFormat');
module.exports = {
slash: true,
testOnly: false,
category: 'Fun',
description: 'Shows COVID-19 statistics about desired country!',
minArgs: 1,
expectedArgs: '<name>',
Expand Down
1 change: 1 addition & 0 deletions src/commands/debug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ function apiStatusFormatter(statusCode: number) {
module.exports = {
slash: true,
testOnly: false,
category: 'Misc',
description: "Debug informations.",
callback: async ({}) => {
const apiStatusFormatted: string = apiStatusFormatter(await APIStatusCode());
Expand Down
18 changes: 18 additions & 0 deletions src/commands/donate.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
const { MessageEmbed } = require('discord.js');
const { embedColor } = require('../../config.json');

module.exports = {
slash: true,
testOnly: false,
category: 'Misc',
description: "If you want to support bot financially.",
callback: async ({}) => {
const donationEmbed = new MessageEmbed()
.setColor(embedColor)
.setTitle('CoronaBot Donation:')
.addFields(
{ name: "If you want to support our development and server cost you can use this donation link. Thank you very much if you do <3", value: "https://ko-fi.com/kankaj" }
)
return donationEmbed;
}
}
4 changes: 3 additions & 1 deletion src/commands/help.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const { embedColor } = require('../../config.json');
module.exports = {
slash: true,
testOnly: false,
category: 'Help',
description: "All the important commands for the bot!",
callback: async ({ }) => {
const embedHelp = new MessageEmbed()
Expand All @@ -16,7 +17,8 @@ module.exports = {
{ name: 'Shows link to invite bot on your server:', value: '/invite', inline: false },
{ name: 'Shows number of servers we are on:', value: '/servers', inline: false },
{ name: 'Shows debug info:', value: '/debug', inline: false },
{ name: 'Shows authors of the bot:', value: '/authors', inline: false }
{ name: 'Shows authors of the bot:', value: '/authors', inline: false },
{ name: 'If you want to support bot financially:', value: '/donate', inline: false }
)
.setFooter('In case of any problem please contact me ([email protected] or kankaj#2731)', 'https://ourghtfu.sirv.com/Images/czechIcon.png');
return embedHelp;
Expand Down
1 change: 1 addition & 0 deletions src/commands/info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const { covidInfo } = require('../core/covidInfo');
module.exports = {
slash: true,
testOnly: false,
category: 'Fun',
description: "Shows info about COVID-19 and it's symptoms!",
callback: async ({}) => {
const infoEmbed = new MessageEmbed()
Expand Down
1 change: 1 addition & 0 deletions src/commands/invite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const { formatNumber } = require('../core/numberFormat');
module.exports = {
slash: true,
testOnly: false,
category: 'Misc',
description: 'Invite this bot on your server!',
callback: ({}) => {
const inviteEmbed = new MessageEmbed()
Expand Down
1 change: 1 addition & 0 deletions src/commands/servers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const { embedColor, inviteLink } = require('../../config.json');
module.exports = {
slash: true,
testOnly: false,
category: 'Misc',
description: "Shows number of servers are we on!",
callback: ({ client }) => {
const embedServers = new MessageEmbed()
Expand Down
1 change: 1 addition & 0 deletions src/commands/world.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const { formatNumber } = require('../core/numberFormat');
module.exports = {
slash: true,
testOnly: false,
category: 'Fun',
description: 'Shows COVID-19 statistics about the whole world!',
callback: async ({}) => {
const data = await getDataOfWorld();
Expand Down
15 changes: 14 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,20 @@ client.on('ready', () => {
ignoreBots: true,
testServers: [testGuildId],
showWarns: false,
})
}).setCategorySettings([
{
name: 'Fun',
emoji: ':joy:'
},
{
name: 'Help',
emoji: ':helmet_with_cross:'
},
{
name: 'Misc',
emoji: ':ninja:'
}
]);
})

// Listens for legacy commands and redirect user to slash commands.
Expand Down

0 comments on commit 9d241d7

Please sign in to comment.