Can I do tree.command, but for special group of users? discord.py
I have a problem. I need to make slash commands that will be displayed only to the administration, while others will not see them. Is there such a possibility?
How to make a discord bot join my voice channel using interaction (slash commands) (Python)
@client.tree.command(name = “join”, description = “Makes the bot join your voice channel.”) async def join(interaction: discord.VoiceChannel): try: if interaction.guild.voice_client: channel = interaction.guild.voice_client.channel await channel.connect() await interaction.response.send_message(content = “I joined the voice channel!”) elif not interaction.message.author.voice: await interaction.response.send_message(content = “You have to join a voice channel to use this command!”) except: await interaction.response.send_message(content = “I’m already […]
How to Localize Button Labels in discord.py Based on User Locale or Guild Settings?
I am using discord.py
to build a Discord bot that includes interactive views with buttons. Each button performs specific actions related to message embed manipulation. I want to localize the button labels so they are displayed in the user’s locale or default to the guild’s locale. Below is a simplified version of my setup:
Discord slash commands with python and failing
I am setting up a discord.py file for a discord bot I have. Everything is going smooth so far, I got messages sending working, but not commands, I started setting it up, but now having issues. I have gone to several other posts, but to no avail.
Discord.py Bot regularly being rate limited
I’m very new to coding and, as my first “big” project, attempted to create a music bot in discord. I’m currently running into the issue that the bot regularly gets rate limited despite not being used by a lot of users (300 servers). I’m not sure what parts of my code I can change/optimize to make fewer API calls and still have all my functionalities remain the same. I’m hoping someone more experienced can give me a header here. Thanks!
NameError: name ‘r’ is not defined | It is defined, and It works in one function but not the other
I keep on getting the error “NameError: name ‘r’ is not defined”.Here is my code:
` import discord
from discord import app_commands
from discord.ext import commands
import nest_asyncio
How do I get my main discord python file to run other py files?
I am currently running a python API that runs my main.py discord bot file as a subprocess and I don’t really want to create another subprocess for each subsequent files that I add to my project. I am currently working on an Analytics.py file that I am running on the side with a test bot while my main bot continues to run, and I want to know how I can run my Analytics.py file in my main.py without creating another subprocess in my API.py.
How to remove duplicate slash commands (discord.py)
I’m relatively new to Discord.py, and I have a bot that seems to be experiencing a peculiar problem. Not too long after being started as a service on my remote Ubuntu server, the bot will begin duplicating certain commands (if not all of them), as seen in Discord’s slash command interface.
discord.errors.LoginFailure: Improper token has been passed
so I have a discord selfbot script, when I try to run it, I get an error like this.
Can’t figure out how to get react roles working with the example in discord.py
So I’m programming a bot for my dnd and lancer group with absolutely zero experience. I’m mostly stringing example code together and then making it work. I am currently stuck on trying to get the example code for reaction roles, seen in it’s entirety here