#discord-bots
1 messages Β· Page 1063 of 1
First from pickle to sqlite
Then from sqlite to asyncpg
Now third time to rewrite it to slash commands
π©
Eh wait haven't done that in a while
Like if I wanna specify IST
Does anyone know what's wrong in this code
@client.event
async def on_member_join(member):
button = Button(label = 'Write an introduction', style = discord.ButtonStyle.green)
async def button_callback(interaction: discord.Interaction):
await member.send('What would you like your nickname to be? (32 character max)')
async def on_message(message):
try:
message = await client.wait_for("message", check=lambda m: m.content == m.channel == message.channel)
except asyncio.Timeout.Error:
await member.send('You took too much to respond.')
else:
if len(message).content <= 32:
await member.send(f'Nickname set to {message}!')
else:
await member.send('Something went wrong please try again.')
view = View()
button.callback = button_callback
view.add_item(button)
await member.send(f'Welcome to the server {member.mention}! Use the button below to make an introduction and get access to the server.', view = view)
it depends on what problems you have
There are no errors
!d datetime.timezone @maiden fable probably make an object of this
class datetime.timezone(offset, name=None)```
The *offset* argument must be specified as a [`timedelta`](https://docs.python.org/3/library/datetime.html#datetime.timedelta "datetime.timedelta") object representing the difference between the local time and UTC. It must be strictly between `-timedelta(hours=24)` and `timedelta(hours=24)`, otherwise [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError "ValueError") is raised.
The *name* argument is optional. If specified it must be a string that will be used as the value returned by the [`datetime.tzname()`](https://docs.python.org/3/library/datetime.html#datetime.datetime.tzname "datetime.datetime.tzname") method.
New in version 3.2.
Changed in version 3.7: The UTC offset is not restricted to a whole number of minutes.
Oh okay thanks
do you have any other on_message event in your code?
can someone help me fix this
button_callback must have 2 args: the button itself and the interaction
And have you enabled message contents intent?
Also bad method to assign callback
no
yes
@sullen pewter
this too, fix it
And you get no errors because of improper error handler most likely
how do i get the id or the person authorizing my bot
It must raise unhandled errors
how do i get it pls help
Authorizing your bot? What
where
Yours has only interaction
yes
It must also have self
It's not a cog
The button
it want the id of the person authorizig my bot
That's why you should subclass views and not do it like this
idk how to do that
Do you think that self should only be in cogs 
maybe
and in classes
Nah that's OOP
It's an instance of class at the moment of function execution
In simple words
Check examples in the library's github repo
lol
What's so bad in not having button: discord.ui.Button?
I've had a bot without it and it worked fine
!d discord.ui.Button.callback
await callback(interaction)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
The callback associated with this UI item.
This can be overridden by subclasses.
It's not a staticmethod
The self attribute is required
In views it is a bit different, self is View, button is Button and interaction is MessageInteraction
Or whatever it is in dpy
May I ask
Yessir
Do you know object-oriented programming
Ok
I think I only know basics
super() is a method of accessing the method of the superclass
super() is the super constructor, when you create a subclass you can call the super method to access the superclass
Basically self.method() will call the method you overwrite and super().method() will call original method inherited from superclass
oh ok
so super().__init__ will call the constructor of the superclass
it means that you will have to pass to the subclass all the parameters that you will originally pass in the superclass
makes sense
Exe let's start a python class 
is super class parent?
How to fetch the user who is autjorizing my bot i need to know that
Authorizing* pls help
I don't know if it is possible, i will check the doc
How to use button_callback when using view subclass
class ExampleView(discord.ui.View):
@discord.ui.button(label='Confirm', style=discord.ButtonStyle.green)
async def confirm(self, interaction: discord.Interaction, button: discord.ui.Button):
await interaction.response.send_message('Confirming', ephemeral=True)
self.stop()
you mean that?
yes
oh and the order has changed of the parameters so keeping that in mind
I want it to be like this but using subclass
You can actually get it by fetching through the audit log with the action of AuditLogAction.bot_add, and check if entry.target == bot.user, then get the user with entry.user.
Good idea
Yes
that makes lots of sense
"Authorizing the bot" you mean the person who launches the bot?
Can I have discord.ui.button(...) inside of async def on_member_join
You typically define views in a separated module and import them from it
ok
thats optional though?
Yes but considered a good practice
Then it's not a json.
And it will be automatically converted to string
!e
from json import dumps
print(dumps({10: "yes", 20: True}))```
@vale wing :white_check_mark: Your eval job has completed with return code 0.
{"10": "yes", "20": true}
i thought value sry
Ok
How to send normal messages after an interaction
but i did int(keys)
not interaction.response.send_message
and its error of end giv method
interaction.channel.send
ok, ty
@discord.ui.button(label='Write an introduction', style=discord.ButtonStyle.green)
async def callback(self, interaction: discord.Interaction, button: discord.ui.Button, member):
await interaction.channel.send(f'Welcome to the server {member.mention}! Use the button below to make an introduction and get access to the server.')
self.value = True
self.stop()```
Can I add member?
in the args
No
interaction.author (the attribute may also be interaction.user, depends on lib)
ty
class discord.MessageInteraction```
Represents the interaction that a [`Message`](https://discordpy.readthedocs.io/en/latest/api.html#discord.Message "discord.Message") is a response to.
New in version 2.0...
class Introduction(discord.ui.View):
def __init__(self):
super().__init__()
self.value = None
@discord.ui.button(label='Write an introduction', style=discord.ButtonStyle.green)
async def callback(self, interaction: discord.Interaction, button: discord.ui.Button, member):
await interaction.channel.send(f'Welcome to the server {interaction.user.mention} Use the button below to make an introduction and get access to the server.')
self.value = True
self.stop()
@client.event
async def on_member_join(member):
view = Introduction()
await member.send(f'Welcome to the server {member.mention}! Use the button below to make an introduction and get access to the server.', view=view)```
solved
How to remove this red note under the button after an interaction?
There are no errors
and interaction works
I just want to remove the red thing under it
Reply to that interaction (I don't think there's any other method to remove it)
Deferring it will only give forever "bot is thinking" message
Reply with some ephemeral like "go to #welcome to make your introduction"
ic
Is there message.content.after bot's message => await message.reply('Blah, blah, blah')
wait_for ^
uh?
Bot: What would you like your nickname to be? (32 character max)
User: Ronald
Bot: Nickname set to Ronald!
and?! what arent you able to do?
wdym
use a wait_for event
idk how to
Ik but I cant
wait_for what
msg = await bot.wait_for(...)
print(msg.content)
wait_for bot messag
Since msg is a discord.Message object
Ik how wait_for works but what should bot wait for
"message"
if I want it to wait for it's own nickname message
There are examples in the docs
seen them
import asyncio
import discord
try:
msg: discord.Message = await Bot.wait_for("message", timeout=300, check=if_any_custom_check)
except asyncio.TimeoutError:
...
I forgot about ashley
oops wrong channel
Lol it's fine
nah ill repost to general
@bot.command()
async def command(ctx):
await ctx.send("Type: `hello`")
def check(m):
return m.content == 'hello' and m.channel.id == ctx.channel.id
try:#`msg` will receive a message object if check function returns True
msg = await bot.wait_for('message', check=check,timeout=10)
except asyncio.TimeoutError:#time out error will be raise when it has been 10 seconds
await ctx.send("10 seconds has passed, timeout.")
else:
await ctx.send(f'Hello {ctx.author}!')```
Do i have to write my nickname message in 'hello'?
whats the problem here?
I want users to set their nicknames after bot's message
so they write their new names in chat?
<prefix>command
bot: type hello
user: some message
bot: hello uwu#1234
yea right
msg = await bot.wait_for(...)
this line gives you a message object of the message that passed your check
but that's not what i want
Ik
I want users to change their nicknames after bot offers them to change it
but user didnt type hello
If bot sends Babooey message users have to change their nickname
uh?
if ctx.author.name == "Something you want them to change it to" :
await ctx.send("Nice , you changed your nickname")
else :
await ctx.send("You didn't change ur nickname ")
what is hello
that's not what I want
display_name*
That's what you said
no
You said you want them to change their nickname
yeah, so why are you waiting for message, not name change
Example:
pfffttt
Bruh thats not what you asked for
bruh
I may be bad at explanation but this is what I meant
wait for message, grab resulting message's content, change msg author's name to this content
||or you just have bad comprehension(I don't mean it in a mean way lol)||
YES that's what I want
3 people failed to understand you
π
tells something
import asyncio
import discord
try:
msg: discord.Message = await Bot.wait_for("message", timeout=300, check=if_any_custom_check)
except asyncio.TimeoutError:
...
if len(message.content) > 32:
return "No"
#you should really use some filters to allow in specific characters
await ctx.author.edit(nick=msg.content)
then that just makes me bad at explaining
OOO
Bot is a class
stop, there must be some issue with understanding due to language differences
omg thanks for letting me know.....
I knowingly put it there?
uh maybe don't fight
i wasnt judging?
okay fine apologies
Wth
Ayo calm down
steps back
leaves
runs
awaits
Calm down u guys... It will much better if u guys can help me...
#help-cheese message

lol
how to fix non type object is not subcriptible
code = exchange_code('')['access_token']
getting error in this
!eval
code = exchange_code('')['access_token']
@light violet :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 1, in <module>
003 | NameError: name 'exchange_code' is not defined
!eval
code = exchange_code('')['access_token']
@light violet :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 1, in <module>
003 | NameError: name 'exchange_code' is not defined
!eval
def exchange_code(code):
print("something")
code = exchange_code('')['access_token']
@light violet :x: Your eval job has completed with return code 1.
001 | something
002 | Traceback (most recent call last):
003 | File "<string>", line 4, in <module>
004 | TypeError: 'NoneType' object is not subscriptable
why
Calm down share the code
well, if it's returning None, you can't get the attributes/methods of a None
@maiden fable :x: Your eval job has completed with return code 1.
001 | <string>:1: SyntaxWarning: 'NoneType' object is not subscriptable; perhaps you missed a comma?
002 | Traceback (most recent call last):
003 | File "<string>", line 1, in <module>
004 | TypeError: 'NoneType' object is not subscriptable
@light violet I think start by figuring out why it's returning None, or use try excepts maybe
can anyone tell me why this pause command isnt working ?
#checks
PAUSE_STATE = False
@bot.event
async def on_message(message):
global PAUSE_STATE
if message.channel.id not in (x, x):
return
if message.author == bot.user:
return
if message.content.upper == "PAUSE":
PAUSE_STATE = True
return
if message.content.upper == "RESUME":
PAUSE_STATE = False
if PAUSE_STATE:
return
if message.content.startswith("Play"):
#time.sleep(3)
await message.channel.send("**Act One, Scene One: The Beginning**")
im trying to stop the code from continuing past this point if PAUSE_STATE == True
but its continuing to accept inputs lower down the on_message function
def exchange_code(code):
data = {
'client_id': CLIENT_ID,
'client_secret': CLIENT_SECRET,
'grant_type': 'authorization_code',
'code': code,
'redirect_uri': REDIRECT_URI
}
headers = {
'Content-Type': 'application/x-www-form-urlencoded'
}
r = requests.post('%s/oauth2/token' % API_ENDPOINT, data=data, headers=headers)
r.raise_for_status()
return r.json()
getting bad response for this
everything is correct
maybe what you can do is this? ```py
if PAUSE_STATE is False:
...
else:
return
then maybe it's returning None. I assume what you should do is check that the function is returning something besides None
that means id need to have near the entire contents of my on_message function (anything below the check anyway) indented till it hits the else statement at the end, wouldnt i?
unless im missing something
That's unfortunately not how an event works
Everytime it receives a message that function gets called again
feel free to educate me, as im still learnin new things relating to this every day
You need to make pause_state a global variable
would actually be appreciated if you were able to explain where the issue is
wait...
yeah it is atm
global PAUSE_STATE
in my code it is, missed it when i was copy pasting selectively
oh yeah I missed that first line but you still need the global keyword
dont, its a bad practice
yeah i have the global in there, ill edit my copy paste sec
Python allows you to set custom attributes to most objects, like your bot! By storing things as attributes of the bot object, you can access them anywhere you access your bot. In the discord.py library, these custom attributes are commonly known as "bot variables" and can be a lifesaver if your bot is divided into many different files. An example on how to use custom attributes on your bot is shown below:
bot = commands.Bot(command_prefix="!")
# Set an attribute on our bot
bot.test = "I am accessible everywhere!"
@bot.command()
async def get(ctx: commands.Context):
"""A command to get the current value of `test`."""
# Send what the test attribute is currently set to
await ctx.send(ctx.bot.test)
@bot.command()
async def setval(ctx: commands.Context, *, new_text: str):
"""A command to set a new value of `test`."""
# Here we change the attribute to what was specified in new_text
bot.test = new_text
This all applies to cogs as well! You can set attributes to self as you wish.
Be sure not to overwrite attributes discord.py uses, like cogs or users. Name your attributes carefully!
also, just incase you didn't know, you can use commands discord.ext.commands, and you can remove the prefix if you want a prefixless bot :)
Ashley
yea, it is
I am sus?
upper()
yeah i been using that loads through the code
π’
nearly every input line has it
uh, okay you say it
sus
Suspicious activity
Is there some sort of a Rate limit, how many bots you can run at once?
until you get ratelimited
and if you are running them from the same ip
you'll get blocked faster
Wtf
Just woke up and saw that 3 of my bots aint working "disnake.errors.HTTPException: 429 Too Many Requests (error code: 0): You are being rate limited."
Damn it
This is what my google search got me, idk if it help or not...```
Discord has different rate limits for routes and discord bots. On top of that, Discord also has a global limit of fifty requests per second. The rate limits are always given on the response headers, which can be found in the developer tools section of your browser.
how would i go about using this if i have alot of variables? (which i do)
You are not allowed to use that command here. Please use the #bot-commands channel instead.
it's just as simple as defining a normal var, just bot.var = var/value
so this..?
bot.PAUSE_STATE = False
@bot.event
async def on_message(message):
if message.channel.id not in (x, x):
return
if message.author == bot.user:
return
if message.content.upper == "PAUSE":
bot.PAUSE_STATE = True
return
if message.content.upper == "RESUME":
bot.PAUSE_STATE = False
if bot.PAUSE_STATE:
return
if message.content.startswith("Play"):
#time.sleep(3)
await message.channel.send("**Act One, Scene One: The Beginning**")
So my only way is to purchase another Vps service and host some bots from there?
yeah
what is the reason to use bot. over a standard variable?
Well not exactly that but
You got the point
it makes it an attribute of bot
which does ...
What's the alternative method? Do you know?
Likee.. run bots from different ip?
im wondering what extra functionality id get from it by doing so
Yes
the only bot. stuff ive done is based off examples ive been given; i presume itll help somewhere but if i dont know how to use it
bot is basically accessible everywhere, therefore your var will be accessible everywhere you can access your bot
Supposed
Hey I want to make my bot 24/7, any help?
ashley can you try help me in this channel #help-cheese
Only if discord are dealing with requests by ips and not by the application id which is gonna be a problem in your case
Thanks SniperGlitcherz
apart from avoiding global imports, what other benefits would be gained by letting the variable be accessed anywhere? can u give me an example?
you won't accidentally overwrite shit
I think you must try to run them with a different ips
also, you most likely only need that variable in scope of your bot
that's a double kill (you don't have to pass your bot AND that variable as an arg)
If its still then discord does contain requests by the application id and not by the ip
if you use cogs, you can access the vars like that, otherwise I am not 100% sure xD Just don't make every single var a bot attr, but it can be useful for important things that you may need to use in multiple places and cases
well the bot is going to become a lot more advanced later on (because of that, id appreciate if someone who knows their shiz would be willing to put aside a bit of time to run through the code with me and see how i can optimize it/implement certain features.)
before it grows into a monster job to change everything later :p
for me I normally use slash commands and cogs which ig you can say are advanced, but if you making your commands in on_message event, therefore you won't really need to use too many advanced features or the whole bot attr thing as everything will be in one file
Shiit.. yeah I can't even run the bot from my local pc
So I'm f-ed? xd
Oh
Are you running them from a vps service?
xd
In the Discord docs, what does the Optional mean under the attributes?
I recommend looking into commands before going to far as they will def help you in the long run since they'll trump having your commands in on_message
am i the "other guy"? π
Yes i mean your username i couldnt type it
thats why i could use someone who knows their shit lol
it means that it can either return None or the other thing
aha nps
Im talking about the Optional[Union[VoiceChannel, StageChannel]] from the example I gave
I know a little bit, but I can't help you in your case as I like to make sure everything is future resistant, I know I don't know it all, but feel free to consult others or the docs :) gl on your coding adventures and I hope you succed as it's very fun
wdym by future resistant?
yes, it means it will return either None, VoiceChannel or StageChannel
if I want to keep tinkering and tinkering, I try go for the things that save me from completely restating things and/or are more willing to be upgraded with the newer features
like I said, look into commands, then maybe look into cogs, but as of now, if you doing simple things, the on_message event will work fine for a bit
i mean its a text adventure with more complicated features so...
prolly relatively simple, once i work out how to make it do what i want
'_overwrites[0].allow{'new_value':1024, 'old_value':0}
What do 1024 represent? I changed view channel for @everyone and i got this from after in on_channel_update.
How can I use response header to get information about my rate limits?
!paste
Pasting large amounts of code
If your code is too long to fit in a codeblock in discord, you can paste your code here:
https://paste.pythondiscord.com/
After pasting your code, save it by clicking the floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.
Any glue anybody?
!d discord.Member
class discord.Member```
Represents a Discord member to a [`Guild`](https://discordpy.readthedocs.io/en/latest/api.html#discord.Guild "discord.Guild").
This implements a lot of the functionality of [`User`](https://discordpy.readthedocs.io/en/latest/api.html#discord.User "discord.User")...
dpy does that for u
It doesn't give me those necessary params I want to see. It only says: disnake.errors.HTTPException: 429 Too Many Requests (error code: 0): You are being rate limited.
I want to see, for how long am I?
and if it's global or user
user = client.get_user(int(getUser(ctx.channel.id)))
await user.add_roles(discord.utils.get(ctx.guild.roles, name="Whitelist"))
why is this not working
What's getUser
bruh you want to get a user object with the id of a channel 
https://paste.pythondiscord.com/umupocaqot Someone help me plz
it is a valid UID that i stored in database.
User is not None.
Any help?
AttributeError: 'User' object has no attribute 'add_roles'
!d discord.Member.add_roles
await add_roles(*roles, reason=None, atomic=True)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Gives the member a number of [`Role`](https://discordpy.readthedocs.io/en/latest/api.html#discord.Role "discord.Role")s.
You must have the [`manage_roles`](https://discordpy.readthedocs.io/en/latest/api.html#discord.Permissions.manage_roles "discord.Permissions.manage_roles") permission to
use this, and the added [`Role`](https://discordpy.readthedocs.io/en/latest/api.html#discord.Role "discord.Role")s must appear lower in the list
of roles than the highest role of the member.
I guess.. you need to catch the error and access the response bound with it.. like
except HTTPException as e:
print(e.response.headers.get('Whatever-Header-you-wanna-access'))
Note that response is aiohttp.ClientResponse's instance, so just check it's docs for what more you can do with it
https://github.com/Rapptz/discord.py/blob/master/discord/http.py#L448-L480 See how dpy packs the error for you and reverse-engineer it. Disnake probably do the same (if they haven't modified this part of source code)
how to get amount member's messages?
in the whole guild?
yes
only thing I can think of is loop through every text_channel in the guild and check the history there where you check if the author was the user you're looking for
hm
Basically you can't, technically you can (what SniperGlitcherz said) but will cause ratelimits
oh ok, thx
then why can we tho
if you think about it, we make those API calls too
when we click on search and type from:meh
Bot accounts aren't allowed to use that endpoint iirc
Stats bots typically don't fetch it, they track and store
Hi guys, I got issues while trying to catch exceptions on a discord bot project - I did not have this issue while catching exceptions on other projects..
"TypeError: catching classes that do not inherit from BaseException is not allowed"
My Exception class inherit from Exception :
class BalanceInsuffisanteException(Exception):
pass
async def on_submit(self, interaction: Interaction):
if findMiseForBet(interaction.user.id, self.bet["_id"]) is not None:
embed = discord.Embed(color=0xff2429)
embed.add_field(name="Pari refusΓ©", value="Tu as dΓ©jΓ misΓ© sur ce pari", inline=False)
else:
try:
addMiseToDB(interaction.user.id, str(self.children[0]), str(self.choice), self.bet, self.bet['date'], self.bet['heure'], self.idUsed)
embed = discord.Embed(color=0x152dff)
embed.add_field(name="Pari validΓ©", value="Tu as misΓ© 500 jetons sur une victoire", inline=False)
except BalanceInsuffisanteException as e:
embed = discord.Embed(color=0xff2429)
embed.add_field(name="Pari refusé", value="Tu ne possèdes pas assez de jetons", inline=False)
except DelaiDepasseException as e:
embed = discord.Embed(color=0xff2429)
embed.add_field(name="Pari refusΓ©", value="Le dΓ©lai pour miser sur ce pari est passΓ©", inline=False)
await interaction.response.send_message(embed=embed)
Maybe am I doing wrong in catching exceptions since it's an async function & an await at the end ? I don't really know..
Could you show the full traceback
Yep for sure !
Ignoring exception in modal <DoBet timeout=None children=1>:
Traceback (most recent call last):
File "C:\Users\Utilisateur\Desktop\kothbot\components\modals\DoBet.py", line 26, in on_submit
addMiseToDB(interaction.user.id, str(self.children[0]), str(self.choice), self.bet, self.bet['date'], self.bet['heure'], self.idUsed)
File "C:\Users\Utilisateur\Desktop\kothbot\db\Mise.py", line 45, in addMiseToDB
raise BalanceInsuffisanteException()
exceptions.BalanceInsuffisanteException.BalanceInsuffisanteException
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Utilisateur\Desktop\kothbot\venv\lib\site-packages\discord\ui\modal.py", line 187, in _scheduled_task
await self.on_submit(interaction)
File "C:\Users\Utilisateur\Desktop\kothbot\components\modals\DoBet.py", line 29, in on_submit
except BalanceInsuffisanteException as e:
TypeError: catching classes that do not inherit from BaseException is not allowed
this is weird lol
it's not too many API calls either, it's a single heavy api call
discord/http.py lines 727 to 734
if before is not None:
params['before'] = before
if after is not None:
params['after'] = after
if around is not None:
params['around'] = around
return self.request(Route('GET', '/channels/{channel_id}/messages', channel_id=channel_id), params=params)```
Try ctrl + press the exception class in except and see where it brings you to, you might have redefinition
BalanceInsufficientException isn't a subclass of Exception/BaseException
hi
class BalanceInsuffisanteException(Exception):
pass
Isn't it supposed to ? π₯΄
@gaunt mortar so what did you get
I already did, it brings me to the right class
Ok that's weird
Maybe is it related to how I'm raising the exception ? idk
Print BalanceInsuffisanteException.__mro__ before the critical statement
Well how do you raise it
I'm printing what you asked me to, I'm sending the function that raises the exception after that
Ok
(<class 'exceptions.BalanceInsuffisanteException.BalanceInsuffisanteException'>, <class 'Exception'>, <class 'BaseException'>, <class 'object'>)
do you import the class itself?
because from what i see, the name of your file is same as the name of the class~
Oh yeah
Btw follow naming convention for god's sake
Are you a java programmer or smth
spotted oops
Cause in java the standard is one class per file
yep
In python it's not
It's several classes per module
Put all exceptions into one module and import them from there
ok ok, gonna do this
Most likely you were trying to catch a module lol
how can i check if my bot has a specific permission
Specific channel permission or guild
guild
!d discord.Member.guild_permissions use ctx.me to get the bot's Member
property guild_permissions```
Returns the memberβs guild permissions.
This only takes into consideration the guild permissions
and not most of the implied permissions or any of the
channel permission overwrites. For 100% accurate permission
calculation, please use [`abc.GuildChannel.permissions_for()`](https://discordpy.readthedocs.io/en/latest/api.html#discord.abc.GuildChannel.permissions_for "discord.abc.GuildChannel.permissions_for")...
ok
would i be able to print(ctx.me.guild_permissions)
yea
umm
disnake.ext.commands.errors.ExtensionFailed: Extension 'cogs.events' raised an error: ExtensionFailed: Extension 'cogs.aboutme' raised an error: TypeError: Couldn't find an interaction parameter in <function aboutme.info at 0x000002E26F09F010>
cogs code
aboutme.py
import disnake
from disnake.ext import commands
from datetime import datetime
import time
from wb import config
from colorama import Fore
class aboutme(commands.Cog):
def __init__(self, bot: commands.Bot):
self.bot = bot
print(Fore.CYAN + 'Loading About Me cog' + Fore.WHITE)
@commands.slash_command(name='info', description='Tells you about myself.')
async def info(self):
embed = disnake.Embed()
embed.title = 'About Me UwU'
embed.set_footer(text='β€ Made with Love β€')
embed.set_author(name=f'self.bot.user.name', icon_url=f'{self.bot.user.avatar}')
embed.description = f"""
"""
@commands.slash_command(name='permissions')
async def permissions(self, ctx):
me = ctx.me
print(me.guild_permissions)
# if me.guild.permissions == 'administrator'
def setup(bot):
bot.add_cog(aboutme(bot))
hello
async def info(self, inter):
Hiiii
π .

Hiiii Blvck
Hi there
thanks
its inter for slash commands π
for the second one
not ctx
You can name it ctx 
you can
but dont
i remember when i called ctx message
Well i mostly use my AnyContext object lel
i never fixed it till i learnt cogs
i see
just use guild_permissions.permission_name, it will be True if the bot has the permissions
where is the 1st cmd inter
its in my code but not in that codeblock
ok that helps thanks
Guys is there any way to add buttons in discord.py 1.7
Cause replit pip trash it not download 2.0
no.
you cant
but you can just use disnake
pip install disnake
Hmm discord.ui?
Will it work?
class disnake.ui.Button(*, style=<ButtonStyle.secondary: 2>, label=None, disabled=False, custom_id=None, url=None, emoji=None, row=None)```
Represents a UI button.
New in version 2.0.
just use disnake XD
But discord.py original
Do it have same thing?
yeah
And buttons?
Is pycord or disnake or nextcord better
disnake is the best
yeah
none is the best, use dpy 2.0 or a separate discord api wrapper
try railway
thats a hosting service...
π
he wants to use replit to host right
no?
oh
But bro my parents doesn't allow use money on internet
but anyways, you cant code with it if you are doing the same with replit
Lmso
uh oh
i think i will just go away
For free
not to code π
... dude just self host the bot
No i used to for code too
why
Bro Android
XD
pydroid
dont have a pc/laptop?
I have
stop
^
But lazy to turn on
. . .
turn it on once and never turn it off again.
you could do 6 hours of android coding in one hour on a pc
anyways... is there a way that i could run a slash command via a prefix?
No
what does that even mean lmao
its called a slash command
can i run my /ping command via a $ping
as a alternative to people who want to see them in the help documentation
or how can i put slash commands in the help documentation lol
you can invoke your normal command with a slash command but not a message command with a slash one L
@commands.Cog.listener()
async def on_guild_channel_delete(self, channel):
if channel not in channel.guild.categories:
return
oldChannels = channel. ???
for oldChannel in oldChannels:
await oldChannel.delete()
hey guys, how can i get a list of the text channels that were in a category before it was deleted? normally, when you delete a category, all the channels are freed and dont belong to a category anymore but im trying to delete them if their category is deleted
channel.channels ~
any known way?
the tricky thing is that channel = None because it was just deleted..
which library
disnake
!d disnake.SlashCommand.description
The slash commandβs description.
will that show up in the help command?
you would have to subclass HelpCommand class and override its methods to add the slash commands
hmm any guides for that?
What host are you using lol
replit
porkchop
File "c:/Users/Akai/Desktop/Sugari/main.py", line 10, in <module>
from .util.bot import Sugari, getprefix
ImportError: attempted relative import with no known parent package
So nobody has a clue?
how can i import the bots class from utils/bot.py to main.py?
Oil @stray carbon remove the dot from before util
File "c:/Users/Akai/Desktop/Sugari/main.py", line 10, in <module>
from utils.bot import Sugari, getprefix
ModuleNotFoundError: No module named 'utils.bot'
Looks like there are a lot of people getting this issue
People are talking about it official Discord developer server
hm?
isn't "utils" inside of "cogs"? looks like it to me
what are the benefits or using bot.http.send_message?
nvm, was missing init file in utils
!d discord.CategoryChannel.edit
await edit(*, reason=None, **options)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Edits the channel.
You must have the [`manage_channels`](https://discordpy.readthedocs.io/en/latest/api.html#discord.Permissions.manage_channels "discord.Permissions.manage_channels") permission to
use this...
Hello, tell me how to make the text limit vertically and horizontally in the white box
I want to make a command deleting a given role, but of course I'm not able to delete a role created for a bot. how do I make an error handler for that?
like, if it recognizes that it's a bot role, it replies saying that
Do you need to delete roles in use except for the bot?
no
you can check if the bot has that role (ctx.guild.me.roles)
the command is deleterole
I provide the role name/id and it deletes it
but you guys know when you make a bot joins a server, it automatically creates a role for itself
and that role is not able to get deleted
I want my bot to reply it's not able to delete that role if the user provides it
try handle for the discord.Forbidden error or something
already tried
hmm
I made a try/except thing
try:
except discord.Forbidden:
except:
it always passes except only
help me pliz
no clue man
any other ideas?
I think I have one hacky way... what you can do is check that the role has more than just on bot user in it
@wispy sequoia the documentation is short about it, but i think you're looking for discord.Role.is_bot_managed
welp, there you go xD
is_bot_managed()```
[`bool`](https://docs.python.org/3/library/functions.html#bool "(in Python v3.10)"): Whether the role is associated with a bot.
New in version 1.6.
so is it just
if role.is_bot_managed():
pass
?
yeah, sure
well
it still raises error
let me check if I did something else wrong first
@bot.command()
async def test(ctx):
currentGuild = bot.get_guild(ctx.guild.id)
try:
for role in currentGuild.roles:
print(role.id)
# if role.is_bot_managed():
#print("couldn't delete")
# return
except:
return print("error")
this is the code, I modified it so I can see if it's something else. at the moment, it prints all the roles' IDs as it's supposed to do. any clue on what's wrong?
what, why getting the same guild object again?
oh yeah
yeye Ik it just didn't come in my mind
that's not a problem anyways
wots the issue?
ah ```py
for role in roles:
if role.is_bot_managed(): continue
delete role
yes
and you also need to ignore the everyone role..
also
still
wait
I think I know what's wrong
does it start from the bottom? because if so that's the issue, bc it tries to delete @ everyone
The first element of this list will be the lowest role in the hierarchy. ... yes
just if role.id == ctx.guild.id: continue it 
is the @ everyone role
is_default()
?
!d discord.Role.is_default
is_default()```
[`bool`](https://docs.python.org/3/library/functions.html#bool "(in Python v3.10)"): Checks if the role is the default role.
yeah
nice
but, eh thats just an extra call, just compare the role id with the current server's id
the id of everyone role is always same as the server's ID
thats what that method does essentially
Why does my python bot keeps sending messages when I sent message that isn't even contains in message.content.lower?
#chat bot
@client.event
async def on_message(message):
if message.author == client.user:
return
if 'hello' in message.content.lower():
await message.channel.send(random.choice(greetings))
time.sleep(1)
await message.channel.send(random.choice(cq))
and how to fix it
okay, thanks anyways for all the help, even tho I figured it out by myself
I feel dumb π₯²
@slate swan u down or busy
thanks for pinging, anything is better than me getting addicting to something, whats the issue?
Intents = discord.Intents.default()
Intents unresolved reference
uh?
what could even be wrong??
is this inside a class?
have you tried to run your code?
to see if you receive a full traceback error
yes and nothing seems to work fine when related to intnets + this first time happens
did you make a folder discord ?
im sorry how is this related 
if you have any problems just ask ποΈ
Guys I need help making my warnsystem , I think I made the tables but I need some help with commands and ye . Iβm using a cog
mmm, send your main.py code, how many lines are there?
import json
import discord
from discord.ext import commands
import os.path
botinfo = json.load(open('config.json'))
token = botinfo.get('Token')
prefix = botinfo.get('Prefix')
intents = discord.Intents.default()
bot = commands.Bot(command_prefix = prefix, intents=intents)
bot.remove_command("help")
for filepy in os.listdir("./cogs"):
if filepy.endswith(".py"):
bot.load_extension("cogs." + filepy[:-3])
bot.run("e")```
bro just ask if u have a problem then anyone here will respond
Ok then I already asked so ima wait
ping the question pls
what do you want help about?
sorry not the folder, the file discord.py if you created it it's gonna overlap original module
that's sussy, does your Bot not run completely?
try reinstalling d.py
i created nothing called discord.py
!rule 7
7. Keep discussions relevant to the channel topic. Each channel's description tells you the topic.
reinstall dpy
it's member.name
and you don't need an f-string
but you might need members intents
Save the world nice
Indeed
Iβm a twine peaks dude lol
same im pl 131
Iβm pl 115 cuz I havenβt played in awhile
What about battle royale I heard there is a new season about to drop
!intents
Using intents in discord.py
Intents are a feature of Discord that tells the gateway exactly which events to send your bot. By default discord.py has all intents enabled except for Members, Message Content, and Presences. These are needed for features such as on_member events, to get access to message content, and to get members' statuses.
To enable one of these intents, you need to first go to the Discord developer portal, then to the bot page of your bot's application. Scroll down to the Privileged Gateway Intents section, then enable the intents that you need.
Next, in your bot you need to set the intents you want to connect with in the bot's constructor using the intents keyword argument, like this:
from discord import Intents
from discord.ext import commands
intents = Intents.default()
intents.members = True
bot = commands.Bot(command_prefix="!", intents=intents)
For more info about using intents, see the discord.py docs on intents, and for general information about them, see the Discord developer documentation on intents.
what are the benefits or using bot.http.send_message?
whats a way to get all commands in a bot
in code,
like
getbotcommands
print commands
im using cogs by the way
!d discord.ext.commands.Bot.commands
property commands```
A unique set of commands without aliases that are registered.
/
\
guys this is my cog , can someone help me fix the undefined clients first of all
So in the() do I just add self ?
Ok
Anyone know off hand if there's any Discord documentation for the new voice channel text channel things? Can't seem to locate anything.
can't even find the master api reference now
oh it's latest not master
oh ForumChannel, might this be it?
this is all we got
i want my bot to be able to send messages outside of an event
so like lets say i want it to send a message every hour saying 'one hour has passed'
import discord
import time
import threading
client = discord.Client()
def time_alert():
output_channel = client.get_channel(343944376055103488)
while True:
time.sleep(3600)
|AWAIT| channel.send("one hour has passed")
thread = threading.Thread(target=time_alert)
thread.start()
client.run(token)
the issue with this is i cant use await
use tasks
what are tasks?
from discord.ext import tasks
@tasks.loop(seconds=3600)
async def my_background_task():
#do your thing
my_background_task.start()
bot.run(TOKEN)
since you want to get a channel, you'd have to put await bot.wait_until_ready() at the start of your task
so the cache is loaded
Wait where did you find that? Probably would be bundled in the Voice Channel specific stuff
thank you very much π
it's under Discord Models
Ah, gotcha. Was hoping for specific Discord docs rather than d.py
But I guess I could comb through the code
Odds are good we aren't there yet, though.
maybe a fork has it
Possible. But I can't even find API docs on it in Discord's Developer docs
I have never looked at discord docs itself
Oh no wait
It is in there? In d.py
Whelp, time to roll up my sleeves and get a-hunting
I'm not sure I follow π
Integrate your service with Discord β whether it's a bot or a game or whatever your wildest imagination can come up with.
Yarp
it isnt there, the updates of the last week and this does not specify it
So voice channels are getting a feature where they have a text channel bundled into them. Means we don't have to have #751591688538947646 and #voice-chat-text-0 as separate channels. However I want to see how they work with regards to the API endpoints. I just can't seem to track down the official endpoint docs for this new feature
It hasn't been fully rolled out
I think it's only on one server I've been on
understandable
help?
I want to know where Danny et al. found it
Still wouldn't hurt to regen
what lib are you using
half
haven't seen discord.commands yet
yeah but that doesn't have slash commands either
no
Gotcha
fax
or permissions
just describe it as split screen. ease
ill ask in the dpy server and let you know
even better bro
maybe they won't be toxic about this one
first option: wrong python interpreter
second option: right python interpreter dotenv not downloaded
you need to install python-dotenv module
I'm going to be honest, I completely forgot that I'm on that server
Derp
nevermind but i dont think there's any use for the api to have that feature since everything happens on the client side itself
wym by "wrong python interpreter"
Channel and message handling. If we implement it here, we need to make sure that the bot is able to properly see in there in the event we need to lay down justice
I have no idea why I worded it that cheesily
your IDE uses the wrong python version
hm but would that work that way?
like will the on_message even care about any other condition though? (just asking)
client.db = await aiosqlite.connect("warn.db")
await client.db.execute(
"CREATE TABLE IF NOT EXISTS warnsystem (guild_id INTEGER, warns INTEGER, id INTEGER)")
await client.db.commit() ``` guys would this work for a multi guild system or nah
yeah thats what i meant
pass self
yems
not client
Rest of it would be permissions....
self doesnt do anything when i added ity
yo what have we talked about 5 minutes ago
Uhm i see that there is an interesting discussion here
yeah you gotta pass self and use self.client
self , self.client?
I guess the only other thing I'll have to figure out is how visible it is and what not for the end user. Anyway, appreciate the help, folks
async def setup_db(self):
self.client.db = await aiosqlite.connect("warn.db")
await self.client.db.execute(
"CREATE TABLE IF NOT EXISTS warnsystem (guild_id INTEGER, warns INTEGER, id INTEGER)")
await self.client.db.commit()
ok now i need to code the commands , will be tricky
you can do it π
never forget self
the reason why I hate dpy and forks' cogs
what
do i just start off with commands.command() ?
yes
alright
hikari is better
you know what
i dont
I won't even argue
me too
me neither*
yes that
Guys ima try code but if someone is nice can they help me later on
Uknow no attitude needed just answer is good enough π
how to make the bot send a message every 15 minutes?
!d discord.ext.tasks.loop
discord.ext.tasks.loop(*, seconds=..., minutes=..., hours=..., time=..., count=None, reconnect=True)```
A decorator that schedules a task in the background for you with
optional reconnect logic. The decorator returns a [`Loop`](https://discordpy.readthedocs.io/en/latest/ext/tasks/index.html#discord.ext.tasks.Loop "discord.ext.tasks.Loop").
@bot.slash_command(guild_ids=[923895612745842718], name='host', description='Host an Endurance')
@option("wave", description='The Current Wave')
@option("endingwave", choices=[25,26,27,28,29,30], description="The wave you want your endurnace to end on")
@option("seats", choices=["One", "Two", "Three"], description="The amount of free seats")
@option("zone", choices=["Stonewood", "Plankerton", "Canny Valley", "Twine Peaks"], description="The zone you are hosting in")
@option("epic", description="Your Epic Games username")
@option("description", description="Any other notes you want to tell others about", required=False)
async def bruh(ctx: discord.ApplicationContext, wave: int, endingwave: int, seats: str, zone: str, epic: str, description: str):
Anyone notice anything wrong with this, the options to add wave endingwave ect. are not showing.
How to check if the author role is higher than the bot role and if the author is a server administrator?
!d discord.ext.commands.has_permissions
@discord.ext.commands.has_permissions(**perms)```
A [`check()`](https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#discord.ext.commands.check "discord.ext.commands.check") that is added that checks if the member has all of
the permissions necessary.
Note that this check operates on the current channel permissions, not the
guild wide permissions.
The permissions passed in must be exactly like the properties shown under
[`discord.Permissions`](https://discordpy.readthedocs.io/en/latest/api.html#discord.Permissions "discord.Permissions")...
how to get voicechannel id of ctx.author?
Should work^
!d discord.VoiceChannel
class discord.VoiceChannel```
Represents a Discord guild voice channel...
Check that for more info
@commands.command()
@commands.has_permissions(ban_members=True)
async def warn(self, ctx, member : discord.Member)``` can someone help me do my warnsystem
What do you need help with
And are you using cogs?
yes
import discord
from discord.ext import commands
import aiosqlite
class warning(commands.Cog):
def __init__(self, client):
self.client = client
@commands.Cog.listener()
async def on_ready(self):
print('warning.py has been loaded')
async def setup_db(self):
self.client.db = await aiosqlite.connect("warn.db")
await self.client.db.execute(
"CREATE TABLE IF NOT EXISTS warnsystem (guild_id INTEGER, warns INTEGER, id INTEGER)")
await self.client.db.commit()
@commands.command()
@commands.has_permissions(ban_members=True)
async def warn(self, ctx, member : discord.Member)
def setup(client):
client.add_cog(warning(client))``` full code atm
Uhm
Whatβs the error
i need it to be multi guild and be used as aiosqlite
Thatβs also easy
nice
You need to setup something to store the guild id
Then store everything per guild in their specified place in your db
and btw it may be easy for u but i also need to add warns , delwarns
yes
thats correct
Thousands of people will use it per second ?
not per second
lol but u do need a warn system for a bot , well u dont but i want i guess.

Uh what
bro im making a multi guild bot
Thatβs stupid
not a bot just for one server
i can tell reading ur bio lol
Hm?
Josh could u help me by any chance or na
With what

Not really, better in almost every way ngl
Maybe for one server would be nice , not for multi guilds
thats what i wanna do
Why would you wanna warns to carry on between guilds?
CSS
No , each guild has its own warnings stored
Use #web-development
Although that's really just raw css and html so.
So they you can use roles, easier for staff to see, easier for people getting punished to see, easier for over bots to see, easier for analytics, and you can view all warned people at once, doesnβt require a db either
so can someone first help me with the add warn command
.......
Itβs not
im not using it for one server bro
You just said each guild has individual warning
Aero please stop
Yes
So how wouldnβt that work
But he wants to do it differently
i mean as long as someone helps me I donβt mind tbf warning system is a warning system
What database are you using
aiosqlite
Alright well I canβt really help atm
I suggest just looking at the forms or example code for it
Oh damn ok
How familiar are you with python? @warped mirage
Idk tbf Iβm alright with it
Do you know how to get and post to your db ?
Sorta , I would need help
what best way to unban someone in discord.py?
!d discord.Guild.ban
unban*
!d discord.Guild.unban
await unban(user, *, reason=None)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Unbans a user from the guild.
The user must meet the [`abc.Snowflake`](https://discordpy.readthedocs.io/en/latest/api.html#discord.abc.Snowflake "discord.abc.Snowflake") abc.
You must have the [`ban_members`](https://discordpy.readthedocs.io/en/latest/api.html#discord.Permissions.ban_members "discord.Permissions.ban_members") permission to
do this.
thanks!
Can someone help me with my warning system first a warn command ( aiosqlite )
idts its possible yet nor did they send out any updates in order
Dw I fixed it
did you learn sqlite though
just fmi is it possible to have app commands in a cog?
All I did was setup cog like u told me before ig
Yeah
eh? can I see an example?
No
so you dont know how to perform basic sqlite queries?
alright alright
Well I do know some stuff I mean the general warn system itself
well just a write something like
a command named warn
- which inserts/updates new values into the db
import discord
from discord.ext import commands
import aiosqlite
class warning(commands.Cog):
def __init__(self, client):
self.client = client
@commands.Cog.listener()
async def on_ready(self):
print('warning.py has been loaded')
async def setup_db(self):
self.client.db = await aiosqlite.connect("warn.db")
await self.client.db.execute(
"CREATE TABLE IF NOT EXISTS warnsystem (guild_id INTEGER, warns INTEGER, id INTEGER)")
await self.client.db.commit()
@commands.command()
@commands.has_permissions(ban_members=True)
async def warn(self, ctx, member : discord.Member)
def setup(client):
client.add_cog(warning(client))``` full code atm idk if some stuff wrong but ye
your indents ^^ the setup_db function is outside the cog
and please learn sqlite before asking for help with it
I know some but I donβt know all of it lol and I need help with the warn system because itβs not all about db
what you have to do
- send a message to the member to be warned
- update records in the database
and capitalize your class lol
β¦.. viewwarns delwarns
Lol this is not easy
first make one command at least? and try to visualize and write pseudo code of your objective to achieve
Damn no help L ok Iβll just code on my own till it works I guess
π³ write an algo and make a flowchart for ur dream viewwarn delwarn commands.
β¦..
jokes apart, this 
you should first make it clear "how" and "when" to delete , read or insert the data
guys do yall know how to start from scratch i have no knowledge with discord bots in python, could i have website recommendations etc?
how experienced are you with python?
i know the basics etc print functions, inputs and using int and str
so not much experience
Does she have any experience?
i would recommended learning some basic concepts like
- builtin functions like len, sort , etc
- classes
- an introduction to asyncio ( async/ await syntax at minimum )
- control flow, loop logics
since discord.py is a bit complex library to work with
pleasure, there are many free resources to learn them π , you can use !resources command to find it
can you help me
!ytdl we can't help with YTDL / anything related to youtube music bots as per the rule 5
Per Python Discord's Rule 5, we are unable to assist with questions related to youtube-dl, pytube, or other YouTube video downloaders, as their usage violates YouTube's Terms of Service.
For reference, this usage is covered by the following clauses in YouTube's TOS, as of 2021-03-17:
The following restrictions apply to your use of the Service. You are not allowed to:
1. access, reproduce, download, distribute, transmit, broadcast, display, sell, license, alter, modify or otherwise use any part of the Service or any Content except: (a) as specifically permitted by the Service; (b) with prior written permission from YouTube and, if applicable, the respective rights holders; or (c) as permitted by applicable law;
3. access the Service using any automated means (such as robots, botnets or scrapers) except: (a) in the case of public search engines, in accordance with YouTubeβs robots.txt file; (b) with YouTubeβs prior written permission; or (c) as permitted by applicable law;
9. use the Service to view or listen to Content other than for personal, non-commercial use (for example, you may not publicly screen videos or stream music from the Service)
OK
Thereβs a bot called diva and they arenβt breaking rules ?
Just curious .
there are many bots using Youtube to play music, and yes they are all breaking TOS, not discord's but youtube's
a bot named Groovy recently stopped with its development for the same reason.
I use Spotify/distube well not atm
this error
self.argv is a list with 0 or 1 elements
!e ["1st element"][1]
@slate swan :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 1, in <module>
003 | IndexError: list index out of range
is privet a subclass of commands.Bot ?
in this case, the script is expecting command line argument, the bot token
they stopped, like stopped and aren't gonna make a comeback?
@commands.has_permissions(ban_members=True)
async def warn(self, ctx, member : discord.Member):
warn = [0]
cursor = cursor
async with self.client.db.execute("INSERT INTO warnsystem (guild_id, warns , id, guild) VALUES (?, ?, ?, ?)"("id, warns, guild.id",)) as cursor:
await self.client.db.commit()``` xd im so bad
youtube fucked up real great
im trying atleast
wait...what the heck?
? hello im @warped mirage
why are you passing the parameters in a single string
idk what shall i do
are you aware of required indentation in python?
i indented
they didnt state any info
https://groovy.bot/ here's the faq
i'll be fine, too lazy to read
though rythm did announce that they had updates coming out this year?
Bro idk why the slash commands dont show up nomo
and how will we know-
yes, im not sure if its about music, but the say they are working on something "cooler"
It says that the cogs are loaded but after hours nothing happens
yeah
Idk im just asking if there is a problem with the disnake library or discord "API"
use test_guilds kwarg easy
in the commands deco
you probably dont have the app_commands scope
disnake has no problematic issues rn ( stable branch )
I already have it. It doesnt work either
application.commands scope
well, that sould raise an exception in that case...
^
yeah something like "cannot overwrite....in guild....."
ok?
good boy
have you setted sync_commands_debug to True to see if your slash commands are loaded successfully?
arent we wasting our time on this convo too, okimii
what....
i like how this chat is always on fire.
π
ill go watch naruto anyways
Guys ima send my crap code in a sec which will be the most terrifying thing u will see
@slate swan btw you said it would raise an error if the permission is missing, which payload sends the perms of the bot? so then disnake would parse it and probably check it and raise a exception?
β οΈ DISCLAIMER : donβt watch if u hate bad codes
I don't think so mmm
because as far as i can see READY doesnt send them
I use disnake too, and the first time me too haven't activated application.commands scope
yeah
but no errors were coming
because ive seen users with the issue of them not having the scope on and errors werent getting raised
yes
maybe some endpoint payloads were updated, i doubt it. mayeb disnake didnt parse it? i doubt it as well.
try setting the logging level to debug, you should then see the responses from discord on requests, if you're missing a scope it should be 403ing in those responses
idk if sync_commands_debug = True will show the problem, maybe it can be helpful
this would happen when? syncing app commands?
yes
no idea cause i have read discord's docs yet, and disnake or actually any discord.py ( forks included ) documents their http :)
why would they document internals?
Honestly I stand in the camp of "internals should be documented" because it means that people gain a better understanding of how the library works, not just what it offers, and is good for contributors
I would do that for disnake but I'm too burned out to even consider it rn
thats what im saying, one could just look at the docs and come the conclusion of why the exception was raised instead of digging into the source
