aboutsummaryrefslogtreecommitdiff
path: root/commands
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2022-12-21 21:15:52 -0500
committerAndrew Lee <alee14498@protonmail.com>2022-12-21 21:15:52 -0500
commitfd9d5776b84162449fb558696ee3a671f3f03f8c (patch)
tree67c4c86247d2f38562d6365f02e5c42a1ca5593a /commands
parentae562f8b06f8834cb3bc51be81568a018ad0bc7c (diff)
downloadshrimpbot-js-fd9d5776b84162449fb558696ee3a671f3f03f8c.tar.gz
shrimpbot-js-fd9d5776b84162449fb558696ee3a671f3f03f8c.tar.bz2
shrimpbot-js-fd9d5776b84162449fb558696ee3a671f3f03f8c.zip
Added more commandsHEADmaster
Diffstat (limited to 'commands')
-rw-r--r--commands/about.js10
-rw-r--r--commands/uptime.js25
-rw-r--r--commands/work.js14
3 files changed, 46 insertions, 3 deletions
diff --git a/commands/about.js b/commands/about.js
index a493288..c0efcfa 100644
--- a/commands/about.js
+++ b/commands/about.js
@@ -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] });
}
};
diff --git a/commands/uptime.js b/commands/uptime.js
new file mode 100644
index 0000000..1375401
--- /dev/null
+++ b/commands/uptime.js
@@ -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.` });
+ }
+};
diff --git a/commands/work.js b/commands/work.js
new file mode 100644
index 0000000..d069baf
--- /dev/null
+++ b/commands/work.js
@@ -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)]);
+ }
+};