-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RELEASE] - v2.0.0
- Loading branch information
Showing
30 changed files
with
399 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
node_modules | ||
db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,6 @@ jspm_packages/ | |
|
||
# Config | ||
.env | ||
db | ||
|
||
# IDE | ||
.vscode | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,4 @@ RUN npm install --production | |
|
||
COPY . . | ||
|
||
RUN mkdir db | ||
|
||
ENTRYPOINT [ "npm", "start" ] | ||
ENTRYPOINT [ "npm", "start" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { MessageEmbed } from 'discord.js' | ||
|
||
export default { | ||
command: 'help', | ||
help: { | ||
name: 'Help', | ||
description: 'Display the help menu', | ||
}, | ||
|
||
run: async (client, message) => { | ||
message.delete() | ||
let embed = await new MessageEmbed() | ||
.setColor(client.config.colors.primary) | ||
.setFooter(`Requested by ${message.author.username}`, message.author.avatarURL({ dynamic: true })) | ||
.addField('\u200b', '📍 **INFORMATIONS**', false) | ||
.addField('Support', 'https://discord.gg/nEDcagb', true) | ||
.addField('Source code', 'https://github.com/LucasCtrl/SpookyBot', true) | ||
.addField('🤖 Bot version', '2.0.0', false) | ||
.addField('\u200b', '📍 **COMMANDS LIST**', false) | ||
|
||
client.commands.forEach((c) => { | ||
if (c.help) { | ||
embed.addField(c.help.name, `${c.help.description}\n**Usage: **${client.config.prefix}${c.command}`, false) | ||
} | ||
}) | ||
|
||
message.author.send({ embeds: [embed] }) | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { MessageEmbed } from 'discord.js' | ||
|
||
export default { | ||
command: 'invite', | ||
help: { | ||
name: 'Invite', | ||
description: 'Get an invitation link to invite the bot on your server', | ||
}, | ||
|
||
run: async (client, message) => { | ||
const embed = new MessageEmbed() | ||
.setColor(client.config.colors.primary) | ||
.setAuthor('Invitation link', client.user.avatarURL()) | ||
.setDescription( | ||
'You can click on the following link to add the bot on your server: [https://discord.com/oauth2/authorize?client_id=761568927188123669&scope=bot&permissions=380108139840](https://discord.com/oauth2/authorize?client_id=761568927188123669&scope=bot&permissions=380108139840)' | ||
) | ||
|
||
message.channel.send({ embeds: [embed] }) | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,21 @@ | ||
import { MessageEmbed } from 'discord.js' | ||
|
||
export default { | ||
config: { | ||
command: 'ping', | ||
aliases: ['test'], | ||
}, | ||
command: 'ping', | ||
|
||
run: async (client, message) => { | ||
message.reply('Pong') | ||
const beforePing = new MessageEmbed().setColor(client.config.colors.primary).setDescription('Pinging...') | ||
|
||
message.channel.send({ embeds: [beforePing] }).then((m) => { | ||
let ping = m.createdTimestamp - message.createdTimestamp | ||
|
||
const afterPing = new MessageEmbed() | ||
.setColor(client.config.colors.primary) | ||
.setDescription( | ||
`Pong! :ping_pong:\nBot Latency: \`${ping}ms\`, API Latency: \`${Math.round(client.ws.ping)}ms\`` | ||
) | ||
|
||
m.edit({ embeds: [afterPing] }) | ||
}) | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { MessageEmbed } from 'discord.js' | ||
|
||
export default { | ||
command: 'stats', | ||
help: { | ||
name: 'Stats', | ||
description: 'Give you some statistics about the bot', | ||
}, | ||
|
||
run: async (client, message) => { | ||
const memoryStats = process.memoryUsage() | ||
const embed = new MessageEmbed() | ||
.setColor(client.config.colors.primary) | ||
.setAuthor(`Stats - ${client.user.username}`, client.user.avatarURL({ dynamic: true })) | ||
.addField('Number of servers ¬', client.guilds.cache.size.toLocaleString(), true) | ||
.addField( | ||
'Number of users ¬', | ||
client.guilds.cache.reduce((mem, g) => (mem += g.memberCount), 0).toLocaleString(), | ||
true | ||
) | ||
.addField('Number of emojis ¬', client.emojis.cache.size.toLocaleString(), true) | ||
.addField('Number of channels ¬', client.channels.cache.size.toLocaleString(), true) | ||
.addField('Memory usage ¬', `${Math.ceil(memoryStats.heapUsed / 1048576)} Mo`, true) | ||
.setFooter(`Requested by ${message.author.username}`, message.author.avatarURL({ dynamic: true })) | ||
|
||
message.channel.send({ embeds: [embed] }) | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { MessageEmbed } from 'discord.js' | ||
|
||
export default { | ||
command: 'support', | ||
help: { | ||
name: 'Support', | ||
description: 'Get the invitation link to join the support server', | ||
}, | ||
|
||
run: async (client, message) => { | ||
const embed = new MessageEmbed() | ||
.setColor(client.config.colors.primary) | ||
.setAuthor('Support server', client.user.avatarURL()) | ||
.setDescription( | ||
'You can click on the following link to join the support server: [https://discord.gg/nEDcagb](https://discord.gg/nEDcagb)' | ||
) | ||
|
||
message.channel.send({ embeds: [embed] }) | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { MessageEmbed } from 'discord.js' | ||
|
||
export default { | ||
command: 'vote', | ||
aliases: ['upvote'], | ||
help: { | ||
name: 'Vote', | ||
description: 'Vote for the bot', | ||
}, | ||
|
||
run: async (client, message) => { | ||
const embed = new MessageEmbed() | ||
.setColor(client.config.colors.primary) | ||
.setAuthor('Support server', client.user.avatarURL()) | ||
.setDescription( | ||
'You can vote for the bot by clicking on the following link: [https://discordbotlist.com/bots/spookybot/upvote](https://discordbotlist.com/bots/spookybot/upvote)' | ||
) | ||
|
||
message.channel.send({ embeds: [embed] }) | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"prefix": "!", | ||
"prefix": "boo!", | ||
"colors": { | ||
"primary": "#FF6403", | ||
"success": "#2ECC71", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import dotenv from 'dotenv' | ||
import mongoose from 'mongoose' | ||
|
||
dotenv.config() | ||
|
||
const uri = `mongodb+srv://${process.env.MONGODB_USERNAME}:${process.env.MONGODB_PASSWORD}@${process.env.MONGODB_URL}/${process.env.MONGODB_DEFAULT_DB}?retryWrites=true&w=majority` | ||
|
||
mongoose.connect(uri, { useNewUrlParser: true, useUnifiedTopology: true }) | ||
|
||
const dbConnection = mongoose.connection | ||
dbConnection.on('error', (err) => console.log(`Connection error: ${err}`)) | ||
dbConnection.once('open', () => console.log('Connected to DB!')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ version: '3' | |
|
||
services: | ||
bot: | ||
build: . | ||
build: . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.