-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
134 additions
and
287 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
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,20 +1,21 @@ | ||
import { SlashCommandBuilder } from "discord.js"; | ||
import { Command, deploy } from "../lib/command"; | ||
import { Embeds } from "../lib/utils/embeds"; | ||
import { COMMANDS } from "."; | ||
import commands from "."; | ||
|
||
const MY_SNOWFLAKE = "140520164629151744"; | ||
|
||
export const Deploy: Command = { | ||
data: new SlashCommandBuilder() | ||
.setName('deploy') | ||
.setDescription('Deploys slash commands for the bot.'), | ||
execute: async (client, interaction) => { | ||
execute: async (_, interaction) => { | ||
if (interaction.user.id === MY_SNOWFLAKE) { | ||
deploy(); | ||
await Embeds.send(interaction, embed => embed | ||
await Embeds.create() | ||
.setTitle("Deployed commands") | ||
.setDescription(`${COMMANDS.length} commands have been deployed.`)); | ||
.setDescription(`${commands.length} commands have been deployed.`) | ||
.send(interaction); | ||
} else await Embeds.error(interaction, "You do not have permission to execute this command!"); | ||
}, | ||
} |
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,16 +1,17 @@ | ||
import { SlashCommandBuilder } from "discord.js"; | ||
import { Command } from "../lib/command"; | ||
import { Embeds } from "../lib/utils/embeds"; | ||
import { COMMANDS } from "."; | ||
import commands from "."; | ||
|
||
export const Help: Command = { | ||
data: new SlashCommandBuilder() | ||
.setName('help') | ||
.setDescription('Lists all the available commands.'), | ||
execute: async (client, interaction) => { | ||
await Embeds.send(interaction, embed => embed | ||
await Embeds.create() | ||
.setTitle("Help") | ||
.setDescription(`There's a lot I can do for you. Here is a list of the avaliable commands:`) | ||
.addFields(COMMANDS.map(command => ({ name: `/${command.data.name}`, value: command.data.description, inline: true })))); | ||
.addFields(commands.map(command => ({ name: `/${command.data.name}`, value: command.data.description, inline: true }))) | ||
.send(interaction); | ||
}, | ||
} |
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.
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
Oops, something went wrong.