IH8MTG
IH8MTG
DIAdiscord.js - Imagine an app
Created by IH8MTG on 7/24/2024 in #djs-questions
using only id to send DM
hey guys, quick question. to avoid api calls, I plan on saving a user's id to my database, then when I need to DM them:
const { Client, GatewayIntentBits, REST, Routes, WebhookClient, User,} = require('discord.js');
const user = new User(discordClient,{id:database_id})
user.send(message)
const { Client, GatewayIntentBits, REST, Routes, WebhookClient, User,} = require('discord.js');
const user = new User(discordClient,{id:database_id})
user.send(message)
it *seems * to work for the few users I've tried. but I have a feeling there are crucial downsides to it (all the other fields in user are null for example). anyone know more about this?
8 replies