fix: constant urls endpoints need to be functions

This commit is contained in:
Skillz4Killz
2022-03-25 19:23:44 +00:00
committed by GitHub
parent 18bf53ac6b
commit fbbac43053
12 changed files with 27 additions and 22 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ import { DiscordChannel } from "../../types/discord.ts";
export async function getDmChannel(bot: Bot, userId: bigint) {
if (userId === bot.id) throw new Error(bot.constants.Errors.YOU_CAN_NOT_DM_THE_BOT_ITSELF);
const dmChannelData = await bot.rest.runMethod<DiscordChannel>(bot.rest, "post", bot.constants.endpoints.USER_DM, {
const dmChannelData = await bot.rest.runMethod<DiscordChannel>(bot.rest, "post", bot.constants.endpoints.USER_DM(), {
recipient_id: userId.toString(),
});