How would I lock a command behind a specific role?
I want to make a command that only a specific role can run.
Can i fetch every message from a channel?
Hello, i'm trying to make a bot that sends a random cat photo from the cat photos channel, but i don't know how i can get every message on the channel.
Get the date of a user joining discord
Is there a way to use the Discord API to get the date when a user joined discord (not a guild) or does discord not give out that infommation. I was unable to find any traces
Shard Error
Not enough sessions remaining to spawn 1 shards only 0 remaining; resets at 2024-09-29T08:20:23.377Z
How do I make a Message Context Action
Currently I have:
```js
const logSearchContextMenu = new ContextMenuCommandBuilder()
.setName('Get Time')...
Message Collector help
Hey all,
Im having some issues with message collectors in DM's.. i cant get the bot to actually collect anything at all when the user replies to the bot's dm?
is it a code error or something else?
...
Permissions
is there a way to know what permissions my bot has in a specific channel? (ignoring the role permissions he has when we got to the guild)
because when I use
interaction.channel.permissionsFor(interaction.guild.members.me)
returns the combined permissions he has in role perspective and channel...I get an error saying ReferenceError: GatewaysIntentBits is not defined and I don't know how to fix
const { Client, GatewayIntentBits, Partials } = require('discord.js');
console.log("Running");
const client = new Client({...
Attachment won't send
Hello everyone, again, so this time i encountered an issue where when i take attachment as an option I cannot output it.
Code:
``const { SlashCommandBuilder, EmbedBuilder } = require(
discord.js`);
module.exports = {...How do I run code
I haven't done discord.js in a while and I forgot how to run the code 😭
Any help would be appriciated...
guildAuditLogEntryCreate
```ts
client.on("guildAuditLogEntryCreate", async (log, guild) => {
if(log.action === AuditLogEvent.ChannelCreate) {
console.log(log.target?.id); // error
}...
emoji
heya, its possible to add emoji into a embed for example:
:neteller: Neteller\n:payeer: Payeer\n🪙 Pesos Mexicanos\n💳 Gift Card```'...
{
name: ':credit_card: Payment Methods',
value: '
{
name: ':credit_card: Payment Methods',
value: '
ClientUser.setActivity
Hello everybody!
I'm trying to implement in my project the feature that allows the user to show a presence on Discord just using their authentication token. For it I'm using the modified Discord.js script provided at https://github.com/seia-soto/chrome-discord-presence.
My question is how can I use https://discord.js.org/docs/packages/discord.js/14.16.2/ClientUser:Class#setActivity to show a presence as customized as https://github.com/pandasoli/nekovim/raw/master/docs/final-preview.gif ? The documentation of
ClientUser.setActivity
doesn't say anything about changing the images....How do I prevent this if you press a button several times that it makes the error below?
```Error retrieving command list: DiscordAPIError[10062]: Unknown interaction
at handleErrors (/home/container/node_modules/@discordjs/rest/src/lib/handlers/Shared.ts:148:10)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at async BurstHandler.runRequest (/home/container/node_modules/@discordjs/rest/src/lib/handlers/BurstHandler.ts:144:20)
at async _REST.request (/home/container/node_modules/@discordjs/rest/src/lib/REST.ts:210:20)...
how to add bot for car registration
bot for car registration
Accessing Connections
Is it possible to get a users connections, for exmaple their steam connection to be able to verify their steam account owns a game or something similar? Even if it's just getting their steam username?
using discord oauth
so atm i have a website, and a discord server with a bot. id like to allow a user to authenticate on the website with their discord account. if my understanding is right i need a bot to do this. can i use my current bot or is it a good idea to seperate authentication to a seperate bot?
My Discord activities just gives me a White Screen
I tried uninstalling and reinstalling the discord and a continue to get the same error.
I'm getting this problem both in my Ubuntu (24.04.1) and Windows 11...
Guild User Profile URL
From what I understand you can’t ping a user they don’t have access to, so my thought is to add an embedded link that points to their guild profile. Is there such a thing or is this not possible. If not, how do those large scale bots send embed messages containing user mentions to channels the mentioned user doesn’t have access to.