"ApplicationCommandType.User" is not assignable to parameter of type "ContextMenuCommandType"
I'm using discord.js with Typescript and I encounter the error
TS2345: Argument of type ApplicationCommandType.User is not assignable to parameter of type ContextMenuCommandType
But if I look in the type definition I can see type ContextMenuCommandType = ApplicationCommandType.Message | ApplicationCommandType.User;
Code...retrive user gaming activity history?
Hello, is there a way to retrive a user gaming activity history without building a DB?
I can get game from when 'User is now playing Game', but is there a way to get to see what he played in the past?
I suppose not, but it's worth asking.
Thanks...
using SlashCommandBuilder in Constructor
Hey im updating my old discord bot to v14 and used the slashcommand builder in a constructor after updaing it does not work anymore, can someone help me with that?
```ts
constructor() {
super(...
Track invite origin
Hello developers!
I am trying to set up a tracker for different invite sources for my bot but I keep getting a
Missing permissions
error.
The invite URL works fine for every use case.
...Roles Cache sometimes inconsistent
I got very simple code
...
const role = channel.guild.roles.cache.get(pingRoleId);
size = role?.members?.size
const role = channel.guild.roles.cache.get(pingRoleId);
size = role?.members?.size
A collector that collects messages from a predetermined channel
```js
const collectorFilter = m => m.content.includes('discord');
const collector = interaction.channel.createMessageCollector({ filter: collectorFilter, time: 15_000 });
collector.on('collect', m => {...
Thread fetchStarterMessage with Attachments
Working on a bot that detects when a thread is created in a particular forum, and then returns the first starter message (original post message created by OP). All works well with the code below, until an image is uploaded in which I get the error:
DiscordAPIError[10008]: Unknown Message
. Is there a way for me to get the image data (e.g. a link to it) when the message is created?
My guess is that the message is taking longer to generate since there is a attachment included. How can I resolve this? Thanks.
```js...More URL schemes on link buttons
https://github.com/discordjs/discord.js/blob/main/packages/builders/src/components/button/LinkButton.ts#L22-L29
I was hoping to make a url button for a magnet (
magnet:
) link, but got an error that lead me here.
Is the url scheme limitation server side? I don't see a reason to restrict it locally...How deploy slash commands only in one specific guild
I would like to register a slash commands only in one specific guild but not in the others in which my bot is. How can I do it
Bot not starting invalid token
Yesterday, I coded a bot and got it running. I tried adding it to Ghostbot to test something, but it didn’t work. This morning, I removed it from Ghostbot, but after hosting it with MongoDB, the bot went down.
Shard Variables
```
bot.once(Events.ShardReady, async () => {
imgchannel = bot.channels.cache.get(process.env.IMAGE_CHANNEL);
vidchannel = bot.channels.cache.get(process.env.VIDEO_CHANNEL);
module.exports.imgchannel = imgchannel;...
It doesnt work.
So I have a discord bot that always when someone deleting a message it could not find the deleter. can anyone help me?
the code: https://sourceb.in/DtistNYGW7...
Bot Preformance - Sending the same message to many servers
My bot sends he same message to many servers (nearly 1,600) at once.
The message includes:
- Embed
- Content (Role mentions)
- Attachment...
Website interaction for discord api
It's very frustrating to do this. I am trying to interact with Discord API with a website such as Google Sites or HTML. However, cors is blocking my interaction between the discord api for security purpose. I know a few solution to solve this but, it doesn't satisfy me because I don't have money for buying a dedicated server or even a local server.
* Own a Node.Js server as a back-end program for interacting discord API and acts for sending/requesting data for the Website.
* Requesting Website (Front-End) > Node.Js Server (Back-End) > Discord API > Some Backend from discord...
I am getting this error when the snippet is right.
Hello! I am making a bot, very complex handling system which works perfectly, until now... I have made a command and yet it doesn't work, check the error and snippets below.
```name: 'order',...
There was an error running this command: TypeError: interaction.options.getSubcommand is not a function.
There was an error running this command: TypeError: interaction.options.getSubcommand is not a function.
Quick question : Do I need to reconnect the SQL database / use a pool connection lib in js or no?
Hi, I was making my bot with Java and I was using Hikari, but I am learning JS now and I don't know if using pool connection lib in js or no. Is the connection to forever or must I use a pool connection lib?
[Moved]
It's as the title says. I've been trying to solve this problem for hours and I just don't understand it.