diff --git a/template/minimal/deps.ts b/template/minimal/deps.ts index 59aab469a..66cb20eaa 100644 --- a/template/minimal/deps.ts +++ b/template/minimal/deps.ts @@ -1,5 +1,4 @@ -export * from "https://deno.land/x/discordeno@13.0.0-rc12/mod.ts"; -export * from "https://deno.land/x/discordeno_cache_plugin@0.0.14/mod.ts"; -export * from "https://deno.land/x/discordeno_fileloader_plugin@v1.0.1/mod.ts"; +export * from "https://deno.land/x/discordeno@13.0.0-rc27/mod.ts"; +export * from "https://deno.land/x/discordeno@13.0.0-rc27/plugins/mod.ts"; export { config as dotEnvConfig } from "https://deno.land/x/dotenv@v3.1.0/mod.ts"; export * from "https://deno.land/std@0.117.0/fmt/colors.ts"; diff --git a/template/minimal/src/commands/mod.ts b/template/minimal/src/commands/mod.ts index 678d171cb..19c730924 100644 --- a/template/minimal/src/commands/mod.ts +++ b/template/minimal/src/commands/mod.ts @@ -3,7 +3,7 @@ import { ApplicationCommandTypes, Bot, Collection, - DiscordenoInteraction, + Interaction, } from "../../deps.ts"; export type subCommand = Omit; @@ -19,7 +19,7 @@ export interface Command { type: ApplicationCommandTypes; /** Defaults to `Guild` */ scope?: "Global" | "Guild"; - execute: (bot: Bot, interaction: DiscordenoInteraction) => unknown; + execute: (bot: Bot, interaction: Interaction) => unknown; subcommands?: Array; } diff --git a/template/minimal/src/events/interactionCreate.ts b/template/minimal/src/events/interactionCreate.ts index 502868f7b..18ad267e2 100644 --- a/template/minimal/src/events/interactionCreate.ts +++ b/template/minimal/src/events/interactionCreate.ts @@ -4,7 +4,7 @@ import { bgYellow, black, BotWithCache, - DiscordenoGuild, + Guild, green, red, white, @@ -22,7 +22,7 @@ events.interactionCreate = async (rawBot, interaction) => { if (interaction.data && interaction.id) { let guildName = "Direct Message"; - let guild = {} as DiscordenoGuild; + let guild = {} as Guild; // Set guild, if there was an error getting the guild, then just say it was a DM. (What else are we going to do?) if (interaction.guildId) { diff --git a/template/minimal/src/utils/helpers.ts b/template/minimal/src/utils/helpers.ts index b0936c0c7..633e35942 100644 --- a/template/minimal/src/utils/helpers.ts +++ b/template/minimal/src/utils/helpers.ts @@ -1,8 +1,8 @@ import { Bot, BotWithCache, - DiscordenoGuild, - EditGlobalApplicationCommand, + Guild, + CreateApplicationCommand, getGuild, MakeRequired, upsertApplicationCommands, @@ -18,8 +18,8 @@ export async function updateCommands( bot: BotWithCache, scope?: "Guild" | "Global", ) { - const globalCommands: MakeRequired[] = []; - const perGuildCommands: MakeRequired[] = []; + const globalCommands: MakeRequired[] = []; + const perGuildCommands: MakeRequired[] = []; for (const command of commands.values()) { if (command.scope) { @@ -65,8 +65,8 @@ export async function updateCommands( } /** Update commands for a guild */ -export async function updateGuildCommands(bot: Bot, guild: DiscordenoGuild) { - const perGuildCommands: MakeRequired[] = []; +export async function updateGuildCommands(bot: Bot, guild: Guild) { + const perGuildCommands: MakeRequired[] = []; for (const command of commands.values()) { if (command.scope) { @@ -89,12 +89,12 @@ export async function updateGuildCommands(bot: Bot, guild: DiscordenoGuild) { export async function getGuildFromId( bot: BotWithCache, guildId: bigint, -): Promise { - let returnValue: DiscordenoGuild = {} as DiscordenoGuild; +): Promise { + let returnValue: Guild = {} as Guild; if (guildId !== 0n) { if (bot.guilds.get(guildId)) { - returnValue = bot.guilds.get(guildId) as DiscordenoGuild; + returnValue = bot.guilds.get(guildId) as Guild; } await getGuild(bot, guildId).then((guild) => {