mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-04 18:00:08 +00:00
Fix beginner template (#2315)
* Fix beginner template * deno fmt * 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:
@@ -1,2 +1,2 @@
|
||||
BOT_TOKEN=
|
||||
DEV_GUILD_ID=
|
||||
BOT_TOKEN=''
|
||||
DEV_GUILD_ID=''
|
||||
@@ -8,6 +8,7 @@ import {
|
||||
enableCacheSweepers,
|
||||
enableHelpersPlugin,
|
||||
enablePermissionsPlugin,
|
||||
GatewayIntents,
|
||||
} from "./deps.ts";
|
||||
import { Command } from "./src/types/commands.ts";
|
||||
|
||||
@@ -15,7 +16,7 @@ import { Command } from "./src/types/commands.ts";
|
||||
const bot = createBot({
|
||||
token: configs.token,
|
||||
botId: configs.botId,
|
||||
intents: [],
|
||||
intents: GatewayIntents.Guilds,
|
||||
events: {},
|
||||
});
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { dotEnvConfig } from "./deps.ts";
|
||||
|
||||
// Get the .env file that the user should have created, and get the token
|
||||
const env = dotEnvConfig({ export: true });
|
||||
const env = dotEnvConfig({ export: true, path: "./.env.example" });
|
||||
const token = env.BOT_TOKEN || "";
|
||||
|
||||
export interface Config {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export * from "https://deno.land/x/discordeno@13.0.0-rc31/mod.ts";
|
||||
export * from "https://deno.land/x/discordeno@13.0.0-rc31/plugins/mod.ts";
|
||||
export * from "https://deno.land/x/discordeno@13.0.0-rc45/mod.ts";
|
||||
export * from "https://deno.land/x/discordeno@13.0.0-rc45/plugins/mod.ts";
|
||||
|
||||
// Terminal Colors!
|
||||
export * from "https://deno.land/std@0.117.0/fmt/colors.ts";
|
||||
|
||||
@@ -2,9 +2,9 @@ import { Bot } from "../../bot.ts";
|
||||
import log from "../utils/logger.ts";
|
||||
|
||||
Bot.events.ready = (_, payload) => {
|
||||
log.info(`[READY] Shard ID ${payload.shardId} of ${Bot.gateway.maxShards} shards is ready!`);
|
||||
log.info(`[READY] Shard ID ${payload.shardId} of ${Bot.gateway.lastShardId} shards is ready!`);
|
||||
|
||||
if (payload.shardId + 1 === Bot.gateway.maxShards) {
|
||||
if (payload.shardId === Bot.gateway.lastShardId) {
|
||||
botFullyReady();
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user