#Basic Pycord Help (Quick Questions Only)

1 messages Ā· Page 22 of 1

boreal dust
#

whats error?

#

try modal = get_ad(title="Adverstiment")

#

ping me then pls

amber shale
#

interaction.user?

boreal dust
#

didnt work i tryied

#

bruh grammar

amber shale
boreal dust
#

should it pass id?

amber shale
#

interaction.type?

boreal dust
#
        guild.default_role: discord.PermissionOverwrite(view_channel=False),
        interaction.user: discord.PermissionOverwrite(view_channel=True),
        guild.me: discord.PermissionOverwrite(view_channel=True),
        ticket_role: discord.PermissionOverwrite(view_channel=True),
        }```
#

no

#

welp i actually did work

#

but how do i close modal? šŸ’€

proud mason
boreal dust
#

fixed šŸ’€

proud mason
#

Ah kk

boreal dust
#

i just cant close modal

#

šŸ’€

proud mason
#

Or do you mean you want to close the modal using the bot?

#

That's not possible

boreal dust
#

ticket created

#

but something went wrong

young bone
#

?

boreal dust
#

i dont use interaction.response

proud mason
#

You have to respond to the modal in the interaction callback

boreal dust
#

maybe this is prob?

proud mason
#

Yeah

#

Send and ephemeral message saying that ticket has been created

boreal dust
#

ooooh so i can use for example "ticket created. check at c.mention"?

proud mason
#

That's the best way around it

boreal dust
#

nice

young bone
boreal dust
boreal dust
#

Help please, these four horseman do not change

#

@proud mason yk?

#

nvm fixed

buoyant mesa
#

hey how do i get the class of a app command and list only the commands that are inside a class

delicate jolt
#
Ignoring exception in view <SearchView timeout=10 children=1> for item <Button style=<ButtonStyle.primary: 1> url=None disabled=False label=None emoji=<PartialEmoji animated=False name='šŸ…°ļø' id=None> row=None>:
Traceback (most recent call last):
  File "C:\Users\tearx\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\ui\view.py", line 375, in _scheduled_task
    await item.callback(interaction)
  File "C:\Users\tearx\Documents\GitHub\Cries-Bot\cogs\economy.py", line 132, in a
    await interaction.response.send_message(embed=embed, ephemeral=True)
  File "C:\Users\tearx\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\interactions.py", line 656, in send_message
    raise InteractionResponded(self._parent)
discord.errors.InteractionResponded: This interaction has already been responded to before```
#
    @discord.ui.button(emoji="šŸ…°ļø", style=discord.ButtonStyle.blurple, custom_id="help:left")
    async def a(self, ctx, interaction: discord.Interaction):
        await interaction.response.defer()
        chance = randint(1, 3)
        if chance == 1 or 2:
            amount = randint(100, 1000)
            db_check = await self.bot.db.select("economy", ["*"], checks=[["user_id", interaction.user.id]],
                                                single=True)
            if not db_check:
                await self.bot.db.insert("economy", [["user_id", interaction.user.id], ["wallet", 5000 + amount]])
                embed = discord.Embed(title="Economy", description=f"You found `{amount}`$",
                                      colour=col)
                embed.set_author(icon_url=interaction.user.avatar, name=f"{interaction.user.name} Searched")
                await interaction.response.send_message(embed=embed, ephemeral=True) 
            else:
                await self.bot.db.update("economy", [["wallet", db_check[2] + amount]],
                                         checks=[["user_id", interaction.user.id]])
                embed = discord.Embed(title="Economy", description=f"You found `{amount}`$",
                                      colour=col)
                embed.set_author(icon_url=interaction.user.avatar, name=f"{interaction.user.name} Searched")
                await interaction.response.send_message(embed=embed, ephemeral=True) 
        else:
            embed = discord.Embed(title="Economy", description=f"Unlucky, You did not find anything.",
                                  colour=col)
            await interaction.response.send_message(embed=embed)```
#

Could someone help me with this error?

buoyant mesa
#

hey how do i make dropdown menu

delicate jolt
buoyant mesa
#

thnks

delicate jolt
#

np

loud holly
#

You used one to defer

#

And one to send

delicate jolt
#

Oh right okay

loud holly
#

If you want to send another one

#

I believe its followup

#

Something like that

delicate jolt
#

Alright thanks, I'll try it

loud holly
#

I recommend you search followup in the docs and see something related to interaction

#

Since my memory currently doesn't serve me properly

delicate jolt
#

šŸ‘

loud holly
#

Is there something built in python to check ram, CPU, Storage usage or do I have to use external library? When I use an external library, it gives me the incorrect value unless my maths is wrong

delicate jolt
#

I think psutil works

#

Idk if you are using that

#

I've used psutil before

loud holly
#

I have been using that however when I check it against the host information, it gives me incorrect values

#

Unless my maths is wrong, which idk myself

delicate jolt
#

Do you want me to have a look?

loud holly
#

Yes pls

#

I'll try to find the code I've got

delicate jolt
#

Alright

buoyant mesa
#

hey how do i create a loop which can create select menus

delicate jolt
#

It's not hard to make loops

buoyant mesa
#

i just want to know how to make aloop which can create select menus option things i guess its not possilbe

pine grotto
buoyant mesa
#

discord.errors.ExtensionFailed: Extension 'cogs.utility' raised an error: TypeError: select function must be a coroutine function what this error

rugged lantern
#

probably exactly what it suggests šŸ™‚

cobalt tangle
#
    @bridge.bridge_command()
    @discord.Option(type = discord.Member, description = "User you want to coinflip with!")
    @discord.Option(type=str, description = "Pick the side of the coin you inherit in this game!", choices = ["Heads", "Tails"])
    async def coinflip(self, ctx: bridge.BridgeContext, user: discord.User, side: str):```
#

what is this error?

#

ive been getting non-stop errors for like 2 hours, i cant solve this one though

rugged lantern
#

use @real compasstion

#

...

cobalt tangle
delicate jolt
#

rip

rugged lantern
#

@option

cobalt tangle
#

ill try

#

nope

#

no work

cobalt tangle
#

guy didnt finish his work for like 5 months or something?

rugged lantern
cobalt tangle
#

does @Option not work anymore?

rugged lantern
#

how about u try to doing it without the decorator

#

did u try lower capitalized

cobalt tangle
cobalt tangle
rugged lantern
#

weird, works for me

cobalt tangle
cobalt tangle
#

and how do i define SlashCommandOptionType if i dont want to use decorators? Im trying without decorators

rugged lantern
#

i used:

@bridge.bridge_command(name='test', description="Nothing of use lol")
@option('testoption', type=discord.Member, description="User")
async def my_command(self, ctx: discord.ApplicationContext, testoption):
    pass
cobalt tangle
#

nope my first error came

#

great

rugged lantern
#

strange

cobalt tangle
buoyant mesa
#

TypeError: menu.select_callback() missing 1 required positional argument: 'interaction'

#

what is this error

rugged lantern
#

we dont have your code so hard to tell

buoyant mesa
#

it comes whenever i add client in parameter

buoyant mesa
rugged lantern
#

yes

buoyant mesa
#

2sec

#
class menu(discord.ui.View):
       
    @discord.ui.select(placeholder="select a category",options= [  
        discord.SelectOption(label= f"moderation", value="1",description="moderation commands"),
        discord.SelectOption(label= f"utility", value="2",description="get the class names"),
        ])


    async def select_callback(self, select, client: discord.Bot, interaction: discord.Interaction):
        select.disabled = True
        for names in client.get_cog("moderation").get_commands():
         if select.values[0] == "1":
               embed = discord.Embed(title="hello",description= f"{names}")
         await interaction.response.send_message(embed= embed)
#

code of menu class

rugged lantern
#

you don't need client in a callback

buoyant mesa
#

how would i define it

rugged lantern
#

follow the example provided by the guide

#

if you really want to provide client, you need to add:

def __init__(self, client):
    self.client = client
```then in your call for the ``menu``, you provide ``client``

```py
view = menu()
view.client = discord.Bot

await ctx.send(view)
#

or you can just do

def __init__(self, client: discord.Bot):
    self.client = client
...

await ctx.send(menu())
buoyant mesa
#

TypeError: menu.select_callback() missing 1 required positional argument: 'interaction' its same

rugged lantern
#

what do u use to call it

buoyant mesa
#

sry i did it

rugged lantern
#

yeah it should work for u, it worked for me at least :p

cobalt tangle
#

can i make a command only usable for a specific user?

#

(slash command), (without using if)

#
@bot.slash_command()
@discord.default_permissions(
    administrator=True,
)  # Only members with this permission can use this command.
async def admin_only(ctx: discord.ApplicationContext):
    await ctx.respond(f"Hello {ctx.author}, you are an administrator.")
#

such as this

buoyant mesa
#

you can use if user is thing

#

if user.id == "" something like this

twin gulch
#

@commands.Cog.listener() async def on_member_update(self, before, after): print(before,after)

#

cant seem to make this work. Presence intents is true.

rugged lantern
#

did u make sure to add it to your bot class too

twin gulch
#

Everything else on that cog works too

#

Yessir

rugged lantern
#

you need the members intents too

#

only*

#

on_presence_update would require both but on_member_update only requires Intents.members

twin gulch
#

`intents = discord.Intents( guilds=True,members=True,presences=True)

class HallMonitor(commands.Cog):
def init(self, client):
self.client = client

@slash_command(description="id test")
async def id(self, ctx, user: Option(discord.User, "User", required=False)):
    user = user or ctx.author
    await ctx.respond(f"The ID of {user} is {user.id}")

@commands.Cog.listener()
async def on_member_update(self, before, after):
    print(before,after)

def setup(client):
client.add_cog(HallMonitor(client)) `

#

i have members intents as well

young bone
#

do you have the intents in the main file?

rugged lantern
#

but do you have intents=intents in your client object?

young bone
#

^

twin gulch
#

didnt, well that solved it. thanks guys (apologies for being a noob)

spice oyster
#

How can I wait for client.load_extension("cogs.database") to be fully executed before proceeding?

rugged lantern
#

isn't that what the on_ready is triggered by

spice oyster
#

I'm not sure. I've tried but it didn't work.

young bone
#

dont load the cogs at the on_ready event....

spice oyster
#

I'm not doing it there.

rugged lantern
#
async def on_ready(self):
    await self.bot.wait_until_ready()
```? dunno
cold jetty
#

can anyone help me rq just 1 min of help neeeded

rugged lantern
#

dont ask to ask

cold jetty
#

what

gleaming falcon
#

Don’t ask to ask, just ask

cold jetty
#

pls anyone help me

rugged lantern
#

...

cold jetty
#

the embed first row isnt working

rugged lantern
#

shameless

cold jetty
#

what?

gleaming falcon
#

Just post your full question and context. ā€œIsn’t workingā€ isn’t a helpful description

cold jetty
#

The First row of Embed is not working i need someone to help me.

rugged lantern
#

it's like going to the doctors saying 'help, something is wrong'

cold jetty
#

Lol

#

thats all what i can explain you i would need to screenshare to show it you will not understand

#

i would need to*

rugged lantern
#

provide relevant code

gleaming falcon
#

Screenshots are a thing. So are pastebins for code. You don’t need someone’s direct time

cold jetty
#

ok sending ss

gleaming falcon
cold jetty
#

the first row is not embed

#

but in my code its already shown embed

gleaming falcon
#

Well no, it’s in the embed. It’s just not inside the code block

cold jetty
gleaming falcon
#

By putting the output inside the code block tags, I guess. You didn’t post the code as requested

cold jetty
gleaming falcon
#

Put the three backticks before value1

rugged lantern
#

u just move the row1 value to the right

cold jetty
#

i do but it turns red then

gleaming falcon
#

Come on. It’s a string.

cold jetty
#

can you tell me the exact code?

#

its been a week since i just started

rugged lantern
#

bruh

#

nobody is gonna manually write that out from a ss

gleaming falcon
#

No. The answer requires very elementary knowledge of python. We have provided the answer, but we aren’t going to write the code for you

cold jetty
#

ok can you tell me briefly where to put the three `

gleaming falcon
#

Look at how you have it before value2

rugged lantern
#

we literally told you. you don't need to add more of them, you MOVE it to the left of row1

cold jetty
#

oh

#

remove from /na and move to row 1

gleaming falcon
#

It’s a string. It’s markdown that turns text into a fixed-width code block, as you already know (since you’re doing it for the rest of the output). You just need to change it to include your value1

cold jetty
#

so my string is wrong

gleaming falcon
#

More accurately ā€œout of orderā€

#

Change the order, you change the output

cold jetty
#

wait ill send you one more string

ebon pelican
#

does timestamps still work? <t:1663592960.827099> cuz then im doing it, its not working

cold jetty
#
        em.set_footer(text="This is Not 100% Accurate, We will Not Be Responsable If you Loose Thank you For Using Our Predictor")
        await ctx.reply(embed=em)```
gleaming falcon
#

I strongly urge you to review how strings work in python (which frankly is similar to every other language out there). There are a million and one YouTube videos that can help you.

cold jetty
#

This good?

ebon pelican
#

oh

young bone
gleaming falcon
ebon pelican
#

bruh but i want to make a giveaway bot, everything works but idk hot to do it correctly so that it adds the time to the datetime and transfers it to a timestamp

gleaming falcon
ebon pelican
#

idk how

#

cuz i use tstamp = ctime2.timestamp()

gleaming falcon
#

You don’t know how to cast a variable to a different type? ā˜¹ļø That’s pretty basic python and can be easily rectified with some short research

ebon pelican
#

yes thats the way to say it

#

yeah wait a sec

#

i want to research myself

#

sry quit coding half a year and restarting :D

cold jetty
#

Traceback (most recent call last):
File "C:\Users\Ahmad Kamil\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\Ahmad Kamil\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "c:\Users\Ahmad Kamil.vscode\extensions\ms-python.python-2022.14.0\pythonFiles\lib\python\debugpy_main
.py", line 39, in <module>
cli.main()
File "c:\Users\Ahmad Kamil.vscode\extensions\ms-python.python-2022.14.0\pythonFiles\lib\python\debugpy/..\debugpy\server\cli.py", line 430, in main
run()
File "c:\Users\Ahmad Kamil.vscode\extensions\ms-python.python-2022.14.0\pythonFiles\lib\python\debugpy/..\debugpy\server\cli.py", line 284, in run_file
runpy.run_path(target, run_name="main")
File "c:\Users\Ahmad Kamil.vscode\extensions\ms-python.python-2022.14.0\pythonFiles\lib\python\debugpy_vendored\pydevd_pydevd_bundle\pydevd_runpy.py", line 320, in run_path
code, fname = _get_code_from_file(run_name, path_name)
File "c:\Users\Ahmad Kamil.vscode\extensions\ms-python.python-2022.14.0\pythonFiles\lib\python\debugpy_vendored\pydevd_pydevd_bundle\pydevd_runpy.py", line 294, in _get_code_from_file
code = compile(f.read(), fname, 'exec')
File "c:\Users\Ahmad Kamil\Downloads\Untitled-1.py", line 211
description = \n{row1}\n{row2}\n{row3}\n{row4}\n{row5} \n Accuracy\n{info}%")
^
SyntaxError: unexpected character after line continuation character
PS C:\Users\Ahmad Kamil\Downloads>

full basin
#

You're missing a "

cold jetty
#

where

full basin
#

After your equal

#

Should be description=f"....")

cold jetty
rugged lantern
#

dark, you should honestly just let them try to fix it

cold jetty
gleaming falcon
#

All of this can be rectified by finding a nice YouTube channel on strings

spice oyster
gleaming falcon
cold jetty
#

and it was urgent thats why

rugged lantern
#

by help it is suggestive towards the definition: make it easier or possible for (someone) to do something by offering one's services or resources, not directly help you with your homework type of help

cold jetty
#

yes all im asking is to guide me

gleaming falcon
#

It’s not too urgent that you can’t learn how strings work. It will save you time in the long run.

gleaming falcon
#

Uhhhh. ā€œPython stringsā€? Wtf

cold jetty
#

ok

rugged lantern
#

ive lost all hope

cold jetty
#

sorry if im arse

gleaming falcon
#

Oh, sweet.

spice oyster
#

I'm not a fan of having 1000 lines of code in the main file but it works. eddaniDerp

#

I don't know how to split it without using cogs and if appropriate. rooThink

fervent cradle
#

Alright, so I have this modal:py class get_ad(discord.ui.Modal): def __init__(self): super().__init__( discord.ui.InputText(style = discord.InputTextStyle.long, label = "Enter your Advertisement", placeholder = "Maxium of 250 characters, 5 lines.", max_length = 250), title = "Advertisement", timeout = None) async def callback(self, interaction: discord.Interaction): await interaction.response.pong() and when open it using ```py
modal = get_ad()
await ctx.send_modal(modal)

gleaming falcon
spice oyster
fervent cradle
#

Wait never mind. That wasn't even my problem.

#

I have this, ```py
await commands.ColourConverter().convert(ctx, "#fff223")

loud holly
# delicate jolt I've used psutil before

sorry for like the late late response

import os
import psutil
pid = os.getpid()
python_process = psutil.Process(pid)
memoryUse = python_process.memory_info()[0]/2**30  # memory use in GB...I think
print('memory use:', memoryUse)

This just showing incorrect values so I'm confused af on what I'm doing wrong

cold jetty
#

can anyone help me with delete_after=5

young bone
cold jetty
#

it isnt working,

young bone
#

how do you use it?

cold jetty
#

@bot.command()
async def crash(ctx):
author = ctx.author.name
tag = ctx.author.discriminator
id = ctx.author.id
log = f"Command crash as been used by {author}#{tag} || ID : {id}"
print(log)
games = scraper.get("https://rest-bf.blox.land/games/crash").json()
if ctx.author.id != bot.user.id:
ok = await ctx.send(
embed=discord.Embed(title="Checking API",description="Connecting to the API...",delete_after=5,color=0x5ca3ff))

    def lol():
        r = scraper.get("https://rest-bf.blox.land/games/crash").json()["history"]
        yield [
            r[0]["crashPoint"],
            [float(crashpoint["crashPoint"]) for crashpoint in r[-2:]]
        ]

    for game in lol():
        games = game[1]
        avg = sum(games) / len(games)
        chance = 1
        for game in games:
            chance = chance = 95 / game
            prediction = (1 / (1 - (chance)) + avg) / 2
            if float(prediction) > 2:
                color = 0x81fe8f
            else:
                color = 0xfe8181
                description = f"""
                **Crashpoint:**
                *{prediction:.2f}x*
                **Chance:**
                {chance:.2f}%
                """
            em = discord.Embed(description = description, color=color)
        await ctx.reply(embed=em)
#

the Checking API i want it to delete in 5 secs

#

but when i do command

#

it dosent delete

young bone
#

you need it in the ctx.send/reply

cold jetty
#

where

#

hmm

young bone
#

ctx.send("text", delete_after=5)

cold jetty
#

ok

#

but

#

i tried it

#

1 min let me try again

woeful spindle
#

My modules in requirements.txt aren’t installing, is there any command I can run in my console to install all modules in that file?

cyan quail
#

or something along those lines

young bone
#

^

cold jetty
#

look i fixed it but it isnt starting now

#

what am i doing wrong?

young bone
#

do you have something else installed?

cold jetty
#

let me try again

#

@young bone look

#

what your saying is correct but i want the text to be embed

#

i want to embeded text to delete

#

not "text"

young bone
#

than you have to edit the embed

cold jetty
#

yes

#

what do i do?

solid agate
#

Is there a way to get a Commands ID? I looked through the documentation, and can't find it anywhere.

solid agate
#

yes

young bone
solid agate
#

negative

#

That doesn't return the intergration ID

#

it returns the ApplicationCommand, which does not have this data.

cold jetty
#

ok

solid agate
#

annoying

cold jetty
#

@young bone help:(

#

pls check dms

fleet tusk
#

I don't know why its not work. I want to add reaction. Help plz

        message_r: discord.Message = await interaction.response.send_message(embed=embed, ephemeral=True, delete_after=60)
        await message_r.add_reaction(ross)
#

Error:

AttributeError: 'Interaction' object has no attribute 'add_reaction'
hasty bloom
#

What is this error:

gleaming falcon
#

@cold jetty - Instead of asking people to code for you (to which you are not paying for the service), you should be reading the Pycord docs. There's even a nicely formatted site with information that will help you understand how embeds and sends work. https://docs.pycord.dev/

But you still need to know how Python itself works at a basic level in order to make use of this information. We cannot learn it for you.

drifting birch
#

What is the difference between @discord.commands.slash_command, @discord.slash_command and @discord.ext.commands.slash_command? Looks like they all do the same thing and the last two have the exact same description in the docs. Is it just that the last two are a shortcut for the first one?

cold jetty
#

he is good guy he solved all errors for me

gleaming falcon
#

And you learned nothing, which means the next time something doesn't work as expected, you're going to use this channel (or the person that helped) as a crutch. You're doing yourself a disservice.

cyan quail
woeful spindle
#

fixed 🤭

hasty bloom
fleet tusk
craggy ibex
#

~~Is it possible to get username from a given discord user ID?

I saved the UID into my database and I would like to get their name/nickname from that number.~~
await fetch_user(user_id) gottem

fervent cradle
#

how can i catch This interaction failed error?

hasty bloom
#

What is this error:

delicate jolt
#

Im trying to use the bridge command but it's saying Context has no attribute 'respond'

#
    @bridge.bridge_command(description="Test your luck with the magic 8ball.")
    async def eightball(self, ctx, *, text):
        await ctx.respond(embed=self.neko_api(ctx, "8ball").set_author(icon_url=ctx.author.avatar, name=text))```
#

The slash command works

#

just not the normad

#

neverming

#

nevermind

#

i found a way round @ me if im wrong but I just used try: and except:

proud pagoda
#

Does anyone else have an issue with docker and azure where the bot goes offline without any error message, but all the other containers i have running are perfectly fine?

delicate jolt
#

Is there a way to use custom emojis in buttons?

vital blade
#

how can i send an message through an interaction in a certain channel

cyan quail
cyan quail
fervent cradle
#

My discord bot uses Pycord & slash commands, but for some reason I don't get this symbol on my bot, I see others with it. How can I get it.

cyan quail
#

are there any global commands on it?

fervent cradle
fervent cradle
cyan quail
#

not sure then, that appears to be the only requirement #discord-api-updates message

fervent cradle
#

i don't know why this issue is happening.

cyan quail
#

i mean, is your global command working fine?

fervent cradle
#

Yea, even tried the one in the documentation.

cyan quail
#

then idk GuraShrug if you have a global command it should appear, if not i can't really help you further since there isn't another way to get the badge

fervent cradle
#

Fixed it. Thanks anyways.

#

Anyone know why my slash command seems to be sending twice.

silver moat
#

send code

fervent cradle
#
@client.slash_command(name = "ping", description = "Checks the bot's latency")
async def ping(ctx):
    embed=discord.Embed(color=0x0f47fff)
    embed.add_field(name="Pong!", value=f"The bot's latency is `{client.latency*1000} ms.`", inline=False)
    await ctx.send(embed=embed)
#

it's pretty basic.

silver moat
#

it's ctx.respond

fervent cradle
#

thx

slim plaza
#

One of my bot's commands are based around having multiple users in a channel. I've been only able to test my bot with 1 user (myself) in a channel. Is there a way to add "dummy" users to a channel for testing purposes?

full basin
#

Create alt accounts?

slim plaza
#

true lol, somehow didnt think of that

delicate jolt
#
        role = interaction.guild.get_role(1021515147145138208)
        await interaction.user.add_roles(interaction.user, role)```
#
Traceback (most recent call last):
  File "C:\Users\tearx\PycharmProjects\Starlia-Bot\venv\lib\site-packages\discord\ui\view.py", line 396, in _scheduled_task
    await item.callback(interaction)
  File "C:\Users\tearx\PycharmProjects\Starlia-Bot\cogs\verification.py", line 37, in verify
    await interaction.user.add_roles(interaction.user, role)
  File "C:\Users\tearx\PycharmProjects\Starlia-Bot\venv\lib\site-packages\discord\member.py", line 975, in add_roles
    await req(guild_id, user_id, role.id, reason=reason)
  File "C:\Users\tearx\PycharmProjects\Starlia-Bot\venv\lib\site-packages\discord\http.py", line 355, in request
    raise NotFound(response, data)
discord.errors.NotFound: 404 Not Found (error code: 10011): Unknown Role
#

I am getting this error?

#

I have all intents enabled

#
intents=discord.Intents().all()```
proud pagoda
#

Pretty much, discord is saying that it cannot find the role

delicate jolt
#

It does though

#

<Role id=1002645940722728981 name='@everyone'>, <Role id=1021515147145138208 name='Verified'>, <Role id=1021504438675964006 name='Starlia'>]

proud pagoda
#

Are you sure you have the correct role id?

delicate jolt
#

yes

proud pagoda
#

Maybe try using fetch_role instead?

delicate jolt
#

ill try

proud pagoda
#

Correction: Use guild.fetch_roles() and then loop through the result trying to find the exact role

delicate jolt
#

kk

#

lemme try and get back to you

simple plover
#

how can i add this to my bot?

proud pagoda
cyan quail
#

(#discord-api-updates message)

delicate jolt
#

It's not working

simple plover
#

mine is not verified unfortuantly

proud pagoda
#

If there is, send that and the code

median tinsel
#

I used this to create a select menu for my bot but even when I set the min and max values to 1 it still lets me select multiple values and select the same values multiple times. I want it so the user can only select it once, how can I go about doing this?

class MyView(discord.ui.View):
    @discord.ui.select(
        placeholder="Choose an option",
        min_values=1,
        max_values=1,
        options= [
            discord.SelectOption(
                label="E"
            ),
            discord.SelectOption(
                label="P"
            ),
            discord.SelectOption(
                label="C"
            )
        ]
    )
    async def select_callback(self, select, interaction):
        if select.values[0] == 'E': await interaction.response.send_message("EEEEEEEEEEE")
        elif select.values[0] == 'P': await interaction.response.send_message("PPPPPPPPPPP")
        elif select.values[0] == 'C': await interaction.response.send_message("CCCCCCCCCC")
delicate jolt
#
        role = interaction.guild.get_role(1021515147145138208)
        print(role)```
#

it've done this and role returns "Verified"

cyan quail
delicate jolt
#

Yeah I saw what I've done now

cyan quail
median tinsel
#

hmm lemme try that

median tinsel
cyan quail
#

are you sure it's that view being sent?

#

don't think there's any bugs that would cause this

median tinsel
#

i was able to send 6 messages using the same view

cyan quail
#

no that's not what it means

median tinsel
#

ohhh

cyan quail
#

the min/max_values arguments tell the bot how many can be selected at the same time

median tinsel
#

gotcha

cyan quail
#

if you want to disable the select then you should do it in the callback and edit the message again

#

or just straight up remove the view if you want

median tinsel
#

gotcha

#

so i would do that underneath this right?

cyan quail
#

yeah that works

#

also instead of using if/else there you could simply take self.values[0] and multiply the string

#

though ig that's just an example

indigo badger
#
@bridge.bridge_command(description=" Gets the ping of the bot")
    async def ping(self, ctx):
        embed = discord.Embed(
            title="Bot Stats", 
            colour= discord.Colour.green()
        )
        embed.add_field(name="Ping", value=f'Pong! {round(self.Client.latency * 1000)}ms')
        embed.set_footer(text=f' Called by {ctx.author.name} |Hyper Tech Bots')
        await ctx.respond(embed=embed)
#

I am trying to get the commands with bridge working but when I run it.

#

The prefix one does not work.

#

And yes I have intents on.

#

If anyone sees anything wrong with this and can tell me that would be great.

silver moat
#

and do you have an on_message event?

indigo badger
#

I do but that was solved a long time ago.

#

Like they’re not even registering us new commands.

#

As they did new things to the commands, and they didn’t change anything.

#

Got any ideas?

#

Now I am getting this errror.

#

And not sure why as I did it like how it was in the guide.

limber bison
#

does anyone know of anywhere i can send an epic username and return the account id?

full basin
#

Google can help you find what you're looking for. šŸ˜‰

zealous lark
#

I feel like there is a simple answer to this question but is there a way to get the pressed button info? I cant find a way to get it from the interaction response. THis is from the documention but whenever i try to put a button argument it doesn't like it and only wants the interaction argument

@bot.event
async def on_ready():
    bot.add_view(MyView()) # Registers a View for persistent listening

class MyView(discord.ui.View):
    def __init__(self):
        super().__init__(timeout=None) # timeout of the view must be set to None

    @discord.ui.button(label="A button", custom_id="button-1", style=discord.ButtonStyle.primary, emoji="šŸ˜Ž") # the button has a custom_id set
    async def button_callback(self, button, interaction):
        await interaction.response.send_message("Button was pressed", ephemeral=True)

@bot.command()
async def button(ctx):
    await ctx.send(f"Press the button! View persistence status: {MyView.is_persistent(MyView())}", view=MyView())
zealous lark
rugged lantern
#

you asked to get pressed button info

#

whatever that means

silver moat
#

button is a button

#

what about the button.

#

or do you want to interaction info?

zealous lark
#

i get the interaction info just fine, i want to pass the button that has been pressed / clicked to the callback function

cyan quail
#

it's literally right there

silver moat
#

what's wrong with your current code?

cyan quail
#
async def button_callback(self, button, interaction)```
zealous lark
#

ive tried that and i get this error

cyan quail
#

can you paste the full error

#

however many lines it is

silver moat
zealous lark
#
Traceback (most recent call last):
  File "C:\Users\richa\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ui\view.py", line 396, in _scheduled_task
    await item.callback(interaction)
TypeError: Library.MARK_AS() missing 1 required positional argument: 'interaction'```
zealous lark
silver moat
weary knot
zealous lark
#

no just vscode on my laptop, that what you mean?

weary knot
#

Try defining them

cyan quail
#

hm the line number does match our master branch

#

but i don't see why that error would occur

weary knot
weary knot
#

Yeah

#

Quite weak at english šŸ˜‚

cyan quail
#

wait

#

that error's for a different button

#

can you show the code for the button that's erroring

zealous lark
cyan quail
#

everything i suppose

zealous lark
#

this is included in my main file

cyan quail
#

so that's why

#

indeed, when you have a button without a decorator the only argument would be interaction; button isn't available there, which loops back to your original question

#

i would recommend defining a custom_id for the buttons

#

then you can get the button object from self.children

#

wait

#

i suppose self.get_view().children

zealous lark
cyan quail
#

all buttons in the view

#

or items i suppose

#

e.g. discord.utils.get(self.get_view().children, custom_id="...") will return an item with the specified custom_id from the view

weary knot
#

Wait

#

What was your error @zealous lark

#

I am still confussed

cyan quail
#

callbacks have different arguments depending on how the item is created

#

if you use a decorator such as ui.button, then the arguments are (button, interaction) (+self in a class)

zealous lark
cyan quail
#

but without a decorator, the only argument is interaction

cyan quail
cyan quail
#

e.g. if all the labels are guaranteed to be unique, you could do label="..." instead of custom_id="..."

zealous lark
#

no idea what you're talking about. Haven't dived into custom_ids at all yet

#

but i will, thanks

cyan quail
#

custom_id is just a unique identifier for any item, nothing too complex

#

oh i suppose i misunderstood your get_view(), you basically need some way of getting the view object

#

i'd suggest storing your current view as self.view inside your get_view() function

#

that way you can reference it in any function

zealous lark
#

can the view see what has been clicked?

cyan quail
#

well the view just stores the items, you only get a reference in the interaction

#

because interaction contains the custom_id attribute as the sole identifier of what was clicked

#

(which is why it's useful to search view.children with)

#

though

#

custom_id can be randomly generated for you so if you don't care about what it is and you only need what's clicked i guess you can search anyway

zealous lark
#

so interaction.custom_id will return str it looks like wheich i then can search self.view with to find the button object that has been clicked?

cyan quail
#

mhm

zealous lark
#

alrighty! thank you very much explaining that all to me

cyan quail
#

the easiest way would be discord.utils.get(self.view.children, custom_id=interaction.custom_id)

#

maybe i should add view.get_item as an alias...

zealous lark
#

are you a dev for pycord?

cyan quail
#

not necessarily, anyone can contribute

zealous lark
#

oh neat, so you have contributed?

cyan quail
#

a few times i guess

fervent cradle
#

hey, could anyone tell me how to get a message link in context commands

yes - message.jump_url

obtuse juncoBOT
#

Please put your code in a code block:
```py
Here is your Code
```

That makes reading code in Discord a lot easier:

print("This is an example.")
hasty bloom
#

thx i solved the problem

fringe socket
#

Ok

cold jetty
#

can anyone good free 24/7 host not replit nor uptimer

nocturne canopy
#

is it against tos to make a bot without a prefix?

young bone
#

?

rare ice
rare ice
nocturne canopy
rare ice
#

Well what are you wanting to do. And they’re only forcing verified bots to use slash commands.

#

if they don’t have the message content intent

cold jetty
#

@rare ice Thank you.

dim flicker
#

Guys, please help. Only in this channel does this error appear, I have already set a delay. The messages are not deleted, but when the bot puts all the reactions, it sends the following error.

404 Not Found (error code: 10008): Unknown Message
dim flicker
cold jetty
dim flicker
# cold jetty yes

I have already posted the error above. The rest of the message is not important

spice oyster
cold jetty
#

@spice oyster hey can you help me?

#

with github

spice oyster
spice oyster
cold jetty
#

@spice oyster how to put github code and host it with railway

spice oyster
loud holly
#

the on disconnect event, is it the bot going offline completely or even more?

loud holly
# young bone if you read ;3

yes but I wanted more clarity, since if this event can be called many times as said, what I'm looking for is the event that it disconnects fully and won't be able to reconnect, which is why I was asking just to be sure

cyan quail
loud holly
#

Hmmm, I was hoping that the on_disconnect would like be where the bot completely goes offline and it can't reconnect back to discord at least like a final alert somehow without connecting to Discord API send out a message that the bot died.

Since the on_disconnect can be fired for various other reasons, the best thing I can do is compare the on_connect to on_disconnect but from there I'll have to see how I'll do that.

Is there a time set of how long will it take for the Bot to connect after it disconnects?

cyan quail
#

the delay is exponential, so it'll start small then increase if there's multiple reconnects

fervent cradle
#

would anyone happen to know why my autocomplete is not completing as i type?

    async def get_langs(self, ctx: discord.AutocompleteContext):
        return googletrans.LANGUAGES

    @commands.slash_command(description='Translate text straight from discord')
    async def translate(self, ctx: discord.ApplicationContext, language: discord.Option(str, 'The language to translate to', required=True, autocomplete=get_langs)):
        await ctx.respond('placeholder')```
fervent cradle
#

oh it HAS to be a list?

cyan quail
#

well

#

yeah

#

what were you going for?

#

if you want a dict like name:value then that's possible, but it'd still be as a list; just using OptionChoice instead

fervent cradle
# cyan quail if you want a dict like name:value then that's possible, but it'd still be as a ...

yeah, so i did .values(), now it returns a list but it still wont autocomplete

print(googletrans.LANGUAGES.values())

dict_values(['afrikaans', 'albanian', 'amharic', 'arabic', 'armenian', 'azerbaijani', 'basque', 'belarusian', 'bengali', 'bosnian', 'bulgarian', 'catalan', 'cebuano', 'chichewa', 'chinese (simplified)', 'chinese (traditional)', 'corsican', 'croatian', 'czech', 'danish', 'dutch', 'english', 'esperanto', 'estonian', 'filipino', 'finnish', 'french', 'frisian', 'galician', 'georgian', 'german', 'greek', 'gujarati', 'haitian creole', 'hausa', 'hawaiian', 'hebrew', 'hebrew', 'hindi', 'hmong', 'hungarian', 'icelandic', 'igbo', 'indonesian', 'irish', 'italian', 'japanese', 'javanese', 'kannada', 'kazakh', 'khmer', 'korean', 'kurdish (kurmanji)', 'kyrgyz', 'lao', 'latin', 'latvian', 'lithuanian', 'luxembourgish', 'macedonian', 'malagasy', 'malay', 'malayalam', 'maltese', 'maori', 'marathi', 'mongolian', 'myanmar (burmese)', 'nepali', 'norwegian', 'odia', 'pashto', 'persian', 'polish', 'portuguese', 'punjabi', 'romanian', 'russian', 'samoan', 'scots gaelic', 'serbian', 'sesotho', 'shona', 'sindhi', 'sinhala', 'slovak', 'slovenian', 'somali', 'spanish', 'sundanese', 'swahili', 'swedish', 'tajik', 'tamil', 'telugu', 'thai', 'turkish', 'ukrainian', 'urdu', 'uyghur', 'uzbek', 'vietnamese', 'welsh', 'xhosa', 'yiddish', 'yoruba', 'zulu'])```
cyan quail
#

do list(googletrans.LANGUAGES.values())

#

but again, if you were wanting dict-like functionality in autocomplete you can still do it

fervent cradle
#

no thats fine i just need the simple names for people, works either way

cyan quail
#

fair enough

fervent cradle
#

this still doesnt match it

cyan quail
#

oh right

#

isee

#

you'd have to do something like ctx.value in ... but this logic can be handled for you with basic_autocomplete

#

perhaps something like this would work```py
language: Option(str, "...", autocomplete=discord.utils.basic_autocomplete(list(googletrans.LANGUAGES.values())))

fervent cradle
#

thanks ill try it out

#

how do i put a view into an embed?

fervent cradle
cyan quail
#

all good

cyan quail
#

you can send a view and embed in the same message

fervent cradle
#

thanks

little hill
#

So with default_permissions being a thing, do you guys still use has_permissions as well? Or do you trust the server owners to not be idiots when configuring slash commands within discord

cyan quail
#

but if it's intended for others to be able to manage the permissions then it may be better to not hard-limit them

little hill
#

Yeah it's a public bot

#

I'll prob just add smth to my tos that says "dev is not responsible for dumb perm setups"

young bone
#

I can see the commands on my phone

cyan quail
#

even if you can see commands you arent meant to be able to run, discord will stop you

proud cargo
#

how can i update the options on a command? The options are based on current date

mossy relic
#

Can I get the date when a user got banned?

fervent cradle
#

are slash commands disabled by default if u dont have permission to use them?

#

using default_permissions

gilded niche
#

How can i format a float in hh mm ss

loud holly
flint breach
#

how would i go about adding options from a dict to a select menu?

cyan quail
cyan quail
cyan quail
#

like the key: value should be the option label and value respectively?

flint breach
cyan quail
#

well you can iterate through dict.items() as two variables to represent key and value

flint breach
cyan quail
#

the decorator is for the select menu itself (though you don't have to use it)

#

but select options are added separately

errant craneBOT
#

Here's the dropdown example.

flint breach
#

ohhhhh ok thanks, i think i got it now

dim flicker
#

Dear ones, can I use the first post on these forums to check if it's a photo or not?

cyan quail
cyan quail
#

then when you have that message, you can check message.attachments

dim flicker
#

And if not, then delete this thread, and if yes, then automatically set reactions

cyan quail
dim flicker
cyan quail
#

translate?

#

i suppose you want to send the image to another channel?

dim flicker
cyan quail
#

ahh forum channels

dim flicker
#

Oh, yes, I probably explained it wrong

#

Here it makes a branch, if a photo, and if not, then it curses a person and deletes the text

#

I call it PhotoMod

cyan quail
#

ahhhhhhh

#

so you want the bot to create the thread?

#

or does the user create it

dim flicker
#

Ta no, I'll explain now

#

Here, if as in the 1st screenshot, then delete this publication, and if as in the 2nd screenshot, then leave the publication and add emoticons

cyan quail
#

right right

#

then yes, you want on_thread_create

dim flicker
#

Is that how it works? Okay, thanks

cyan quail
#

mhm

#

thread.starting_message is the message they used to create the thread

#

so you can check that message to see if it has an image

#

after that, the other things i said above apply

dim flicker
#

I'm going to try

spice oyster
lean marten
#

My command isnt working after 1 usage. So I can use it one time but after that it says the command does not respond

async def lootbox_add(ctx, user, amount):
    profile = collection.find_one({"_id":user.id})

    if profile is None:
        newuser = {"_id":user.id, "lootbox_amount":1}
        collection.insert_one(newuser)
        await ctx.respond(f"{user.mention} `{amount}`")
        await statAddLootbox(amount)

    else:
        lootboxNum = profile["lootbox_amount"] + amount
        collection.update_one({"_id":user.id}, {"$set":{"lootbox_amount":lootboxNum}})
        await ctx.respond(f" {user.mention}. `{profile['lootbox_amount']}`.")
        await statAddLootbox(amount)


async def lootbox_remove(ctx, user, amount):
    profile = collection.find_one({"_id":user.id})

    if profile is None:
        await ctx.respond(f"{user.mention} has no lootbox/es.")

    else:
        lootboxNum = profile["lootbox_amount"] - amount
        collection.update_one({"_id":user.id}, {"$set":{"lootbox_amount":lootboxNum}})
        await ctx.respond(f"{user.mention}`{profile['lootbox_amount']}`")
        await statRemoveLootbox(amount)



lootboxGroup = bot.create_group("lootbox", "option")

@lootboxGroup.command(description="d")
async def add(ctx, user: Option(discord.User, "", required = True), amount: Option(int, description="The amount of lootboxes you want to give.", default=1, min_value=1)):
    try:
        if ctx.author.guild_permissions.manage_roles == True:
            await lootbox_add(ctx, user, amount)

        else:
            await ctx.respond(f".", ephemeral=True)
    except Exception as e:
        print(e)


@lootboxGroup.command(description="j")
async def remove(ctx, user: Option(discord.User, "k", required = True), amount: Option(int, description="j", default=1, min_value=1)):
    if ctx.author.guild_permissions.manage_roles == True:
        await lootbox_remove(ctx, user, amount)

    else:
        await ctx.respond("j", ephemeral=True)
#

I get no error

full basin
#

Try deferring it?

lean marten
#

?

#

Whats that

cyan quail
#

no errors?

lean marten
#

nope nothing

lean marten
spice oyster
# lean marten

Not related to your question but please check if the amount is equal to 1 and change the string to singular/plural accordingly. blobpain

lean marten
proud pagoda
#

Are there any ways to optimize RAM even more past turning off all unused intents? Ping on reply please

slim plaza
#

Is there any way to format embeds? E.g. id like it to be horizontally as it should be a leaderboard. So first line Schnappi 3 and the next line with Hello Bot 3

silver moat
#

where gc is the python garbage collector

slim plaza
# copper dew inline=True irc

Not quite, this is what i would get. But Schnappi and "3" horizontally in one line. And the next ones like that under those

silver moat
slim plaza
slim plaza
raven island
#

may be a dumb question but how can I pass a variable to a view?

For example I have command / tryme. Inside of this command i spawn my view for my buttons. I want to pass a string to the buttons so they can do some logic, but it seems the view does not take args other than items, timeout, and disableon timeout.

loud holly
#

Is there an automatic convertor when you input in channel ID in options, that it'll turn it into an object if it is valid?

user: discord.Option(discord.Member, required=True)

# This makes it so that you can put in User ID and it'll automatically convert into an object I believe

Is there a similar thing for TextChannels? I did use discord.TextChannel and it gave me incorrect TextChannel ID. The channel ID is in a different server that the bot has access to

#

it does work if I put in the channel ID in the server that I'm using the commands in

proud pagoda
proud pagoda
#

I'll try it anyway though

#

Should I have a task running every 5 min or so that just runs gc.collect()?

silver moat
#

should be fine

round rivet
#

garbage collection runs automatically anyways

proud pagoda
#

how often does it run?

round rivet
#

no clue

#

probably more often than 5 minutes

proud pagoda
#

Ok

#

gc.collect() won't remove all vars right, just the ones that are locals for functions that have finished running?

round rivet
#

it removes all unreferenced objects from memory

#

if it can't be accessed by anything it's generally considered garbage

naive steppe
#

Dont quote me, since i have yet to touch views properally.

gleaming falcon
#

That's correct. (Although don't forget to call super().__init__())

naive steppe
#

So im not at my pc rn
But using slash commands is there a way to have the "products" suggest be different depending on the server?

#

Like theres a command to add a product, and its linked with the server id

But i dont know how to make the suggested show up differently on each server

#

Because server 1 shouldnt know / have the same products as server 2

#

(Using option)

errant craneBOT
#

Here's the slash autocomplete example.

cyan quail
proud pagoda
cyan quail
#

yeah, but just in case you still wanted those intents enabled

warm grotto
#

How is an attachment link formatted?

#

I know that for Discord message links, they are formatted as:
https://discord.com/channels/{guildid}/{channelid}/{messageid}

#

But for attachment links, I can't figure out one of the arguments

#

So far I've gotten:
https://cdn.discordapp.com/attachments/{channelid}/{unknownarg}/{example.txt}

dreamy raft
#

Are there events for guild-avatar updates, about me updates, and guild about me updates?

spice oyster
round rivet
#

attachments isn't on there for some reason

somber cloak
#

how can i have my discord bot send stickers? is there a syntax for stickers similar to the one there is for emoji, i.e. <:emoji_name:emoji_id>?

somber cloak
#

thank you!

#

oh, relatedly, idk who manages the docs, but there seems to be a formatting error for that method:

naive steppe
#

forgot the async but yeah. exact result i wanted

raven garden
#

how do i send a regular message, not a response with interaction?

#

i want to edit a message and send a message

rugged lantern
#

ctx.send?

cold jetty
#

can anyone help me with github how do i pt my code in github

raven garden
#

hence i asked about interaction

rugged lantern
#

just add ctx to it then

raven garden
#

i dont think thatd work

rugged lantern
#

it does

raven garden
#

no it doesnt

rugged lantern
#

yes it does work if you do it correctly

raven garden
#
class seeBoard(discord.ui.View):
    @discord.ui.button(label="Hand", style=discord.ButtonStyle.primary)
    async def seehand(self, button, interaction, ctx):
        game = load(interaction.channel)
        await ctx.send(game['hand' + str(interaction.user)[0:-5].lower()], ephemeral = True)
        await interaction.response.edit_message(content=buttonBoard())``` just adding ctx to the arguments wont make it work i assume
rugged lantern
#

you can't just add it like that

raven garden
#

i know

#

but you did say i could

rugged lantern
#

in your class add def __init__(self, ctx)

#

in your call for the class, addsomething like
view = seeBoard(ctx)

#

remove it from the callback

raven garden
#

do i tab my @discord.ui.button and async def once then?

#

to put it in the def __init__ block

rugged lantern
#

yes

#

and also add self.ctx = ctx

raven garden
#

and if i have another button in the same class, do i do the same to that button too?

rugged lantern
#

and do self.ctx.send instead

#

not if u already have the ctx?

raven garden
#

do i need to put it in the def __init__ block too

rugged lantern
#

self.ctx = ctx?

raven garden
#

dont you mean ctx = self.ctx

rugged lantern
#

no

young bone
raven garden
#

ty

young bone
#

You dont need ctx for that

raven garden
#

yeah i was hoping there was a more obvious more easy solution

raven garden
young bone
#

Try it

raven garden
#

i did and it doesnt work

spice oyster
#

Although it could be not enough, depending on what you are sending.

spice oyster
rugged lantern
#

but passing ctx takes at least 5 seconds šŸ˜•

#

is there no instantly solve my problem cus lazy-way?

rugged lantern
#

nope. i do not have remote access to your pc

#

or whatever else you're hosting it on

woeful spindle
#

nvm

fleet tusk
#

Please help. When I create a message, I write it to a variable. After I get the id from the variable. After in the on_reaction_add function, I again try to get the id. But it differs from the one I received the first time. What to do and how to fix it?

    async def callback(self, interaction: Interaction):
        embed = discord.Embed(title='1', colour=discord.Colour.darker_gray())
        embed.add_field(name="2", value=self.children[0].value, inline=False)
        embed.add_field(name="3", value=self.children[1].value, inline=False)
        embed.add_field(name="4", value=self.children[2].value, inline=False)
        embed.add_field(name="5", value=self.children[3].value, inline=False)
        embed.add_field(name="6", value=self.children[4].value, inline=False)
        # await client.get_channel(1021084385543471145).send(embed=embed)
        message = await interaction.response.send_message(embed=embed, delete_after=60)
        messages_ids[interaction.user.id] = message.id
        print(message.id)

        @client.event
        async def on_reaction_add(react, user):
            print(messages_ids[user.id])
            print(self.message.id)
full basin
#

Why are you using self? You're not in a class

#

interaction.respose.send_message returns an Interaction object.

fleet tusk
spice oyster
full basin
fervent cradle
#

hey, does anyone know how to work with lavalink? -> i want to make a command to replay the last played song from queue

full basin
full basin
fervent cradle
#

ah alright yeah thanks

spice oyster
limber bison
#

How do I have the bot auto delete this message? I don’t want peoples emails being able to be known by everyone

#

I looked through the docs but couldn’t figure out how to phrase what I was looking for

full basin
#

You can use ephemeral=True when responding so only the user can see the response.

real frost
#
Ignoring exception in on_interaction
Traceback (most recent call last):
  File "C:\Users\ilush\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 127, in wrapped
    ret = await coro(arg)
  File "C:\Users\ilush\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 1201, in _invoke
    await command.invoke(ctx)
  File "C:\Users\ilush\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 356, in invoke
    await self.prepare(ctx)
  File "C:\Users\ilush\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 278, in prepare
    if not await self.can_run(ctx):
  File "C:\Users\ilush\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 373, in can_run
    local_check = cog._get_overridden_method(cog.cog_check)
AttributeError: '_MissingSentinel' object has no attribute '_get_overridden_method'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\ilush\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\bot.py", line 1009, in invoke_application_command
    await ctx.command.invoke(ctx)
  File "C:\Users\ilush\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 359, in invoke
    await injected(ctx)
  File "C:\Users\ilush\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 135, in wrapped
    raise ApplicationCommandInvokeError(exc) from exc
discord.errors.ApplicationCommandInvokeError: Application Command raised an exception: AttributeError: '_MissingSentinel' object has no attribute '_get_overridden_method'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\ilush\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\client.py", line 382, in _run_event
    await coro(*args, **kwargs)
  File "C:\Users\ilush\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\bot.py", line 1058, in on_interaction
    await self.process_application_commands(interaction)
  File "C:\Users\ilush\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\bot.py", line 756, in process_application_commands
    await self.invoke_application_command(ctx)
  File "C:\Users\ilush\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\bot.py", line 1013, in invoke_application_command
    await ctx.command.dispatch_error(ctx, exc)
  File "C:\Users\ilush\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 401, in dispatch_error
    local = cog.__class__._get_overridden_method(cog.cog_command_error)
AttributeError: type object '_MissingSentinel' has no attribute '_get_overridden_method'
Ignoring exception in command favorites show:
Traceback (most recent call last):
  File "C:\Users\ilush\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 127, in wrapped
    ret = await coro(arg)
  File "C:\Users\ilush\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 1201, in _invoke
    await command.invoke(ctx)
  File "C:\Users\ilush\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 356, in invoke
    await self.prepare(ctx)
  File "C:\Users\ilush\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 278, in prepare
    if not await self.can_run(ctx):
  File "C:\Users\ilush\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\commands\core.py", line 373, in can_run
    local_check = cog._get_overridden_method(cog.cog_check)
AttributeError: '_MissingSentinel' object has no attribute '_get_overridden_method'

The above exception was the direct cause of the following exception:

#

can anyone help me, i still have no idea why am i getting this error

real frost
#

im actually have lastest version

silver moat
#

which is?

#

hmm, send entire pip list

real frost
#
aeval                      0.1.3
aiohttp                    3.7.4.post0
anilibria.py               0.1.0
AnilistPython              0.1.3
anyio                      3.5.0
apiai                      1.2.3
arrow                      1.2.2
async-generator            1.10
async-timeout              3.0.1
atomicwrites               1.4.0
attrs                      21.4.0
beautifulsoup4             4.10.0
Brotli                     1.0.9
bs4                        0.0.1
calendra                   7.0.0
certifi                    2021.10.8
cffi                       1.15.0
cfscrape                   2.1.1
chardet                    3.0.4
charset-normalizer         2.0.10
click                      8.1.2
cloudscraper               1.2.60
colorama                   0.4.4
covid-stats                0.0.1
cryptography               37.0.2
Cybernator                 0.6.3
deep-translator            1.8.3
Deprecated                 1.2.13
discord-together           1.2.3
discord-webhook            0.14.0
discum                     1.4.0
ffmpeg-python              0.2.0
filetype                   1.0.13
future                     0.18.2
geojson                    2.5.0
googletrans                3.0.0
gTTS                       2.2.4
h11                        0.9.0
h2                         3.2.0
hpack                      3.0.0
hstspreload                2021.12.1
httpcore                   0.9.1
httpx                      0.13.3
hyperframe                 5.2.0
idna                       2.10
imageio-ffmpeg             0.4.7
iniconfig                  1.1.1
install                    1.3.5
joblib                     1.1.0
jplephem                   2.17
keyboard                   0.13.5
libmesh                    0.0.6
lunardate                  0.2.0
lxml                       4.9.0
lyricsgenius               3.0.1
more-itertools             8.13.0
MouseInfo                  0.1.3
multidict                  6.0.1
mutagen                    1.45.1
nltk                       3.7
numpy                      1.22.4
outcome                    1.1.0
packaging                  21.3
pafy                       0.5.5
Pillow                     9.1.0
pip                        21.2.4
pluggy                     1.0.0
progressbar                2.5
py                         1.11.0
py-cord                    2.1.3
PyAutoGUI                  0.9.53
pyCalverter                1.6.1
pycparser                  2.21
pycryptodomex              3.15.0
PyGetWindow                0.0.9
pyluach                    2.0.0
PyMsgBox                   1.0.9
PyNaCl                     1.4.0
pyOpenSSL                  22.0.0
pyowm                      3.2.0
pyparsing                  3.0.9
pyperclip                  1.8.2
pyrandmeme                 0.0.5
PyRect                     0.2.0
PyScreeze                  0.1.28
PySocks                    1.7.1
pytesseract                0.3.9
pytest                     7.1.2
python-dateutil            2.8.2
python-twitch-client       0.7.1
pytweening                 1.0.4
pytz                       2021.3
random2                    1.0.1
redis                      4.3.4
regex                      2022.3.15
requests                   2.27.1
requests-toolbelt          0.9.1
rfc3986                    1.5.0
selenium                   4.1.5
setuptools                 58.1.0
sgp4                       2.21
six                        1.16.0
skyfield                   1.42
skyfield-data              4.0.0
sniffio                    1.2.0
silver moat
#

hmm try uninstall py-cord and reinstalling it

real frost
#

same error((

young bone
silver moat
real frost
#

i'm coded in discord py 1.7.3 earlier

little hill
#

What causes guilds to be unavailable? Is it just when the bot is no longer a member of that guild?

#

Ok so I found this

#

Why/how would a guild be "offline?"

loud holly
#

ok so I'm trying to catch some errors when something fails, which is via try and except

try:
    await bot.get_channel(int(User_Message.content)).send(embed=Embed)

except commands.BotMissingPermission.missing_permissions as Error:
    await ctx.repond(Error)

the exception is not working at all, I hope I'm using the correct one, I did also have the discord.Forbidden. but I want to catch the exact missing permission so I'm confused

frank herald
#
My Error:
Ignoring exception in on_ready
Traceback (most recent call last):
  File "C:\Users\e\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\client.py", line 382, in _run_event
    await coro(*args, **kwargs)
  File "C:\Users\e\PycharmProjects\RB-Bot copy\main.py", line 28, in on_ready
    await bot.logger.info("Test")
  File "C:\Users\e\PycharmProjects\RB-Bot copy\logs.py", line 77, in info
    async with aiohttp.ClientSession as session:
AttributeError: \_\_aenter\_\_

The code that causes it:
    async with aiohttp.ClientSession as session:
        log_webhook = Webhook.from_url(url=self.webhook, session=session)

Any idea what could cause the error?

little hill
loud holly
#

lemme do it again

little hill
#

Wait maybe that's forbidden

#

Yeah just use discord.Forbidden

loud holly
#

just got this error

little hill
#

commands.BotMissingPermissions is typically raised when the @commands.bot_has_permissions() check fails

loud holly
little hill
loud holly
#

I get different errors on either the bot (I believe can't send messages which is error 403 and if it can't view the channel (401 or 402??)

#

Alr, I'll give it ago, I presume the global error won't get triggered?

#

this one

fervent cradle
#

How do I remove the color of an embed? Like so

full basin
#

It's just the same hex as Discord's background

#

You can't "remove" it

fervent cradle
#

oh

#

lmao, thanks

undone smelt
#

How does one manually make a command without the decorator? I need to programmatically assemble some commands. The docs says

These are not created manually, instead they are created via the decorator or functional interface.

But I'm not sure what the functional interface is

fleet tusk
dry echo
#

is there a way to disable all commands in dms at once?

full basin
fleet tusk
full basin
#

?tag idw

obtuse juncoBOT
#

Saying it doesn't work or asking what's wrong with this code? is not helpful for yourself or others.
Describe what you expect and/or tried (with your code), and what isn't going right.
Please provide any errors you get for optimal assistance.

fleet tusk
full basin
#

You've just said the same thing

#

HOW is it not working

fleet tusk
#

It' all, i describe everything

woeful spindle
#

Are the pycord examples in the GitHub up to date?

young bone
#

not all of them

woeful spindle
#

yeah they don’t really seem like it

#

I’m looking for an example of slash commands in cogs with options

woeful spindle
#

I had a look at that

#

Is it up to date though?

young bone
#

no but it has not changed

#

you can use ```py
@discord.option()

or

def(ctx, text: Option())....

cyan quail
#

? why wouldn't the examples be up to date

#

they're all functional

young bone
#

some of them doesn “t work

cyan quail
#

any in particular?

cyan quail
#

ok audio recording fair enough

#

but the rest are fine

woeful spindle
#

Does commands.guild_only() apply for slash command?

cyan quail
#

there are very few people here that know how to navigate the mess of audio processing in the lib

woeful spindle
#

kk ty

cyan quail
woeful spindle
#

got it ty

wooden zenith
#

theres an error when trying to host my bot and its a general pycord problem

#

there is the error

delicate jolt
#

im trying to make a levelling system and I dont want people to be able to spam it can I use @commands.cooldown(1, 5, commands.BucketType.user) in a cog listener

fervent cradle
#

I think so

hidden oxide
#

Hello, help plz.
I want to get raction id, but have Error. What i should do?
Code:


        @client.event
        async def on_reaction_add(reaction, user):
            if ids.get(member.id) is not None:
                if ids.[member.id] == reaction.message.id:
                    print(reaction.emoji.id)

Error:
AttributeError: 'str' object has no attribute 'id'

delicate jolt
#

alright

full basin
wooden zenith
full basin
#

Means, you have conflicting libraries lmao

#

You have other discord package

#

That conflicts with py-cord

gilded niche
#

So i put my command in a cog in a file and it's working perfectly, but now that i made another cog in a different file that one wont work

full basin
#

?tag idw

obtuse juncoBOT
#

Saying it doesn't work or asking what's wrong with this code? is not helpful for yourself or others.
Describe what you expect and/or tried (with your code), and what isn't going right.
Please provide any errors you get for optimal assistance.

gilded niche
#

Why does my addmoney command work and my collect command doesn't?

silver moat
sage galleon
#

Is markdown not available for embed footers?

full basin
#

footer you mean?

sage galleon
#

Yeah footer lmao

full basin
#

No, discord doesn't parse mentions or markdown there

sage galleon
#

Got it, thanks

rare ice
#

@wooden zenith Please stop cross-posting.

rare ice
#

Choose your own help thread or this main help thread. Not both.

fleet tusk
#

Next question:
I create a modal, everything works well, it remembers the text. The problem is this: when I post my answers, the modaldoes not close, and it says that something went wrong. What to do in this situation?
Code:

    async def callback(self, interaction: Interaction):
        embed = discord.Embed(title='1', colour=discord.Colour.darker_gray())
        embed.add_field(name="2", value=self.children[0].value, inline=False)
        embed.add_field(name="3", value=self.children[1].value, inline=False)
        embed.add_field(name="5", value=self.children[2].value, inline=False)
        embed.add_field(name="6", value=self.children[3].value, inline=False)
        embed.add_field(name="6", value=self.children[4].value, inline=False)
        overwrites = {
            interaction.user: discord.PermissionOverwrite(read_messages=True),
            interaction.guild.default_role: discord.PermissionOverwrite(read_messages=False),
            interaction.guild.me: discord.PermissionOverwrite(read_messages=True)
        }
        channel = await interaction.guild.create_text_channel('secret', overwrites=overwrites)
        message1 = await client.get_channel(channel.id).send(embed=embed, delete_after=60)
        msg = message1
        await msg.add_reaction('\U00002611')
        await msg.add_reaction('\U0000274C')
        messages_ids[interaction.user.id] = msg.id
silver moat
fleet tusk
silver moat
lapis fossil
#

How to find a word in multiple files? (get file paths)

silver moat
somber cloak
#

if i have a slash command and use @default_permissions(...), what will it look like for people without the permissions? will it not show up at all? or will it show up but have some sort of "you're not allowed to use this" message?

silver moat
worldly schooner
#

How do I set a cooldown for a user to use a command?

#

not a global cooldown, only for the user that did the command

worldly schooner
#

thanks

somber cloak
#

is there a way to tag a user like @somber cloak without giving them a notification?

#

i could just use the user's nickname, but it's nice to be able to click on them and see their profile

full basin
#

Use the allowed_mentions kwarg when sending the message

somber cloak
#

so i would do AllowedMentions.none()?

fervent cradle
#

is it possible to make a slash command only usable/visible in a specific channel?

near hollow
#

not currently, would be neat if discord added support for that tho. only guild specific

somber cloak
#

can't you do that manually by going to server settings -> integrations?

near hollow
#

Probably could through permissions I would assume bot not through code

near hollow
sly comet
#

Hi, I'm trying to figure out how to edit a message depending on whether or not a value starts with a vowel (or y), but I can't seem to get it to work. Here's the part of the code I need help on (the variable names have been changed, and I'm pretty sure every variable shown has been defined somewhere in the code):

            if prompts1[0] in vowels:
                sentence = GlobalVariable1
            else:
                sentence = GlobalVariable2
            embed = discord.Embed(title = "Create your sentence!", description = sentence)
            embed.set_author(name = f"Your word is {word}, which is a {prompt}")
            await self.edit_original_message(embed = embed)

I've tried using startswith() as well but nothing seems to work. I don't even get an error in the log, it just fails to edit the message. I'd appreciate some help!

weary knot
warm grotto
#

I'm running into a weird problem
Figure 1py @app.route('/test1') def test1(): try: URI = request.args['view'] except: return "<h1>Access Denied</h1>" f = requests.get(URI) return f.contentFigure 2py @app.route('/test2') def test2(): try: ID = request.args['view'].split('/')[5] except: return "<h1>Access Denied</h1>" f = requests.get(f"https://cdn.discordapp.com/attachments/992881557893292112/{ID}/transcript.html") return f.contentFigure 3py @app.route('/transcripts') @app.route('/transcripts/<ID>') def transcripts(ID=None): if not ID: try: return redirect(f"/transcripts/{request.args['view'].split('/')[5]}") except: return "<h1>Access Denied</h1>" f = requests.get(f"https://cdn.discordapp.com/attachments/992881557893292112/{ID}/transcript.html") return f.contentIn figure one, I'm trying to get the html contents of a cdn file using the ?view argument.
In figure two, I'm getting the attachment id of a cdn file and getting the html contents with the ID.
In figure three, it is the same thing as figure two, except it redirects to the same route so that it shortens the link.
Figure 1 and Figure 2 display the same content, but Figure 3 somehow does not include the CSS files that come with it.
Examples:
https://bots.versadev.org/test1?view=https://cdn.discordapp.com/attachments/992881557893292112/1022286369348931624/transcript.html
https://bots.versadev.org/test2?view=https://cdn.discordapp.com/attachments/992881557893292112/1022286369348931624/transcript.html
https://bots.versadev.org/transcripts?view=https://cdn.discordapp.com/attachments/992881557893292112/1022286369348931624/transcript.html
Any suggestions as to why this does not recognize the .css files in the 3rd figure?

quick temple
#

Could I make a slash command only available to a certain group of users (user id list)?

#

So that they are the only ones who can see the command and use it

raven island
round rivet
#

although i am questioning why it's from a free robux discord

naive steppe
#

im not at my pc, so i cant test. but are you able to pass ctx to a function?
example:

def user_id(ctx):
  return ctx.author.id


@Bot.slash_command("stuff blah blah")
def user_id_send(ctx: discord.ApplicationContext):
  await ctx.respond(content=user_id(ctx))

(i know this example is not use full at all, just wondering if ctx can be passed to a function)

rugged lantern
#

yes

naive steppe
fringe socket
slender abyss
fringe socket
#

Hello everyone! I am wondering how I can make my bot's status display how many servers the bot is currently in.

slender abyss
#

Bot.guilds

fringe socket
#

you know how some big bots like mushroom.gg ask you to join their server when you add them? how do i make my bot do that?

#

@slender abyss

full basin
#

on_guild_join

fringe socket
#

And what would I do with that?

#

Yeah but how do I make the bot invite the user

full basin
#

on guild join triggers when the bot is added to a server

#

Just send a message

delicate jolt
slender abyss
cyan quail
#

yeah the easiest way to build short cooldowns for purposes like this would be a dict

#

just map the user id to the last unix timestamp they gained exp at and then compare it to the current time

fading granite
#

Is it possible to have every slash subcommand in a group follow the same default permission except for one?

cyan quail
#

you can only set those permissions for the entire group

fading granite
#

ah okay

fleet tusk
#

What the problem?
I want to get message, having his id, but ween i try to do that, i get None. Why? The message definitely exists

@client.event
async def on_raw_reaction_add(reaction):
    is_in_list = False
    print("YEA")
    mes = client.get_message(reaction.message_id)
    print(mes)
coral kindle
#

can some one help me?

gray juniper
#
payload["embeds"] = [e.to_dict() for e in embeds]
AttributeError: 'str' object has no attribute 'to_dict
``` is this a bug?
#

full log with file

#

path

  File "C:\Users\Kulkarni\AppData\Roaming\Python\Python310\site-packages\discord\interactions.py", line 689, in send_message
    payload["embeds"] = [e.to_dict() for e in embeds]
  File "C:\Users\Kulkarni\AppData\Roaming\Python\Python310\site-packages\discord\interactions.py", line 689, in <listcomp>
    payload["embeds"] = [e.to_dict() for e in embeds]
AttributeError: 'str' object has no attribute 'to_dict'
little hill
#

Any guesses as to where Hydra gets music from, if not youtube?

silver moat
silver moat
#

it's still against discord tos regardless.

little hill
#

Yeah but

#

Yeah.

#

Ok

#

You have a sound argument

silver moat
#

and discord does check the bots again from time to time to make sure they aren't against tos

little hill
#

šŸ‘€

#

Is there a helpful list of audio sources that are safe?

waxen whale
#

forget this, that'll get your bot faster deleted then you think

little hill
#

Yeah def dont want that

#

Im at 50 servers rn, I'll start looking into my options now so that I have time warn my userbase before the switch

fleet tusk
gilded niche
#

Hi,
Im getting an error when i am using cogs.

I have a cog with at the end: 'ctx.respond' but i am getting an error with unknown interaction.

The error may come from the fact that cogs use self but i am not sure if that is the problem.

Can anyone help me?

gleaming falcon
little hill
spiral urchin
#

If I do </name:id> it turns into a slash command... but if I click it, nothing happens... What am I missing?

blissful spear
fervent cradle
#

hey, could anyone explain this error further?; In data.components.0.components.0.options.3: The specified option value is already used

wraith saffron
#

hello hello

#
@discord.ui.button(label="Conectare pe Server", style=discord.ButtonStyle.url)
    async def button_callback(self, button, interaction):
        await interaction.response.send_message("Ai fost redirecționat pe o pagină nouă.")

I want to add a redirect to this button and if I will add url="https://www.example.com" it pops up an error.

wraith saffron
young bone
#

you can just use py button = discord.ui.Button() ...

#

the url button does not have a callback

young bone
wraith saffron
#

just py-cord

wraith saffron
#

thanks for helping

proud pagoda
#

How come ctx.channel is sometimes a PartialMessageable?

versed fern
#

Never seen this before, any ideas?

proud pagoda
#

Cuz pycord doesn't require load_extension to be awaited

versed fern
#

yeah, I didn't really change anything, just switched to vscode, pressed some buttons and here we are

proud mason
#

run pip freeze

proud pagoda
#

Send the output of your pip freeze

proud mason
#

and send that here

#

yea

versed fern
#

just did, appeartly I installed discord.py (how, when, what???)

proud pagoda
#

Send the output of pip freeze here, we might be able to figure out which one requires it

#

And uninstall dpy and pycord and then reinstall pycord

proud mason
#

uninstall it ||and watch the world burn? ThinkO_O||

#

r?tag install

versed fern
#

unistalled already

proud mason
#

oop i forgor

proud mason
#

dIsCoRd2.0.0 šŸ‘€

versed fern
#

wtf

#

I just created a new venv

proud mason
#

also why is it in mixed case šŸ¤”

versed fern
#

how is that in there

#

iƄm so confused

#

aiohttp==3.8.3
aiosignal==1.2.0
async-timeout==4.0.2
attrs==22.1.0
charset-normalizer==2.1.1
discord==2.0.0
frozenlist==1.3.1
idna==3.4
multidict==6.0.2
py-cord==2.1.3
yarl==1.8.1

#

thre we go wtf

proud mason
#

huh

#

are you sure you have activated the venv?

versed fern
#

pretty sure yeah

proud mason
#

well then yeet discord and pycord and then reinstall

versed fern
#

might have accidentally installed something to the standart python folder or however you'd call that

proud mason
#

no idea i dont really use venv

versed fern
#

aiohttp==3.8.3
aiosignal==1.2.0
async-timeout==4.0.2
attrs==22.1.0
charset-normalizer==2.1.1
frozenlist==1.3.1
idna==3.4
multidict==6.0.2
yarl==1.8.1

#

current pip freeze output, gonna install pycord now using python -m pip install py-cord

#
  Using cached py_cord-2.1.3-py3-none-any.whl (1.0 MB)
Requirement already satisfied: aiohttp<3.9.0,>=3.6.0 in c:\users\bruno bittrich\pycharmprojects\aim\venv\lib\site-packages (from py-cord) (3.8.3)
Requirement already satisfied: attrs>=17.3.0 in c:\users\bruno bittrich\pycharmprojects\aim\venv\lib\site-packages (from aiohttp<3.9.0,>=3.6.0->py-cord) (22.1.0)
Requirement already satisfied: yarl<2.0,>=1.0 in c:\users\bruno bittrich\pycharmprojects\aim\venv\lib\site-packages (from aiohttp<3.9.0,>=3.6.0->py-cord) (1.8.1)     
Requirement already satisfied: frozenlist>=1.1.1 in c:\users\bruno bittrich\pycharmprojects\aim\venv\lib\site-packages (from aiohttp<3.9.0,>=3.6.0->py-cord) (1.3.1)  
Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in c:\users\bruno bittrich\pycharmprojects\aim\venv\lib\site-packages (from aiohttp<3.9.0,>=3.6.0->py-cord) (4.0.2)
Requirement already satisfied: multidict<7.0,>=4.5 in c:\users\bruno bittrich\pycharmprojects\aim\venv\lib\site-packages (from aiohttp<3.9.0,>=3.6.0->py-cord) (6.0.2)
Requirement already satisfied: charset-normalizer<3.0,>=2.0 in c:\users\bruno bittrich\pycharmprojects\aim\venv\lib\site-packages (from aiohttp<3.9.0,>=3.6.0->py-cord) (2.1.1)
Requirement already satisfied: aiosignal>=1.1.2 in c:\users\bruno bittrich\pycharmprojects\aim\venv\lib\site-packages (from aiohttp<3.9.0,>=3.6.0->py-cord) (1.2.0)   
Requirement already satisfied: idna>=2.0 in c:\users\bruno bittrich\pycharmprojects\aim\venv\lib\site-packages (from yarl<2.0,>=1.0->aiohttp<3.9.0,>=3.6.0->py-cord) (3.4)
Installing collected packages: py-cord
Successfully installed py-cord-2.1.3
``` WTF is happening
proud mason
#

uhh nothing

#

that was supposed to happen

versed fern
#

but I unistalled it

#

before installing

#

so like what

proud mason
#

no the Requirement already satisfied is for the dependencies of py-cord

#

in the last line you can see that py-cord was installed

frank thistle
#

https://cdn.no1irishstig.co.uk/t1bn6.png
https://cdn.no1irishstig.co.uk/d6alr.png

How can I ensure this event is checked before the application command code is executed? I used to do it before Slash and it would prevent commands from running without process_commands being on the end. However now they both run at the same time?

And I know I could add a @commands.check() to each command, but ideally I can be lazy and cover them all using the event listener like I used to

versed fern
#

working again, thx

#

Uhm, why can't I import Option from discord.app?

frank thistle
#

Its not in discord.app

#

from discord import Option

#

Or just import discord and use discord.Option

versed fern
#

thx

clever nova
#

Help! My bot appears online in command line but it doesn't appear when i write the / , what could I do to find the reason?

versed fern
#

Is there a way to preven this (pic 1) from showing up without responding like this (pic 2)

#

Basically don't want a text response in discord at all

versed fern
#

yep

#

for the second pic

jovial dagger
#

still missing

copper dew
#

restart vs code

woeful spindle
#

fixed šŸ¤”

jovial dagger
#

still missing

copper dew
jovial dagger
#

nvm

#

got it

copper dew
#

ok then

jovial dagger