I want to fetch a data from another python file everytime i execute the other one
I know that whenever i use from my_file_contains_data.py import data_i_want
i can access the data i want and i can use it for ‘if’ statements.
but in ‘my_file_contains_data.py’ file, the ‘data_i_want’ is a variable that can changes.
and when the ‘data_i_want’ changes, it does not change in the main file i work, it always stays the same value in the beginning.
Why after renaming the TXT file to “valid_tokens.txt” the same error came up?
Traceback (most recent call last): File “c:UsersHomeDownloadssomeonespammer.py”, line 365, in <module> grupdelay[0] = 5 ~~~~~~~~~^^^ IndexError: list assignment index out of range PS C:UsersHome> I tried renaming the TXT file to “valid_tokens.txt” and it came up with the same error. python discord discord.py 1
How to sync slash command to Group Chat or User DM?
How to make my Discord Bot sync to Group Chat or User DM? There is a Discord Bot able to use the commands without inviting to Discord Server, and it works in Discord Group Chat and User DM’s. Is there a way to make my Slash Command sync to my own Group Chat?
I am coding a Discord bot with Python. The command is working, but after it executes, instead of sending the message to the server, it gives an error
I created a simple Discord bot. The ‘clear’ command works, but instead of saying ‘{len(deleted)} messages have been deleted.’, it shows a warning saying ‘The application did not respond.’Additionally, I’m receiving this error:
discord.py not registering hybrid commands with user install inside of cogs
discord.py doesn’t seem to register user install with a hybrid command inside of a cog. Only inside of a guild using a app command and prefixed command.
something is blocking the streaming print command – it appears when I end the bot
I am developing a Discord AI Chatbot and I test step by step
how to read the messages in a thread in a forum channel
How do I read all messages on a Discord forum thread using discord.py? I am oblivious and have been looking everywhere but couldn’t find any solution. Can someone provide a detailed explanation or example code to help me out with this issue? Thank you!
i tried renaming the txt file to “valid_tokens.txt” and it came up with the same error help please
Traceback (most recent call last):
File “c:UsersHomeDownloadssomeonespammer.py”, line 365, in
grupdelay[0] = 5
~~~~~~~~~^^^
IndexError: list assignment index out of range
PS C:UsersHome>
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 […]