Skip to content

Commit

Permalink
bit update
Browse files Browse the repository at this point in the history
  • Loading branch information
lajbel committed Mar 18, 2022
1 parent de4d183 commit 3186f82
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 7 deletions.
35 changes: 35 additions & 0 deletions deps.ts
Original file line number Diff line number Diff line change
@@ -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/[email protected]/mod.ts";

export type {
Bot,
CreateGlobalApplicationCommand,
DiscordenoInteraction,
DiscordenoMember,
DiscordenoMessage,
Embed,
GuildMember,
} from "https://deno.land/x/[email protected]/mod.ts";

export { config } from "https://deno.land/x/dotenv/mod.ts";

export type { DotenvConfig } from "https://deno.land/x/dotenv/mod.ts";
15 changes: 11 additions & 4 deletions src/commands/roles.ts
Original file line number Diff line number Diff line change
@@ -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 = {
Expand All @@ -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" },
},
],
},
Expand Down
2 changes: 0 additions & 2 deletions src/commands/tip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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] },
Expand Down
1 change: 0 additions & 1 deletion src/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,4 @@ readDir("src/buttons", async (file) => {
buttonsActions.set(button.name, button);
});

// start bot
startBot(bot);

0 comments on commit 3186f82

Please sign in to comment.