#Basic Pycord Help
1 messages · Page 21 of 1
idk it doesnt work if i definie id on somethink like bot.get_guild
If i doesnt it dowks?
2024-02-21T15:15:19.064457092Z Ignoring exception in on_guild_channel_delete
2024-02-21T15:15:19.064652129Z Traceback (most recent call last):
2024-02-21T15:15:19.064671628Z File "/usr/local/lib/python3.10/site-packages/discord/client.py", line 378, in _run_event
2024-02-21T15:15:19.064677078Z await coro(*args, **kwargs)
2024-02-21T15:15:19.064680054Z File "/data/cogs/autodelete2.py", line 102, in on_guild_channel_delete
2024-02-21T15:15:19.064683460Z resultcursor = await db.execute('SELECT channel_id FROM autodelete WHERE channel_id = ?', (channel.id))
2024-02-21T15:15:19.064686687Z File "/usr/local/lib/python3.10/site-packages/aiosqlite/core.py", line 190, in execute
2024-02-21T15:15:19.064690083Z cursor = await self._execute(self._conn.execute, sql, parameters)
2024-02-21T15:15:19.064692869Z File "/usr/local/lib/python3.10/site-packages/aiosqlite/core.py", line 133, in _execute
2024-02-21T15:15:19.064695774Z return await future
2024-02-21T15:15:19.064698439Z File "/usr/local/lib/python3.10/site-packages/aiosqlite/core.py", line 106, in run
2024-02-21T15:15:19.064701786Z result = function()
2024-02-21T15:15:19.064705082Z ValueError: parameters are of unsupported type```
And what is wrong with that?
Let me see
@frail basin py 2024-02-21T09:04:52.373061763Z TypeError: Client.get_channel() got some positional-only arguments passed as keyword arguments: 'id'
thats a pretty self explanatory error
The error literslly telld you
get_channel only receives one positional argument, an int
Why would you need to pass id=
So i dont have to write id?
no
and what is wrong her?
2024-02-21T15
19.064705082Z ValueError: parameters are of unsupported type
Thats pycord ig?
i think sql would return a ProgrammingError dont quote me on that one tho
The traceback literally shows your sql query line as the error line...
Yes but idk whats wrong there
hardcode the ID and see if it works
if it does, go from there
2024-02-21T09:04:52.373415787Z user_info = (datetime.datetime.now() - member.created_at).days
2024-02-21T09:04:52.373418784Z TypeError: can't subtract offset-naive and offset-aware datetimes```
How can i get how old in days a account is?
you're trying to subtract a datetime that doesn't have timezone information (offset-naive) from one that does have timezone information (offset-aware)
Can you tell me why i cant import time?
the two timestamps shoule be the same type
show error
Its grey
can you send a screenshot?
I got a workaround. Thanks
okay
guild = await bot.fetch_guild(config().guild_id)
members = guild.fetch_members()
print(guild.chunked)
print(guild.members)
why do i get False for chunked? I fetched the members before? and why is guild.members an empty list?
you dont have members intents
and please dont fetch all members on bot start
they get cached by default
and dont fetch the guild either
i am doing it in a task just because testing
i have it enabled in dd portal
and intents = discord.Intents.all()
well,
then
any idea?
do it in a normal command and see what happens
okay now everything is weird...
@tasks.loop(minutes=5)
async def user_count_task():
print("hi")
if user_count_task.is_running():
user_count_task.restart()
print("user_count_task restarted")
else:
print("user_count_task started")
i get "user_count_task started" but not "hi"
what do you mean?
you are basically doing
if the task is running
restart it
if the task is not running
print "it started"
unless im reading that wrong
yeah
uh wait
wtf
user_count_task.start()
just dissapeared
im dumb
all works now, very weird
Also wait until ready with the tasks
yeah just removed it in this case because i was confused
hey guys, Interaction.edit is not working on my pc, but it was working on my other one
sadly i cant get what version i was using, and i couldnt find anything online
could someone help me please
interaction.edit is not a thing
its either interaction.response.edit_message or interaction.edit_original_response
So it never existed ? Then I may be wrong and I was using a different library than py cord because it worked
Thank you for helping me out here
.rtfm Interaction.edit
it's on master
Wait what
because nziie and i hard-coded it
Is there any way I can install this version since it seems to be working ?
?tag install
1. Uninstall discord.py or any other forks of discord.py you might have with the namespace discord.
python -m pip uninstall discord.py discord -y
2a. Install py-cord
python -m pip install py-cord
2b. Update py-cord
python pip install -U py-cord
Installing other builds:
Note: You need to have git installed. Use ?tag git to find out how to install git.
Updating the module to master branch (unstable):
pip install -U git+https://github.com/Pycord-Development/pycord
last line
I actually don’t know why Interaction.edit was working before, I didn’t install the master one,
But thanks I will do that
webhook.send(view=btn()) ?
like this ?
i have no idea what btn is
class for buttons
class btn(discord.ui.View):
def __init__(self):
super().__init__(timeout=None)
invite = discord.ui.Button(label='Invite Dank Alert!', style=discord.ButtonStyle.gray, url='https://discord.com')
self.add_item(invite)
well, it’s bad practice to name something to be something it isn’t
and also UpperCamelCase for class names
anyway rename to InviteBot
should work
i did
okh let me see
yeap thanks
discord.errors.InvalidArgument: Webhook views require an associated state with the webhook
why ?🙂
the webhook needs to be owned by the application
e.g. as a follow-up to an interaction
that & it needs to actually have the client state attached to it
smth like Webhook(..., state=bot._connection) or webhook._state = bot._connection
webhooks are jank af
My message delete log embed has message.attachments[0].url but 9 out of 10 times I see this placeholder image, is there any fix to this?
Tried searching docs, it only takes https links so I don’t think I can save attachment and put attachment url
?tag localfile
f = discord.File("some_file_path", filename="image.png")
e = discord.Embed()
e.set_image(url="attachment://image.png")
await messagable.send(file=f, embed=e)```
Thank you
any idea why it's installing the library as "UNKNOWN"?
What is your Python version?
3.10.12, would that cause any issues?
Can a bot create a linked role?
or add a requirement to an existing one to make it linked?
How many slash commands and groups can now be registered per app?
100 slash commands. And if it is a slash command group i think you can have 25 options and each of those 25 options can have 25 options.
- 5 user commands +5 message commands
Then double it for guild commands vs global commands
And is one group command one slash command?
pretty sure that requires oauth (it is not available to normal bots at least. )
Fabio, yes
how can I tell if a slash command was ran from a VC text channel
Check the type of ctx.channel
how can I make a slash command only appear to users in certain contexts, such as only in a VC, I am making an AutoVC and need some per channel config commands
where can I find the list of kwargs for @bot.slash_command
Is there a way to retrieve the bot's default role? The one that gets created when adding it to a guild
So Max 100 commands at all
can someone help me i need to know if pycord is installed on my pycharm now
but i am completely new and idk a shit
Yes
You can run pip list
Also if Pycord stuff doesn't work then you know it is not installed
there is nothing when i run pip list
it's pycharm. they probably have a venv
there's a button called Python Packages
It should be on the lower left side of your window
ye
if you see py-cord then it's there
yeah it is
Heya, I am trying to send an image to a different channel
such as a saved image is sent to a announcement channel
so what is your question
So I am making a bot which places a logo on an image saved from a previous message. I want to get the image to be sent back by the bot to a different channel
is user_limit=0 infinity for voice channels
how to send message in the channel on start?
what type of channel? Is it like the same channel every time?
yeah, text channel
What is wrong here
await cursor.execute(
"SELECT channel_id FROM db WHERE guild_id = ? AND channel_id = ?",
(message.guild.id, message.channel.id))
TypeError: not all arguments converted during string formatting```
update- i had to upgrade pip, setuptools and wheel, it works now! thanks to everyone
by the way do you know why Interactoin.edit was working on my main pc, even though i did not install it from the main branch?
if not then i maybe forgot i installed it that way, but im pretty sure i did not
I'm having trouble getting slash commands working, they show up in the server settings, but are not available in my text channel, any idea of what might be up, or where to start debugging?
Refresh your client.
Is there a way, that a bot can interact with automod in pycord?
@frail ocean the docs have some good examples.
Take a look at https://docs.pycord.dev/en/stable/api/models.html#automod and https://docs.pycord.dev/en/stable/api/models.html#discord.Guild.create_auto_moderation_rule
Models are classes that are received from Discord and are not meant to be created by the user of the library. Attributes key, url. Methods def is_animated, async read, def replace, async save, def ...
Do you have a exact example?
No because i don't think its in the guide and it requires a lot of stuff that I don't want to type out at the moment
That Guild.create_auto_moderation_rule should be all you need to take a look at though
What are you trying to do, just create rules?
I completely restarted my discord, and that seems to have done the trick – but that doesn't really work when actually deploying the client, do you know if this eventually becomes consistant by itself?
automod badge haha
wdym
bots get badges if they interact with the automod?
Oh i didn't know that
I will not help you with this further, unfortunately. It's misleading for your bot to have an automod badge if it does not, in fact, actively utilize the automod.
Na I want to see what i can do with code on the Automod side
I have a slash command that asks the user for a channel and I want to send that data over to a button, someone suggested to me that using a custom_id is a good idea to forward that data to the button but I can't figure it out how to set that up. Does anyone have a good example of how they used the custom_id to get data into a button?
I highly encourage you take a look at our documentation. It truly has everything that you are asking about.
What do you mean, forwarding that data to a button?
it should fix it self within a few minutes. Discord just need to refresh it. Sometimes it seems like the client get stuck and does not update for a long time.
I was stuck trying to figure this out for half an hour+ :|
This depends on how you have things set up. If it is a short term button you can just save it as a variable in the view passed via the __init__ function
Yeah that seems like something I could do. The button should not stay enabled for any longer then 20ish seconds
It is unfortunately a discord issue (assuming you are pycord 2.4.1 or newer.) Generally it should refresh soon enough for users.
Ok thanks
Do you have any documentation I could stare at?
There is not docs for this specific thing it is more just general python
This is our example of buttons and can get you started: https://github.com/Pycord-Development/pycord/blob/master/examples/views/confirm.py
Do you know how to pass and argument to an instance of a class?
I do not, is it like passing an argument into a function or is it different?
I was expecting this to be instant with the server IDs specified, but I suppose there is no benefit to that then?
I have created a command group in a cog, can I then use this group in another cog?
It might be best to watch a quick tutorial on how classes work in python, it is similar to functions but not exactly the same. My recomendation: https://www.youtube.com/watch?v=ZDa-Z5JzLYM&list=PL-osiE80TeTsqhIuOqKhwlXsIBIdSeYtc
going to make things easier down the road
Alright I'll give it a watch, thanks!
It should be almost instant with guild_ids. The intended benefit to guild_ids is you can have different commands on different servers though. It might have just been a one off discord thing too, I would not worry about it to much.
I'm going to say yes, however it would probably be the best case to keep a command group all in one cog for organization purposes
can u tell me how can i import the group to a new cog?
💀
May I ask why you are trying to do this? Your code would be easier to read and maintain if you kept groups in one file with each other
i have 1 group with a lot of sub commands and i will add this in seperated cogs
It's just a matter of making a slash command group and importing it in a new file
Well, seems like command changes update by themselves after a bit
Thanks for the help! :)
What's the best way to implement scheduled tasks? I can research it myself, just getting a few contradictory answers online
how do i make a group bridge commands work in guilds only
You need at least 100 rules created by your bot to get that badge
Your badge hunting thing is really weird. I've seen you in the ddevs server
?
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.39.33519\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for aiohttp
Failed to build aiohttp
ERROR: Could not build wheels for aiohttp, which is required to install pyproject.toml-based projects
wtf is this error
solve someone
somewhere in there it tells you to install c++
i installed still same problem
how do i make a modal
discord.ui.Modal
discord.ui.Modal.add_item
discord.ui.Modal.callback
discord.ui.Modal.children
discord.ui.Modal.custom_id
discord.ui.Modal.on_error
discord.ui.Modal.on_timeout
discord.ui.Modal.remove_item
discord.ui.Modal.stop
discord.ui.Modal.title
discord.ui.Modal.wait
discord.ui.modal.Modal
discord.Guild.fetch_auto_moderation_rule
discord.Guild.fetch_auto_moderation_rules
discord.Guild.create_auto_moderation_rule
use python 3.11
forget it dude
you need to install like 5GB worth of c++ build tools for that crap
You can use 3.12
so installing 5GB worth of stupid vs c++ build tools isnt too mcuh effort?
instead of just using the github version or using 3.11?
How do I link users, messages and channels in a slashcommand response?
member.mention
channel.mention
message, not sure
These are the permissions the bot currently has, so I don't think that is the problem
more likely I'm just not sending the correct data
Whatever you're doing, you're formatting the mention wrong.
Can't tell without code.
hello, so i have a command in a cog but the command doesnt show up
import discord
from discord.ext import commands
from discord import option
import json
import base64
from discord import guild_only
class Testujemy(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.slash_command(name = "testcik", description = "test")
async def trolled(interaction):
for category in interaction.channel_categories:
for channels in category:
print (channels)
def setup(bot):
bot.add_cog(Testujemy(bot)) ```
^ thats the code of the cog
```python
import discord
from discord.ext.commands import CommandNotFound
from discord.ext import commands
from discord import guild_only
import os # default module
from dotenv import load_dotenv
import sys
import requests
from io import BytesIO
import asyncio
import json
intents = discord.Intents.all()
bot = discord.Bot(intents=intents)
import base64
load_dotenv()
for filename in os.listdir("./cogs"):
if filename.endswith(".py"):
bot.load_extension(f"cogs.{filename[:-3]}")
print(f"Loaded {filename}")
#commands...
^ thats how i load the cog
(i did everthing in .slashnoshow)
I tried both plain @nick and @<user_id> – what is the correct way of doing it?
@bot.slash_command(
description="List current status",
guild_ids=config.get("discord_server_ids", []),
)
async def checkinstatus(ctx: discord.commands.context.ApplicationContext):
users_in = []
users_out = []
with Session(engine) as session:
for user in session.query(DiscordUser).all():
if user.checkin.is_in:
users_in.append(f"@<{user.discord_id}>")
else:
users_out.append(f"- @<{user.discord_id}>: {user.checkin.message}")
outlist = "\n".join(users_out)
await ctx.respond(
f"""**In:** {", ".join(users_in)}
**Out:**
{outlist}""",
ephemeral=True,
# delete_after=config.get("temporary_message_time", 120),
)
Mentions format is <@ID>
You placed the @ in the wrong place
so close, yet so far 😅 thanks, I didn't notice the difference when I typed off after my test message
bump
There is no point in getting the member object just for a mention
got details on this?
My intent here is to list a bunch of users based on data from a database, simply to make it easier to send them a message.
I'm not mentioning the user that executed the command, it's basically everyone in the channel
That being said, any magic to make them links but not ping people? not that it matters much, as I'm using ephemeral, but it'd look cleaner without
I had trouble with my Discord client being slow at loading in the commands last night, try quitting discord completely and starting it again? The commands where visible under the bot in settings, but not when typing in the text channels
or User.mention whatever
oh so you store the ID in the db, makes sense
That doesn't exist. Either its a text string or its a proper highlighted mention
I could've sworn that was a thing, but it's very possible I'm confusing it with Matrix
Yea
not sure what that'd even accomplish
you can silence the ping ofc but not sure that's what you intend lol
actually hang on
well okay there is another way
You can construct a link like this https://discord.com/channels/@me/userid
that will insta-open the DMs with that user
and it'll be labelled with that persons username
that also wouldn't produce a ping if you were to make it non-ephemeral
bump
restart your discord and make sure you do /trolled and not /testcik
how do I disconnect a user from VC using a bot, assuming the ctx is the VC in question
You use discord.Member.move_to
Models are classes that are received from Discord and are not meant to be created by the user of the library. Attributes key, url. Methods def is_animated, async read, def replace, async save, def ...
Where can I get the time a command was sent at for ApplicationContext? I can't exactly do message.created_at
time.time()?
The problem is that there might be a delay from when a command was sent vs. when it reached my bot
and that's exactly what I'm trying to measure
ctx.interaction.id then do something like
?tag snowflake
oh my
You could edit the message and only mention the users when editing the message (basically send some random crap first and then edit). However, this just gets rid of the ping, it will still be blue/yellow
or just discord.Object(id).created_at
wait how do i make bridge group commands work in dms only
just return if the channeltype is not a dm
@boreal sky
isnt there like a guild_only()

but that doesnt work for groups for some reason
yeah it’s like discord.ext.commands.dm_only or something
oh
holy fuck
so what can i put here
so that the slash cmd doesnt show up in dms at all
like the @guild_only() doesnt work for groups
That seems to work \🤔
and how often does ctx.bot.latency end up getting updated?
you can always just make a regular slash command group
but like most of my bot is bridge commands
i don’t work with bridge that much so I wouldn’t know, but you can make a slash command and a text-based command
can what be found in docs
like how to make bridge groups guild only
don’t think so?
oh
oh you can pass guild_only = True in the group decorator maybe
oh ok thx
Yes, that is the idea, being able to silence the pings, aka no red dot/sound and so on, while still giving access to the context menus you get from clicking a mention
how to make paginator persistent?
I'll end up asking this one again lol
Just curious if maybe there's a way to force a latency check or something
or at least know what kinda tiem frame it's based on
what do you need it for
A needlessly complex ping command for the fun of it
that no one will use? :3
that I will use because it's satisfying
id assume it gets updated often enough for your purposes
not like anyone will be using my bot all that much in the first place, I'm just vibing here
well... like every 30 seconds
or so it seems
not that fun having to wait 2.5 minutes just for a single command
32, but still:
doubtful
Even with 32, the 2nd and 3rd always seem to be the exact same for some weird reason
yes but why is it specifically the 2nd and 3rd
if you think about it it makes sense really
In what way?
actually no, its shorter than 32s according to your logic
it makes sense in my head but i cant put it into words
0 15 30 45 60 75 80
|-------|-------|-------|-------|-------|-------|
U U U U U U
Q1 Q2 Q3 (Overlap) Q4 Q5
here, i asked AI
to make a representation of what i mean
Q is your query, and the U is the time of the latency updating that it itself just assumed to be 15
idk if that makes sense ill go lmao
Is there a way to make a slash command group over more cogs
sorry for the late response but yea it doesnt work
How long are buttons active for
every command is from the main file not from any cogs
they worked before now itsbroken
no clue then, ig you are doing the cog incorrectly then
its in the ./cogs directory
so idk what could be wrong
it detect the files
so i have no clue
change the whole for loop that handles the loading to just
bot.load_extensions("cogs")
lol
you can still do this btw
it needs to be load_extensions*
Anyone
if im not very wrong, 15m by default
The toothy my friend
what do you think does it mean that i dont respond
A: i dont care
B: i dont know
Do you care?
i cant care if i dont know
Oh
how to send message in the channel on start?
ctx.edit
await ctx.msg.edit?
Get the channel, send the message
msg is is variable
No, ctx.edit.
ApplicationContext already provides an edit method that does it for you.
ctx.message will always be None on slash commands.
.rtfm ApplicationContext.edit
🤔 Do Files always show before embeds in messages, or did I somehow do something wrong? Are there any sneaky ways of making it come after?

the order is fixed
you can't change it
message > files > embeds > buttons
Can't think of any place where a file before an embed makes visual sense, but it is what it is. Thanks for the rundown
np
it's just because of how embeds work I think
they're kind of not part of the message
how do i make a multiple choice option
Am I right that it takes a while for Context Menus to appear?
I know slash commands are fast now not sure if that is the same for context menus. If it has been over an hour post your code here.
Here's the slash options example.
@whole needle ^
Is there a way to use the same slash command group in multiple cogs
you asked this the other day
we gave you an answer
just like you would any other variable or object
# cog1.py
import discord
group = discord.SlashCommandGroup("MyGroup")
...
# cog2.py
import discord
from cogs.cog1 import group
@group.command
async def my_command(ctx):
...
I'm pretty sure that's how it works
fact check me
I’ll try thx
hey, I'm working on an old bot of mine, and when I launch the bot it spits out this error log. All my previous commands are still working, however any new commands I try to make are just giving me Application did not respond in discord and no log output on the bot.
Error:
Traceback (most recent call last):
File "/home/[user]/.local/lib/python3.11/site-packages/discord/client.py", line 378, in _run_event
await coro(*args, **kwargs)
File "/home/[user]/.local/lib/python3.11/site-packages/discord/bot.py", line 1164, in on_connect
await self.sync_commands()
File "/home/[user]/.local/lib/python3.11/site-packages/discord/bot.py", line 738, in sync_commands
app_cmds = await self.register_commands(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/[user]/.local/lib/python3.11/site-packages/discord/bot.py", line 531, in register_commands
prefetched_commands = await self._bot.http.get_guild_commands(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/[user]/.local/lib/python3.11/site-packages/discord/http.py", line 365, in request
raise Forbidden(response, data)
discord.errors.Forbidden: 403 Forbidden (error code: 50001): Missing Access```
One of the ids in guild_ids or debug_guilds does not have your bot in it.
oh smh my head, the person I'm making the bot for removed my bot from their server, that explains it
sorry! should've checked that before posting here
I'm experiencing issues with pinging on certain servers, similar to the images provided. I'm using <@&RoleID> in my bot
i have the role btw
show us your code
for when you're sending the role mention
async def SendMessage(channel_id,role_id,embed,extra_text):
channel = bot.get_channel(channel_id)
await channel.send(f'<@&{role_id}> {extra_text}',embed=embed)
but working on some sever idk why
your bot may not have the permissions to mention roles in those channels
which permission actually?
even i can't ping noobies by typing <@&id> myself
this ?
ig
that would work
Is it possible to change the avatar/profile of a bot per server?
No
is paginator.send() can only be used with context? i want to send it in an event, howw?
How can I use @bot.command and the on_interaction Event?
If you mean slash_commands than its discord.Bot but on_interaction also works with the other instances
I mean command
@bot.command(
name="leaderboard",
description="Gibt eine Liste der User, sortiert anhand ihrer Level, zurück",
guild_ids=[1206310273649217546]
)
async def leaderboard(interaction: discord.Interaction):
print(interaction)
use ctx: discord.ApplicationContext instead of interaction at slash commands
And it would be discord.Bot what you have to use
yes
But if I have a on_interaction Event, it don't prints interaction in the console
how do i send svg file (as image)
this file gets sent like this
. . .
await msg.edit_original_response(file=discord.File("result.svg"))
this is what im doing currently to send the file
btw ping me when u respond to me ( I FIXED IT )
just realised discord doesnt have preview for svg
ok wtf
everytime i convert to png from svg using cairo
it tells me i dont have libcairo-2.dll
when i download it
it says i dont have discord
maybe some context or screenshot would help
how to put quantity optional?
required=False
async def fattura(ctx, prodotto, prezzo, quantity, required=False):
that's correct?
hm how
Here's the slash options example.
@option("product", description="Product name") @option("price", description="price") @option( "quantity", description="How many pieces", required=False )
like that?
try it and see
that is usually when no one knows
Because you're probably overriding the method and not letting the bot process the interaction
How can I fix that?
Why do you need to override the on_interaction event?
For buttons
Buttons have their respective callbacks in views.
You don't override events.
Here's the confirm example.
line 964, in send
raise TypeError(f"expected Context not {ctx.__class__!r}")
TypeError: expected Context not <class 'discord.channel.TextChannel'>
paginator = Paginator(
pages=pages,
use_default_buttons=False,
custom_buttons=pages_buttons,
)
channel = bot.get_channel(1127166473467600896)
await paginator.send(channel)
is there a way to send paginator to a specific channels or update the page content?
without Context
and they work after a restart?
No, you have to use persistent views.
Here's the persistent example.
Thanks
The new PR by @fleet cedar will
technically no, but it looks like if you create a dummy context object to pass as ctx and then use target to specify the channel it should work. TBH this should not be how it works. I might PR a fix if I have time
ohh, Oms fixes this
Hello ! 
What permission do I need to use the soundboards on the doc?
what do you mean by "doc"?
why doesnt this work?
Application Command raised an exception: AttributeError: 'Interaction' object has no attribute 'edit'
messageToEdit = None
@bot.slash_command(name='test1', description='test1')
async def host(interaction: discord.Interaction):
global messageToEdit
messageToEdit = await interaction.response.send_message("Test")
@bot.slash_command(name='test2', description='test2')
async def host(interaction: discord.Interaction):
messageToEdit.edit(content="Testttttt")
because interactions have no edit method
use ctx: discord.ApplicationContext instead of interaction
Mmm okay ill give it a try
documentation
I can't find the exact permission to modify the use of soundboards with a bot
thanks
in set_permissions of a voice channel, is there a permission that can be modified to prevent the use of soundboards?

Ayo what
Oh that
That might not make it into 2.5 unfortunately
Doruk felt 2.5 already has too many changes. So 2.6 it is
But you can always install my fork
Regardless of the version of pycord you are using
Traceback (most recent call last):
File "/home/container/bot.py", line 3, in <module>
from src.cogs.economy import setup as setup_economy
File "/home/container/src/cogs/economy.py", line 1, in <module>
import discord
ModuleNotFoundError: No module named 'discord'``` im getting this error on my test bot all of a sudden not quite sure why, im using a requirement file py-cord
colour= discord.colour.embed_background("dark") This aint working
It should be discord.Colour.embed_background(...)
Oh one more thing how do i get the link for dms
What link
You mean like link for messages?
Models are classes that are received from Discord and are not meant to be created by the user of the library. Attributes key, url. Methods def is_animated, async read, def replace, async save, def ...
Like this https://discord.com/channels/1206760297176498216 for dms
Discord is the easiest way to communicate over voice, video, and text. Chat, hang out, and stay close with your friends and communities.
Hi! I want to automaticly create post in a forum and send a message but I not find how to do it (Sorry for my bad english)
Dm channel format is https://discord.com/channels/@me/USERID and for server channel it's https://discord.com/channels/SERVERID/CHANNELID
button = discord.ui.Button(label="Direct Messages", url=msg.jump_url)
View.add_item(button)```
Missing item in View.add_item
and you replace userid, serverid and channelid with the one you wish for
You didn't make the view instance
How do i do that
Pls
Just like how you make an instance of any class. If you don't know, you should definitely learn about oop first before making a discord bot
But i dont want it in a class
I seen it work before
What
I dont need this in a class function
That's not what I mean...
You should first learn python before making a discord bot
You're gonna face lots of basic difficulties like this and it'll make your work harder
Models are classes that are received from Discord and are not meant to be created by the user of the library. Attributes key, url. Methods def is_animated, async read, def replace, async save, def ...
I think it's this
Can you give me an exemple ?
You just get the forum channel and then create the thread.
How ? I already tried
Tomorrow
im getting this error
Traceback (most recent call last):
File "/home/container/bot.py", line 49, in <module>
class Bot(discord.AutoShardedBot):
AttributeError: module 'discord' has no attribute 'AutoShardedBot'. Did you mean: 'AutoShardedClient'?```
show your pip freeze
Oh wait, I think the error is coming from your host right
And not from your local pc I think
it is yeah
aiocache==0.12.2
aiohttp==3.8.6
aiomysql==0.2.0
aiosignal==1.3.1
appdirs==1.4.4
async-timeout==4.0.3
attrs==23.2.0
beautifulsoup4==4.12.3
certifi==2024.2.2
cffi==1.16.0
charset-normalizer==3.3.2
colorama==0.4.6
DateTime==5.4
easy-pil==0.3.0
frozendict==2.4.0
frozenlist==1.4.1
gitdb==4.0.11
GitPython==3.1.42
html5lib==1.1
humanize==4.9.0
idna==3.6
loguru==0.7.2
lxml==5.1.0
multidict==6.0.5
multitasking==0.0.11
numpy==1.26.4
pandas==2.2.1
Pillow==9.5.0
psutil==5.9.8
py-cord==2.4.1
pycparser==2.21
pycryptodomex==3.20.0
pygit2==1.14.1
PyMySQL==1.1.0
python-dateutil==2.8.2
python-dotenv==1.0.1
pytz==2024.1
requests==2.31.0
sentry-sdk==1.40.5
six==1.16.0
smmap==5.0.1
soupsieve==2.5
topggpy @ git+https://github.com/top-gg/python-sdk/@c26fed5ef246c51f958a2971adc2e00662f4da53
typing_extensions==4.9.0
tzdata==2024.1
urllib3==2.2.1
webencodings==0.5.1
yarl==1.9.4
yfinance==0.2.25
zope.interface==6.2
``` this is from my vps
i also had discord.py so after i un installed that, this is the new error ```py
Traceback (most recent call last):
File "/root/alpha_bot/bot.py", line 11, in <module>
import topgg
File "/root/alpha_bot/venv/lib/python3.10/site-packages/topgg/init.py", line 24, in <module>
from .client import DBLClient
File "/root/alpha_bot/venv/lib/python3.10/site-packages/topgg/client.py", line 36, in <module>
from discord.ext.commands.bot import BotBase
ModuleNotFoundError: No module named 'discord.ext.commands'
Your bot uses all those packages?
nnot all of them i dfont know how all of them got there lol im using a requirement file
After uninstalling dpy, uninstall pycord and reinstall it
will try
If I were you I'd remove all the unnecessary ones
why isnt the email option showing up
you send a codeblock inside of a file?
also...
?tag requests
Why you should not use the requests library for your bot
requests is a popular HTTP library for Python. It is however not a good option for Discord bots, since it is not async and blocking.
This essentially means that your bot will not be able to execute any code at all while a request is happening. Since requests usually take a few seconds to complete, this can have a detrimental effect on your bot's performance. E.g if a user executes a command that performs a request taking 5 seconds to complete, no one else will be able to use your bot for those 5 seconds.
Please look at using a HTTP library that has async support, such as aiohttp or httpx
the code is too long so it converts to a txt file automatically
dont have nitro 
dont use requests
why not
.
ive had not problems
use aiohttp
restart your discord so you are getting the latest version of the command, and check your terminal for any errors inside
doesnt have to be the same name as the same name as in the option?
what is also your py-cord version?
works fine when i copy your code
ignore the command name
Also, dont use choices
typehint the spuserid argument as bool and it'll work
I think topggpy has discord.py as a dependency. Im not sure how you can exclude it but im sure there is a way.
but not the github one?
Hmm ima have to look into this more cause I’m getting all kind of issues all of a suddden
Ima have to make a minimal bot tomorrow
py-cord 2.4.1
pycord 0.1.1
@whole needle
and remove the choices
also why tf do you ahve pycord installed
you can uninstall pycord it is not related to py-cord
pycord is not related to py-cord
oh lol
me first
alternatively to typehinting the command argument as bool you can change the option to be @option(name="showemail", bool, description="Do You Want To Show Your Email?")
how lol im new from discord.js
spuserid: bool
that is typehinting
@whole needle try commenting out the command, then running it, uncomment and run it
and restart your discord after changing it, or at least ctrl+r
typehinting is a python concept, nothing specific to any library
it’s also a javascript thing lol
oh typehint mb im trippin 💀
or do this as i said, doesnt matter
. this will probably fix your issue
for what purpose
the command on discord’s side is stale
so unregistering and re-registering would fix it
the discord api, not discord client
i never had that happen lol
i’ve seen that happen quite a lot with students i teach
i just edited the same command 3 times in like 20s and it always worked
¯_(ツ)_/¯
this not working either lmao i reset my discord ive kicked and reinvited the bot and all i get is spuserid
you’re not providing an argument for email
yes, it should look like the following:
async def spuserinfo(ctx, spuserid: str, showemail: bool):
then do this?
it can just be if showemail but yeah
ive always used if x == o
is is weird
yes, is is wieird
Hi Pycord people! I am having a hell of a time getting the server nickname for a user that sends a command. I see in the docs that ctx.author.nick is an attribute, but it is always coming up None. Basically, I want to capture the server nickname for a user that executes a command instead of their actual discord username. Also tried ctx.author.display_name, but that is just showing the discord username, too
?tag install
1. Uninstall discord.py or any other forks of discord.py you might have with the namespace discord.
python -m pip uninstall discord.py discord -y
2a. Install py-cord
python -m pip install py-cord
2b. Update py-cord
python pip install -U py-cord
Installing other builds:
Note: You need to have git installed. Use ?tag git to find out how to install git.
Updating the module to master branch (unstable):
pip install -U git+https://github.com/Pycord-Development/pycord
upgrade to master branch
Heck yes, will try this.
Thanks
it started to work in one channel but not others.
is there any guide where I can make a form like stuff?
Like I want to make a command in my bot where it sends a form and retrieves the information from user
and makes predictions using that data
What is "form" supposed to be? You mean a modal?
No like a text form
Which the bot will give, like a UI
Here's the modal dialogs example.
yes but it will be through the bot
when using a the slash command
Yeah but I want to add like choice options in it
like selectable options ( categorical ) in the form
Like Yes/No
Modals can only receive text input
Okk
Can we see your .txt file?
Nope doesnt work. If they are not in a class they wont get registered
Try it with the github one
okay. Do i have to uninstall pycord for that
It would automatically install py-cord so no x3
brooo whats that
can you show your pip list
They changed wavelink its good
@bot.slash_command(name="render", description="render a cape", guild_ids=[ID])
async def render(ctx, cape_url: str, id: str, author: discord.Member):
if not any(role.name == 'Staff' for role in ctx.author.roles):
await ctx.respond("> :no: You don't have the required role to use this command.")
return
async with aiohttp.ClientSession() as session:
await ctx.respond(f"> ⚙ Rendering... ID: {id}", ephemeral=True)
image_url = f"https://skinrendermc.kiwi.moe/url/image/both?skinUrl={SKIN_URL}&capeUrl={cape_url}&nameTag={PLAYER_NAME}&definition=1.5&transparent=true"
image_data = await fetch_image(session, image_url)
if image_data is None:
await ctx.send("> :1158039813455351932: I can't find the texture with the link provided.\n:Try using Imgur or something else.")
return
image = Image.open(io.BytesIO(image_data))
width, height = image.size
new_height = int(height * 0.8)
offset_y = int(height * 0.03)
right_image = image.crop((width // 2, offset_y, width, offset_y + new_height))
buffer = io.BytesIO()
right_image.save(buffer, format='PNG')
buffer.seek(0)
forum_channel = bot.get_channel(1211012472358830132)
thread = await forum_channel.create_thread(name=f"Cape: {id}", auto_archive_duration=10080)
await thread.send(f"> [ ||<@&1208447185117782097>|| ]\n> ID: {id}\n> to set the cape: </set:1208440978768265257>\n> Author: {author.mention}", file=discord.File(fp=buffer, filename='right_half.png'))
And what's the traceback
wait i launch
Ignoring exception in command render:
Traceback (most recent call last):
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 124, in wrapped
ret = await coro(arg)
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 982, in _invoke
await self.callback(ctx, **kwargs)
File "C:\Users\litou\Desktop\GoldenCapes\Bot\bot.py", line 174, in render
thread = await forum_channel.create_thread(name=f"Cape: {id}", auto_archive_duration=10080)
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\channel.py", line 1320, in create_thread
data = await state.http.start_forum_thread(
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\http.py", line 371, in request
raise HTTPException(response, data)
discord.errors.HTTPException: 400 Bad Request (error code: 50006): Cannot send an empty message
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\bot.py", line 1114, in invoke_application_command
await ctx.command.invoke(ctx)
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 375, in invoke
await injected(ctx)
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 132, in wrapped
raise ApplicationCommandInvokeError(exc) from exc
discord.errors.ApplicationCommandInvokeError: Application Command raised an exception: HTTPException: 400 Bad Request (error code: 50006): Cannot send an empty message
You are missing content=
Or something for the starter message
Like a normal message
send content (a string), an embed or something
Models are classes that are received from Discord and are not meant to be created by the user of the library. Attributes key, url. Methods def is_animated, async read, def replace, async save, def ...
Read the docs
You pass arguments as if you were sending a message
You have to pass arguments for a message. When you create a thread there's a starter message
Yes?
Literally use your brain. I'm telling you what to do
I use it, but I'm a beginner I don't understand anything about it
If you don't know python basics, that's not my issue.
Here we assume you understand python basics and how to read docs.
You're literally just missing 1 argument in your method.
Oh
I think i understand
This is easy
But @lofty parcel How do I send an image and make it the "thumbnail" of the thread?
await create_thread(name=f"Cape: {id}", content=f"> [ ||<@&1208447185117782097>|| ]\n> ID: {id}\n> to set the cape: </set:1208440978768265257>\n> Author: {author.mention}", *, embed=None, embeds=None, file=discord.File(fp=buffer, filename='right_half.png'), files=None, stickers=None, delete_message_after=None, nonce=None, allowed_mentions=None, view=None, applied_tags=None, auto_archive_duration=100, slowmode_delay=0, reason=None)
but how do I specify the forum channel? Because there he create it nowhere
forum_channel = bot.get_channel(1211012472358830132)
await forum_channel.create_thread(
name=f"Cape: {id}",
content=f"> [ ||<@&1208447185117782097>|| ]\n> ID: {id}\n> to set the cape: </set:1208440978768265257>\n> Author: {author.mention}",
file=discord.File(fp=buffer, filename='right_half.png'),
auto_archive_duration=100,
slowmode_delay=0,
reason=None
)
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 124, in wrapped
ret = await coro(arg)
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 982, in _invoke
await self.callback(ctx, **kwargs)
File "C:\Users\litou\Desktop\GoldenCapes\Bot\bot.py", line 174, in render
await forum_channel.create_thread(
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\channel.py", line 1282, in create_thread
data = await state.http.send_files(
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\http.py", line 371, in request
raise HTTPException(response, data)
discord.errors.HTTPException: 400 Bad Request (error code: 50008): Cannot send messages in a non-text channel
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\bot.py", line 1114, in invoke_application_command
await ctx.command.invoke(ctx)
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 375, in invoke
await injected(ctx)
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 132, in wrapped
raise ApplicationCommandInvokeError(exc) from exc
discord.errors.ApplicationCommandInvokeError: Application Command raised an exception: HTTPException: 400 Bad Request (error code: 50008): Cannot send messages in a non-text channel
Stay in one channel pls
Please i am stuck
i mean it tells you that that is not a text channel
so id double check if that ID is really a text channel
are you sure that is the line in your code the exception comes from? check the line numbers
yes
here is my code:
@bot.slash_command(name="render", description="render a cape", guild_ids=[ID])
async def render(ctx, cape_url: str, id: str, author: discord.Member):
if not any(role.name == 'Staff' for role in ctx.author.roles):
await ctx.respond("> :no: You don't have the required role to use this command.")
return
async with aiohttp.ClientSession() as session:
await ctx.respond(f"> ⚙ Rendering... ID: {id}", ephemeral=True)
image_url = f"https://skinrendermc.kiwi.moe/url/image/both?skinUrl={SKIN_URL}&capeUrl={cape_url}&nameTag={PLAYER_NAME}&definition=1.5&transparent=true"
image_data = await fetch_image(session, image_url)
if image_data is None:
await ctx.send("> :1158039813455351932: I can't find the texture with the link provided.\n:Try using Imgur or something else.")
return
image = Image.open(io.BytesIO(image_data))
width, height = image.size
new_height = int(height * 0.8)
offset_y = int(height * 0.03)
right_image = image.crop((width // 2, offset_y, width, offset_y + new_height))
buffer = io.BytesIO()
right_image.save(buffer, format='PNG')
buffer.seek(0)
forum_channel = bot.get_guild(1206656710509592617).get_channel(1211012472358830132)
if forum_channel is not None:
await forum_channel.create_thread(
name="Cape: {id}",
content="> [ ||<@&1208447185117782097>|| ]\n> ID: {id}\n> to set the cape: </set:1208440978768265257>\n> Author: {author.mention}",
files=[discord.File(fp=buffer, filename='right_half.png')],
auto_archive_duration=100,
slowmode_delay=0
)
else:
print("forum_channel not found")
I modified it but it wont work
You aren't storing the created thread anywhere so if you are trying to send a message there after the thread creation you have to change that
What line is 174
if forum_channel is not None:
also that can be if forum_channel
this says you have a create_thread call in line 174 tho 
maybe bc i modified the code
here is the new traceback
Ignoring exception in command render:
Traceback (most recent call last):
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 124, in wrapped
ret = await coro(arg)
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 982, in _invoke
await self.callback(ctx, **kwargs)
File "C:\Users\litou\Desktop\GoldenCapes\Bot\bot.py", line 175, in render
await forum_channel.create_thread(
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\channel.py", line 1305, in create_thread
data = await state.http.send_files(
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\http.py", line 371, in request
raise HTTPException(response, data)
discord.errors.HTTPException: 400 Bad Request (error code: 50008): Cannot send messages in a non-text channel
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\bot.py", line 1114, in invoke_application_command
await ctx.command.invoke(ctx)
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 375, in invoke
await injected(ctx)
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 132, in wrapped
raise ApplicationCommandInvokeError(exc) from exc
discord.errors.ApplicationCommandInvokeError: Application Command raised an exception: HTTPException: 400 Bad Request (error code: 50008): Cannot send messages in a non-text channel
if you print forum_channel, does it output the intended channel
let me try
Bot is ready.
🔥┃catalog
Ignoring exception in command render:
Traceback (most recent call last):
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 124, in wrapped
ret = await coro(arg)
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 982, in _invoke
await self.callback(ctx, **kwargs)
File "C:\Users\litou\Desktop\GoldenCapes\Bot\bot.py", line 176, in render
await forum_channel.create_thread(
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\channel.py", line 1305, in create_thread
data = await state.http.send_files(
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\http.py", line 371, in request
raise HTTPException(response, data)
discord.errors.HTTPException: 400 Bad Request (error code: 50008): Cannot send messages in a non-text channel
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\bot.py", line 1114, in invoke_application_command
await ctx.command.invoke(ctx)
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 375, in invoke
await injected(ctx)
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 132, in wrapped
raise ApplicationCommandInvokeError(exc) from exc
discord.errors.ApplicationCommandInvokeError: Application Command raised an exception: HTTPException: 400 Bad Request (error code: 50008): Cannot send messages in a non-text channe
also you didn't make your thread strings f strings so your variables wont work
print the channel and see if its the right one.
where
Catalog is the channel
ah
oh yes
thank lol
does the bot have permissions to create threads
yes
then i dont know :/
dumb idea but try remove the name= and make it a positional argument
What?
just remove the name=
but this is the syntax
name is a positional argument from what i can see
just try it, if it doesnt work, then 
like this?
await forum_channel.create_thread(f"Cape: {id}", f"> [ ||<@&1208447185117782097>|| ]\n> ID: {id}\n> to set the cape: </set:1208440978768265257>\n> Author: {author.mention}", [discord.File(fp=buffer, filename='right_half.png')], 100, 0
no, just remove name=, nothing else
if forum_channel is not None:
print(forum_channel)
await forum_channel.create_thread(
f"Cape: {id}",
content=f"> [ ||<@&1208447185117782097>|| ]\n> ID: {id}\n> to set the cape: </set:1208440978768265257>\n> Author: {author.mention}",
files=[discord.File(fp=buffer, filename='right_half.png')],
auto_archive_duration=100,
slowmode_delay=0
)
yea
no
Ignoring exception in command render:
Traceback (most recent call last):
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 124, in wrapped
ret = await coro(arg)
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 982, in _invoke
await self.callback(ctx, **kwargs)
File "C:\Users\litou\Desktop\GoldenCapes\Bot\bot.py", line 176, in render
await forum_channel.create_thread(
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\channel.py", line 1305, in create_thread
data = await state.http.send_files(
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\http.py", line 371, in request
raise HTTPException(response, data)
discord.errors.HTTPException: 400 Bad Request (error code: 50008): Cannot send messages in a non-text channel
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\bot.py", line 1114, in invoke_application_command
await ctx.command.invoke(ctx)
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 375, in invoke
await injected(ctx)
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 132, in wrapped
raise ApplicationCommandInvokeError(exc) from exc
discord.errors.ApplicationCommandInvokeError: Application Command raised an exception: HTTPException: 400 Bad Request (error code: 50008): Cannot send messages in a non-text channel
then i dont know
:(
are you sure its a forum channel and not a regular channel
hm
hm
2.4.1
yea ok i give up for real now
can you show your updated code
@bot.slash_command(name="render", description="render a cape", guild_ids=[ID])
async def render(ctx, cape_url: str, id: str, author: discord.Member):
if not any(role.name == 'Staff' for role in ctx.author.roles):
await ctx.respond("> :no: You don't have the required role to use this command.")
return
async with aiohttp.ClientSession() as session:
await ctx.respond(f"> ⚙ Rendering... ID: {id}", ephemeral=True)
image_url = f"https://skinrendermc.kiwi.moe/url/image/both?skinUrl={SKIN_URL}&capeUrl={cape_url}&nameTag={PLAYER_NAME}&definition=1.5&transparent=true"
image_data = await fetch_image(session, image_url)
if image_data is None:
await ctx.send("> :1158039813455351932: I can't find the texture with the link provided.\n:Try using Imgur or something else.")
return
image = Image.open(io.BytesIO(image_data))
width, height = image.size
new_height = int(height * 0.8)
offset_y = int(height * 0.03)
right_image = image.crop((width // 2, offset_y, width, offset_y + new_height))
buffer = io.BytesIO()
right_image.save(buffer, format='PNG')
buffer.seek(0)
forum_channel = bot.get_guild(1206656710509592617).get_channel(1211012472358830132)
if forum_channel is not None:
print(forum_channel)
await forum_channel.create_thread(
name=f"Cape: {id}",
content=f"> [ ||<@&1208447185117782097>|| ]\n> ID: {id}\n> to set the cape: </set:1208440978768265257>\n> Author: {author.mention}",
files=[discord.File(fp=buffer, filename='right_half.png')],
auto_archive_duration=100,
slowmode_delay=0
)
else:
print("forum_channel not found")
can you show what does it exactly print in the terminal
Bot is ready.
🔥┃catalog
Ignoring exception in command render:
Traceback (most recent call last):
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 124, in wrapped
ret = await coro(arg)
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 982, in _invoke
await self.callback(ctx, **kwargs)
File "C:\Users\litou\Desktop\GoldenCapes\Bot\bot.py", line 176, in render
await forum_channel.create_thread(
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\channel.py", line 1305, in create_thread
data = await state.http.send_files(
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\http.py", line 371, in request
raise HTTPException(response, data)
discord.errors.HTTPException: 400 Bad Request (error code: 50008): Cannot send messages in a non-text channel
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\bot.py", line 1114, in invoke_application_command
await ctx.command.invoke(ctx)
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 375, in invoke
await injected(ctx)
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 132, in wrapped
raise ApplicationCommandInvokeError(exc) from exc
discord.errors.ApplicationCommandInvokeError: Application Command raised an exception: HTTPException: 400 Bad Request (error code: 50008): Cannot send messages in a non-text channel
I try
Bot is ready.
<class 'discord.channel.ForumChannel'>
Ignoring exception in command render:
Traceback (most recent call last):
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 124, in wrapped
ret = await coro(arg)
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 982, in _invoke
await self.callback(ctx, **kwargs)
File "C:\Users\litou\Desktop\GoldenCapes\Bot\bot.py", line 176, in render
await forum_channel.create_thread(
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\channel.py", line 1305, in create_thread
data = await state.http.send_files(
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\http.py", line 371, in request
raise HTTPException(response, data)
discord.errors.HTTPException: 400 Bad Request (error code: 50008): Cannot send messages in a non-text channel
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\bot.py", line 1114, in invoke_application_command
await ctx.command.invoke(ctx)
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 375, in invoke
await injected(ctx)
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 132, in wrapped
raise ApplicationCommandInvokeError(exc) from exc
discord.errors.ApplicationCommandInvokeError: Application Command raised an exception: HTTPException: 400 Bad Request (error code: 50008): Cannot send messages in a non-text channel
Truly, I'm cursed
@subtle moth
hmm
@civic lotus try removing the files kwarg and see if it atleast posts the thread
keyword argument
i understand sorry
wait
Bot is ready.
<class 'discord.channel.ForumChannel'>
Ignoring exception in command render:
Traceback (most recent call last):
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 124, in wrapped
ret = await coro(arg)
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 982, in _invoke
await self.callback(ctx, **kwargs)
File "C:\Users\litou\Desktop\GoldenCapes\Bot\bot.py", line 176, in render
await forum_channel.create_thread(
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\channel.py", line 1320, in create_thread
data = await state.http.start_forum_thread(
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\http.py", line 371, in request
raise HTTPException(response, data)
discord.errors.HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
In auto_archive_duration: Value "100" is not a valid enum value.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\bot.py", line 1114, in invoke_application_command
await ctx.command.invoke(ctx)
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 375, in invoke
await injected(ctx)
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 132, in wrapped
raise ApplicationCommandInvokeError(exc) from exc
discord.errors.ApplicationCommandInvokeError: Application Command raised an exception: HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
In auto_archive_duration: Value "100" is not a valid enum value
@subtle moth
tf
can you show your pip freeze
do pip freeze in your terminal and show the output
Name: py-cord
Version: 2.4.1
Summary: A Python wrapper for the Discord API
Home-page:
Author: Pycord Development
Author-email:
License: MIT
Location: c:\users\litou\appdata\local\programs\python\python310\lib\site-packages
Requires: aiohttp, typing-extensions
Required-by:
i have py-cord
ok wait nvm
dpy docs explain it well
auto_archive_duration (int) –
The duration in minutes before a thread is automatically hidden from the channel list. If not provided, the channel’s default auto archive duration is used.
Must be one of 60, 1440, 4320, or 10080, if provided.
oh
it should be one of these specified values
i am dumb
Now, for the image lol?
...
means something was wrong with your image the whole time
Why is py-cord and discord installed?
Idk
💀
discum 💀
💀
So you are against the discord TOS and can get banned for it
I dont use it
i uninstall, i think i dont need it
you have to uninstall all 4 and py-cord and only reinstall py-cord
but i need discord to do this
from discord.ext import commands
bot = commands.Bot(command_prefix=current_prefix, intents=intents, help_command=None)
@sage tendon that also explains now a lot maybe
wow
dpy and pycord have the same namespace
oh okay
it was discord etc and py-cord installed

crying rn brb
and now Dark is also here
idts actually
it was raising httpexception and it was because the file which he was trying to upload was goofy and its a valid reason
idk
done
I was here the whole time
read the exception..?
...
oh
yeah
i forgot about that
i just saw httpexception and forgot about the rest
i found
way to debug
file (File) – The file to upload.
files (List[File]) – A list of files to upload. Must be a maximum of 10.
so i need to use file
"Must be a maximum" is such a weird phrasing
ya
yes but files also works if you pass in a list like previously
yes
uh idk
Traceback (most recent call last):
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 124, in wrapped
ret = await coro(arg)
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 982, in _invoke
await self.callback(ctx, **kwargs)
File "C:\Users\litou\Desktop\GoldenCapes\Bot\bot.py", line 176, in render
await forum_channel.create_thread(
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\channel.py", line 1279, in create_thread
raise InvalidArgument("file parameter must be File")
discord.errors.InvalidArgument: file parameter must be File
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\bot.py", line 1114, in invoke_application_command
await ctx.command.invoke(ctx)
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 375, in invoke
await injected(ctx)
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 132, in wrapped
raise ApplicationCommandInvokeError(exc) from exc
discord.errors.ApplicationCommandInvokeError: Application Command raised an exception: InvalidArgument: file parameter must be File
files are hell in programming
you just need to pass in discord.File(fp=the binary) to the file parameter
with this maybe
@bot.slash_command(name="render", description="render a cape", guild_ids=[ID])
async def render(ctx, cape_url: str, id: str, author: discord.Member):
if not any(role.name == 'Staff' for role in ctx.author.roles):
await ctx.respond("> :no: You don't have the required role to use this command.")
return
async with aiohttp.ClientSession() as session:
await ctx.respond(f"> ⚙ Rendering... ID: {id}", ephemeral=True)
image_url = f"https://skinrendermc.kiwi.moe/url/image/both?skinUrl={SKIN_URL}&capeUrl={cape_url}&nameTag={PLAYER_NAME}&definition=1.5&transparent=true"
image_data = await fetch_image(session, image_url)
if image_data is None:
await ctx.send("> :1158039813455351932: I can't find the texture with the link provided.\n:Try using Imgur or something else.")
return
image = Image.open(io.BytesIO(image_data))
width, height = image.size
new_height = int(height * 0.8)
offset_y = int(height * 0.03)
right_image = image.crop((width // 2, offset_y, width, offset_y + new_height))
with open('right_half.png', 'wb') as f:
right_image.save(f, format='PNG')
with open('right_half.png', 'rb') as f:
file = discord.File(fp=f, filename='right_half.png')
forum_channel = bot.get_guild(1206656710509592617).get_channel(1211012472358830132)
if forum_channel is not None:
print (type(forum_channel))
await forum_channel.create_thread(
name=f"Cape: {id}",
content=f"> [ ||<@&1208447185117782097>|| ]\n> ID: {id}\n> to set the cape: </set:1208440978768265257>\n> Author: {author.mention}",
file=file,
auto_archive_duration=1440,
slowmode_delay=0
)
else:
print("forum_channel not found")
os.remove('right_half.png')
huh
this is what i do
buffer = io.BytesIO()
right_image.save(buffer, format='PNG')
buffer.seek(0)
forum_channel = bot.get_guild(1206656710509592617).get_channel(1211012472358830132)
if forum_channel is not None:
print (type(forum_channel))
await forum_channel.create_thread(
name=f"Cape: {id}",
content=f"> [ ||<@&1208447185117782097>|| ]\n> ID: {id}\n> to set the cape: </set:1208440978768265257>\n> Author: {author.mention}",
file=[discord.File(fp=buffer, filename='right_half.png')],
auto_archive_duration=1440,
slowmode_delay=0
)
oh no, not this again
Ignoring exception in command render:
Traceback (most recent call last):
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 124, in wrapped
ret = await coro(arg)
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 982, in _invoke
await self.callback(ctx, **kwargs)
File "C:\Users\litou\Desktop\GoldenCapes\Bot\bot.py", line 176, in render
await forum_channel.create_thread(
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\channel.py", line 1282, in create_thread
data = await state.http.send_files(
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\http.py", line 371, in request
raise HTTPException(response, data)
discord.errors.HTTPException: 400 Bad Request (error code: 50008): Cannot send messages in a non-text channel
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\bot.py", line 1114, in invoke_application_command
await ctx.command.invoke(ctx)
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 375, in invoke
await injected(ctx)
File "C:\Users\litou\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 132, in wrapped
raise ApplicationCommandInvokeError(exc) from exc
discord.errors.ApplicationCommandInvokeError: Application Command raised an exception: HTTPException: 400 Bad Request (error code: 50008): Cannot send messages in a non-text channel
WHYY
I have an idea
Dont work :(
I'm sick of it
I think I'm going to give up
@lofty parcel I find this method but how to make the image become the vignette?
buffer = io.BytesIO()
right_image.save(buffer, format='PNG')
buffer.seek(0)
file = discord.File(fp=buffer, filename='right_half.png')
forum_channel = bot.get_guild(1206656710509592617).get_channel(1211012472358830132)
if forum_channel is not None:
print (type(forum_channel))
thread = await forum_channel.create_thread(
name=f"Cape: {id}",
content=f"> [ ||<@&1208447185117782097>|| ]\n> ID: {id}\n> to set the cape: </set:1208440978768265257>\n> Author: {author.mention}",
auto_archive_duration=1440,
slowmode_delay=0
)
await thread.send(file=file)
else:
print("forum_channel not found")
this is not what i want to do
what is a vignette
that’s just a transparent background
No
I dont talk about that
the preview if you prefer
so how to add the image as the preview?
please?
you send it separate from the embed
um, what embed?
oh you send it as an attachment to the original message
But i cant
l was looking at an older version of your code
If i do that i got this error
did you try using files
yes
you can send a link that embeds the image
a link like https://media.discordapp.net/attachments/1132206148309749830/1211365106101784617/image.png?ex=65edeeab&is=65db79ab&hm=496bdf74221f5f39aae05801d7753a7e9a44cde341e2214aa34936ecafb4b2de&
It dont work
How to make the team work through @user_command and @bridge Simultaneously
register another command and have them use a separate function
Isn’t there a way to make it so that user_command used the function from bridge?
yes you can
Sorry, can you tell me how to do this?
just import the bridge cog class to your user command cog and use it from there
just create an instance of the bridge cog and use the command from there
kind of like this
but i used slash commands but it should be the same with bridge also ig
Got it, thank you very much
does anyone else use this library here https://github.com/top-gg/python-sdk/ im having a lot of issues with it, ever since the changes was made a week ago its been spittign our errors, ```py
Collecting git+https://github.com/top-gg/python-sdk/ (from -r requirements.txt (line 14))
Cloning https://github.com/top-gg/python-sdk/ to /tmp/pip-req-build-fid7hgk8
Running command git clone --filter=blob:none --quiet https://github.com/top-gg/python-sdk/ /tmp/pip-req-build-fid7hgk8
Resolved https://github.com/top-gg/python-sdk/ to commit 06844706605b2d368d6892933f7f1aae45be5dee
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [1 lines of output]
error in topggpy setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; Parse error at "'://files'": Expected string_end
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
[notice] A new release of pip is available: 23.0.1 -> 24.0
[notice] To update, run: pip install --upgrade pip
Traceback (most recent call last):
File "/home/container/bot.py", line 3, in <module>
from src.cogs.economy import setup as setup_economy
File "/home/container/src/cogs/economy.py", line 1, in <module>
import discord
ModuleNotFoundError: No module named 'discord'
container@pterodactyl~ Server marked as offline...```
and i think the whole discord error because i think discord.py is also installed alongside the top.gg library, and im using a requirement file.
A simple API wrapper for top.gg written in Python. Contribute to top-gg/python-sdk development by creating an account on GitHub.
as far as i can see topgg doesn't depend on dpy or any other discord api wrapper
why not try installing the pypi version instead of the git one
you have to use the github one because the pip one is gonna install dpy
oh
How can I create a dropdown menu which has all server members in it
use @discord.ui.user_select
What i have to do for that
I don’t want a extra class
Just saying
can you test whether my fork works? git+https://github.com/Krishpy-Chips/python-sdk/ the error was coming from their requirements file, after fixing it, it installed properly for me but idk if it works or not
If u maybe can help me haha
do you have a view class?
In on_message_edit, if the message that was edited isn’t cached, does the event fire? Doesn’t seem to fire if I restart my bot and I edit a message I sent before hand.
@lofty hedge @subtle moth I recommend removing that package and making sure the dependencies are gone too, its possibly malware. Last week some person add 4 packages
colorama
base58 - used for formatting things for bitcoin or something
Construct - parser and builder of binary data
DateTime - not the builtin rather a datatype package for communicating with Zope (webserver something) API
After adding the 4 packages they made 19 commits that used the names of other commits and only added/removed spaces like they were trying to cover up their other commit.
Thank you
No. Only fired for cached messsges
But there should me on_raw_message_edit which fires regardless The cache
Does it provide a before and after?
Docs say it’s a payload
help
i use ljust, it works when i print it, but when i send the same thing in an embed it doesn’t work, i asked lala and she was too tired, i tried making it fill the area in with a letter (to make sure spaces weren’t the problem) and it had the same problem
i know a codeblocks would fix it but that doesn’t look as good, please ping me if you have a suggestion
alr
add this ⠀ invisible character instead of the spaces and try ig
Discord strips any extra spaces
i tried filling the end in with a letter or just "." to see if it was that and it did the same
try wrapping the entire thing in a codeblock
that would work but that wouldn’t look nearly as good so i think i’d rather deal with this
I don’t want to have one
How to make a custom status like this?
Is this new? Because this bot doesn't have a Playing/Streaming/Watching status
Is there a way to make slash command params look nicer? Right now, discord is showing the internal variable names for each option. For example, this command has 2 string type options that the user can type in. They show as "fromuser" and "aircraftreg" in discord, as those are the names inside my code. However, I want to show a more user-friendly name like "From User" and "Aircraft Registration" instead. I'm looking at documentation for slash commands, and I can't find anything so far on how to do this
it has to be lowercase and for a space you could use a slash command group
damn, was hoping to be able to just make the params look nicer
you can use _ - or a space with groups so yea..
Is there a way to limit commands to only being used by people with a specific role? I want to restrict usage of a few commands
I'm trying to use @commands.has_permissions() like mentioned in docs, but it's giving an error NameError: name 'commands' is not defined
nvm had to add from discord.ext import commands for it to work
that would be for permissions
you would have to use has_role if you want to use roles
yeah that's why I was using it. I found has_role a few min ago after digging through some github commits since it's not documented as far as I can find
it is at the py-cord docs
;3
One of the most appealing aspects of the command extension is how easy it is to define commands and how you can arbitrarily nest groups and commands to have a rich sub-command system. Commands are ...
@little cobaltcan u send me the link again?
Which one?
The multicog and can u explain how it works
I help way easier when Im at home
That will be in like 30 Minutes
It is not new anymore, it is the custom activity type
I don't think this is possible as discord does not use equal length characters. So python has no idea how many pixels wide it needs to actually fill. You could try putting an inline field with the numbers instead.
plun suggested that which sounds great but wouldnt work for mobile users
This is left up to server owners. They can go into Server Settings -> Integrations -> <Your Bot> -> <Your Command> and then set who can and cant use the command. If you want to be extra sure you can also use has_role but the way I described will make it so users cannot even see the command if they dont have permissions (where has_role will just throw an error within your code)
Is it allowed to have nsfw slas commands listet everywhere? Like /p...gif
you should add the nsfw check for it
Yes it only works in nsfw channels but its shown everywhere als slash command
You know?
ye
so thats allowed?
good question so I gonna say not a yes to it
can you tell me how i make a dropdown which automatically inserts all server members
That wont be possible since the dropdown limit is 25 iirc
you could make a custom paginator which attaches a different dropdown for each page
This is possible somehow
.
Does someone know if it’s possible to get if a guild has subscribed to a bot
If the formatting is more important than the text (ie you don’t need to copy/paste), you could always create an image using Pillow
But otherwise, discord limitations simply won’t be able to get this working as you’d like. Code blocks will be your best bet, but could still introduce enough variations to make it off center
keep in mind that you have to create a runner for it because its not asyncio
Found a direct example that’s even contextual to discord bot use
An example of how to generate Pillow images in async (f.e. Discord.py) without blocking the event loop - PogoDigitalism/PillowInAsync
Oh, I think this is pretty much the same instructions as the tag output
.rtfm user_select
You have to work with SKUs
and how?
You have to fetch the SKU, then look for the flags to check if its a guild subscription and then ig checking IDs
Read the docs
i guess its only work with master?
Yes
Not with stable?
Your first question and my answer, answer that.
Is there in general anything changed?
That would be a question for ddevs. Not sure why you would want NSFW commands to be seen though.
it's actually a question you would probably ask the discord legal team
Ye but do they respond?
lmao
i think the only way to get discord's attention AT ALL is to add the word "minor" anywhere in your request
i literally have never gotten a proper response to any of my support requests, ever
yes
Just via support or a special outlet?
i thought we were just talking about support?
Yeah, I just did not know if support answered legal questions or if you had to email them or something. Support does not have the best record of being helpful.
lol, nope
I reported the same mod that spams slurs in his server about 10 times now
Nothing ever happened to him
Not even a day ban or something
support is pointless to waste your time on
trust & safety is different from other issues
if you dont even take trust and safety seriously then why bother
trust and safety is literally dead
nothing done by them
#general
how i can make the bot avatar move? (gif)
Edit it
thanks
Or change it at the Website
I often got rate limited, for example if my bot sends a few messages behind another. But these rate limits are always under 1 or 2 seconds.
I now coded a part in my bot which renames a few channels iteratively, and after a few channels I get rate limited 5 minutes?!
We are being rate limited. Retrying in 296.14 seconds. Handled under the bucket "1211787820247678996:None:/channels/{channel_id}"
Is this a bug in pycord or does discord have such insane rate limits for renaming channels?
Channels uh
They got a ratelimit of 2 every 10 Minutes I think
how do i add a slash command to a cog?
Should prolly be really easy but i have:
def setup(bot):
bot.add_cog(origins_mc(bot))
class origins_mc(commands.Cog):
def __init__(self, bot):
self.log = logger.file_logger()
self.log.initialize('origins_mc')
self.cache = Cache()
self.bot = bot
@commands.slash_command(name="command_name", description="Description of the command")
@commands.has_permissions(administrator=True)
async def testplease(self, ctx):
await ctx.send("Command executed!")
But this slash command is not appearing on discord? I manged to get a slash command in my main bot.py file but this wont show up even though it does not give me any errors
you have to do /testplease
also I'm not that great with cogs but I think the Def setup belongs at the bottom
in my experience it works both ways
but i am aware how to use slash commands. its just that its like the command does not exist
did you copy the code over from the working command?
and are you loading the cog in bot.py
i just tried that, but since @bot.slash_command is not an option in the cog im trying to figure out what i am supposed to use instead
i used to have commands.Cog for the cogs but if i then do commands.slash_command it doesnt show up, but that does exist i guess? cause otherwise it would error out
should work like that
so im thinking i need to do someting extra when importing a cog with slash commands but i have no idea
just make sure you actually load the cog in your main file
Show your main file
also class names are pascalcase :>>>
this is my main file (bit long)
?
LikeThis
oh yeh
im just kinda coding on 1% brain cause its past midnight for me and i should prolly sleep
im just kinda confused by this issue cause it seems so simple
Youre not supposed to load cogs on on_ready
You're supposed to do it before running the bot.
oh, so just somewhere with the startup code that also connects to the db and stuff?
in this file i only use it at boot tho
this fixed the issue btw for anyone else
.tag avatargif
Tag not found.


