Update minimal template (#2314)

* Outdate template

* don't use `.env.example`

* deno fmt

Co-authored-by: meister03 <meisterpi@gmail.com>
Co-authored-by: LTS20050703 <87189679+lts20050703@users.noreply.github.com>
Co-authored-by: LTS20050703 <lts20050703@gmail.com>
This commit is contained in:
meister03
2022-08-23 10:30:19 -04:00
committed by GitHub
co-authored by meister03 LTS20050703 LTS20050703
parent 34d7a47f24
commit 0fb4e1f398
6 changed files with 76 additions and 65 deletions
+4 -4
View File
@@ -51,7 +51,7 @@ export async function updateCommands(
if (globalCommands.length && (scope === "Global" || scope === undefined)) {
log.info(
"Updating Global Commands, this takes up to 1 hour to take effect...",
"Updating Global Commands, changes should apply in short...",
);
await bot.helpers.upsertApplicationCommands(globalCommands).catch(
log.error,
@@ -59,7 +59,7 @@ export async function updateCommands(
}
if (perGuildCommands.length && (scope === "Guild" || scope === undefined)) {
await bot.guilds.forEach(async (guild) => {
await bot.guilds.forEach(async (guild: Guild) => {
await upsertApplicationCommands(bot, perGuildCommands, guild.id);
});
}
@@ -99,8 +99,8 @@ export async function getGuildFromId(
}
await getGuild(bot, guildId).then((guild) => {
bot.guilds.set(guildId, guild);
returnValue = guild;
if (guild) bot.guilds.set(guildId, guild);
if (guild) returnValue = guild;
});
}