AttributeError: 'coroutine' object has no attribute 'edit' with discord.py

So I was working on a discord bot, that should edit its own message on a command, and I tried many things, but I kept getting the AttributeError: ‘coroutine’ object has no attribute ‘edit’ Error, my code is this: embed = discord.Embed(title="title") embed.set_author(name="name", icon_url="image") embed.add_field(name="name", value="some text", inline=True) channel = Client.get_channel(channel-id) msg = channel.fetch_message(message-id) await… Read More AttributeError: 'coroutine' object has no attribute 'edit' with discord.py

Discord.py missing permissions when bot role is above all and has admin privileges

raise CommandInvokeError(self, e) from e discord.app_commands.errors.CommandInvokeError: Command ‘test’ raised an exception: Forbidden: 403 Forbidden (error code: 50013): Missing Permissions Constantly getting this error, even though my bot has administrator permissions, also the role is located at the top of the tree. Evem with all of this, I continuously get the error of missing permissions. My… Read More Discord.py missing permissions when bot role is above all and has admin privileges

My Discord bot is not responding to messages/not even outputting to terminal?

Trying to make a sorta complicated bot, but before i get started on writing the other code I wanted to just make sure that the bot worked in Discord, and was up and running and responding to a basic command – Send the message "Hello" when someone used the command "!hello". import discord from discord.ext… Read More My Discord bot is not responding to messages/not even outputting to terminal?

I'm making a Discord bot that is supposed to read from a text file and send called for line

I’m new to this coding space, and what I’m trying to do is have the discord bot respond to slash command with it’s specified line. I have it where it works, but it responds to the command with the line below what is being called for. Here’s what I have so far @slash.slash(name="f2pquest", description="Lists all… Read More I'm making a Discord bot that is supposed to read from a text file and send called for line

Cannot assign to global variable in on_ready()

I am trying to code a discord bot that simultaneously prints new messages and sends user input from console to a selected channel. Here is what I have so far: import discord from threading import Thread from asyncio import run intents = discord.Intents.all() intents.members = True client = discord.Client(intents=intents,chunk_guilds_at_startup=False) main_channel = int(input(‘Enter channel ID you… Read More Cannot assign to global variable in on_ready()

How to stop discord.py bot incrementing more values than expected in SQLite database?

I’ve recently implemented an SQLite database into my discord.py bot in an effort to teach myself SQL in a fun and more meaningful way. It works as intended with a slight issue. The function of the cog is to increment a counter for each discord user everytime they send ‘brilliant’ in the chat. However, it… Read More How to stop discord.py bot incrementing more values than expected in SQLite database?