#discord-bots

1 messages · Page 64 of 1

slate swan
#

do icon_url=user.display_avatar.ur because user.avatar will return None if the avatar is a discord default

sacred minnow
tawdry tendon
#

They are taking the piss 😭😭

sacred minnow
#

is there a way to only send a footer image

slate swan
#

huhhh

#

that shouldn't be happening

#

if that ain't working then

sacred minnow
slate swan
#

you can't have an avatar without text

sacred minnow
#

rip

tawdry tendon
#

I think you can

slate swan
#

idk that should have worked

sacred minnow
#
    @commands.command(name="kick", description="Kick a user from the server.")
    async def kick(self, ctx: commands.Context, user: discord.Member, *, reason=None):
        if ctx.author.id != self.bot.owner_id:
            await ctx.send("author id does not match owner id!")
            return
        if reason is None:
            reason = "No reason provided"
        embed = discord.Embed(
            title=f"Kicked user {user.name}",
            description=f"Reason: {reason}",
            color=0xFF0000,
        )
        embed.set_footer(text="** **", icon_url=user.display_avatar.url)
        embed.set_author(name=ctx.author.name)
        # await ctx.send("kick command called")
        await ctx.send(embed=embed)```
slate swan
#

!d discord.Embed.set_footer

unkempt canyonBOT
#

set_footer(*, text=None, icon_url=None)```
Sets the footer for the embed content.

This function returns the class instance to allow for fluent-style chaining.
sacred minnow
slate swan
#

wait text is optional

#

I'm high

tawdry tendon
#

Can’t you do description = “ “

slate swan
tawdry tendon
#

Or what do you want it to do @sacred minnow

slate swan
#

it wasnt working before because avatar.url returned None

#

so

sacred minnow
tawdry tendon
#

Ye it should be display_avatar.url

slate swan
tawdry tendon
slate swan
#

the user avatar

sacred minnow
tawdry tendon
#

Oh

sacred minnow
tawdry tendon
#

Ok

#

Since it’s in an embed you can do

#

Can someone send me the backsticks

#

I’m on mobile lol

slate swan
#

`

sacred minnow
#

nvm im using set_thumbnail and it works better

slate swan
#

it indeed does

sacred minnow
tawdry tendon
#

I was about to tell you to do that lol

#

wel.set_thumbnail(url=f"{member.display_avatar.url}")

slate swan
#

why the f string

tawdry tendon
#

That’s how I did it but with welcome

tawdry tendon
#

It works either way anyways

sacred minnow
#

wrong chat lol

vale wing
#

!e py s = "string" print(s == f"{s}") # what the hell for

unkempt canyonBOT
#

@vale wing :white_check_mark: Your 3.11 eval job has completed with return code 0.

True
drifting arrow
#

How can I make a discord button only usable by an admin?

tawdry tendon
drifting arrow
#

Yes

tawdry tendon
#

Import has_permissions

#

And then

#

@dawn stratus_permissions(administrator=True)

drifting arrow
tawdry tendon
slate swan
#

!d discord.ext.commands.has_permissions

unkempt canyonBOT
#

@discord.ext.commands.has_permissions(**perms)```
A [`check()`](https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#discord.ext.commands.check "discord.ext.commands.check") that is added that checks if the member has all of the permissions necessary.

Note that this check operates on the current channel permissions, not the guild wide permissions.

The permissions passed in must be exactly like the properties shown under [`discord.Permissions`](https://discordpy.readthedocs.io/en/latest/api.html#discord.Permissions "discord.Permissions").

This check raises a special exception, [`MissingPermissions`](https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#discord.ext.commands.MissingPermissions "discord.ext.commands.MissingPermissions") that is inherited from [`CheckFailure`](https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#discord.ext.commands.CheckFailure "discord.ext.commands.CheckFailure").
slate swan
tawdry tendon
#

No

#

From discord.ext.commands

drifting arrow
#

idk feels wrong

#

Wait. So All I have to do is put the has permissions before the buttons class?

slate swan
#

you might already have commands imported
just use commands.has_permissions

#

these checks have nothing to do with button classes, they are for prefix commands

tawdry tendon
slate swan
#

for commands, yes
for buttons, a big fat No

tawdry tendon
#

Ah

drifting arrow
#

Anyway. back to my issue. How can I make a button only usable to lets say.. Admins?

slate swan
#

interaction.user.guild_permissions.administrator will be True if the user who used the interaction has admin perms

#

I tried making a !whois command with interactions but when i try it it gives me an error
How do i fix this:

async def whoiscmd(ctx, member: interactions.Member = None):
    embed=interactions.Embed(description="<@%s>**'s Profile**"%member.id)
    embed.set_thumbnail(url=member.avatar_url)
    await ctx.send(embeds=embed)```

ERROR:
```AttributeError: 'Member' object has no attribute 'avatar_url'```
hidden violet
#

[<Relationship user=<User id=126891288518721536 name='Xaniel' discriminator='5634' bot=False system=False> type=<RelationshipType.friend: 1> nick=None>]
How could I extract the users ID from this?

slate swan
#

How to fix?

#

@hidden violet

hidden violet
#

@slate swan Have you defined intents?

slate swan
slate swan
#

@hidden violet

slate swan
slate swan
#

I'm just smiling

#

Don't mind me

#

😳

hidden violet
#

client = commands.Bot(command_prefix=',', intents=intents)```
#

copy line 1

slate swan
#

BROOOOOO

#

New line?

hidden violet
#

and add intents=intents

slate swan
hidden violet
#

yes

slate swan
#

😦

#

tf?

hidden violet
#

just add a line intens = discord.Intents.default()

#

it's impossible for me t read this sorry

slate swan
#

I hate this new update

#

Now the commands is not working

woeful geyser
#

saul

slate swan
#

The ping

#

Is not working

#

Nvm

hidden violet
#

delete and reset ur token @slate swan

#

and does it work now?

tawdry tendon
#

No

#

Don’t do default intents

#

Do all

hidden violet
#

yeah can do that too

tawdry tendon
#

And don’t show your token

#

Someone can take full access

#

So reset it

slate swan
#

BRUH

tawdry tendon
slate swan
#

Done

hidden violet
#

@tawdry tendon can you help me with this?
[<Relationship user=<User id=126891288518721536 name='Xaniel' discriminator='5634' bot=False system=False> type=<RelationshipType.friend: 1> nick=None>]
I need to get the users ID from this, do you know how to?

tawdry tendon
#

But Wdym by take users if

slate swan
#

Still now working

hidden violet
#

I want to store the user ID in a variable

tawdry tendon
#

Master32 can help

#

He’s much better at discord bots than me

tawdry tendon
slate swan
#

troll command

hidden violet
tawdry tendon
silk fulcrum
slate swan
silk fulcrum
#

you don't have message_content intent enabled

#

it's required for message command and getting message content at all

tawdry tendon
#

Bro @slate swan I told you to do intents to all

slate swan
#

Where?

tawdry tendon
silk fulcrum
#

it's .default()

hidden violet
#

Don't be mad at him I told him the wrong thing

tawdry tendon
#

Ok

hidden violet
#

Shimi change it and should be fine

silk fulcrum
tawdry tendon
#

MY PCCCCCCCCC OMD ITS SO ANNOYING WTF

silk fulcrum
#

Don't use so much capital letters btw

tawdry tendon
#

Ok

slate swan
silk fulcrum
tawdry tendon
#

Go on dev portal and turn on intents

silk fulcrum
#

it says to enable intents on dev portal

tawdry tendon
#

Yo

#

How do you kill your computer

silk fulcrum
tawdry tendon
#

Yep

hidden violet
#

ctrl alt del?

slate swan
silk fulcrum
#

hm....

tawdry tendon
slate swan
#

This one?

hidden violet
#

turn off psu

silk fulcrum
#

the best way is to throw it in window ig

tawdry tendon
tawdry tendon
tawdry tendon
#

I’ll take out the Gpu

silk fulcrum
tawdry tendon
#

UGH

slate swan
tawdry tendon
#

@silk fulcrum are you good with windows

hidden violet
#
@client.event
async def on_user_update(before, after):
    if before.id in client.user.friends:
        # do stuff```
slate swan
#

Ahhhh still not working

hidden violet
#

@silk fulcrum that's what I am trying to do but how should I change it to make it work?

tawdry tendon
hidden violet
#

and client.user.friends returns what I sent earlier
[<Relationship user=<User id=126891288518721536 name='Xaniel' discriminator='5634' bot=False system=False> type=<RelationshipType.friend: 1> nick=None>] But with all friends

slate swan
#

NVM IM QUITING AS A DEVELOPER

silk fulcrum
tawdry tendon
dim cosmos
silk fulcrum
#

😳

hidden violet
dim cosmos
#

on_user_update is triggered when a user changes their username discriminator or avatar

dim cosmos
slate swan
dim cosmos
#

usre

silk fulcrum
#

burh

hidden violet
#

burh

tawdry tendon
#

Damn

dim cosmos
#

just enable intents and you're good

tawdry tendon
#

Oh because there is something wrong

dim cosmos
#

no need to "quit being a dev"

tawdry tendon
#

The thing is

#

Idk xD

hidden violet
dim cosmos
slate swan
#

Idk how

dim cosmos
slate swan
silk fulcrum
#

when proccessing your query (INSERT INTO ...) you didn't specify a value of lastuserID which is a required column, since it doesnt have a default value

dim cosmos
slate swan
#

I just want the ping

silk fulcrum
#

if lastuser variable is an ID of that user, then yes

slate swan
dim cosmos
#

u would get terminated

silk fulcrum
#

your bot's pool is somehow None

#

probably

slate swan
#

Sooo my bot is now active 24/7?

dim cosmos
#

obv not 24/7

slate swan
#

Ohh its still running

#

I closed it

dim cosmos
#

why are u using replit in the first place

#

and why on phone

slate swan
#

Nuke them back

dim cosmos
#

i've never seen this level of autism

#

seek help

slate swan
#

Hold up-

dim cosmos
#

not worth paying for

slate swan
#

Nahh bro my server is prototype

#

Im gonna use heroku

dim cosmos
#

.

#

dude heroku is shit too

#

just use an actual vps

slate swan
#

Idk what to dooo

dim cosmos
#

^^

slate swan
#

Ik

dim cosmos
#

i use aws

#

it's great

#

my bot averages 16-20 ms

#

yep

#

the dpy version on replit is locked to 1.7.3 btw

#

u can't use anything like buttons or select menus

#

unless u use a fork or some shit

slate swan
#

Yes ik but im just typing my bots command their and deleting it

dim cosmos
#

or even worse get u and ur bot terminated

#

only thing i would use replit for is to clear unused imports

#

literally the only thing it's useful for

slate swan
#

Why other bot is still running even i dont have intent turned on?

dim cosmos
#

..

slate swan
#

what would you recommend as a paid host?

dim cosmos
#

buy a bigger aws server

#

or contabo

#

contabo gives u like 8gb ram for 7$

#

forgot other perks

slate swan
#

Nice ty man will look it up

dim cosmos
#

there's multiple good paid services

#

just choose the one u like the most

slate swan
#

Just want fastest response time and 24/7 tbh

#

don’t mind paying a lil extra

dim cosmos
#

aws gets me 16-20 ms & it's 24/7

#

free tier btw

#

u just need to add a cc as a payment method

slate swan
#

Sweet will check em out

dim cosmos
#

👍

slate swan
#

Is heroku bad?

winged coral
#

Very

dim cosmos
slate swan
#

It’s not like replit is it? I want it to be 100% private

winged coral
#

VPS’s are private by nature

dim cosmos
#

obv private

slate swan
winged coral
#

Virtual Private Server

winged coral
slate swan
winged coral
#

So good luck with that

dim cosmos
#

no more free heroku 🗣️🗣️

dim cosmos
#

shimi why dont u use an actual vps

dim cosmos
winged coral
slate swan
slate swan
dim cosmos
#

step 1 is as djj said

dim cosmos
winged coral
#

That buys you a month

#

You’re literally setting pool to none in the init

slate swan
winged coral
#

You’re also creating a second bot inside the first bot for no reason?

dim cosmos
winged coral
#

You’re overwriting the d.py pool with your DB pool

slate swan
dim cosmos
winged coral
#

Yes, d.py has its own pool

#

Change the name

#

self.databasepool =

#

or something

slate swan
dim cosmos
#

look up a tutorial

#

@slate swan can u send me an invite to a server with ur bot in it

slate swan
#

Can u use google cloud?

#

@slate swan

#

2H wasted

#

kk

ionic edge
#
import discord
from discord import ui , app_commands
from discord.ext import commands
import discord.ui


class Modals(commands.Cog):
    def __init__(self , client = commands.Bot):
        super().__init__(
            "Modals",
        )
        self.client = client
        self.emTitle = discord.ui.TextInput(label= "Embed Title", min_length = 2 , max_length = 124 , required = True ,placeholder= "Enter Title")
        self.add_item(self.emTitle)
        self.emDes = discord.ui.TextInput(label= "Embed Description", min_length = 5 , max_length = 4000 , required = True ,placeholder= "Enter the embed description" , style = discord.TextInputStyle.Paragraph)
        self.add_item(self.emDes)
    async def callback(self, interaction:discord.Interaction) -> None:
        title = self.emTitle.value
        des = self.emDes.value
        embed = discord.Embed(title = title , description = des , colour = discord.Colour.purple())
        return await interaction.response.send_message(embed = embed)

    @commands.command()
    async def embed(self, ctx):
        await self.callback(ctx)
        await ctx.send("Embed Created")



async def setup(client):
    await client.add_cog(Modals(client))```
slate swan
#

Can you run 2 different .py files on sparked? And do they also provide a database?

#

ok sweet

lethal patio
#

um, i can see the command; why the bot cannot

crystal glen
#

Is it possible for a bot to share there screen?

#

Or something like that?

crystal glen
#

You forgot the ()

lethal patio
#

GOD!!

crystal glen
dim cosmos
#

oh wait ys

crystal glen
#

-_-

dim cosmos
#

i thought it was client.event

crystal glen
tawdry tendon
#

why isnt this working

lethal patio
#

and event is decorator?

crystal glen
tawdry tendon
#
botinfoembed = discord.Embed(title="Bot Information",
                             description="This bot was made by HelloHello#0729 you can contact him through discord. The creator of this bot lives in London",
                             colour=discord.Colour.magenta())``` i get this error even though it isnt a command```    botinfoembed = discord.Embed(title="Bot Information",
AttributeError: 'Command' object has no attribute 'Embed'```
tawdry tendon
ionic edge
#

heyy i need help

dim cosmos
tawdry tendon
ionic edge
#

class Modals(ui.Modal):
    def __init__(self , client = commands.Bot):
        super().__init__(title="New suggestion:")
        self.client = client
        self.emTitle = ui.TextInput(label= "Embed Title", min_length = 2 , max_length = 124 , required = True ,placeholder= "Enter Title")
        self.add_item(self.emTitle)
        self.emDes = ui.TextInput(label= "Embed Description", min_length = 5 , max_length = 4000 , required = True ,placeholder= "Enter the embed description" )
        self.add_item(self.emDes)
    async def callback(self, interaction:discord.Interaction) -> None:
        title = self.emTitle.value
        des = self.emDes.value
        embed = discord.Embed(title = title , description = des , colour = discord.Colour.purple())
        return await interaction.response.send_message(embed = embed)

class Utilities(commands.Cog):
    def __init__(self, client = commands.Bot):
        self.client = client
        
    @commands.command()
    async def suggestion(self, ctx):
        suggest = Modals()
        await ctx.send(suggest)```
crystal glen
ionic edge
#

i am not getting the modal

tawdry tendon
dim cosmos
#

just know its @client.command() and @client.event

crystal glen
ionic edge
#

this is the response

tawdry tendon
#
infoembed = discord.Embed(title="Bot Information", description="This bot was made by HelloHello#0729 you can contact him through discord. The creator of this bot lives in London", colour=discord.Colour.magenta())```
crystal glen
tawdry tendon
dim cosmos
#

why make it a modal

#

u could just make it a normal command

#

oh

#

☠️

crystal glen
#

You probably forgot something

tawdry tendon
#
botinfoembed = discord.Embed(title="Bot Information", description="This bot was made by HelloHello#0729 you can contact him through discord. The creator of this bot lives in London", colour=discord.Colour.magenta())

@bot.command()
async def botinfo(ctx):
    await ctx.send(embed=botinfoembed)```
dim cosmos
#

why do u have the embed defined outside of the command

tawdry tendon
#

i called the embed later in the command

dim cosmos
#

it's outside of the command

crystal glen
#

I think it's not possible...

tawdry tendon
#

it would still work

dim cosmos
#

move it in & try

crystal glen
#

Either it's a function, Or it won't work

slate swan
#

ya it got to be inside command to call it i thought

unkempt canyonBOT
#

@crystal glen Per Rule 6, your invite link has been removed. If you believe this was a mistake, please let staff know!

Our server rules can be found here: https://pythondiscord.com/pages/rules

crystal glen
#
@client.command()
async def botinfo(ctx):
    embed = discord.Embed(title=f"{client.user.name}", color=0x00FF00)
    embed.set_thumbnail(url=client.user.avatar_url)
    embed.add_field(name="ID", value=client.user.id)
    embed.add_field(name="Created at", value=client.user.created_at.strftime("%d-%b-%Y-%H:%M"))
    embed.add_field(name="Prefix", value="?")
    embed.add_field(name="Developer & Owner", value="ArasoOsara69")
    embed.add_field(name="Guilds", value=len(client.guilds))
    embed.add_field(name="Users", value=len(client.users))
    embed.add_field(name="Version", value="1.6.9")
    embed.add_field(name="Dev Language", value="discord.py")
    await ctx.send(embed=embed)

@tawdry tendon

tawdry tendon
#

still dont work

#

same as before

#
AttributeError: 'Command' object has no attribute 'Embed'```
#
@bot.command()
async def botinfo(ctx):
    await ctx.send(embed=botinfoembed)
botinfoembed = discord.Embed(title="Bot Information", description="This bot was made by HelloHello#0729 you can contact him through discord. The creator of this bot lives in London", colour=discord.Colour.magenta())```
slate swan
tawdry tendon
crystal glen
tawdry tendon
#

my embed is named botinfoembed

crystal glen
#

^

dim cosmos
#

move it ABOVE CTX.SEND

crystal glen
tawdry tendon
dim cosmos
#

dude ur sending an embed that isn't defined

#

define the embed first THEN send it

tawdry tendon
#

that would give an error saying that i havent defined the command

crystal glen
#

bruh

tawdry tendon
#

so you cant be calling me stupid

crystal glen
tawdry tendon
crystal glen
#
@bot.command()
async def botinfo(ctx):
   botinfoembed = discord.Embed(title="Bot Information", description="This bot was made by HelloHello#0729 you can contact him through discord. The creator of this bot lives in London", colour=discord.Colour.magenta())
    await ctx.send(embed=botinfoembed)
crystal glen
tawdry tendon
#

my bad

#

thanks

crystal glen
tawdry tendon
crystal glen
#

define main.py

tawdry tendon
#

its just a py file

#

why you want me to change it

crystal glen
#

You clearly don't know what is main.py

tawdry tendon
#

why cant i send the code

dim cosmos
dim cosmos
tawdry tendon
#

oh it has a discord link

crystal glen
tawdry tendon
#
@bot.command()
async def discord(ctx):
    await ctx.send("[MATHER's discord](thelinkhere)")```
dim cosmos
#

@tawdry tendon whats a subclass

tawdry tendon
#

im learning

#

chill wtf

dim cosmos
#

i'm chilling

tawdry tendon
#

my name can be anything i want wtf

dim cosmos
#

nobody said it can't

crystal glen
#

but...

#

you shouldn't have it when you don't know what's main.py

#

i'm just saying this, because it's annoying in my opinion

tawdry tendon
#

idc about your opinion

#

damn

#

if i want my name to be main.py then ill leave ir like that

crystal glen
#

k.

tawdry tendon
#

look, i dont care if he wants me to change my name then thats his problem

#

not mine

dim cosmos
#

why are u talking to me about it

tawdry tendon
#

you @ ed me and sent me a picture

dim cosmos
#

doesn't have anything to do with him asking u to change ur nickname

#

are u stupid or something

#

ur autism is even worse than @slate swan's

#

seek help bud

crystal glen
#

😂

shrewd apex
#

we talk about everything in this channel except discord bots

tawdry tendon
#

and if anyone would need help it would be you

#

especially with that image in your files

shrewd apex
#

chill mate no need to respond

tawdry tendon
#

116 123 you should call them @dim cosmos

cold sonnet
#

😵

rugged shadow
#

Python does not treat it specially

tawdry tendon
crystal glen
tawdry tendon
cold sonnet
#

it doesn't matter...

rugged shadow
tawdry tendon
#

fr

crystal glen
#

It wasn't initially why I told him to change it

#

print ("Goodbye") quit()

#

wtf is this

glad cradle
#

I'm back

tawdry tendon
crystal glen
tawdry tendon
#

a face is now a meme

#

and you were laughing at @dim cosmos saying i was autistic

crystal glen
tawdry tendon
#

if im autistic idk what you are

#

you are on another level of autism

crystal glen
#

yes because you're autistic

tawdry tendon
#

says you

crystal glen
#

shut up bro

#

take this somewhere else

#

go learn coding

#

And then use quit()

rugged shadow
#

<@&831776746206265384>?

tawdry tendon
#

i would say something

#

but u will probs cry so i wont

shrewd apex
#

guys calm down 😅

crystal glen
tawdry tendon
rugged shadow
#

I already did

crystal glen
rugged shadow
#

Don't ping them twice

tawdry tendon
rugged shadow
#

Both of you will probably get muted or banned

tawdry tendon
#

hes carrying it on

#

not my problem, its his

rugged shadow
#

.topic

lament depotBOT
#
**Do you think there's a way in which Discord could handle bots better?**

Suggest more topics here!

rugged shadow
#

these topics are ass bro

#

i swear they only put 3 topics

shrewd apex
#

they need new topics someone needs to make a pr

slate swan
#

how about you do something that doesn't annoys others

rugged shadow
#

sarth don't

#

we are literally talking about the topic command

tawdry tendon
shrewd apex
crystal glen
#

omfg

crystal glen
rugged shadow
slate swan
#

lmao

tawdry tendon
crystal glen
#

bruh

slate swan
# lament depot

add message content as an invite scope instead of intent 😔

shrewd apex
rugged shadow
slate swan
rugged shadow
#

if they dont hav msg content they can't use prefix command?

shrewd apex
#

sarth should be on discord dev team

rugged shadow
slate swan
shrewd apex
#

and they claim slash commands will stop self bots and stuff which person tries to verify himself as a self bot and req for message contentpithink

slate swan
#

discum: hold my beer

rugged shadow
#

and that would be a problem for prefix-only bots

slate swan
#

why would someone not invite the bot with that scope if they want to use prefix commands

rugged shadow
#

eh good point

slate swan
#

there's no such method in discord.py what library are you using

#

its create_activity_invite , not link

tawdry tendon
#

hello

#

i need help

#
@bot.listen()
async def on_member_join(member):
  wel = discord.Embed(color=discord.Color.magenta(), title=f"Welcome {member.name}!", description=f"Welcome {member.mention} If you don't know the commands type in '.help', this will tell you all the commands. I am a math bot so if you ever need help with math, I am the one to use. I can do other things aswell, test me out in. Enjoy your stay!")
  wel.set_thumbnail(url=f"{member.display_avatar.url}")
  wel.set_author(name=f"{member.guild}", icon_url=f"{member.guild.icon.url}")
  await member.send(embed=wel)
#
  File "/home/runner/MATHER/venv/lib/python3.8/site-packages/discord/client.py", line 409, in _run_event
    await coro(*args, **kwargs)
  File "main.py", line 205, in on_member_join
    wel = discord.Embed(color=discord.Color.magenta(), title=f"Welcome {member.name}!", description=f"Welcome {member.mention} If you don't know the commands type in '.help', this will tell you all the commands. I am a math bot so if you ever need help with math, I am the one to use. I can do other things aswell, test me out in. Enjoy your stay!")
AttributeError: 'Command' object has no attribute 'Embed'
#

anyone know why?

vale wing
tawdry tendon
#

is it not allowed

slate swan
#

what docs are you even using?

tawdry tendon
#

i swr its discord.Embed

vale wing
vale wing
#

Rename your function to something like discord_cmd

tawdry tendon
#

ok

#

thanks

#

it works!

vocal snow
#

and use name kwarg of command decorator

slate swan
#

;-; use the name kwarg

tawdry tendon
#

thanks

vocal snow
#

you're calling acquire() on None

shrewd apex
#

use an env file

#

for passwords

#

also are u doing self.pool = None just so u don't get error? from ide?

#

u can typehint with pool: aiomysql.pool

#

then in setup hook declare pool

jolly basalt
#

how to make a bot send a message in a channel in some other server

#

like if i run a command in this server, it should send a message in another server

#

wdym

slate swan
jolly basalt
slate swan
#

Get the channel’s id and send message

jolly basalt
#

is that it

slate swan
#

await chn.send(“hi”)```
slate swan
#

yk how good it feels to install d.py 2.0 using pip lemon_smile

maiden fable
#

Lmao

slate swan
vocal snow
maiden fable
#

github lol

slate swan
#

ye git

maiden fable
#

Zeffo forgot that there was a depressing period where we had to use the master branch to use views in discord.py

vocal snow
#

you were cloning the repo into you rporjects everytime? 😳

maiden fable
#

pip install git+url

vocal snow
#

that is installing with pip !!

slate swan
#

Pip+git

maiden fable
#

pip and Git
pip and PyPi

#

There is a difference

vocal snow
#

🙄 pedants

maiden fable
#

And that difference is a fine demarcation between the depression and happy period!

maiden fable
vocal snow
#

happy period is me finally installing arch on my laptop

slate swan
#

imagine having all intents enabled (in code) and then disabling them again just to do nothing

maiden fable
#

My happy period is never gonna come because it will come when Windows 11 performance issues get fixed which is never gonna happen

silk fulcrum
unkempt canyonBOT
#

The PyPA recommended tool for installing Python packages.

slate swan
#

Me happy with my crappy windows 10

maiden fable
#

Ik

silk fulcrum
#

!pypi pip

unkempt canyonBOT
#

The PyPA recommended tool for installing Python packages.

maiden fable
silk fulcrum
#

hm..... where's difference?

maiden fable
silk fulcrum
#

between pip and pypi

maiden fable
#

pip and pypi are command alises

jagged adder
#

im looking for a way to create a saved instance of my bot, but one that doesnt break when i add new attrs in the instance class.
Currently the save system works by using these 2 funcs

# save
state_json = jsonpickle.encode(state)
                       def write_json(filepath, data) -> dict:
    with open(filepath, "w") as f:
        json.dump(data, f, indent=4)
    return data     write_json(os.path.join('saves', f'{str(ctx.author.id)}.json'), state_json) 

# load
def read_json(filepath) -> dict:
    with open(filepath, "r") as f:
        data = json.load(f)
    return data

state = ctx.bot.game_states[str(game_channel.id)] = jsonpickle.decode(read_json(os.path.join('saves', f'{str(ctx.author.id)}.json')))

however using this current system, it overrides any new attrs not in the old save. When it then asks for said attrs the bot crashes as the attrs dont exist in its instance

maiden fable
#

but irl, pip is the tool used to download packages from pypi

#

Nice, json db

#

@vocal snow all yours

vocal snow
#

holy shit

maiden fable
#

I suck with JSON

vocal snow
#

no thanks lmao

maiden fable
#

Only u r the JSON God here

vocal snow
#

that last line is really tangling my eyeballs

maiden fable
#

Same

vocal snow
#

wait what is jsonpickle

swift pumice
maiden fable
#

!pypi jsonpickle

unkempt canyonBOT
maiden fable
#

Nice

jagged adder
#

im ngl, this was not written by me; it was written by a friend for me when i was still using ifs and elifs for the majority of my code

maiden fable
#

pickle module for.... json

#

uh, very nice

jagged adder
#

it doesnt serve any useful purpose tho anymore, for the reason described above

vocal snow
#

ok that's not terrible

maiden fable
#

damn, it also has numpy and pandas support

#

And apparently it also has a JS port which is.... nice

jagged adder
#

i have absolutely 0 experience with json, if json is even the way to go here

vocal snow
#

whatever is happening here is def not the way to go

#

it seems like you're saving a new file for each user as well

jagged adder
#

correct

#

that is somethin that needs to stay

vocal snow
#

you require a seperate file, per user?

#

I seriously doubt that

jagged adder
#

however, the thing that needs to change is allowing for additions to the instance class

#

well..

jagged adder
#

i dont want saved files to stack, hence each is keyed to a user id

vocal snow
#

yes but why don't you just use a database

jagged adder
#

i also have no experience with databases either :l

jagged adder
vocal snow
#

what exactly are you storing

jagged adder
#

each game instance has a number of variables and instanced references

#

this is a small snippet of it

class NewGameState:
    def __init__(self):
        self.name = 'Player'
        self.c_arena_count = 3
        self.valid_game_options = []
        self.Factions = game_info.Factions()
#

but theres hella more items

vocal snow
#

ah i see, an rdbms would be fine, but it's going to take a hell lot of time for you to refactor

jagged adder
#

i have over 3k lines of code :l

#

im guessing that will be quite some time...

vocal snow
#

well lets ignore the possible atomicity and file corruption issues and see what the issue on hand is

jagged adder
#

alr

vocal snow
#

so what is happening exactly

jagged adder
#

u mean wheres the issue with my json one?

vocal snow
#

you store an instance of the NewGameState in one of those files

#

and when you read it, it's attributes are overidden by another instance?

vocal snow
jagged adder
#

its like u copy paste the save over the existing file

#

which removes everything that is new since the game was saved

#

when u then run the bot, when the code (which refers to the NewGameState), hits somewhere it needs one of those new attrs, it crashes

#

because in that old saved instance, that attr never existed

limber bison
#

can i dm all members of server at once
????????????

#

🐸

vocal snow
#

ok, so essentially if you had py attr1 = 1 attr2 = 2 in the original save and then you tried to write ```py
attr3 = 3

jagged adder
#

also this might help;

ctx.bot.game_states[str(game_channel.id)] = NewGameState()

state = ctx.bot.game_states[str(game_channel.id)]
vocal snow
jagged adder
#

this is where the 'state' is coming from

limber bison
vocal snow
#

ping everyone

#

don't mass dm

limber bison
limber bison
vocal snow
limber bison
vocal snow
#

that's still spam. And it's still a jerk move

#

not going to help with mass dm

slate swan
#

hi

#

mass dming is api abuse

vocal snow
jagged adder
#

tbc i think its more accurate to say if u had

attr1 = 1
attr2 = 2

in the original save and then you tried to load over the current game that has

attr1 = 1
attr2 = 2
attr3 = 3

itll only keep 1 and 2

vocal snow
#

how are you loading and dumping the states, can you share that code again

jagged adder
#

just more straightforward in my head lol

#

alr sec

limber bison
jagged adder
#
# save
state_json = jsonpickle.encode(state)
                       def write_json(filepath, data) -> dict:
    with open(filepath, "w") as f:
        json.dump(data, f, indent=4)
    return data     write_json(os.path.join('saves', f'{str(ctx.author.id)}.json'), state_json) 

# load
def read_json(filepath) -> dict:
    with open(filepath, "r") as f:
        data = json.load(f)
    return data

state = ctx.bot.game_states[str(game_channel.id)] = jsonpickle.decode(read_json(os.path.join('saves', f'{str(ctx.author.id)}.json')))
vocal snow
#

no.

limber bison
#

😳

vocal snow
#

we are not helping with mass dm on any scale

#

please stop asking about it

jagged adder
#

mind u, this isnt all in 1 spot; i just chucked it together so it makes sense

vocal snow
#

gotcha

jagged adder
#

rn the save/load is hella screwed lol
coz it means every time i update NewGameState, i have to force people to start new games from scratch.

#

good thing its mostly private still

ornate sail
#

how would i go to convert from normal commands to slash commands

jagged adder
ornate sail
vocal snow
#

I'm not sure how your system is set up, a DB would've been so much easier 😭

jagged adder
#

do u mean does it update live ?

vocal snow
#

when you modify an attribute of someone's state, do you immediately save it to their file?

jagged adder
#

no

#

they have to use a save command (the write part)

#

well command is the wrong word; its not a python command

#

more just a keyword that is set up to do x when typed while within the bot

vocal snow
#

i see, and when they run that save command what happens exactly

#

the old data in the file is lost?

#

if this is on github or some online repo could you share it

jagged adder
#
            elif state.choice.lower() == '&save':
                
                # Converts from python object into a json string
                state_json = jsonpickle.encode(state)

                # if the dir ./saves/(author_id).json is in the save folder (meaning they have saved before)
                if os.path.exists(os.path.join('saves', f'{str(ctx.author.id)}.json')):
                    await game_channel.send(
                        'Save file already exists. Do you wish to overwrite existing save? __(Yes/No)__\n'
                        '**Warning: This action cannot be undone.**'
                        )
                    confirm_msg = await bot.wait_for('message', check=lambda m: m.content.lower() in ['yes', 'no'] and m.channel == game_channel and m.author == ctx.author)
                    if confirm_msg.content.lower() == 'yes':
                       write_json(os.path.join('saves', f'{str(ctx.author.id)}.json'), state_json)

i left the comments my helper wrote when designing it (they have since ghosted me, else id be asking them for help)

#

choice just equals msg.content

#

so basically if its a message

jagged adder
jagged adder
cerulean shale
#

Whats going on people 👋

jagged adder
#

ello

silk fulcrum
cerulean shale
vocal snow
#

i need to go fix my cycle

#

for like 20 min

jagged adder
#

Zeffo is helping redesign my save system :l

vocal snow
#

I honestly think it's not too late to shift to a db!!

jagged adder
#

my rather broken save system*

vocal snow
#

I will help you with all the setup if you want

#

but this json pickle file thing is not very good !

#

how many users do you have currently

jagged adder
#

honestly, i need someone who actually knows what they r talking about to run through my code, at least a once off

#

there is so many things that i dont know i dont know ngl

onyx cipher
#

what is the problem wit this ?

vocal snow
#

i will even contribute to your code, but it needs to be on some repo like github

slate swan
#

How can I get all the commands in a bot and add them to an embed secreted by ,?

rugged shadow
#

move to a db, it will make it easier

slate swan
#

I mean command name*

onyx cipher
vocal snow
rugged shadow
jagged adder
vocal snow
rugged shadow
vocal snow
#

mostly with azure

jagged adder
#

because thats been on my list for quite some time, but i have no idea where to start

onyx cipher
vocal snow
#

usually the hosting part comes after the development part 😄

jagged adder
#

well this is a project with an indefinite length

vocal snow
#

I know, but no point wasting resources in hosting it before it's in a working condition

jagged adder
#

so i kinda want to host it so i can let people give feedback without my laptop on 24/7

#

oh it works

#

its just constantly being expanded

vocal snow
#

I see

#

anyways ill brb in 15-20 min, need to do some repair work

jagged adder
#

nps

vocal snow
#

feel free to ping/dm if you need anything

onyx cipher
slate swan
slate swan
#

's no issue

onyx cipher
#

I have the whole command, but it just says that

slate swan
#

it's like

def foo():
  ...

def bar():
  ...

bar()```
here I'm calling bar and therefore **accessing** it while foo is never accessed, i.e. never called/referenced
onyx cipher
#

but then when I use the command it just says command not found ?

slate swan
#

or show the command

#

code

meager chasm
#

inb4 he forgot the command decorator

slate swan
#

what about the parantheses 😔

onyx cipher
#

Look oever here its normal

#

but in the other its not

#

@slate swan

#

@meager chasm

meager chasm
#

@self.bot.command()?

slate swan
#

you create commands in a cog using commands.command
idek how youre accessing the self either

#

and there needs to be a self argument

meager chasm
#

please senr full code

#

!paste

unkempt canyonBOT
#

Pasting large amounts of code

If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/

After pasting your code, save it by clicking the floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.

regal pulsar
#
async def help(self, ctx, etc…)
onyx cipher
shrewd apex
onyx cipher
#

@slate swan what do you think the problem is

regal pulsar
#

that sucks

#

used to be my go to for hosting purposes

onyx cipher
#

does anyonw know how I can fix this

slate swan
#

you should look at the examples though

onyx cipher
#

alr

#

which examples though

shrewd apex
slate swan
#

discord.gateway: Can't keep up, shard ID None websocket is 50.1s behind.

#

what does this mean?

#

wtf

#

!intents

unkempt canyonBOT
#

Using intents in discord.py

Intents are a feature of Discord that tells the gateway exactly which events to send your bot. By default discord.py has all intents enabled except for Members, Message Content, and Presences. These are needed for features such as on_member events, to get access to message content, and to get members' statuses.

To enable one of these intents, you need to first go to the Discord developer portal, then to the bot page of your bot's application. Scroll down to the Privileged Gateway Intents section, then enable the intents that you need.

Next, in your bot you need to set the intents you want to connect with in the bot's constructor using the intents keyword argument, like this:

from discord import Intents
from discord.ext import commands

intents = Intents.default()
intents.members = True

bot = commands.Bot(command_prefix="!", intents=intents)

For more info about using intents, see the discord.py docs on intents, and for general information about them, see the Discord developer documentation on intents.

slate swan
#

what intents do i need for buttons?

slate swan
onyx cipher
#

How do I fix this !!!

#

it doesnt want to defind help as a command

slate swan
#

have to do

#

yeah

onyx cipher
#

thats not the error though

vocal snow
#

self is not defined in that scope

onyx cipher
vocal snow
#

and your class isn't subclassing commands.Cog

onyx cipher
onyx cipher
vocal snow
#

what

#

oh i see

onyx cipher
#

self.bot is defined

vocal snow
#

your command callback is in the init

#

that is a very... unusual way of doing things

#

and how are you running the bot

slate swan
onyx cipher
vocal snow
slate swan
vocal snow
#

isn't that a coro

vocal snow
#

!d discord.ext.commands.Bot.login

unkempt canyonBOT
#

await login(token)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).

Logs in the client with the specified credentials and calls the [`setup_hook()`](https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#discord.ext.commands.Bot.setup_hook "discord.ext.commands.Bot.setup_hook").
vocal snow
#

it needs to be awaited. So you cannot call that in the init

slate swan
#

!d discord Intents

unkempt canyonBOT
#

In order to work with the library and the Discord API in general, we must first create a Discord Bot account.

Creating a Bot account is a pretty straightforward process.

vocal snow
slate swan
#

because of the gateway im assuming

vocal snow
#

are you sure you have no blocking code

#

no time.sleep or non-async libs

slate swan
#

ah

#

yes i do

#

for my task loop status

vocal snow
#

!d asyncio.sleep

unkempt canyonBOT
#

coroutine asyncio.sleep(delay, result=None)```
Block for *delay* seconds.

If *result* is provided, it is returned to the caller when the coroutine completes.

`sleep()` always suspends the current task, allowing other tasks to run.

Setting the delay to 0 provides an optimized path to allow other tasks to run. This can be used by long-running functions to avoid blocking the event loop for the full duration of the function call.

Deprecated since version 3.8, removed in version 3.10: The `loop` parameter. This function has been implicitly getting the current running loop since 3.7. See [What’s New in 3.10’s Removed section](https://docs.python.org/3/whatsnew/3.10.html#whatsnew310-removed) for more information.

Example of coroutine displaying the current date every second for 5 seconds:
spare urchin
onyx cipher
spare urchin
vocal snow
#

do you have a NOT NULL constraint on those fields?

vocal snow
# onyx cipher

you need to call await bot.login(...) in some async finction

#

maybe make an async login method of your runner class

onyx cipher
vocal snow
#

ok, you can remove those with DELETE FROM Table WHERE guildID IS NULL

#

as for why the database isn't "saving" anything, you'll need to elaborate a bit on that

onyx cipher
# onyx cipher

The original problem of it not registering it as a command is still there

#

doesnt want to work

vocal snow
#

like i said, make an async method of the Runner class and log the bot in there

vocal snow
#

you know what a method is right

#

I know you don't, I'm telling you to run that query to get rid of the NULL records

onyx cipher
#

im quite new to coding so..

#

ok so method is when you define a function in a variable ?

slate swan
#

!d display avatar

unkempt canyonBOT
#

display [expression]```
Display the value of the expression if it changed, each time execution stops in the current frame.

Without expression, list all display expressions for the current frame.

New in version 3.2.
slate swan
#

How can my bot google something and provide the top most text from the search and send it in an embed?

#

hmmm

slate swan
unkempt canyonBOT
#

This part of the documentation covers all the interfaces of Requests. For parts where Requests depends on external libraries, we document the most important right here and provide links to the canonical documentation.

vocal snow
#

you can use an async http client like httpx or aiohttp

slate swan
rugged shadow
#

everyone in this channel expects stuff to be free

onyx cipher
#

@vocal snow could you help me out ? how would I do it.

vocal snow
rugged shadow
slate swan
#

although it is laggy

vocal snow
#
  1. It's against google ToS
#

so in general, a really bad idea

rugged shadow
#

aiohttp vs httpx, who will win

slate swan
#

then?

vocal snow
spare urchin
#

Is this error from my side or discord's end

vocal snow
slate swan
#

can be both

spare urchin
slate swan
#

it can be both

spare urchin
#

I use a separate host

slate swan
#

are you usng replit?

spare urchin
#

No

onyx cipher
slate swan
#

how to create one variable in one command. And then transfer it to another command?

vocal snow
onyx cipher
#

Watching rn

slate swan
# onyx cipher

It's better not to watch someone doing something on YouTube because everything always works for them. Since he is showing it on another bot

vocal snow
#

that's not a discord bot tutorial

#

it's fine

onyx cipher
#

so your basically telling me to do this right ? @vocal snow

scarlet sorrel
#

How do i check if a channel object is a text channel and that the bot has permission to send messages?

vocal snow
#

and call await self.bot.login(...) in there

onyx cipher
#

ok

#

thanks 👍

slate swan
#

@vocal snowit seems to me if I called the video tutorial and everything is done incorrectly and it is not clear. Then you need to block such authors and not let them upload videos

vocal snow
#

didn't understand you, sorry

onyx cipher
vocal snow
#

or remove the decorator

#

and use self.bot.add_command(help)

scarlet sorrel
vocal snow
#

it's a builtin

#

!d isinstance

unkempt canyonBOT
#

isinstance(object, classinfo)```
Return `True` if the *object* argument is an instance of the *classinfo* argument, or of a (direct, indirect, or [virtual](https://docs.python.org/3/glossary.html#term-abstract-base-class)) subclass thereof. If *object* is not an object of the given type, the function always returns `False`. If *classinfo* is a tuple of type objects (or recursively, other such tuples) or a [Union Type](https://docs.python.org/3/library/stdtypes.html#types-union) of multiple types, return `True` if *object* is an instance of any of the types. If *classinfo* is not a type or tuple of types and such tuples, a [`TypeError`](https://docs.python.org/3/library/exceptions.html#TypeError "TypeError") exception is raised.

Changed in version 3.10: *classinfo* can be a [Union Type](https://docs.python.org/3/library/stdtypes.html#types-union).
vocal snow
#

isinstance(obj, discord.TextChannel)

scarlet sorrel
#

No idea how that would help

onyx cipher
vocal snow
#

which is what you asked for

vocal snow
#

You're really new to python im guessing

onyx cipher
scarlet sorrel
vocal snow
onyx cipher
slate swan
#

how do I make the command work when the button is pressed ? That is, I clicked on the button it was written enter the text you entered the text and it was saved to the variable

scarlet sorrel
#

And many other things

#

Looking at it, about half the lines have issues

#

@onyx cipher look at some examples of discord bots

onyx cipher
#

brother everything looks to be working fine however idky it doesnt want to define help as a command

scarlet sorrel
onyx cipher
#

there is no error ?

scarlet sorrel
#

Yeah, because the other error gets there before it

#

You will see many errors as you fix each one

onyx cipher
#

`where did the if statement go wrong

scarlet sorrel
onyx cipher
scarlet sorrel
#

Move the for loop below the else

#

@vocal snow can i ask you something

slate swan
#

!intents

unkempt canyonBOT
#

Using intents in discord.py

Intents are a feature of Discord that tells the gateway exactly which events to send your bot. By default discord.py has all intents enabled except for Members, Message Content, and Presences. These are needed for features such as on_member events, to get access to message content, and to get members' statuses.

To enable one of these intents, you need to first go to the Discord developer portal, then to the bot page of your bot's application. Scroll down to the Privileged Gateway Intents section, then enable the intents that you need.

Next, in your bot you need to set the intents you want to connect with in the bot's constructor using the intents keyword argument, like this:

from discord import Intents
from discord.ext import commands

intents = Intents.default()
intents.members = True

bot = commands.Bot(command_prefix="!", intents=intents)

For more info about using intents, see the discord.py docs on intents, and for general information about them, see the Discord developer documentation on intents.

slate swan
#

how do i get the authors current avatar in python 2.0?

onyx cipher
#

@scarlet sorrel fixed it

scarlet sorrel
#

Cool

slate swan
#

Traceback (most recent call last):
File "C:\Users\user\Desktop\main.py", line 22, in <module>
@lua.commnad()
AttributeError: 'Bot' object has no attribute 'commnad'. Did you mean: 'command'

onyx cipher
#

why does this eror come !!! 😭

slate swan
#

you mispelled it

slate swan
slate swan
#

a

slate swan
#

ctx.user.avatar.url?

#

ctx.author

#

ctx.author.avatar.url

#

alr

#

its not defined in the code... not the database

#

@slate swan
"@lua.command" or "@lua.command()"

#

second

#

its a corro

#

So what's the error in my code @slate swan

#

Aaah ok

#

Stop pinging smh

#

AttributeError: 'Bot' object has no attribute 'commnad'. Did you mean: 'command'

#

an AttributeError

#

well the error explains itself

regal pulsar
#

you spelt it wrong ;-;

onyx cipher
#

anyone know the issue with this

still lichen
#

you didnt save the file or something because the error says msg but in the screenshot i see message

#

i dont understand

#

why is the error saying msg

#

btw its obvious that you didnt define message

vale wing
#

msg.author.id

#

No definition of msg

wicked atlas
#

There is no msg variable in this context. If you wanted the id of the user who made the interaction, just do interaction.user.id

vale wing
#

Code in normal ide to see errors like this

still lichen
#

you just didnt define it

shrewd apex
#

strange why is the linter not screaming

slate swan
#

cuz its not a linter

#

*code editor/IDE

shrewd apex
#

🙏

polar scroll
#

how do i give someone a role by coding?

wicked atlas
slate swan
#

they are literally coding on their hosts' file upload page

shrewd apex
unkempt canyonBOT
#

await add_roles(*roles, reason=None, atomic=True)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).

Gives the member a number of [`Role`](https://discordpy.readthedocs.io/en/latest/api.html#discord.Role "discord.Role")s.

You must have the [`manage_roles`](https://discordpy.readthedocs.io/en/latest/api.html#discord.Permissions.manage_roles "discord.Permissions.manage_roles") permission to use this, and the added [`Role`](https://discordpy.readthedocs.io/en/latest/api.html#discord.Role "discord.Role")s must appear lower in the list of roles than the highest role of the member.
polar scroll
shrewd apex
shrewd apex
#

just give it admin

polar scroll
#

alr

polar scroll
wicked atlas
polar scroll
wicked atlas
shrewd apex
wicked atlas
#

yeah, probably'

shrewd apex
#

and token leaks are amateur mistake also if i am coding a public bot i would run private tests everything has its pros and cons but for beginners it's best to have intents and admin to avoid beginners problems

shrewd apex
polar scroll
shrewd apex
#

u need role object

polar scroll
#

wdym

shrewd apex
#

!d discord.Role

unkempt canyonBOT
#

class discord.Role```
Represents a Discord role in a [`Guild`](https://discordpy.readthedocs.io/en/latest/api.html#discord.Guild "discord.Guild")...
shrewd apex
#

anyway hbu how is ur day going 👀

shut axle
#

I don't know what intents or how to add..

Traceback (most recent call last):
  File "main.py", line 7, in <module>
    client = commands.Bot(command_prefix = "!")
TypeError: __init__() missing 1 required keyword-only argument: 'intents'
shrewd apex
#

intents=discord.Intents.all()

vale wing
#

!intents

unkempt canyonBOT
#

Using intents in discord.py

Intents are a feature of Discord that tells the gateway exactly which events to send your bot. By default discord.py has all intents enabled except for Members, Message Content, and Presences. These are needed for features such as on_member events, to get access to message content, and to get members' statuses.

To enable one of these intents, you need to first go to the Discord developer portal, then to the bot page of your bot's application. Scroll down to the Privileged Gateway Intents section, then enable the intents that you need.

Next, in your bot you need to set the intents you want to connect with in the bot's constructor using the intents keyword argument, like this:

from discord import Intents
from discord.ext import commands

intents = Intents.default()
intents.members = True

bot = commands.Bot(command_prefix="!", intents=intents)

For more info about using intents, see the discord.py docs on intents, and for general information about them, see the Discord developer documentation on intents.

slate swan
#

its already 30 mins late

shrewd apex
#

u took ur laptop no? 🙏

slate swan
#

no

shrewd apex
#

🥲

slate swan
#

dw ill join replit on phone gang for you

shrewd apex
#

kek sure

slate swan
#

atleast i have my persistent manjaro installation with me, ill find a system for sure

shrewd apex
#

u might as well download pydroid pithink

slate swan
#

indeed

vocal snow
#

i installed arch on laptop

#

best decision of my life

shrewd apex
#

button callback has only interactin and button

#

even ur order of args is wrong iirc first arg is interaction and 2nd arg is button