From 3186f828d2811c51bd4936088679068e0a558cbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=20B=C3=A1ez?= <71136486+lajbel@users.noreply.github.com> Date: Fri, 18 Mar 2022 12:21:20 +0000 Subject: [PATCH] bit update --- deps.ts | 35 +++++++++++++++++++++++++++++++++++ src/commands/roles.ts | 15 +++++++++++---- src/commands/tip.ts | 2 -- src/mod.ts | 1 - 4 files changed, 46 insertions(+), 7 deletions(-) create mode 100644 deps.ts diff --git a/deps.ts b/deps.ts new file mode 100644 index 0000000..61e5984 --- /dev/null +++ b/deps.ts @@ -0,0 +1,35 @@ +export { + ActivityTypes, + addRole, + ApplicationCommandOptionTypes, + ApplicationCommandTypes, + ButtonStyles, + channelOverwriteHasPermission, + createApplicationCommand, + createBot, + deleteMessage, + editBotStatus, + getMember, + getUser, + InteractionResponseTypes, + MessageComponentTypes, + OverwriteTypes, + removeRole, + sendInteractionResponse, + sendMessage, + startBot, +} from "https://deno.land/x/discordeno@13.0.0-rc11/mod.ts"; + +export type { + Bot, + CreateGlobalApplicationCommand, + DiscordenoInteraction, + DiscordenoMember, + DiscordenoMessage, + Embed, + GuildMember, +} from "https://deno.land/x/discordeno@13.0.0-rc11/mod.ts"; + +export { config } from "https://deno.land/x/dotenv/mod.ts"; + +export type { DotenvConfig } from "https://deno.land/x/dotenv/mod.ts"; diff --git a/src/commands/roles.ts b/src/commands/roles.ts index 6b42123..4411995 100644 --- a/src/commands/roles.ts +++ b/src/commands/roles.ts @@ -1,9 +1,16 @@ -import { Bot, ButtonStyles, DiscordenoInteraction, InteractionResponseTypes, MessageComponentTypes, sendInteractionResponse } from "../deps/discordeno.ts"; +import { + Bot, + ButtonStyles, + DiscordenoInteraction, + InteractionResponseTypes, + MessageComponentTypes, + sendInteractionResponse +} from "../../deps.ts"; export default () => { return { name: "roles", - description: "Get a role", + description: "Get a ka-role", options: [], exe: (bot: Bot, interaction: DiscordenoInteraction) => { const embed = { @@ -27,14 +34,14 @@ export default () => { label: "Helper", customId: "helper_button", style: ButtonStyles.Primary, - emoji: { id: "883793329647652934", name: "minimark" }, + emoji: { id: "884813519961342002", name: "kbmhearth" }, }, { type: MessageComponentTypes.Button, label: "Announcements", customId: "announcements_button", style: ButtonStyles.Primary, - emoji: { id: "884789264745897994", name: "cowmark" }, + emoji: { id: "14611006838284310", name: "kbm_pineapple" }, }, ], }, diff --git a/src/commands/tip.ts b/src/commands/tip.ts index 57005f9..c019311 100644 --- a/src/commands/tip.ts +++ b/src/commands/tip.ts @@ -25,8 +25,6 @@ export default () => { description: tip.t, }; - if (tip.img) embed.image = { url: tip.img }; - sendInteractionResponse(bot, interaction.id, interaction.token, { type: InteractionResponseTypes.ChannelMessageWithSource, data: { embeds: [embed] }, diff --git a/src/mod.ts b/src/mod.ts index 8e382c5..83cd181 100644 --- a/src/mod.ts +++ b/src/mod.ts @@ -57,5 +57,4 @@ readDir("src/buttons", async (file) => { buttonsActions.set(button.name, button); }); -// start bot startBot(bot);