I tried to make a roll the dice commands its working but I don’t know why my embed image is not showing in the embed. @commands.command() async def aya(self, ctx): author = ctx.author roll = 1 #random.randint(1,6) print(roll) if roll == 1: file = discord.File("dice/dice1.png", filename="dice1.png") embed = discord.Embed( title= "Roll", color=discord.Color.blue() ) embed.set_thumbnail(url="attachment://dice/dice1.png") embed.add_field(name="Owner", ..
So right now I am trying to create a command which essentially modifies a certain question or in this case a line in a textfile. Currently upon executing the sections (both EDIT and REMOVE), the file does not get modified nor do I get any tracebacks. I don’t really understand what else I can do. ..
There is a code for exp, I actually screwed a working timer there, but the data is not written and when comparing, the TypeError: int () argument must be a string, a bytes-like object or a number, not ‘NoneType’. Arranged prints with F according to the code, should output: If there is simply no time ..
In discord.py, I am getting the bot to send a message. Then, I am getting the bot to assign that message object to a key in a json file. My code is async def testmessage(): with open(‘messages.json’) as json_file: data = json.load(json_file) channel = bot.get_channel(779563485724934184) message1 = await channel.send(‘hi’) print(data) data[‘message1’] = message1 with open(‘messages.json’, ..
I have a discord.py bot and I host it on Google Cloud RDP (windows). I was working and testing PostgreSQL database on my local computer and it was working like charm now when I tried to use the same code and same connection method on my RDP, I got an error. This is how I ..
So I have made a suggestion command using discord.py and here is the current code: @client.command() async def suggest(ctx, *, args): await ctx.message.add_reaction("🗑️") channel1 = client.get_channel(channel_id) embed = discord.Embed(title = "Suggestion from: " + ctx.author.name, color = 1752220) embed.set_author(name = ctx.author.name, icon_url = ctx.author.avatar_url) embed.add_field(name = "Author’s Suggestion:", value = args) msg = await channel1.send(embed ..
This code is designed to automatically send a DM to a user ID registered in the database at a specific time, but typically it comes to me and an error occurs when attempting to DM to another user (Error Content:’NoneType’ object has no attribute ‘send’). Therefore, my question is to know how to send a ..
i couldn’t find a solution for this so here i am. I made a bot in discord.py rewrite for my discord server and i wanted to implement the feature where my bot says something when a user joins the voice channel. I couldn’t even make the bot join the voice chat because it gives every ..
I’m trying to make my discord bot disconnect the voice channel with a command like -disconnect using Lavalink. I have tried doing it in various approaches but it never seems to work for me. I also can’t find many examples online. The most recent thing i’ve tried is this: @commands.command() async def leave(self, ctx): guild_id ..
I need some help with my discord bot. After some time when I start the script the bot just goes offline then the console get spammed with socket.send() raised exception. and directly after I start the script I also get this error /PycharmProjects/Rosy.Dc.py/main.py:38: RuntimeWarning: coroutine ‘Command.__call__’ was never awaited @bot.event RuntimeWarning: Enable tracemalloc to get ..