#General Help

1 messages ยท Page 12 of 1

desert dagger
#

discord.Option

#

gimme a sec

sleek grove
#

yes

slender lintel
#

Cant find what i needed, I am trying to make a bot stats command basicly, but dont know how id get the amount of servers its in, the ping ect

desert dagger
#

^^^

gilded widget
desert dagger
#

kinda amusing

#

how theres a lot of ways of doing the same thing

slender lintel
#

ect*

gilded widget
#

docs

half marsh
desert dagger
#

are you looking for a server info or bot info command?

#

or both

gilded widget
#

and examples

slender lintel
desert dagger
#

you gotta realise you have to read the docs and create a template for it like an embed or a string with the info

slender lintel
#

thats all im asking

desert dagger
#

Well

gilded widget
#

well look through the docs and see if you can find what you need

#

also yeah that exists

desert dagger
#

lets say i want the guilds's profile

gilded widget
#

if you can't find something then ppl can help here

desert dagger
#

you kinda just search, read a bit and go "is this what i need?" and then try it out. You gotta read it carefully and try to understand the info it tells you. Theres multiple ways of doing something

slender lintel
gilded widget
#

needs to be an f-string

desert dagger
#

f'{bot.latency}' btw

lucid cove
#

yo how would i fetich the message.author's icon_url

#

or avatar_url

gilded widget
#

await ctx.send(f"My ping is {bot.latency}.")

desert dagger
desert dagger
#

ok nvm

lucid cove
#

cuz in dpy u have

message.author.avatar_url
#

but thats not a thing in pycord

#

i tried searhcing for an alternative

gilded widget
#

avatar.url

lucid cove
#

but pycord only got .avatar

desert dagger
#

its .url

#

author.avatar.url

lucid cove
gilded widget
#

yes

lucid cove
#

yea nvm

desert dagger
#

xd it happens

gilded widget
slender lintel
desert dagger
#

do you prefer being called jack? xd

#

foolish seems pretty insulting

desert dagger
# slender lintel oh alr thanks

dont wanna be mean but try looking into: https://www.w3schools.com/python/

Im sorta new to python but i actually struggled 60% way less due to checking this out for a bit and looking at the examples

gilded widget
#

agreed, its best to learn python before jumping straight into a not so easy library

slender lintel
desert dagger
#

we're happy to help you learn but its always better to try learning the language

desert dagger
#

discord bot making is fun but no need to run before you crawl

desert dagger
gilded widget
#

^^ gotta be a bit more specific than that

sleek grove
slender lintel
#

is this right btw

lucid cove
#

@gilded widget since it seems u know what ur doing

sleek grove
lucid cove
#

is it possible that the bot responds to a slash command while pinging the user

sleek grove
gilded widget
#
list_of_files = []
for i in range (0, 8):
  list_of_files.append(discord.File(f"image_{i}.jpg", filename=f"image_{i}.jpg")
await ctx.channel.send(files=list_of_files)
gilded widget
sleek grove
desert dagger
sleek grove
#

wait

#
@bot.slash_command(guild_ids=guild_id)
@option("fds", description="Choose if the user have to get upranked or downranked", choices=["uprank", "downrank"])
async def rankfgh(ctx, member: Option(discord.Member)):
    moderator = get(member.guild.roles, id=896705950742880310)
    await member.add_roles(moderator)
    await member.edit(nick=f"ใ‚นใƒซใ‚ตใƒƒใƒ— | {member.name}")
    channel = bot.get_channel(937062067825942549)
    embed = discord.Embed(title=f"{member.name}", color=0x3264a1)
    embed.add_field(name=f"{member.name} is now a mod", value="cvb")
    await channel.send(embed=embed)```
desert dagger
#

add this around it
```python
code
```

sleek grove
#

done.

desert dagger
#

hm

lucid cove
#

btw

#

i have a balance command

#

currently it is run by doing /bal or ?bal

#

however i want to run by /balance or ?balance as well

#

is it possible to do this in a quick and clean way

#

without having to copy paste the code and make it from bal to balance

#

i tried making it so name = 'bal' or 'balance' but that doesnt work i guess

gilded widget
slender lintel
#

@gilded widget py if get_images_from_backend(prompt): list_of_files = [] for i in range (0, 8): list_of_files.append(discord.File(f"image_{i}.jpg", filename=f"image_{i}.jpg") break await ctx.channel.send()

#

This isn't right, right?

lucid cove
gilded widget
#

you didnt add the files to the send but otherwise it should work?

slender lintel
desert dagger
gilded widget
desert dagger
#
@bot.slash_command(guild_ids=guild_id)
async def rankfgh(ctx, member: discord.Option(discord.Member),fds:discord.Option(str, 'fds', choices = [discord.OptionChoice(name="uprank", value="uprank"),discord.OptionChoice(name="downrank", value="downrank")])):
  pass
gilded widget
#

oh wait you want both options

sleek grove
#

yes

gilded widget
#

yeah you shouldn't and im not sure if you can crossmix the option types

desert dagger
lucid cove
#

for example

desert dagger
#

didnt you want slash and prefix command?

lucid cove
#

i want /bal and /balance to do the same thing

gilded widget
#

yeah looks like you want aliases

desert dagger
#

^^

gilded widget
#

you cant do that with slash commands

desert dagger
#

alias is the word

lucid cove
#

true

gilded widget
#

unless you create a different command with the same code

lucid cove
desert dagger
gilded widget
#

prefixed? yes

lucid cove
#

how

slender lintel
desert dagger
#

are you sure you indented it right?

slender lintel
# desert dagger are you sure you indented it right?
async def dallemini(ctx, prompt):
  await ctx.respond("Please wait... โณ/nIf it doesn't upload your images then something went wrong, in that case, try again in some time.", ephemeral  = True)
  if get_images_from_backend(prompt):
    list_of_files = []
    for i in range(0, 8):
      list_of_files.append(discord.File(f"image_{i}.jpg", filename=f"image_{i}.jpg")
    await ctx.channel.send()
gilded widget
# lucid cove how

when you define the decorator for the prefix command put aliases=[your aliases here] in the decorator

lucid cove
#

eh

#

i think ima just copy paste

desert dagger
#

bad habit tbh

lucid cove
#

and use bridge_command

#

yea ik it is thats why i asked

#

but sometimes u gotta do what u gotta do

desert dagger
#

trust me lmfao

desert dagger
#

i once wrote spaghetti code then had to refactor it 3 times

lucid cove
#

i mean whats an alternative

desert dagger
sleek grove
#

and how can i do "if uprank ..."

slender lintel
#

Just this

desert dagger
#

one sec

slender lintel
#

okk

desert dagger
#

i dont really see a syntax error

#

can you change files=list_of_files to something like "test" then run code

slender lintel
#

The whole code.

lucid cove
#

i guess u gotta use ctx.reply or ctx.respond

#

or else ull have to do ctx.message.channel.send i think

slender lintel
sleek grove
lucid cove
#

idk i might be trippin

desert dagger
slender lintel
slender lintel
#

same error

desert dagger
#

whats the error?

slender lintel
sleek grove
desert dagger
lucid cove
#

ok this might be hard to answer

#

but either way

#

is there a way for the bot to recognize that a command has been typed

#

for example

#

i currently have an event listener that adds xp to the user on_message

#

however this doesn't work with slash commands

#

since slash commands dont count as messages

#

how can i overcome this?

desert dagger
#

your own command or

#

other peoples commands?

lucid cove
#

yes

#

my own

desert dagger
#

you probs could just add it in the code or use a custom event

lucid cove
#

how

sleek grove
slender lintel
lucid cove
#

is there an on_command thing or what

desert dagger
slender lintel
#

so something is not right with the loop

desert dagger
#

oh wait

#

on_application_command and on_application_command_completion

#

why do you loop thru 0,8?

lucid cove
desert dagger
#

mhm

slender lintel
desert dagger
#

ahh

#

i was gonna say why not use len() but then i realised

#

you just hard limit 8

slender lintel
#

yeah

desert dagger
slender lintel
#

alright

#

I can't run the command until that error ah

#

@gilded widget

#

Can you help?

lucid cove
#

why this no work

ctx.message.created_at.second
#

AttributeError: 'NoneType' object has no attribute 'created_at'

#

its here tho

slender lintel
#

Why am i getting, Unknown event GUILD_APPLICATION_COMMAND_INDEX_UPDATE.

#

@bot.command()
async def ping(ctx):
await ctx.send(f'My ping is ' + format(round(bot.latency, 1)))

vagrant mortar
#

Is it possible for the builtin autocomplete to ONLY show Threads?

#

or am I hard-stuck on ALL channels?

sleek grove
#

*no error

slender lintel
steady lotus
#

Is it possible to manually create a command using initialising, not through the decorator

sleek grove
vagrant mortar
slender lintel
#

or whatever msg u want

vagrant mortar
sleek grove
#

but the embed isn't sending too

slender lintel
slender lintel
vagrant mortar
#

what does format() do?

sleek grove
slender lintel
vagrant mortar
slender lintel
vagrant mortar
#

try this instead.

slender lintel
#

alr

#

What is it with ".joined_at"

If i ping a user (with the command, everything works fine and i am able to access .joined_at. however if i use the command with a ID, i am able to access every other attribute in the video except ".joined_at"

vagrant mortar
#

you are misusing format (hence why I asked)

slender lintel
vagrant mortar
#

are you sure you are using the line I send ? ๐Ÿค”

slender lintel
#

Yeah

vagrant mortar
#

otherwise add str() around the round()

slender lintel
#

1 sec

vagrant mortar
#

it really shouldn't need that, but ๐Ÿคท

slender lintel
vagrant mortar
#

let me guess, you still had the + in? ๐Ÿ˜›

slender lintel
#
async def get_images_from_backend(prompt):
    async with aiohttp.ClientSession() as cs:
        async with cs.post(backend_url, json={"prompt": prompt}) as r:
          rjson =  r.json() 
          
    if r.status_code == 200:
        json = rjson
        images = json["images"]```
```py
Traceback (most recent call last):
  File "/home/runner/Quasar-1/venv/lib/python3.8/site-packages/discord/bot.py", line 993, in invoke_application_command
    await ctx.command.invoke(ctx)
  File "/home/runner/Quasar-1/venv/lib/python3.8/site-packages/discord/commands/core.py", line 357, in invoke
    await injected(ctx)
  File "/home/runner/Quasar-1/venv/lib/python3.8/site-packages/discord/commands/core.py", line 134, in wrapped
    raise ApplicationCommandInvokeError(exc) from exc
discord.errors.ApplicationCommandInvokeError: Application Command raised an exception: FileNotFoundError: [Errno 2] No such file or directory: 'image_0.jpg'````
#

What would i do to make the bot delete '!say Hello' once its sent the message

#

What's wrong here?

slender lintel
slender lintel
#
    await ctx.send('Hello', delete_after=2)
slender lintel
#

you want to delete it instantly?

#

basicly yeah

#
await ctx.message.delete()```
#

Add this after ctx.send

#

alr

#
async def say(ctx, message):
    if ctx.author.guild_permissions.administrator:
        await ctx.send(message)
        await ctx.message.delete()
    else:
        await ctx.respond('You do not have the correct permissions for this')``` dosent seem to delete tho
paper harbor
#

So i'm working on github for now and I have this piece of code which half my discord bot depends on (it gives the code access to the project files to find a specific json file). This piece of code currently doesn't work because I'm running it with github (heroku) and I don't know the github file path. so my question is: what is the github file path.

slender lintel
slender lintel
#

cause its not hello im sending, Its the input after !say

#

Yes, it should

#

Alright

slender lintel
#

Oh you wanna delete the authors message?

#

yeah, sorry

slender lintel
#

is it like ctx.author.delete or smth?

slender lintel
slender lintel
#

@slender lintel

#

Trying doing this

        await ctx.message.delete(ctx.message)
slender lintel
#

Dosent delete it

#
await message.delete()```
#

do this, don't add ctx

steady lotus
#

you mean

#

do

#
await ctx.message.delete()```
slender lintel
#

that's what I told at first. They said it isn't working

slender lintel
#

Whys it saying all the messages??

steady lotus
#

idk

slender lintel
#

bruh

paper harbor
#

what's the problem?

slender lintel
paper harbor
#

ok

slender lintel
# paper harbor ok
async def say(ctx, message):
    if ctx.author.guild_permissions.administrator:
        await ctx.send(message)
    else:
        await ctx.respond('You do not have the correct permissions for this')```
#

I want the !say (message) to delete after the bot sends the input

paper harbor
#

doesn't ctx.message.delete work?

mental rampart
sleek grove
slender lintel
slender lintel
paper harbor
#

no, do it before you send the bot message

slender lintel
#

@slender lintel did it work?

#

Nope dosent delete it

#
async def say(ctx, message):
    if ctx.author.guild_permissions.administrator:
        ctx.message.delete()
        await ctx.send(message)
    else:
        await ctx.respond('You do not have the correct permissions for this')```
steady lotus
#

does the bot have the permisison to delete messages

slender lintel
slender lintel
slender lintel
slender lintel
slender lintel
slender lintel
slender lintel
sleek grove
slender lintel
slender lintel
sleek grove
#

i whas to stupid to name a variable the same that i wrote it

paper harbor
slender lintel
sleek grove
#

How can I delete all but two roles not?

slender lintel
slender lintel
#

This makes no sense

slender lintel
slender lintel
#

Bruh wth

#

that's weird

#

:(

slender lintel
#

Change your code to this and try again.

sleek grove
paper harbor
paper harbor
slender lintel
#

yes

#

Just copy paste what I sent above

#

nvm

#

im dumb it changed cos ctrl z

#

xD

#

:|

slender lintel
slender lintel
sleek grove
#

ok i say it easyer

#

how to remove all roles from a user

pure lake
#

theoretically i think that will work

#

then you can add the other two after you want to

sleek grove
#

thx

#

i test it

sleek grove
slender lintel
#
async def dm(ctx,member: discord.Member,*, message): 
    if ctx.author.guild_permissions.administrator:
         await member.send(message)
         await ctx.delete()
    await message.respond("I have dmed them!", ephemeral=False)```
How would i delete the !dm (user) (message) for this one? It keeps not working on every one lol
pure lake
#

probs bc member.roles is a list

paper harbor
#

What is a Github repository's file path? (i'm using os.chdir("FILE_PATH") to give a file access to a json file)

pure lake
#

@sleek grove remove the everyone role then try removing all the others w the previous code

pure lake
#

amay work

keen root
slender lintel
#

discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'str' object has no attribute 'respond'

keen root
#

should work

slender lintel
#

this is the same isnt it

sleek grove
slender lintel
#

Thats not deleting it though...

#

oh

#

only user sees it i didnt notice u set to true

#

Ill give that a try

sleek grove
#

hm i go to bed bb

keen root
slender lintel
#

Why whenever i add the else:
await ctx.respond('You do not have the correct permisisons') it always gives me error expected expression

#

File "C:\Users\jackd\Documents\Felbcord Py\main.py", line 53
else:
^^^^
SyntaxError: invalid syntax

#

@slender lintel

#

I dont get the 'I have Dmed them'

#

but it does dm

pure lake
#

think this cld be bc when the dm is sent then the ctx is taken as being in the users dm so you may want to find a way to ensure that the 'i have dmed them' is sent in the orginal channel e.g using its id

#

or you could change the order around

slender lintel
#

Traceback (most recent call last):
File "C:\Users\jackd\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\bot.py", line 344, in invoke
await ctx.command.invoke(ctx)

slender lintel
#

discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'Context' object has no attribute 'respond'

pure lake
# slender lintel wym?

probably wrong but ctx informs of the channel and what not but it might be that when the dm is sent then the ctx changes to the user's dm rather than original channel so then the 'ctx.respond' won't work as desired. like i said i am 85% sure what i'm saying is wrong but a theory xd

slender lintel
#

alr

pure lake
#

produces the possibility of a false result being given tho

#

but shld work ig

slender lintel
#

im dming my alt with it so i know if it goes wrong

pure lake
#

if being interpreted the positive indicator of 'i have dmed them' cld be given and then the actual sending of dm cld fail

#

surely

slender lintel
#

im trying now

pure lake
#

anyways whyilst i'm here, how can i take in '1d' as two separate arguments e.g. '1' as a single and 'd' as another

slender lintel
#

dosent dm anymore

pure lake
#

instead of havinf to type '1 d'

pure lake
slender lintel
#

Would changing it to ctx.send work?

pure lake
#

@slender lintel may not b exactly what you want but maybe try and ephermal message of 'user.mention +{message} with ctx.send

#

ygm

slender lintel
#

I was using slash commands but then i thought it may be better using normal commands (no idea why), Should i be using slash?

pure lake
#

yes

#

discord prefers them massively

slender lintel
#

alright

#

woah i didnt know that

#

i wish i knew before bru]

keen root
slender lintel
#

Nah luckily i just spammed ctrl z XD

#

Btw, Why do sometimes my slash commands just disappear?

#

And i need to restart the bot for them to re-appear

#

is it an issue on my side or a discord issue or what?

#

sometimes every slash command for every bot disappears so i reload discord for that

#

Probably just my discord bugging out then :(

keen root
#

bye

slender lintel
#

gn

#

jeez, All my slash commands have registered twice

#

help

#

what have i donee

paper harbor
#

probably discord bugging out. Discord bugged out for me a few moments ago so it might be a problem with a discord server (not the server you chat in)

#

or it might be that you bot got run twice and ended up registering 2x commands

#

happens to me alot

slender lintel
paper harbor
#

ye

slender lintel
# paper harbor ye

Also do you know how i would have a different line in my message so, ```@bot.slash_command(name="ping", description="Info about bot")
async def ping(ctx):
await ctx.send(f'My ping is ' + format(round(bot.latency, 1)))

The i want to have like another line for my amount of guilds but it would give errors, is there a way to do it so itll have another line when sent
paper harbor
#
text2lol")```
#

\n can divide the string and put it on another line

slender lintel
#

ty

slender lintel
#

like what on my keyboard lol

paper harbor
slender lintel
#

thats backspace

paper harbor
#

if you don't find it, you could just do Ctrl+C or Ctrl+V

paper harbor
vagrant mortar
slender lintel
#

\

#

ooh ty

frigid lark
slender lintel
#

@bot.slash_command(name="ping", description="Info about bot")
async def ping(ctx):
await ctx.send(f'My ping is ' + format(round(bot.latency, 1))

#

what did i mess up there it says ( is not closed

#

nvm fixed it lol

obsidian garnet
#

One message removed from a suspended account.

slow dome
#

?tag ex

obsidian garnet
slow dome
#

I think so

potent rivet
#

how do i give my bot an about me?

midnight cedar
#

set an application description in the dev portal

potent rivet
#

ty plun

steep verge
#

Since the current version of jsk doesnโ€™t support pycord, canโ€™t I just downgrade a version till it works with pycord?

sudden path
#

I use jsk and it does support it.

cunning dragon
#

how would i make commands server only rather than dm/server?

twilit cobalt
#

PartialMessageable

#

how to import discord utils ;-;

twilit cobalt
#

ImportError: cannot import name 'PartialMessageable' from 'discord.channel'

lucid cove
#

message does have a created_at attribute

#

then why is it saying ctx.message is nonetype

lucid cove
#

bruh

#

any helpers?

lucid cove
#
@bot.listen()
async def on_application_command(ctx):
    if ctx.author != bot.user:
        user_egg_id = ctx.author.id
        if bool(mongo.users.find_one({'user_id':user_egg_id})) == False:
            mongo.users.insert_one({'user_id':user_egg_id, 'balance':0, 'xp':10, 'level':1, 'last_message':ctx.created_at.second, 'employment':"unemployed"})
#

event listener that looks for slash commands

#

if a slash command is entered and its the users first time using a slash command

#

it creates a new database entry in mongodb

#

the database entry includes many properties but the issue i have is with the 'last_message'

#

i want it to record when the slash command was used

#

and hence ctx.created_at

lucid cove
#

yo

#

simple question

#

can we get the datetime of a slash command?

slender lintel
#
  File "C:\Users\jackd\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\bot.py", line 993, in invoke_application_command
    await ctx.command.invoke(ctx)
  File "C:\Users\jackd\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 354, in invoke
    await self.prepare(ctx)
  File "C:\Users\jackd\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 285, in prepare
    self._prepare_cooldowns(ctx)
  File "C:\Users\jackd\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 270, in _prepare_cooldowns
    raise CommandOnCooldown(bucket, retry_after, self._buckets.type)  # type: ignore```

Whys my bot sending the command cooldown error to console and not chat?
#
@commands.cooldown(1, 300, commands.BucketType.user)
async def say(ctx, message):
    if ctx.author.guild_permissions.administrator:
        await ctx.send(message)
    else:
        await ctx.respond('You do not have the correct permissions for this')
        @bot.event
        async def on_application_command_error(ctx, error):
            if isinstance(error, commands.CommandOnCooldown):
                await ctx.respond(error)
            else:
                    raise error```
distant stag
#

my slash commands are disappearing after using once
does someone know what could be the problem

keen root
#

you need to put it outside

slender lintel
distant stag
# slender lintel wym?
@bot.slash_command(name="say", description="Repeats input")
@commands.cooldown(1, 300, commands.BucketType.user)
async def say(ctx, message):
    if ctx.author.guild_permissions.administrator:
        await ctx.send(message)
    else:
        await ctx.respond('You do not have the correct permissions for this')

@bot.event
async def on_application_command_error(ctx, error):
    if isinstance(error, commands.CommandOnCooldown):
        await ctx.respond(error)
    else:
        raise error

this is how it should be

slender lintel
#

Alr

distant stag
lucid cove
#

the start of the command ur talking about

distant stag
# lucid cove the start of the command ur talking about
    @core.slash_command(name="confess")
    @commands.cooldown(1, 30, commands.BucketType.user)
    async def confess_slash(self, ctx :discord.ApplicationContext):
        """Confess to your heart's content '-'"""
        modal = confess_modal(self.bot)
        await ctx.send_modal(modal)
lucid cove
#

i dont think im qualified enough to ans i guess

distant stag
#

sure np

#

thanks for trying

fossil kiln
#

guys, is it possible to subclass Bot and define slash commands inside this subclass?

crimson gale
fossil kiln
#

is this correct?

crimson gale
#

this is the most common way to do it to organize commands into sensible groups

#

sometimes you dont need all this and you just simply require a @bot.slash_command decorator in the main file

fossil kiln
#

in my opinion, cogs are too powerful to use it just for just one slash command
at the same time, I want to have opportunity to do something like:

from custom_bots import RoleBot

bot = RoleBot()
bot.run('TOKEN')
fossil kiln
#

I understand, but, eh

#

changing behavior of an object is a bit strange for me

#

prefer to work with classes

#

ok, summing up, I need to use cogs, if I want to get some kind of modularity

#

?

crimson gale
#

yes

fossil kiln
#

thank you

crimson gale
#

dont forget to read up on cog documentation so you know how to make and load one properly

fossil kiln
crimson gale
#

yep thats good

fossil kiln
#

great

#

by the way, when does the 'newbie' icon usually disappear? :-)

crimson gale
#

i think a week?

fossil kiln
#

understood; thank you again for the explanation

crimson gale
#

its a discord thing btw if you were wondering

slender lintel
fossil kiln
crimson gale
crimson gale
#

you need an error handler

fossil kiln
crimson gale
#

might wanna remove a few levels of indentation

slender lintel
#

i think

#
        async def on_application_command_error(ctx, error):
            if isinstance(error, commands.CommandOnCooldown):
                await ctx.respond(error)
            else:
                    raise error```
crimson gale
#

you do

#

im tellin you about the fix

slender lintel
#

ook

#

How do i fix this? My cooldown is having the cooldown on every guild so, for eg i have a cooldown on my test server and its the cooldown on my actual one too

#

like it isnt seperate cooldowns

half marsh
half marsh
inland acorn
#

quick question: i am using alpha version, whenever changes in the code has been committed in repository, do they update automatically in my pc too? or i need to update it

lucid cove
#

i tried applicationcontext.interaction

#

but to no avail

slender lintel
#

why is my bot responding to commands twice?

#

like this

lucid cove
#

just restart the bot

#

itll go away

slender lintel
#

@lucid cove i restarted it a lot of times but it still doesn't work

lucid cove
#

idk then it used to happen to me

inland acorn
#

and you dont notice

lucid cove
#

i just restart the bot and its fine

inland acorn
#

ok

slender lintel
lucid cove
#

restart pc

slender lintel
lucid cove
#

then shutdown the server and run it again

slender lintel
lucid cove
#

yes

inland acorn
#

quick question: i am using alpha version, whenever changes in the code has been committed in repository, do they update automatically in my pc too? or i need to update it

slender lintel
lucid cove
#

idk then

half marsh
lucid cove
half marsh
#

try store the respond message to var, then var.message?

lucid cove
#

but the processes that my code is doing are supposed to be on_message

#

in other words if i take var.message.datetime it would already be too late

#

cuz i have to wait for the bot to reply first before doing anything with the code

#

anyways i think i'll just skip cuz i think there is no solution to this issue

#

moving on

#

im trying to implement buttons

#

and i get this error

_tkinter.TclError: unknown option "-label"
#

for this

btn1 = Button(
            label = "lorem ipsum",
            style = discord.ButtonStyle.primary
        )
distant stag
lucid cove
#

like

#

its literally label = "str"

#

why is my code not working

crimson gale
lucid cove
#

nvm i fixed it now

#

im very dumb sometimes

half marsh
#

Pepega

slender lintel
humble talon
rigid wave
#

Why not work in other server only here?

paper harbor
# rigid wave

I remember seeing the github files for this bot and I saw a restriction on it being used outside of PyCord

#

so i think you can't rly use it outside this server

rigid wave
#

So why not make it private facepalm

paper harbor
#

guess i'm wrong then

solar berry
#

Is there a way to set the online status of a bot (the Online, DND, Away, Invisible thing, not the custom playing game status)

gilded widget
#

use bot.change_presence and use the status parameter

#

i.e. bot.change_presence(status=discord.Status.idle)

slender lintel
#

How would I set my bot to a database so it remembers roles

#

Is there any tutorials

half marsh
#

Theres a ton of tutorial of making a crud on yt

slender lintel
#

alr ty

slender lintel
#

is this good

slender lintel
#

is it confusing to make a database

half marsh
#

On w3

slender lintel
#

is that hard

half marsh
#

Depend on how your brain process kek

#

jk, is not hard

slender lintel
#

its a different database

lucid cove
#

yo is there a way to make interaction.response reference the user / message

lucid cove
#

dont use sql db btw

#

trash

slender lintel
lucid cove
#

just use mongodb

slender lintel
lucid cove
#

that shouldnt matter

#

yes it does

#

but u should ask does it work with python not with pycord

slender lintel
#

ook

tropic fractal
#

ok so I tried to create a new thread but discord threw a pissy fit and errored like 6 times then ratelimited me for 5 minutes but anyway

I think group commands (text-based) are completely broken
I think the logic that is being used for slash groups is being applied to regular text-based group commands. See below example:

from discord.ext import commands


class ExampleCog(commands.Cog):
    def __init__(self, bot: commands.Bot):
        self.bot = bot
   
    @commands.group(name="foo", cls=commands.Group)  # I tried the cls= to see if it would fix the issue. Spoiler alert, it didn't.
    async def foo(self, ctx):
        await ctx.reply("foo")

    @foo.command(name="bar", cls=commands.Command)  # cls= doesn't fix here either
    async def foo_bar(self, ctx):
        await ctx.reply("bar")


def setup(bot):
    bot.add_cog(ExampleCog(bot))

Trying to bot.load_extension(ext) yields this:

Traceback (most recent call last):
  File "C:\Users\Nexus\PycharmProjects\bumpr-v6\venv\lib\site-packages\discord\cog.py", line 715, in _load_from_module_spec
    spec.loader.exec_module(lib)  # type: ignore
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\Nexus\PycharmProjects\bumpr-v6\cogs\main.py", line 12, in <module>
    from .queue import Job
  File "C:\Users\Nexus\PycharmProjects\bumpr-v6\cogs\queue.py", line 112, in <module>
    class QueueCog(commands.Cog):
  File "C:\Users\Nexus\PycharmProjects\bumpr-v6\venv\lib\site-packages\discord\cog.py", line 251, in __new__
    parent = lookup[parent.qualified_name]  # type: ignore
KeyError: 'queue'

(Error traces back to the bottom of this function in cog.py: https://h.nexy7574.cyou/pkKtU88f39.py)

#

I re-installed pycord from git, same issue

#

Actually should i open an issue on github for this

humble talon
# lucid cove dont use sql db btw

You seem to be massively naive about the difference between sql relational and nosql databases, saying one is trash is completely false

#

For more advanced things, you almost have to use relational databases, NoSQL is good for very small, flat data

lucid cove
#

thats the exact reason i said sql is trash

humble talon
#

How exactly is it trash?

slender lintel
tropic fractal
#

guess hastes are dangerous now

humble talon
slender lintel
#

alright

humble talon
#

You could give SQLite a stab

slender lintel
slender lintel
humble talon
#

Like what you're trying to do @slender lintel

humble talon
slender lintel
#

Like i wanna save roles for eg a mute command i dont want them to bypass by leaving then joining

#

i wanna save roles

tropic fractal
#

(don't use the sqlite3 module that's built in to python, it'll block your event loop)

humble talon
#

If you're just storing a few roles for a mute command, you might not even need a database

tropic fractal
#

You're the one throwing a hissy fit but okay

humble talon
#

Like if the amount of data you're storing is very small, like < 100 elements, you can probably just store it locally in a json file tbh

slender lintel
humble talon
#

Your lack of understanding of it doesn't make it ass, if you took more than 30 seconds to learn how it works you'll realise how naive and dumb you're being

slender lintel
#

Thanks but im going to listen to skeeza.

humble talon
slender lintel
tropic fractal
#

(if you're using JSON don't forget all keys have to be strings, so enjoy repeatedly casting)

humble talon
slender lintel
humble talon
#

You can do something like this:

import json

# Then when you want to load it
with open('discord_ids.json', 'r') as file:
    data = json.load(file)

client = discord.Bot(...)
client.muted_people = data

<command to mute people>
  client.muted_people.append(<new_person>)
  # Save
  with open('discord_ids.json', 'w') as file:
      json.dump(file, client.muted_people)
#

If you look up loading and saving with json in Python you'll most likely find something online

slender lintel
#

oops

#

didnt mean to enter lol

humble talon
#

No worries

slender lintel
#

so for example,

async def mute(ctx, member: discord_member, reason)
await member.add_roles('rolename')
bot.muted_people = data

with open('discord_ids.json, 'w') as file: json.dump(file, bot.muted_people)
humble talon
#

Try this:

bot = discord.Bot(...)
with open('discord_ids.json', 'r') as file:
    bot.muted_people = json.load(file)

@bot.slash_command(name="mute", description="e")
async def mute(ctx, member: discord_member, reason):
  await member.add_roles('rolename')
  bot.muted_people.append(member.id)

  # Save
  with open('discord_ids.json', 'w') as file:
      json.dump(file, bot.muted_people)
slender lintel
humble talon
#

If you're ever updating the list, you'll want to update the list in memory (the bot.muted_people) and the permanent list, for when the bot gets restarted or dies (in the file, the json.dump bit)

humble talon
#

You're storing a list in 2 places, once permanently (in the file, which will be stored on your computers storage) and one for easy access, in memory, which is the variable (bot.muted_people)

#

The bot.muted_people list will get cleared when the bot dies right? Since it's just a variable, which is why we store it in the file, but to access the file everytime is slow and bad, so we keep a handy list in a variable

slender lintel
#

alr

half marsh
humble talon
#

It's just a class instance, you can attach anything to it

half marsh
#

Ooh

#

Didnt know that

slender lintel
#

What would i have to do to connect to a youtube channel? like i want to create a /ytsearch command to search for any youtube channel total views, subs ect

#

or just one particular channel if i cant do any

lucid cove
#

also

half marsh
#

Think they have the official api

lucid cove
#

how can i move commands that accept arguments to different files

lucid cove
#

nvm got it

#

im just giga dumb sometimes

fossil kiln
#

is it legal to do something like this? (the last line disturbs me)

class CustomCog(discord.Cog):
    bot: discord.Bot
    
    async def some_stuff(self, ...):
        ...
    
    def __init__(self, bot, *args, **kwargs):
        self.bot = bot
        self.some_stuff = self.bot.listen('on_ready')(self.some_stuff)
idle wagon
#

I run main.py after which I want to run test.py and have it execute this function without starting a new bot.

idle wagon
humble talon
brazen siren
#

@deep timber

slender lintel
#

Why does this happen (It happens no matter what im installing)

fossil kiln
slender lintel
#

How would i fix that?

humble talon
slender lintel
#

no, vs code

idle wagon
crimson coral
#

well replit itself is the disadvantage

slender lintel
#

bru

crimson coral
#

oops i misread the text LOL

slender lintel
#

lol

#

Im using the youtube data api to get youtube channels total veiws subs ect

#

?

#

lol

fossil kiln
# humble talon Yeah don't do that

should I do this if I want some_stuff to be done when self.bot gets on_ready event?

class CustomCog(discord.Cog):
    bot: discord.Bot

    def __init__(self, bot):
        self.bot = bot

    @discord.Cog.listener("on_ready")
    async def some_stuff(self, ...):
        ...
humble talon
#

What is some_stuff, but probably yeah

#

Just set a boolean for if on_ready has fired before

#

Since it can run more than once

fossil kiln
#

stop

fossil kiln
fossil kiln
fossil kiln
fossil kiln
humble talon
#

Yeah no shoot haha

fossil kiln
stiff lotus
#

any ideas?

#

or anybody know why?

brazen siren
#

friends how to take a parameter with slash?

stiff lotus
#

;c

crimson coral
stiff lotus
#

well it says line 51

crimson coral
#

yes but it doesn't really help

stiff lotus
#

here

crimson coral
#

hmmm

#

have you ever ran into it before?

stiff lotus
#

no never.

#

Basically, my other repl got found. The bot was token logged & the person started pinging everybody in my announcements channel. So i've had to fork it to another account & I reset the token. I've also changed the token in the code. Before, all this code was working, but now that i havetransferred it to the new account, i seem to be getting this error.

#

[found out it was a server admin]

crimson coral
#

wait

#

where did you get Option from

stiff lotus
#

i imported it

#

& none of the code was changed

crimson coral
#

can you show just in case

stiff lotus
#

this was all working before

stiff lotus
crimson coral
#

yes

stiff lotus
#

now they're yellow

#

after i transfer

#

;c

crimson coral
#

change optparse to discord

#

idk why you were using that

stiff lotus
#

oh ok

#

now im getting this

#

@crimson coral

#

even tho im coding in pycord

#

๐Ÿ’€

crimson coral
#

uh....

stiff lotus
#

now this is strange

crimson gale
#

that looks like pyscript to me

stiff lotus
crimson gale
#

pycord is a package

stiff lotus
#

ah but

#

im using python

#

so youre probably right

#

but im not sure what these errors are

crimson gale
#

ยฏ_(ใƒ„)_/ยฏ

stiff lotus
#

could somebody please help me

#

as soon as i transfer it to another acc

#

im getting all these errors

#

which means it cant be a problem with the code

#

but a problem with the libraries or smthn

#

hey?

#

someone

#

pls

#

;c

crimson coral
#

i mean... it's pretty hard for us to troubleshoot stuff hosted on replit because the user lacks control

delicate peak
#

How can you download files (ex. recorded voice channel) to local storage? All the examples I see just upload them to a discord channel

crimson coral
#

can you show your code?

delicate peak
#

specifically

#

files = [discord.File(audio.file, f"{user_id}.{sink.encoding}") for user_id, audio in sink.audio_data.items()]

#

this you can upload in a channel using something like await channel.send(f"finished recording audio for: {', '.join(recorded_users)}.", files=files)

#

but I would just like to save the files to local storage

crimson coral
#

hmm hold on

slender lintel
#

Hey so ive connected the youtube data API to my code but how would i make a slash command find any channels stats?

crimson coral
slender lintel
#

Th yt api is confuising me

slender lintel
crimson coral
#

this example follows requesting a channel's info

slender lintel
#

thanks

stiff lotus
#

;c

slender lintel
glass nova
#

I want to set a custom asyncio event loop.
discord.Client has an attribute for it but ext.commands.Bot does not. how can i set one for commands.Bot?

crimson coral
crimson coral
slender lintel
#

alr

slender lintel
#

github*

crimson coral
#

no it's on the site

slender lintel
#

Its showing request stuff and thats just confusing me, I just want it through a slash command

glass nova
#

i couldnt find on docs but if i can set then np

also im actually trying to run bot on a multiprocessing process which doesnt want to work (no event loop in thread-2) so i tried to give it a loop

#

which actually still didnt change anything

crimson coral
slender lintel
crimson coral
#

well you need to understand how to even make the request before using it in a slash command

glass nova
slender lintel
crimson coral
#

what in particular? it shouldn't be that different

slender lintel
crimson coral
#

idk what your ytsearch function does

#

but you're looking for ctx.respond

#

which generally takes a string, an embed, a file or whatever else

slender lintel
crimson coral
#

so what does ytsearch return

slender lintel
crimson coral
#

so you should assign that to the variable instead

#

e.g. result = await ytsearch(...)

#

then you can await ctx.respond(result)

slender lintel
crimson coral
#

no the name doesn't matter

#

that was just an example

slender lintel
#

alright

#
await def ytsearch(ctx, channel):
result = await ytsearch(...)
await ctx.respond(result)``` this right?
crimson coral
#

your original await def ytsearch((my args)) wouldn't be valid code, because def is used to define a function

slender lintel
#

oh

crimson coral
#

did you define ytsearch somewhere else?

#

or are you defining it inside the command

slender lintel
#

I havent defined it anywhere else/inside a different command

crimson coral
#

...so it doesn't exist?

#

sorry im trying to figure this out

ivory zenith
#

How do I create a paginated embed?

crimson coral
slender lintel
#

and id remove api key

crimson coral
#

sure

slender lintel
#
print(sys.version)
import discord
from discord.ui import Button
from discord.ext import commands
import logging
from googleapiclient.discovery import build
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger('discord')
logger.setLevel(logging.DEBUG)
handler = logging.FileHandler(filename='discord.log', encoding='utf-8', mode='w')
handler.setFormatter(logging.Formatter('%(asctime)s:%(levelname)s:%(name)s: %(message)s'))
logger.addHandler(handler)

bot = commands.Bot(command_prefix='!', intents=discord.Intents.all(), debug_guilds=[965533467557371944,933803468815204372,964126154774679582])

@bot.event
async def on_ready():
    await bot.change_presence(activity=discord.Activity(type=discord.ActivityType.watching, name='Over The Felbcord'))
    
    print('Connected to bot: {}'.format(bot.user.name))
    print('Bot ID: {}'.format(bot.user.id))

api_key=(my api key is normaly here)
youtube = build('youtube','v3', developerKey=api_key)
@bot.slash_command(name='ytsearch', description ="Finds yt stats of channels")
await def ytsearch(ctx, channel):
result = await ytsearch(...)
await ctx.respond(result)
``` The rest of the code, the code i removed was mostly just commands not related to this
#

@crimson coral

ivory zenith
crimson coral
#

from discord.ext import pages

crimson coral
slender lintel
#

oops

#
async def ytsearch()
result = await ytsearch(...)
await ctx.respond(result)```
#

sorry that one i meant

#

is that correct

crimson coral
#

again, define it outside of the command

#

you don't want to recreate the function every time someone uses the command

slender lintel
crimson coral
#

close enough, just... make sure you actually write the rest of the function

slender lintel
crimson coral
#

.

#

ytsearch... i presume you're going to write the code for it?

surreal nimbus
#

is it possible to make a slash command arg disabled for a specific occasion?

crimson coral
#

don't think so

surreal nimbus
#

hm

#

is it possible to change the input type depending on the value you put in the arg before the arg you want to change the input type in?

crimson coral
#

nope

slender lintel
crimson coral
#

the best you could do is some manipulation with autocomplete to check previous args

slender lintel
#

im confused sorry

crimson coral
#

all good

surreal nimbus
crimson coral
#

autocomplete results aren't enforced, they can ultimately input anything they want in there

#

but that's the closest you can get to the behaviour you want

surreal nimbus
#

alright, thank you

slender lintel
crimson coral
#

all good

crimson coral
slender lintel
crimson coral
#

well you gotta try first

ivory zenith
surreal nimbus
#

I have another question, if you set the input type to int, can there be made exceptions so you can also put a specific string too?

crimson coral
crimson coral
#

discord didn't design slash commands/options to be flexible across types like that

surreal nimbus
#

yeah...

crimson coral
#

all good

languid hollow
#

I'm guessing the latest library is not compatible without slash commands?

half marsh
pure lake
#

W3 a great free resource for learning it btw ^

#

But if prepared to pay would recommend the Udemy course Python zero to hero by Jose Portilla or something like that

gilded widget
#

tbh, if you don't wanna do courses, because i sure as hell didnt, just start with small projects

#

make small little things and use your resources to understand things

#

if that doesnt work though courses are a good way to understand it

idle wagon
#

How to get bot in flask server

pure lake
worthy basin
# idle wagon How to get bot in flask server

Read part 3 of this.
I'm not sure why you would want to do this unless you are transferring the bot to repl.it or something.
It is not necessary to have flask and uptime robot if you are running it on your own PC or other server that does not go offline after x amount of inactivity.

#

Parth 3 of that ^

idle wagon
worthy basin
#

I dont think you want to have the from main import bot. That leads to circular imports causing problems

idle wagon
worthy basin
#

The more complex way to fix it is by putting all the code in main into a function and doing

if __name__ == __main__:
    myFunc()

Outside the function at the bottom of the file.

I'm not super familiar with how it works so that the best I can give you. :/

idle wagon
glass nova
#

if i want to run flask and discord bot at once, can i not multithread the discord bot and have to multithread flask?

frank wadi
#

Hi

#

i need help with a userinfo command, buttons

#

Error: ```py
File "c:\Users\darkm\OneDrive\Desktop\Skyler v1\cogs\miscellaneous.py", line 32, in b3_callback
await interaction.response.edit_message(embed=more)
NameError: free variable 'more' referenced before assignment in enclosing scope````

#
        b3 = Button(label="More Informations", emoji="![928580930887626782](https://cdn.discordapp.com/emojis/979846983168692265.webp?size=128 "928580930887626782")")
        async def b3_callback(interaction):
                await interaction.response.edit_message(embed=more)
        b3.callback = b3_callback
        view = View()
        view.add_item(b3)```
frank wadi
#

A okey

#

Thanks

#
    await interaction.response.edit_message(content=more)
NameError: free variable 'more' referenced before assignment in enclosing scope
sudden path
frank wadi
#
        b3 = Button(label="More Informations", emoji="![928580930887626782](https://cdn.discordapp.com/emojis/979846983168692265.webp?size=128 "928580930887626782")")
        async def b3_callback(interaction):
                await interaction.response.edit_message(content=embed)
        b3.callback = b3_callback
        view = View()
        view.add_item(b3)

            more = discord.Embed( 
            description=
    f"""
    > ![928580896968306698](https://cdn.discordapp.com/emojis/979846983277744259.webp?size=128 "928580896968306698") *3*User Name:**_ _ `{user.name}#{user.discriminator}`
    > ![928580896876015636](https://cdn.discordapp.com/emojis/979846981855879259.webp?size=128 "928580896876015636") **User ID:**_ _ `{user.id}`
    > ![900023336304775238](https://cdn.discordapp.com/emojis/979001581070589962.webp?size=128 "900023336304775238") **Status:**_ _ 

    > ![928580931080556604](https://cdn.discordapp.com/emojis/979846981675528283.webp?size=128 "928580931080556604") **Join position:**_ _ `{str(members.index(user) + 1)}`

    > ![928580897182199908](https://cdn.discordapp.com/emojis/979846982472466522.webp?size=128 "928580897182199908") **Account Created:**_ _ <t:{round(user.created_at.timestamp())}:R>
    > ![928580897182199908](https://cdn.discordapp.com/emojis/979846982472466522.webp?size=128 "928580897182199908") **Joined Server:**_ _  <t:{round(user.joined_at.timestamp())}:R>

    > ![928580931080556604](https://cdn.discordapp.com/emojis/979846981675528283.webp?size=128 "928580931080556604") **Roles:**_ _ [0]
    > ![928580931080556604](https://cdn.discordapp.com/emojis/979846981675528283.webp?size=128 "928580931080556604") **Emojis:**_ _ [0]
    > ![928580931080556604](https://cdn.discordapp.com/emojis/979846981675528283.webp?size=128 "928580931080556604") **Emojis Animated:**_ _ [0]
    """, 
            color=0xed455b)
            more.set_thumbnail(url=has_avatar)
            more.set_footer(text=f"{user.name}#{user.discriminator} || {user.id}")```
sudden path
#

Do you realise that you're creating the embed after the response and not before

frank wadi
#

a

#

yes

#

it works

#

thanks

potent rivet
#

why do i get an error that create_text_channel is not defined

#

nvm im dumb

#

wait no its not working still

sudden path
#

b!rtfm create_text_channel

open bearBOT
# sudden path b!rtfm create_text_channel

I couldn't find a documentation with the name create_text_channel! Maybe you used to command wrong? Correct Usage: <prefix>rtfm <docs> [<term>] (eg. b!rtfm py cool)
List of Documentations you can search:
python
pycord
discord.py
yarsaw
nextcord
disnake

sudden path
#

b!rtfm pyc create_text_channel

open bearBOT
sudden path
#

Read the docs.

potent rivet
#

i am

#

ty tho

#

oh I am dumb im sorry

solar berry
#

How do you prevent Greedy from trying to get members from a word without a tag, like I use greedy to get members for massban, and it keeps getting members from the reason

sudden path
#

What's Greedy

frank wadi
#

How can i make that only author can use a button?

delicate peak
#

audio.file is a discord.sinks.core.AudioData object

#

it seems to have a write method, but I can't figure out how to use it
not what I was looking for... this is weird

#

I would download the file from the message that it sends, but if the file is too large it won't be able to send in the first place

crimson coral
#

hm

#

audio.file is the AudioData object...?

delicate peak
#

yes

#

the problem is in the channel.send() method you can just pass in a file

#

that is, a discord file object

crimson coral
#

and you got audio from sink.audio_data.items()?

delicate peak
#

yup

#

if I print the type of audio from sink.audio_data.items() it says it's an AudioData object

#

so the question boils down to just: how do you download a discord.File object

crimson coral
#

well it's the other way round

#

you don't download a discord.File, you convert data into it

delicate peak
#

oh I see

delicate peak
#

oh let me check

#

i'm trying - it's being a bit weird

#

sometimes I have to wait to start/stop recordings or they don't work

delicate peak
crimson coral
#

that's exactly what we want

delicate peak
#

what is _io?

#

as in the underscore

crimson coral
#

it's just the module it's from

#

the original code snippet i provided should hopefully work

delicate peak
#

ah okay

delicate peak
#

i'm pretty sure I can do io.BytesIO(data)

crimson coral
#

what about audio.file.getbuffer()

delicate peak
#

like this?

crimson coral
#

yeah

delicate peak
crimson coral
#

eyy nice

potent rivet
#

can anyone help me with making my bot create channels

vocal crane
#

how to i get the pfp of someone?

slow dome
potent rivet
#

been looking at that

#

ill keep playing around

sudden path
#

What are you trying

potent rivet
#

I just want a button that when its pressed it makes a channel

sudden path
#

What are you trying

potent rivet
#

oh right

#

I followed the button tutorial

#

and was trying to replace where the bot sends a message with an async def that makes the channel

sudden path
#

Code?..

potent rivet
sudden path
#

bot.guild?

potent rivet
#

i think i was trying discord.Guild too

#

idk where i got it from but i tried bot.guild too ig

sudden path
#

discord.Guild is the whole class

#

You need a Discord.Guild object

#

#help-rules 1

fresh brook
#

How do you add the unix timestamp to an embed?

slow dome
#

!rtfm pyc timestamp

robust nebulaBOT
slow dome
#

b!rtfm pyc timestamp

fresh brook
#

bet thanks

#

it worked

half marsh
#

Also you dont to make another function under interactikn

potent rivet
#

yeah

#

ty ill mess with it some more

heavy ruin
#

im blanking so badly right now, how do you get the bot to turn a channel id like 881891840746475570 into #help-rules

midnight cedar
#

#help-rules

heavy ruin
midnight cedar
#

where in the embed

heavy ruin
#

title

midnight cedar
#

markdown doesn't work in some fields

#

i believe the title is one of them

heavy ruin
#

hm thats unfortunate

#

thanks

slender lintel
#

b!rtfm pyc category

slender lintel
#

b!rtfm pyc timeout

idle linden
#
    def server_confirm_roles(server: Guild, way: Optional[str]) -> List[discord.Role] | List[str] | List[DictConfig]:
TypeError: unsupported operand type(s) for |: '_GenericAlias' and '_GenericAlias'

This is a python version error isn't it?

#

or am I doing something wrong

midnight cedar
#

that syntax is only supported on 3.10

idle linden
idle linden
#

hmm how do i get _ctypes for 3.10.4