Hi so I stole code from a bot but I changed it to code I made and the slash commands are stuck what do I do.
And I tried watching YouTube videos but no videos helped.
You can do client.application.commands.set([]) to delete all your commands, then restart your bot so that your commands are created.
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 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 am the owner of the discord server. My slash commands won't work but they'll work on the app on my phone.
Additionally, if I log out and log in with an alternate account and go to the server, the slash commands work in that instance too, which leads me to believe it's not a missing update.
Any thoughts?
I want my discord bot to send basic youtube embeds that appear automatically when a link from youtube is pasted on discord by a user.
I do know i need to install and use pytube for this.
Just need some direction on how to connect my bot to youtube.
(I'm new to discord.py)
For example i do !yt mango and the bot sends the top 3 results that come when searched for mango on youtube.
Please help me out
I want my discord bot to send basic youtube embeds that appear automatically when a link from youtube is pasted on discord by a user.
auto-embeds is a default functionality of Discord. When someone posts a link and you have auto-embeds enabled for the server you will be able to watch the YouTube video from the Discord client.
I do know i need to install and use pytube for this.
pytube is for downloading YouTube videos. You don't need to download the video. Thus pytube is not needed.
Just need some direction on how to connect my bot to youtube.
(I'm new to discord.py)
Familiarize yourself with discord.py first. Here is the manual:
https://discordpy.readthedocs.io/en/stable/api.html
Get a basic discord bot running before attempting anything more advanced.
For example i do !yt mango and the bot sends the top 3 results that come when searched for mango on youtube.
To be able to search on YouTube you need Google API. Refer to: https://developers.google.com/youtube/v3/quickstart/python
Here is a possible library you could use: https://pypi.org/project/python-youtube/
On StackOverflow we don't write code for you. We can only guide you in the direction but you have to write the actual code yourself or be more specific with your problem. Break your big problem into smaller tasks and solve those.
StackOverflow is more for debugging faulty code.
Discord have recently booted out a new feature allowing you to add commands to the server. Pressing "/" on pc will bring up a little tab of commands. There is a feature for your bot to add to the list.
Anyone know how to do this?
Currently discord.js does not support slash commands. Advaith1 on GitHub has a tutorial on a workaround that you can read here