Create dm channel when sending message in dm channel

if there is no dm channel
This commit is contained in:
Wroclaw 2023-05-08 02:42:58 +02:00
parent 47e7c107c1
commit d2925a3aa9

View file

@ -68,6 +68,7 @@ export async function queueRequest(request: DiscordApi.Message | DiscordApi.Inte
if (userLimit !== false && userLimit.remaining <= 0) {
if (request instanceof DiscordApi.Message) {
request.react("🛑");
if (!request.author.dmChannel) await request.author.createDM();
request.author.dmChannel?.send({
embeds: [{
color: 0xff0000,