diff --git a/debug.ts b/debug.ts index 5d9984a8b..8a31c825b 100644 --- a/debug.ts +++ b/debug.ts @@ -13,9 +13,6 @@ import { configs } from "./configs.ts"; import { Intents } from "./types/options.ts"; import { logYellow } from "./utils/logger.ts"; import { cache } from "./utils/cache.ts"; -import { editBotsStatus } from "./utils/utils.ts"; -import { StatusType } from "./types/discord.ts"; -import { ActivityType } from "./types/activity.ts"; Client({ token: configs.token, @@ -24,11 +21,6 @@ Client({ eventHandlers: { ready: () => { logYellow("Bot ready emitted"); - editBotsStatus( - StatusType.DoNotDisturb, - "Testing Name DND", - ActivityType.Listening, - ); }, // raw: (data) => logGreen("[RAW] => " + JSON.stringify(data)), messageCreate: async (message) => { diff --git a/structures/channel.ts b/structures/channel.ts index 17b160f79..57af15b34 100644 --- a/structures/channel.ts +++ b/structures/channel.ts @@ -21,13 +21,13 @@ import { Errors } from "../types/errors.ts"; import { RequestManager } from "../module/requestManager.ts"; import { logYellow } from "../utils/logger.ts"; -export function createChannel(data: ChannelCreatePayload) { +export function createChannel(data: ChannelCreatePayload, guildID?: string) { const channel = { ...data, /** The raw channel data */ raw: data, /** The guild id of the channel if it is a guild channel. */ - guildID: data.guild_id, + guildID: guildID || data.guild_id, /** The id of the last message sent in this channel */ lastMessageID: data.last_message_id, /** The amount of users allowed in this voice channel. */ diff --git a/structures/guild.ts b/structures/guild.ts index f3d98a927..11a6753f3 100644 --- a/structures/guild.ts +++ b/structures/guild.ts @@ -72,7 +72,7 @@ export const createGuild = (data: CreateGuildPayload) => { /** The users in this guild. */ members: new Map(), /** The channels in the guild */ - channels: new Map(data.channels.map((c) => [c.id, createChannel(c)])), + channels: new Map(data.channels.map((c) => [c.id, createChannel(c, data.id)])), /** The presences of all the users in the guild. */ presences: new Map(data.presences.map((p) => [p.user.id, p])), /** The total number of members in this guild. This value is updated as members leave and join the server. However, if you do not have the intent enabled to be able to listen to these events, then this will not be accurate. */