I'm using Discord.js V14 and I can't find a way to get the channel description. I already have the channel, I just need to get the description for a channel info command.
You can use .topic for this. For more information, see https://discord.js.org/#/docs/discord.js/main/class/TextChannel?scrollTo=topic
Related
I've looked all over and I can't find a solution.
I'm using discord js using non-slash commands.
How could I make it so you have a message from the bot and if someone types in the channel the bot's message will get deleted and resent
I want to do this in a sense of a server request channel so you need to add the channel you want the command to run and what you want it to say:
e.g:
Stickied Message
Name:
Request Needed:
Approved By:
how could I program that? Thanks :) <3
I ahve googled online and can't see anything relating to this topic - maybe I'm not searching the right things?
Tried Discord.js V13 | Sticky Message but did not work
I'm using Discord.js to write a bot with a number of helpful commands, however I can't seem to find anywhere on either Discord's API docs or Discord.js' docs that lists an example of the json structure for a slash command's role and channel options. I have the commands registering properly, but don't know what sort of data those interactions give me.
TL;DR: what data is returned when I call the following:
interaction.options.getChannel("channelOptionName")
//and
interaction.options.getRole("roleOptionName")
I'm not able to run any code in any reasonable amount of time, so I'm not able to just console.log it and go from there.
Thanks in advance!
I'm trying to have my bot simply send a slash command to a specific discord channel. The command would be read by another bot and executed as needed. Is this possible? I'm using discord.net. I have my bot sending plain text messages to the channel with the code below.
await ((ISocketMessageChannel)_client.GetChannel(channelId)).SendMessageAsync("Just Text Here", false, eb.Build());
I'm trying to send the command below. The bot that should respond is noted here. (https://www.alphabotsystem.com/guide/charting).
/c aapl 3m macd mfi
I checked the documentation + newest version methods and I'm afraid there is no such functionality.
In addition developers very often secure their bots by adding a condition which ignores executing commands from Webhooks and Bots.
I like using webhooks, and I think they work amazing, but what I can't figure out is giving a webhook a certain name for just one message.
You can do it by setting username in the JSON you send to Discord. The full documentation is available here: https://discord.com/developers/docs/resources/webhook#execute-webhook-jsonform-params
I would like to display via command how many voice channels my bot is currently in, is this possible? Maybe also with extra things like the server ID/channel ID. This is not needed though, just the command and the amount would be good.
I already found a method for js but not for Discord.py.
You can use the Bot.voice_clients attribute
voice_states = bot.voice_clients # or client, however you named your instance
await ctx.send(f'I am currently in {len(voice_states)} voice channels')