Can't sent direct message
I wrote a slash command like this (you should get a DM to yourself when you run the command)
However, the following error occurs.
However, the following error occurs.
throw new Error("Expected token to be set for this request, but none was present");
^
Error: Expected token to be set for this request, but none was present{
data: new SlashCommandBuilder()
.setName('dmtest')
.setDescription('sent direct message'),
async execute(interaction) {
client.users
.fetch('626680496834871308')
.then((user) => {
user.send(`Hello`,);
});
},