mirror of
https://github.com/alee14-projects/shrimpbot-js
synced 2025-01-22 08:11:54 -05:00
Added more commands
This commit is contained in:
parent
ae562f8b06
commit
fd9d5776b8
3 changed files with 46 additions and 3 deletions
|
@ -1,4 +1,5 @@
|
|||
import { SlashCommandBuilder, EmbedBuilder } from 'discord.js';
|
||||
import { SlashCommandBuilder, EmbedBuilder, version } from 'discord.js';
|
||||
import { release, platform } from 'node:os'
|
||||
|
||||
export default {
|
||||
data: new SlashCommandBuilder()
|
||||
|
@ -6,11 +7,14 @@ export default {
|
|||
.setDescription('Gets information about Shrimpbot'),
|
||||
async execute(interaction, bot) {
|
||||
const aboutEmbed = new EmbedBuilder()
|
||||
.setImage('https://cdn.discordapp.com/attachments/344244531274711042/1055302911980220436/Banner_18.png')
|
||||
.addFields(
|
||||
{ name: 'ShrimpBot 18.2022.12.21 (NO ROYCE\'S ANIME FANTASY EDITION)', value: 'by Alee (JS Edition), Squid Grill (C# Edition) (and open source contributors)' },
|
||||
{ name: 'Hosting', value: 'Placeholder' },
|
||||
{ name:'Links', value:'Insert links' }
|
||||
{ name: 'Hosting', value: `Node.JS ${process.version}\nDiscord.JS ${version}\n${platform().charAt(0).toUpperCase() + platform().slice(1)} ${release()}` },
|
||||
{ name:'Links', value:'Official ShrimpBot Discord Server: https://discord.gg/fuJ6J4s\nGitHub Repository: https://github.com/Alee14/shrimpbot-js' }
|
||||
)
|
||||
.setFooter({ text: 'Thank you for using ShrimpBot! ❤' })
|
||||
.setColor('#338BC1')
|
||||
return await interaction.reply({ embeds: [aboutEmbed] });
|
||||
}
|
||||
};
|
||||
|
|
25
commands/uptime.js
Normal file
25
commands/uptime.js
Normal file
|
@ -0,0 +1,25 @@
|
|||
import { SlashCommandBuilder } from 'discord.js';
|
||||
|
||||
export default {
|
||||
data: new SlashCommandBuilder()
|
||||
.setName('uptime')
|
||||
.setDescription('Shows how long Shrimpbot has been up'),
|
||||
async execute(interaction, bot) {
|
||||
let uptime = parseInt(bot.uptime);
|
||||
uptime = Math.floor(uptime / 1000);
|
||||
let uptimeMinutes = Math.floor(uptime / 60);
|
||||
const minutes = uptime % 60;
|
||||
let hours = 0;
|
||||
let days = 0;
|
||||
while (uptimeMinutes >= 60) {
|
||||
hours++;
|
||||
uptimeMinutes = uptimeMinutes - 60;
|
||||
}
|
||||
while (hours >= 24) {
|
||||
days++;
|
||||
hours = hours - 24;
|
||||
}
|
||||
const uptimeSeconds = minutes % 60;
|
||||
return await interaction.reply({ content: `:clock3: ShrimpBot has been up for ${days} days, ${hours} hours, ${uptimeMinutes} minutes, and ${uptimeSeconds} seconds.` });
|
||||
}
|
||||
};
|
14
commands/work.js
Normal file
14
commands/work.js
Normal file
|
@ -0,0 +1,14 @@
|
|||
import { SlashCommandBuilder } from 'discord.js';
|
||||
|
||||
export default {
|
||||
data: new SlashCommandBuilder()
|
||||
.setName('work')
|
||||
.setDescription('Work for Squid Grill to get some money.'),
|
||||
async execute(interaction, bot) {
|
||||
const squidJobs = [
|
||||
'You helped crackdown a child trafficking operation at Okaerinasaimase Goshunjinsama!, and got {insert number} dollars!',
|
||||
'You made a virus for FMP and got {insert number} dollars!'
|
||||
];
|
||||
return await interaction.reply(squidJobs[Math.floor(Math.random() * squidJobs.length)]);
|
||||
}
|
||||
};
|
Loading…
Reference in a new issue