When I iniatiate my discord bot,the on_ready method does not work. The bot comes online,but none of the code in the method prints in the command line. Also,the info command fails to work. This is all code that worked previously with another bot that I wrote, so I’m unsure as to what is failing to ..
I made a economy bot in discord and it doesn’t save anything in that part in code, everything else gets saved, there is no error or anything, im lost help me pls code: @client.command() async def buy(ctx, item=None, amount=None): db = sqlite3.connect(‘mainbank.db’) cur.execute("SELECT item1 FROM economy WHERE user_id = ?", (ctx.author.id,)) result = cur.fetchone() if ..
I was just setting up role requirements for certain commands. But I’m using message.content to make the commands. Because of this All My Commands are in one client.event, I Don’t Want all my Commands to Need Mod/Admin to Use. What Should I do? Code for One of The Commands: from discord.utils import get @client.event async ..
I just started learning SQLite with Python, and I wanted to ask, how I can make an enable and disable command for commands? So the server owner could set it as if they want a leveling system in their server they could enable it and if they don’t want it they could disable it. This ..
I have implemented my own functions/checks in my bot. Anyway, there is no normal AttributeError as output in the console, but for example: ‘NoneType’ object has no attribute ‘requested_by’, so without the AttributeError, because it is my own function. Is there a way to output this error also via bot and possibly handle it with ..
I’m using the Discord API to get all the guilds the user is in. With the JSON response, I’m trying to filter out all the server names where the user has the manage_guild permission with list comprehension. all_guild_names = [x[‘name’] for x in guilds if int(x[‘permissions’]) & 0x00000020 != 0] guilds is the name of ..
My bot is actually having a problem with running the command and idk why its keep giving me this error ,The bot that I am using is for a announcement purpose on discord, So this the code that I am using in the bot: import discord from discord.ext import commands from discord.ext.commands import Bot import ..
I am working on a sudoku bot with some sudoku API, and I want the user to type something like this: >sudoku_solve 2…….. …..62.. ..1….7. ..6..8… 3…9…7 …6..4.. .4….8.. ..52….. ……..3 So first will be the command, and then the sudoku table itself. Is it possible to do something like this? Source: Python..
I made a bot but I want the bot to make list all the server names where it is when you type a command. Can any one help me, please? Source: Python..
So I’m trying to make it so that when a command is executed with no errors it will react to the command message with :white_check_mark: and if there’s an error it will react with :x:. I’ve tried to do it with the load command and this is what I’ve got: @commands.check(is_owner) async def load(ctx, extension): ..