#discord-bots

1 messages Β· Page 732 of 1

pliant gulch
#

I thought this was a message counter but I must be wrong

#

Yea I read wrong

slate swan
heavy radish
#

Alr. What should I do now?

slate swan
#

your done lol

#

Ruu can anyone help me with some py error?

slate swan
#

im learning py, like basics

heavy radish
#

Let me test it

potent spear
slate swan
#

Β―_(ツ)_/Β―

potent spear
slate swan
#

welp

potent spear
#

there's not even a loop break or anything πŸ€·β€β™‚οΈ

heavy radish
slate swan
#

πŸƒ

potent spear
#

don't run now, you'll tell him

heavy radish
#

Lmao

#

It's counting

#

Very slow

slate swan
potent spear
heavy radish
potent spear
#

some requests can for example be only made every 10 mins etc

heavy radish
#

What is it for this?

#

Alr, what's a safe time gap?

potent spear
#

just don't count, that's useless asf

heavy radish
#

I want too tho..

potent spear
#

I'd say maybe every 30 secs, edit the message
but have a limit of like 10

#

so it'll only count till 10

pliant gulch
#

Message sending ratelimit is 5/5s

#

Global ratelimit is 50/1s

#

As of speaking right now at least

potent spear
#

well, and counting that shit will make it very close to that limit
think about 10 users using that command at the same time

#

boom, ratelimited in no-time

#

fix= use a cooldown on certain commands etc

heavy radish
#

This bot is literally useless. It's the only command and it will only be counting in a channel

#

Just for the sake of it

potent spear
#

best thing you could do, is something like this

heavy radish
#

..

pliant gulch
potent spear
potent spear
#

<t:1624385691:t>
<t:1624385691:T>
<t:1624385691:d>
<t:1624385691:D>
<t:1624385691:f>
<t:1624385691:F>
<t:1624385691:R>

#

choose and win

heavy radish
#

What's happening?

potent spear
#

nothing, those are just ways of displaying certain times

pliant gulch
#

Either way, so as long as you don't go above 50 requests a second discord.py will handle the ratelimit buckets

#

If a bucket is depleted it will wait until it is filled back up

heavy radish
slate swan
pliant gulch
#

No 1/1s

#

I'm just saying 5/5s because that's how the response headers show it

potent spear
slate swan
heavy radish
#

Lmao

pliant gulch
slate swan
potent spear
pliant gulch
# slate swan ah ic

Ratelimits are a bit different in discord though it's just just a straight 5/5s

#

Because you also have ratelimit buckets

#

E.g if I send a message in a diff channel it will have a different bucket

#

If it werent for buckets the bot would be limited to sending messages in one channel at a time if it's a lot of messages

slate swan
#

ic

#

thats cool

pliant gulch
#

Well logically it's the most sense thing to implment

#

Otherwise you'd be bottlenecking

potent spear
#

for sure, would suck if one loser spammed the bot in 1 guild and ALL the other guilds suffer from it

slate swan
#

yeah

potent spear
#

anyways, if you put cooldowns on that, that won't even happen
it would just be a problem if your bot became big

pliant gulch
#

No not really

#

It's more lenient

#

Bigger bots have different ratelimits

#

They get allowed more requests

potent spear
#

I personally just use bots to make stuff easily accessible for my phone as well as my PC by using API's
I'm not using them for public purposes. But it's always handy to know the possibilities

#
  • public transport schedules
  • twitch streamer schedules
  • ebay~ish notify tool the second a new item is listed with given query and specifications
  • automating daily tasks and monitoring them, ...
cold torrent
#

no idts

#

it can work for only one person

#

but it won't work in grp DM's

#

because you can't invite bots in grp dms

potent spear
#

yes

#

by using a global check

#

global check in the dpy docs will tell you

#

you can make the bot notify users in a guild (when they try to use a command) that it can only be used in DM's tho
lots of options

slate swan
#

kinda gave me ideas ngl thank you

potent spear
#

I just searched for a notifying system that could be used for my PC and mobile phone.
whatsapp and fb etc weren't option, then I stumbled upon discord and here we are, a few yrs later

#

I wanted to make it public, but found that discord isn't really user-friendly for users with no coding background: commands etc are a no-go.
but nowadays with the buttons, select options and slash commands (which basically can't be more clear), I might give it another shot someday

slate swan
potent spear
pliant gulch
slate swan
pliant gulch
#

Idk why there are so many names for it

slate swan
#

i thought they were called that

pliant gulch
#

But on the official discord docs its select menu

potent spear
#

I'm staying on dpy v1.7.3 for now, and I don't go indept in any other fork or version or whatever

slate swan
pliant gulch
#

Would be better for SelectMenu

slate swan
potent spear
#

dropdown reminds me of HTML

#

just integrate what discord calls them (in their API), can't be too hard...

unkempt canyonBOT
#

examples/views/select/dropdown.py line 10

class Dropdown(disnake.ui.Select):```
slate swan
#

^see

#

but yes the class is named Select

#

Inside the folder named select πŸ”ͺ

slate swan
pliant gulch
#

Select πŸ€¦β€β™‚οΈ SelectMenu 🧠

slate swan
#

i still havent learned them

#

i still prefer a react-with-emoji menu tho

slate swan
#

stay mad

potent spear
slate swan
#

I have :) , and I use it too

potent spear
#

bruh

pliant gulch
potent spear
slate swan
pliant gulch
#

I mean, discord seems to be publiclly trying to eliminate bots imo Β―_(ツ)_/Β―

pulsar jewel
#

I don't want to interupt the discussion that is going on here, but I have a question loosely related to bots.

I'm currently in the process of learning python (I'm using the Python Crash Course 2nd edition by Eric Matthes [currently on chapter 5]). The first few 'large' projects I want to build are discord bots. I'm not looking for any help with code at the moment, but more pathway wise. Should I be looking into the processes of coding a bot while still being such a beginner?

For reference, I really only know the basic basics of writing anything. Only having mild experience with for loops and going somewhat in depth with print, lists, and variables.

slate swan
#

Imagine emojis as a privelaged intent

pliant gulch
#

Naw, imagine connecting to the gateway as a privileged intent

pliant gulch
slate swan
#

imagine making api calls a privileged intent

slate swan
pulsar jewel
potent spear
slate swan
pliant gulch
#

^

patent lark
pulsar jewel
#

Python is actually my first real experience with programming, I've dabbled a bit with HTML and CSS, but I wouldn't consider that to be on the same level.

slate swan
pliant gulch
#

I remember the good old days when bots didn't exist and you had to use a user account via email and password, not even token

potent spear
# pulsar jewel Thanks I assume πŸ˜…

listen, if you want to start with libs that change often, don't follow YT tutorials about those subjects
they will maybe give you a grasp of what you can do, but they will affect your coding style by making you implement methods that mostly aren't good or are only for one purpose.

pliant gulch
slate swan
#

Imagine using that these days

pulsar jewel
potent spear
#

that's v1, no?

pliant gulch
#

prob Β―_(ツ)_/Β―

#

My first discord account was back in 2015 something

potent spear
pulsar jewel
#

Awesome, I appreciate all the insight you guys have given!

potent spear
#

you don't want to implement a method that just works, you want to do it good on the first try
temporarily fixing something stinks

pliant gulch
#

Good tutorial written by a competent coder

slate swan
#

!pep8 this can help a bit with your coding style

unkempt canyonBOT
#

PEP 8 is the official style guide for Python. It includes comprehensive guidelines for code formatting, variable naming, and making your code easy to read. Professional Python developers are usually required to follow the guidelines, and will often use code-linters like flake8 to verify that the code they're writing complies with the style guide.

More information:
β€’ PEP 8 document
β€’ Our PEP 8 song! :notes:

pulsar jewel
#

I did have someone recommend code wars to me, but the site seems more geared toward someone at a little bit of a higher level than I'm at right now.

potent spear
#

make sure your project has a purpose tho, you don't want to blindly work on something.
we get bored quickly

pliant gulch
#

You also won't be able to set your client's connection state

#

E.g being "connected"

#

As that's only on the gateway

pulsar jewel
#

My main field of interest is infosec, so I'd be looking to make it have some features semi related to the field, stuff like whois, tracert, etc.

pliant gulch
#

A virustotal command maybe?

pulsar jewel
#

Of course I'll try to have some 'fun' features, but it's not the main focus, but moreso to learn.

pulsar jewel
potent spear
#

if you know basic python, and you know how to read documentation, you're on a good path

pliant gulch
potent spear
#

he doesn't know how to use API's via python tho I think

pulsar jewel
#

Maybe a command that translates shortened URLs too

potent spear
#

mhm, that's like 2 lines of code

pulsar jewel
#

(I don't know most things about python yet)

potent spear
#

if you know what you're looking for, you'll get helpful answers

#

questions like "I need help with my code" or "it's not working" are trash

#

"doesn't work" is equally as bad

pliant gulch
#

When you get to requests just make sure to use an async library for requests, E.g aiohttp httpx's AsyncClient

potent spear
#

that's the async part of dpy πŸ™‚

pulsar jewel
#

Right, I've always been one to try to find why something isn't working, and then search for help if I'm not sure of the solution.

potent spear
pulsar jewel
#

I'm still learning at the moment, so my code is pretty messy. My most recent lab was to make two lists, then append them a few times, then do a for loop to print a message about the items in the lists.

potent spear
#

don't waste too much time on simple errors, especially if you're a beginner, ask for help as much as possible

pulsar jewel
#

There was a bit of slice work thrown in too. I feel like I'm moving at a snails pace, but I am definitely enjoying myself so far.

#

I appreciate that!

potent spear
pliant gulch
#

I was total opposite and I just crammed everything in all at once πŸ˜”

#

Worked tho

pulsar jewel
#

Codecademy used to be really useful too from what I've heard, but now all of their good stuff is locked behind a paywall too.

potent spear
#

simple examples mostly have a "test" at the bottom

#

a small exercise on that subject
nvm, I'm talking about w3schools

pulsar jewel
#

I'm not opposed to getting courses on Udemy, but it's a bit sketchy for me to spend money on a course without having some preview or something to know if it's worth the purchase.

pliant gulch
#

Code Academy is totally unbearable for me

#

I just read project source codes on github and the documentation on python

potent spear
#

A lil stackoverflow here and there hasn't killed anyone yet, but that's a last resort for me

slate swan
#

i mostly learned by annoying andypithink

pulsar jewel
potent spear
#

also, I highly suggest you to learn shortcuts (in the IDE), they're lifesavers if you can make them muscle memory

slate swan
pliant gulch
#

Vim keybinds total icing on cake 😳

#

Can't live without neovim

slate swan
#

vsc is my gf

pliant gulch
#

Bloated

pulsar jewel
#

I'm using pycharm with a couple of custom keybindings for run and new file, but I haven't explored many other IDEs

potent spear
slate swan
pliant gulch
#

No just go into command and type q

final iron
pliant gulch
#

Not that hard lmao

final pumice
slate swan
final pumice
#

and just move on to pycord

slate swan
#

no

#

move to disnake

final iron
final pumice
#

is it better than pycord?

slate swan
#

yes

final pumice
#

ok ill look into it

pliant gulch
#

Pycord is prob the worst fork out there

slate swan
pliant gulch
#

No

potent spear
pliant gulch
slate swan
potent spear
pliant gulch
#

I can also do that

pulsar jewel
#

I've seen mention of it on startup everytime, and know what it means, but don't exactly know what it does and why it's important.

pliant gulch
#

Except my OS doesn't have a built in keylogger

#

Not to mention HELLA telemetry

slate swan
#

πŸƒ

potent spear
final pumice
#

does disnake use slash commands : (

slate swan
#

yes

final pumice
#

but i can still make classic commands?

final iron
#

Yes

slate swan
#

yes why wouldnt you?

final pumice
#

πŸ™‚

pliant gulch
#

Pycharm venv is just over the top tbh

#

Just use poetry or something

final iron
#

Pycharm venv?

#

Pycharm has a built in virtual environment?

pliant gulch
#

No??

potent spear
#

that's standard

#

a virtual environment

pliant gulch
#

They force it as well iirc?

#

Kek

potent spear
#

it's default, mhm

final iron
#

I just use anacondaπŸšΆβ€β™‚οΈ

potent spear
#

first thing devs come crying about "module not found"

pliant gulch
#

Ananconda lmao

#

Poetry on top

final iron
#

What

#

It work doe

#

I can't spell for shit tonight

potent spear
#

I like portable projects, always have
I can't stand it if I were to see errors on a different OS

pulsar jewel
#

Another general question, what's the general opinion on "Automate the Boring Stuff". I saw that it's published for free online and I was considering adding it to my list.

potent spear
#

I assume that would be Linux?

#

is that still Python?

pulsar jewel
#

it is, yeah

#

It's just a general educational book. It's published free on a website with the same name

potent spear
#

hmm, you don't have to read books per se
I rather like exercises

pulsar jewel
#

That's true too, but since I'm just starting out I really don't know enough to do many exercises in a productive way

final iron
#

Finally, it works

potent spear
#

well, you'll have to find some kind of website to generate exercises for you

#

I used edabit, but you'll stumble upon a paywall one day, it's a great starter tho

pulsar jewel
#

Yeah, I was looking at codewars, but they were a bit more advanced than I am at the beginner level.

potent spear
#

you can select which difficulty of exercise you want etc

pliant gulch
#

You can do all solutions in python

pulsar jewel
#

I'll look into edabit real quick, and advent if I'm able.

potent spear
#

don't forget to unsubscribe from the email list, those always sucked

final iron
#

Anyone have any idea why discord returns member as None in their Message Reaction Remove gateway? (on_raw_message_remove event)

pliant gulch
final iron
#

I am aware, I'm asking on more a technical reason

pliant gulch
#

I don't think it's a discord.py thing rather a discord gateway thing

#

They just don't send out that data

final iron
#

Do they have a reason listed why anywhere or do they just do what they want without giving a reason?

#

I don't see it listed anywhere in the docs

#

get_or_fetch_member is a pretty nice disnake feature imo

pliant gulch
#

I'd assume it's like delete message, discord will send out a partial message object

#

There is no apparent reason? At least not publically

#

But partial models in itself omit certain data

final iron
#

Thanks

#

The more you know

timber crescent
#

how to change server avatar of bot to imitate initiator of cmd?

boreal ravine
unkempt canyonBOT
#

await edit(*, username=..., avatar=...)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).

Edits the current profile of the client.

Note

To upload an avatar, a [bytes-like object](https://docs.python.org/3/glossary.html#term-bytes-like-object "(in Python v3.9)") must be passed in that represents the image being uploaded. If this is done through a file then the file must be opened via `open('some_filename', 'rb')` and the [bytes-like object](https://docs.python.org/3/glossary.html#term-bytes-like-object "(in Python v3.9)") is given through the use of `fp.read()`.

The only image formats supported for uploading is JPEG and PNG.

Changed in version 2.0: The edit is no longer in-place, instead the newly edited client user is returned.
boreal ravine
#

you cant edit server avatars yet, you can only edit your global one

timber crescent
#

how would i go about using a link as the argument for the avatar?

#

rather how would i get a users avatar first?

maiden fable
#

!d discord.Member.avatar

unkempt canyonBOT
#

property avatar```
Equivalent to [`User.avatar`](https://discordpy.readthedocs.io/en/master/api.html#discord.User.avatar "discord.User.avatar")
maiden fable
#

!d discord.Asset.url

unkempt canyonBOT
maiden fable
#

(:

boreal ravine
#

it only takes a bytes-like object

#

not a string/URL

pliant gulch
#

Make a request using aiohttp or any other async http library to the avatar url. Then use .read() on the response to get the bytes

timber crescent
#

could you write out how we make a request?(sry very new TwT)

boreal ravine
unkempt canyonBOT
#

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

Retrieves the content of this asset as a [`bytes`](https://docs.python.org/3/library/stdtypes.html#bytes "(in Python v3.9)") object.
pliant gulch
boreal ravine
#

yes

timber crescent
#

so i would use

await edit(*, username=..., avatar=ctx.author.avatar.read)

yes?

slate swan
#

!d discord.Member

unkempt canyonBOT
#

class discord.Member```
Represents a Discord member to a [`Guild`](https://discordpy.readthedocs.io/en/master/api.html#discord.Guild "discord.Guild").

This implements a lot of the functionality of [`User`](https://discordpy.readthedocs.io/en/master/api.html#discord.User "discord.User").

x == y Checks if two members are equal. Note that this works with [`User`](https://discordpy.readthedocs.io/en/master/api.html#discord.User "discord.User") instances too.

x != y Checks if two members are not equal. Note that this works with [`User`](https://discordpy.readthedocs.io/en/master/api.html#discord.User "discord.User") instances too.

hash(x) Returns the member’s hash.

str(x) Returns the member’s name with the discriminator.
boreal ravine
#

but yes

#

you use that method on your bot instance

#

it from from the ClientUser class

#

use the edit method on your discord.ClientUser instance

timber crescent
#

sorry i didnt get that could you rephrase my syntax how its intended to be used?

pliant gulch
#

It's not an attribute it's a method

timber crescent
#

so bot.edit ye?

pliant gulch
#

bot is the client, not the user of the client

#

!d discord.Client.user

unkempt canyonBOT
#

property user: Optional[discord.user.ClientUser]```
Represents the connected client. `None` if not logged in.
cerulean osprey
#
    if any(word in msg for word in char1):
        embed = discord.Embed(title="Ganyu Build")

        embed.add_field(name=" ", value="https://media.discordapp.net/attachments/879736909969113178/928855398520328192/Character_Ganyu.jpg?width=1025&height=683", inline=(False)

      await message.channel.send(embed=embed)
``` How is this giving me an invalid syntax error at the `await` line
pliant gulch
#

inline=(False)??

cerulean osprey
#

Oh that was bc I had it as (True/False) as an example for a friend

pliant gulch
#

Thats causing the error

cerulean osprey
#

It still errored

#
  • thats not the line that is erroring
pliant gulch
#

Show the code

#

The updated one

cerulean osprey
#
if any(word in msg for word in char1):
        embed = discord.Embed(title="Ganyu Build")

        embed.add_field(name=" ", value="https://media.discordapp.net/attachments/879736909969113178/928855398520328192/Character_Ganyu.jpg?width=1025&height=683", inline=False

      await message.channel.send(embed=embed)```
pliant gulch
#

Yea, you didn't fix it

#

You still need to close the add_field call, your missing one paraenthesis now

cerulean osprey
#

Yeah I saw

pliant gulch
#

Before you had an extra one

cerulean osprey
#

Ty

boreal ravine
pliant gulch
#

Just use \u200b as the field name

#

Zero width whitespace character

boreal ravine
#

!d discord.Embed.set_image

unkempt canyonBOT
#

set_image(*, url)```
Sets the image for the embed content.

This function returns the class instance to allow for fluent-style chaining.

Changed in version 1.4: Passing [`Empty`](https://discordpy.readthedocs.io/en/master/api.html#discord.Embed.Empty "discord.Embed.Empty") removes the image.
cerulean osprey
#

Ty

#

so embed.set_image(url) ?

boreal ravine
#

url is a kwarg and yes

swift monolith
#

how to add role on_message

heady skiff
#

no idea

cerulean osprey
#

TypeError: set_image() takes 1 positional argument but 2 were given

embed.set_image("https://media.discordapp.net/attachments/879736909969113178/928855398520328192/Character_Ganyu.jpg?width=1025&height=683")
slate swan
#

anyone to help me with help command description ?

slate swan
#

embeds and title is done by me I need help with description

cerulean osprey
#

Ohh makes more sense

valid perch
slate swan
#

but the thing is I wanna write the commands and work like below each other but it is coming in one line

#

see this @valid perch

pliant gulch
#

You would use the newline character for each new line you want

#

\n

slate swan
#

how can pls say me?

pliant gulch
#

!e ```py
print("foo\nbar")

unkempt canyonBOT
#

@pliant gulch :white_check_mark: Your eval job has completed with return code 0.

001 | foo
002 | bar
slate swan
#

kk

pliant gulch
#

You just put the newline char into the string

valid perch
unkempt canyonBOT
slate swan
#

thnx its working

boreal ravine
cerulean osprey
#

?

boreal ravine
#

you made it into a positional argument when I said its a keyword argument ok

slate swan
#

they means its a key word argument , u need to do argument_name= value . not just value

cerulean osprey
#

Yeah I fixed it already lol

slate swan
#

epic

cerulean osprey
#

I always forget what kwarg means

#

So mb mb

lost lagoon
#

how do you end something

final iron
#

Like end a function?

lost lagoon
#

so like if there is a certain condition that is completed and you want to stop the command

final iron
#

Use return

#

If statement and return

lost lagoon
#

oh right

#

i forgot about that

final iron
#

It happens

glossy compass
#

Help

worldly bane
slate swan
#

hey

#
@slash.slash(name="test")
async def test(ctx:SlashContext,member:discord.Member):
    await ctx.guild.kick(member)
    await ctx.send("Kicked")```
#
TypeError: test() missing 1 required positional argument: 'member'```
#

i am getting this error

honest vessel
#

u need to pass a member

#

/test @slate swan

faint harness
#

is pycord help available here?

timber crescent
slate swan
glossy compass
# worldly bane yes?

Hi sir, kindly want to ask how to combine multiple dictionary in 1 variable

X = {"x" : 1} {"y": 2}
To
Y = {"x": 1, "y":2}

unkempt canyonBOT
obtuse plover
#

i putted my phone on charge but forgetted to turn the switch on for 5 hours
ooof 🀣 i am not kidding

slate swan
#

ot aswell

slate swan
faint harness
#

So can u tell me how to like set permissions restrict...
Like we use to do...

@bot.command()
@commands.has_permission...

How to do it now?

slate swan
slate swan
maiden fable
slate swan
faint harness
heavy radish
#

This is the randomly counting bot. The top one starts from 0 but I want the second command to start from a certain number. How do I do so?

eternal kelp
#

Hi Everyone,
I am not getting any error in the terminal and if a error happens it skips it.
Thank you in advance

faint harness
#

Yeah

faint harness
#

bcs int is a keyword

heavy radish
#

Good?

faint harness
#

Yeah

heavy radish
#

Let me test it

#

Thank You

faint harness
#

Well while true?

#

u sure u want to count forever?

heavy radish
slate swan
#

what if a gets a str

heavy radish
faint harness
#

Any error?

#

yeah do
n:int in parameter list

heavy radish
#

Struggling to copy

#

Yay. It works

slate swan
slate swan
maiden fable
green dust
#

what is the unload counterpart of setup() in dpy extensions?

slate swan
slate swan
#

orrrrr wdym

green dust
#

no, generally function naming scheme

slate swan
#

ah well im not sure

maiden fable
#

There's none

green dust
#

like, every dpy ext has setup()

maiden fable
#

!d discord.ext.commands.Bot.unload_extension u gotta use this

unkempt canyonBOT
#

unload_extension(name, *, package=None)```
Unloads an extension.

When the extension is unloaded, all commands, listeners, and cogs are removed from the bot and the module is un-imported.

The extension can provide an optional global function, `teardown`, to do miscellaneous clean-up if necessary. This function takes a single parameter, the `bot`, similar to `setup` from [`load_extension()`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.Bot.load_extension "discord.ext.commands.Bot.load_extension").
slate swan
green dust
#

yes i am aware of it

slate swan
#

add a cog != load a cog

maiden fable
#

Yea

green dust
#

tq anyway

#

so its teardown

maiden fable
#

Huh?

green dust
#

what will happen if one tries to load a dpy ext when it doesnt have setup()

green dust
#

noted

slate swan
#

you need to add the cog

timber crescent
#

i am trying to nick bot to the same name as whoever used the command

await discord.ClientUser.edit(nick=str(ctx.author))

but this gives me
await discord.ClientUser.edit(nick=str(ctx.author))
TypeError: ClientUser.edit() got an unexpected keyword argument 'nick'

timber crescent
#

can someone help?

green dust
#

only username

#

or something

timber crescent
#

oh

slate swan
#

🚢

#

discord.ClientUser represents an object. So use on your object of this instance.

#

all yours brother🚢

green dust
maiden fable
#

Haha

slate swan
timber crescent
#

await discord.ClientUser.edit(username=str(ctx.author))
TypeError: ClientUser.edit() missing 1 required positional argument: 'self'

#

replacing with username i get this error

green dust
#

import dpy extension from installed module

slate swan
#

Again, you need to use on your object. Not on the class.

slate swan
#

need more context

timber crescent
#

my object would be? bot.ClientUser?

slate swan
#

!d discord.ext.commands.Bot.user

unkempt canyonBOT
slate swan
#

And you have a discord.ext.commands.Bot object that is likely named bot, or client. Just like when you create commands.

#

So simply bot.user or client.user

green dust
# slate swan need more context

assume you installed a module called meow in your python
you want to load an dpy ext from a python file which is inside meow
something like that

maiden fable
#

My Bot object is named HunAI

green dust
#

yep

slate swan
#

You can't load cogs within installed libraries/packages.

green dust
#

so i did it with weird way

timber crescent
#

how can i read a user's nick?

slate swan
#

!d discord.Member.nick

unkempt canyonBOT
green dust
#

bot can have nick?

slate swan
green dust
#

huh.

slate swan
slate swan
#

Bots are also member of guilds.

timber crescent
#

can i use ctx.author for member?

green dust
slate swan
#

Yes

#

sure

timber crescent
#

aight ty

#

and the nick doesnt include tag by default?

slate swan
#

it doesnt

#

Just the nickname as it's written.

misty sparrow
#

Koi py sika do

slate swan
#

The guild specific nickname of the user.

slate swan
slate swan
#

!rule 4

unkempt canyonBOT
#

4. Use English to the best of your ability. Be polite if someone speaks English imperfectly.

timber crescent
#

cant bot change its own nick on the server even if it has perms?

slate swan
unkempt canyonBOT
#

property me: discord.member.Member```
Similar to [`Client.user`](https://discordpy.readthedocs.io/en/master/api.html#discord.Client.user "discord.Client.user") except an instance of [`Member`](https://discordpy.readthedocs.io/en/master/api.html#discord.Member "discord.Member"). This is essentially used to get the member version of yourself.
slate swan
#

Yes a bot can change its own nickname if it has permissions, just like you can change yours.

#

and use .edit(nick=)

timber crescent
#

bot.guild.me.edit(nick=)?

#

bot.me.edit...?

slate swan
timber crescent
#

oh-

arctic gyro
#

Hi is there any code to untimeout someone?

slate swan
timber crescent
#

says guild is not defined ;-;

slate swan
#

!d disnake.Member.timeout

unkempt canyonBOT
#

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

Times out the member from the guild; until then, the member will not be able to interact with the guild.

Exactly one of `duration` or `until` must be provided. To remove a timeout, set one of the parameters to `None`.

You must have the [`Permissions.moderate_members`](https://docs.disnake.dev/en/latest/api.html#disnake.Permissions.moderate_members "disnake.Permissions.moderate_members") permission to do this.

New in version 2.3.
slate swan
#

To remove a timeout, set one of the parameters to None.

arctic gyro
#

ohk thx

slate swan
#

yw

slate swan
# timber crescent oh-

It's always the object and then the attribute. If it's discord.Guild the object and me the attribute, then it's most likely guild.me.

slate swan
#

Without code we can't help either way.

timber crescent
#
bot = commands.Bot(command_prefix='?')
@bot.event
async def on_message(ctx):
    if ctx.author==bot.user:
        return
    print(ctx.content)
    if 'media.discordapp.net' in ctx.content:
        await guild.me.edit(nick=(ctx.author.display_name))
        await ctx.channel.send(ctx.content.replace('media.discordapp.net','cdn.discordapp.com'))
slate swan
#

use something like ctx.guild or any object u have with a guild property

timber crescent
#

this is what im working with so far

slate swan
#

on_message takes a message argument, not ctx

#

on message does not take context ( ik it works but bad naming convention)

timber crescent
#

ah yes should fix tht

slate swan
#

So it's message.guild.me.edit(...)

#

hey Florianpithink

#

!d discord.Message.guild # Since you can see a message object has a guild attribute

unkempt canyonBOT
slate swan
#

It's however None in private messages, since the message doesn't belong to a guild.

slate swan
timber crescent
#
    await msg.guild.me.edit(nick=(msg.author.display_name))
  File "C:\Program Files\Python310\lib\site-packages\nextcord\member.py", line 795, in edit
    raise TypeError(
TypeError: Timeout must be a `datetime.datetime` or `datetime.timedelta`not _MissingSentinel
#

that broke

#

πŸ₯²

#

(replaced ctx with msg in my code)

slate swan
#

yah

#

make a global check

slate swan
#

no lol

#

You need to set the kwarg value to None.

timber crescent
#

the what?

slate swan
#

Keyword Argument

#

duration=None or until=None as parameter.

timber crescent
#

pls show example TwT

slate swan
#

I'd recommend to learn Python a little bit more though.

#

Your knowledge seems very limited ^^

slate swan
timber crescent
#

is a lot more limited than it seems i assure you

slate swan
#

or

slate swan
slate swan
unkempt canyonBOT
#
Resources

The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.

slate swan
slate swan
#

So for you, x or y can be 2?

#

you can use x and y but not at the same timepithink

#

comprendepithink

#

For me if you need to choose between x or y, you only choose one :)

timber crescent
#

and ( not (==x and ==y))

timber crescent
#

that way it should also not satisfy both

slate swan
#

!d disnake.Member.timeout

unkempt canyonBOT
#

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

Times out the member from the guild; until then, the member will not be able to interact with the guild.

Exactly one of `duration` or `until` must be provided. To remove a timeout, set one of the parameters to `None`.

You must have the [`Permissions.moderate_members`](https://docs.disnake.dev/en/latest/api.html#disnake.Permissions.moderate_members "disnake.Permissions.moderate_members") permission to do this.

New in version 2.3.
slate swan
#

Exactly one

#

You eventually can't read my message...

slate swan
# worldly bane what library do you use?
from discord import Client, Intents, Embed
from discord_slash import SlashCommand, SlashContext
import interactions
import discord



bot = Client(intents=Intents.default())
slash = SlashCommand(bot)
slate swan
#

I said

duration=None or until=None as parameter.

#

Not and

slate swan
#

And that's why the "or" is here...

#
@slash.slash(name="test")
async def test(ctx:SlashContext,member:discord.Member):
    await ctx.guild.kick(member)
    await ctx.send("Kicked")```
slate swan
#

If you need to choose between 2 or 4 you can't choose 2 and 4

#

``py

slate swan
#

Doesn't seem like it needs clarification for me.

slate swan
#

i am getting this

#

k

#

And you need to provide a member when executing the command, such as !kick @slate swan

timber crescent
#

duration or until go before the nick argument yes?

#

or order doesnt matter

slate swan
#

It's a different method.

#

disnake.Member.edit() and disnake.Member.timeout()

#

!arg-kwargs @timber crescent

unkempt canyonBOT
#

*args and **kwargs

These special parameters allow functions to take arbitrary amounts of positional and keyword arguments. The names args and kwargs are purely convention, and could be named any other valid variable name. The special functionality comes from the single and double asterisks (*). If both are used in a function signature, *args must appear before **kwargs.

Single asterisk
*args will ingest an arbitrary amount of positional arguments, and store it in a tuple. If there are parameters after *args in the parameter list with no default value, they will become required keyword arguments by default.

Double asterisk
**kwargs will ingest an arbitrary amount of keyword arguments, and store it in a dictionary. There can be no additional parameters after **kwargs in the parameter list.

Use cases
β€’ Decorators (see !tags decorators)
β€’ Inheritance (overriding methods)
β€’ Future proofing (in the case of the first two bullet points, if the parameters change, your code won't break)
β€’ Flexibility (writing functions that behave like dict() or print())

See !tags positional-keyword for information about positional and keyword arguments

timber crescent
#
    await msg.guild.me.edit(until=None,nick=(msg.author.display_name),)
TypeError: Member.edit() got an unexpected keyword argument 'until'

and

    await msg.guild.me.edit(duration=None,nick=(msg.author.display_name),)
TypeError: Member.edit() got an unexpected keyword argument 'duration'
slate swan
#

As I said, those are different methods.

#

.timeout() != .edit()

#

So call .timeout() once and.edit() once.

green bluff
#

can someone help

slate swan
#

Not if you don't give more information.

timber crescent
#

wait why would i need to call .timeout()
i just wanna steal a users nick and make bot imitate them

slate swan
#

Please stay in the help channel. They are the most active.

timber crescent
#

isnt timeout that moderation thingy

slate swan
#

Simply be patient :p

green bluff
#

i never knew this was a thing

#

lol

slate swan
#

Well, you should stay in the help channel, since someone is there.

slate swan
#

For the next time you can ask here, but you're allowed to use help channels for bot related questions.

green bluff
#

okay thanks

#

well what do i say now

#

@slate swan can u help if u can

timber crescent
slate swan
#

and tb

green bluff
#

@slate swan

slate swan
#

And stay there ^^

#

why the ping im right hereπŸ§β€β™‚οΈ

slate swan
timber crescent
#

@slate swan pls help TwT

#
async def on_message(msg):
    if msg.author==bot.user:
        return
    print(msg.content)
    if 'media.discordapp.net' in msg.content:
        await msg.guild.me.edit(nick=(msg.author.display_name))
#

this much should work yes?

#

what did i miss in the msg.guild.me.edit

timber crescent
# timber crescent what did i miss in the msg.guild.me.edit

cus i get this

Ignoring exception in on_message
Traceback (most recent call last):
  File "C:\Program Files\Python310\lib\site-packages\nextcord\client.py", line 414, in _run_event
    await coro(*args, **kwargs)
  File "C:\python scripts\#embed fixer.py", line 12, in on_message
    await msg.guild.me.edit(nick=(msg.author.display_name))
  File "C:\Program Files\Python310\lib\site-packages\nextcord\member.py", line 795, in edit
    raise TypeError(
TypeError: Timeout must be a `datetime.datetime` or `datetime.timedelta`not _MissingSentinel
slate swan
#

bot is commands.bot here , are you trying to make a global check?

#

well , then just self.bot.add_check(function) inside the init

#

Β―_(ツ)_/Β―

timber crescent
#

hiya sarthak could you help me out?

#

cant get bot to nickname itself

slate swan
#

Where is the .timeout() call?

timber crescent
#

nowhere in my code TwT

slate swan
#

Save your file correctly and restart the bot.

slate swan
#

with nick kwarg

#

wew

timber crescent
#

tried

slate swan
timber crescent
#

ye i was using nextcord

slate swan
#

Oh well this explains things

timber crescent
#

whats the issue then? why's it giving that error?

somber crown
#

how can i set a cooldown within a command? currently, i have a command where an arg = None when invoked, however in the actual command its set so that "if arg == None:" then does a fancy embed of how to use the command, if this is executed, the cooldown will take place (15 seconds) how can i make the cooldown for the command only AFTER that specific if statements execution is complete and set the cooldown to 5 seconds

misty sparrow
#

Koi py sika do

slate swan
slate swan
unkempt canyonBOT
#

4. Use English to the best of your ability. Be polite if someone speaks English imperfectly.

timber crescent
slate swan
#

You don't import bot.

#

code?

#

It will be

#

bad

#

that was an example

#

function is nothing

misty sparrow
#

Can anyone help me to learn py

slate swan
unkempt canyonBOT
#
Resources

The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.

slate swan
#

needs to be an actualy function , and remove the @bot.check

#

It will be, see how classes and cogs work again.

timber crescent
#

it worked

#

but it raised an exception too and didnt proceed ahead

#

lemme add a try except that should be good enough ye?

slate swan
#

Error says all

#

Bot doesn't have permissions to edit nickname.

#

Not even its own nickname.

timber crescent
#

but it did it

slate swan
#

?

timber crescent
#

the exception says it failed but in discord i see it changed its nick

misty sparrow
slate swan
#

You trying to do something else then

timber crescent
#

it nicked itself but gave exception anyways so didnt go ahead

slate swan
slate swan
misty sparrow
#

@slate swan :smiling_face_with_tear:

timber crescent
#

tysm try except worked out

#
@bot.event
async def on_message(msg):
    if msg.author==bot.user:
        return
    print(msg.content)
    if 'media.discordapp.net' in msg.content:
        try:
            await msg.guild.me.edit(nick=(msg.author.display_name),timeout=None)
        except:
            return
        await msg.channel.send(msg.content.replace('media.discordapp.net','cdn.discordapp.com'))
slate swan
#

Oh well, bot can't timeout members.

#

What if you remove the timeout argument now?

#

Maybe your previous error is gone

slate swan
#

but i cant write a complete bot for u

timber crescent
#

wait no

slate swan
#

it wont change the nick as well

timber crescent
#

the try except didnt fix it TwT

slate swan
#

Yeah it didn't

#

!d nextcord.Member.edit brb

#

Remove the timeout kwarg, maybe your previous issue is gone

timber crescent
#

k lemme try with that

#

it nicks itself

misty sparrow
#

@slate swan how to start py

timber crescent
#

oh wait

slate swan
timber crescent
#

πŸ€¦β€β™‚οΈ it stops there cus it quits at the except

slate swan
unkempt canyonBOT
#
Resources

The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.

misty sparrow
#

@slate swan but I dont have pc I have phone only

timber crescent
#

aight this much works now tysm yall πŸ₯²

#

now for the next part....

slate swan
#

programming on a phone is complex , use termux or something

#

tho its hard

timber crescent
#

whats the api equivalent for server avatars? can bots even access that?

#

like changing pfp but only on a server

tiny ibex
#

Do bots also have to pass the NSFW filter??

slate swan
tiny ibex
slate swan
#

No they don't need to, they have free access to the channel and can send any messages there.

tiny ibex
timber crescent
#

But...

slate swan
#

Yes

timber crescent
#

There was this bot called nqn

#

It even said it was python based

slate swan
tiny ibex
timber crescent
slate swan
#

And your account can get terminated as it's breaching the developers policy to send NSFW messages in SFW channels.

slate swan
tiny ibex
timber crescent
#

Ohhhhhhhhhh

#

πŸ€¦β€β™‚οΈ

slate swan
#

Yes it also has the "Bot" tag next to its name, but it's a webhook.

timber crescent
#

I spend 3 days learning discord python and python and whatnot for trying that out πŸ€¦β€β™‚οΈ

slate swan
timber crescent
#

And it's not even close to what I thought it was πŸ₯²

tiny ibex
#

I expected Discord to stop that

slate swan
#

I would disable the feature until you've built a filter. It's not Discord's job to check everything you send.

slate swan
#

The filter of Discord is very bad

tiny ibex
slate swan
#

You can easily send NSFW messages in SFW channels, so I wouldn't rely on their filter. That's why making yours or removing/limiting the feature is the best.

tiny ibex
#

Hmmm

tiny ibex
#

Without using any API ofc

slate swan
#

Never went into image analysis myself, there is definitely more information on the Internet available. And you have a high chance of having a library/API.

tiny ibex
#

Not good enough uh....

slate swan
#

In the end I'd recommend to use an API otherwise your bot will be slowed.

#

Make your own API that analyses the image.

tiny ibex
slate swan
#

Well, there must be multiple guides on how AI and image analysis works ^^

tiny ibex
#

I will try checking them

slate swan
#

Sounds great, good luck KryptonBlanket

manic wing
#

is guild none? you can do guild.get_member

slate swan
#

Then you can use get_member on a guild object, you will need to also use get_guild on the bot object to have that guild object.
You have both, user and guild id given back at all times: payload.user_id and payload.guild_id

slate swan
#

The reaction remove event returns only the following:
β€’ user_id
β€’ channel_id
β€’ message_id
β€’ guild_id
β€’ emoji

#

i still doesn't work

#

How do you execute the command?

#

/test member.mention

#

member.mention?

#

You mention a user right?

#

ye

#

ex:/test @slate swan

#

how can I host my bot for free

#

?

#

You don't, all free hosting services are bad and limited

#

wtf?

#

why?

#

many of them do

#

why can't I ?

#

Doesn't matter if someone uses it or not , but what Krypton said is correct

#

As I said, most hosting services are bad and limited.

slate swan
#

You risk your token , since they have acess to all your files...

#

oh ic

#

what abt uptime robot?

#

Replit is not a host.

desert heart
#

Some cloud platforms have always free tiers which may be sufficient for your bot if it's not a resource intensive one

slate swan
#

yes , like AWS or Google cloud

#

I am sayin' I just wanna make my bot online 24/7 so that it can easily get used by users while my pc is shut down

#

simple

#

If it's not a too big bot , you can use replit
I'll still not suggest using it as your host tho

#

I use replit for some single server bots and it fulfills the requirements

slate swan
#

K

#

Which hosting I need to buy?

#

.

#

hm I am thinking to apply for student pack

#

I can get a host for free I think

#

can I use heroku? @slate swan

slate swan
#

Messages with colors:

Discord is now slowly rolling out the ability to send colored messages within code blocks. It uses the ANSI color codes, so if you've tried to print colored text in your terminal or console with Python or other languages then it will be easy for you.

To be able to send a colored text, you need to use the ansi language for your code block and provide a prefix of this format before writing your text:

\u001b[{format};{color}m

The \u001b is the unicode for ESCAPE/ESC, see http://www.unicode-symbol.com/u/001B.html. If you want to use it yourself without bots, then you need to copy paste the character from the website.
After you've written this, you can type and text you wish, and if you want to reset the color back to normal, then you need to use \u001b[0m as prefix.

Here is the list of values you can use to replace {format}:
β€’ 0: Normal
β€’ 1: Bold
β€’ 4: Underline

Here is the list of values you can use to replace {color}:
The following values will change the text color.
β€’ 30: Gray
β€’ 31: Red
β€’ 32: Green
β€’ 33: Yellow
β€’ 34: Blue
β€’ 35: Pink
β€’ 36: Cyan
β€’ 37: White
The following values will change the text background color.
β€’ 40: Firefly dark blue
β€’ 41: Orange
β€’ 42: Marble blue
β€’ 43: Greyish turquoise
β€’ 44: Gray
β€’ 45: Indigo
β€’ 46: Light gray
β€’ 47: White

Let's take an example, I want a bold green colored text with the very dark blue background.
I simply use \u001b[0;40m (background color) and \u001b[1;32m (text color) as prefix. Note that the order is important, first you give the background color and then the text color.
Alternatively you can also directly combine them into a single prefix like the following: \u001b[1;40;32m and you can also use multiple values. Something like \u001b[1;40;4;32m would underline the text, make it bold, make it green and have a dark blue background.

That's some cool formatted text right?
That's some cool formatted text right?

Raw message:
```ansi
\u001b[0;40m\u001b[1;32mThat's some cool formatted text right?
\u001b[1;40;32mThat's some cool formatted text right?
```

The way the colors look like on Discord is shown in the image below ^^

Note: If the change as not been brought to you yet, or other users, then you can use other code blocks in the meantime to get colored text. See this gist: https://gist.github.com/matthewzring/9f7bbfd102003963f9be7dbcf7d40e51

https://media.discordapp.net/attachments/739937507768270939/969283562731872306/ANSI-Colors.png

slate swan
velvet tinsel
#

remember the weird error some guy had

#

that we couldn't figure out

slate swan
#

Nextcord?

#

timeout

velvet tinsel
#

on an on_member_join

#

or something?

slate swan
#

@slash.slash(name="test")
async def test(ctx:SlashContext,member:discord.Member):
    await member.kick()
    await ctx.send("Kicked")```
#

what's wrong?

velvet tinsel
#

I figured out that you had to enable intents

#

that was the solution

slate swan
#
TypeError: test() missing 1 required positional argument: 'member'```
velvet tinsel
#

as a command

slate swan
#

/test @slate swan

velvet tinsel
#

ok

#

also you can just do ctx iirc

slate swan
#

any help here?

velvet tinsel
#

read the error

#

smh

slate swan
#

title and add_field

#

Not tittle and add_feild

velvet tinsel
#

lol

#

name says it all

slate swan
#

bruh

#

spelling mistake
bruh

#

i mean you should've noticed they werent colored shrug

#

bruh my brain hurts

#

rest ig

jade tartan
#

Hi i am trying to create a dashboard for my bot i have a problem with it can i ask it here or where should i ask?

slate swan
#

read the channel description

velvet tinsel
#

don't overwork yourself

slate swan
manic wing
#

use disnake

manic wing
#

disnake is a library that is better than py-cord

slate swan
#

@manic wing

slate swan
manic wing
heavy folio
slate swan
#

i did

#

mention

heavy folio
#

What lib is this

slate swan
#
from discord import Client, Intents, Embed
from discord_slash import SlashCommand, SlashContext
import interactions
import discord

#

these

velvet tinsel
#

i'm late for school

#

but who cares

heavy folio
#

Idk discord_slash

slate swan
#

😒

#

anyone?

random vine
#

?

slate swan
#

@random vine

#

@dusk dock

#

sorry for the ping

#

@strong crow

slate swan
slate swan
#

pls

slate swan
#

What library are you using?

slate swan
#

I recommend using disnake for slash commands instead of this third party library.

#

or you can use e-discord.py its easier and even follows the name of discordpy so you wont have to change alot shrug it also converts all the commands u want to slash commands without having to implements stupid stuff

#

You should give the GitHub link instead of a Discord server.

#

You can't do anything with a Discord server invite beside joining it and then continue searching, if you give the GitHub link directly people can install it without having you to advertise a Discord server.

slate swan
#

now what's wrong?

#

its still not working

#

@slate swan

reef trail
#

is there a permissions kwarg(i think) to use / make slash commands? Like im making a setup command for slash commands and i need a permission decorator so the right people can use it

light violet
#

hy

#

@slate swanhey finally i made my antinuke thanks for all of urs help

slate swan
#

@light violet can u help me?

light violet
#

oo i dk about py slash

slate swan
#

nothing happens

light violet
#

i have to read docs then i will be able to answer

slate swan
#

member is not kicked

#

@maiden fable

light violet
#

in console

slate swan
#

no error

#

lol

light violet
#

are ur roles higher than bot

slate swan
#

nothing happens

#

i am the owner

light violet
#

? does bot has permission to kick?

slate swan
#

yep

light violet
slate swan
#

admin

slate swan
light violet
slate swan
light violet
#

ok

light violet
#

in ur code

slate swan
#

why do we need intents?

light violet
#
@bot.slash(
    name="kick",
    description="Kick a member",
    guild_ids=[guildids],
    options=[
        create_option(
            name="user",
            description="The user I should kick",
            required=True,
            option_type=6
            ),
        create_option(
            name="reason",
            description="Why should I kick them?",
            required=False,
            option_type=3
            )
        ]
)
@has_permissions(kick_members=True)
async def _kick(ctx:SlashContext, user.mention , reason:str="None Given"):
    reason = str(reason)
    usr = "<@"+str(user.id)+">"
    await user.kick(reason)
    await user.send("Kicked from "+ctx.guild.name+" for "+reason)
    embed = discord.Embed(title="Kicked a user", description="Kicked "+usr+" for reason: "+reason)
    await ctx.send(embed=embed)
    ```@slate swantry this once
slate swan
#

k

#

1 min

light violet
#

;aw;

light violet
green bluff
#

reason not accesed?

#

no quick fixes available

#

any way i can fix this

#

#suggest command
@client.command()
@commands.cooldown(1, 600, commands.BucketType.user)
async def suggest(ctx, *, reason='noreasonprovided'):
channel = client.get_channel(928380965787676804)
await channel.send('suggestion idea: {reason}')

#

oh okay

#

@slate swan

#

oh

#

@slate swan

slate swan
#

f string

green bluff
#

oh thats what the f does i alwayss wondered what it did

#

i have programmed for around 4 - 6 hrs now

#

and for 2 days

slate swan
#

!f-strings

unkempt canyonBOT
#

Creating a Python string with your variables using the + operator can be difficult to write and read. F-strings (format-strings) make it easy to insert values into a string. If you put an f in front of the first quote, you can then put Python expressions between curly braces in the string.

>>> snake = "pythons"
>>> number = 21
>>> f"There are {number * 2} {snake} on the plane."
"There are 42 pythons on the plane."

Note that even when you include an expression that isn't a string, like number * 2, Python will convert it to a string for you.

green bluff
#

niceeee also what does the * do

slate swan
#

Here you have a small but good explanation

green bluff
#

thanks

#

what does the * do

green bluff
#

thanks

slate swan
#

Here it's explained

#

And if you scroll above you see how it acts without the *

#

or if you do*reason instead of *, reason

slate swan
green bluff
#

wait @slate swan can u do an f string on an embed

slate swan
#

Everywhere, it's Python

#

Whenever you need to provide a string as parameter, you can use f-strings

light violet
green bluff
#

@slate swan how to get the name of the person who sent the suggestion

#

can anyone help me with getting the name of the person who sent me the suggestion here is my code

slate swan
#

ctx.author

green bluff
#

thank you

green bluff
#

so like {ctx.author}

slate swan
#

Yup

green bluff
#

something like this @slate swan

#

thanks it works

slate swan
jade tartan
green bluff
#

so i added

#

get member url and it doesnt work

#

get member avatar i mean

maiden fable
#

It was changed in 2.0

green bluff
#

bot doesnt reply

#

embed.set_thumbnail(url=member.avatar.url)

#

this right

slate swan
#

Are you sure you've restarted the bot?

green bluff
#

yup did it again

#

nope doesnt worrk

#

its saved

#

as well

slate swan
#

#bot-commands for random commands :)

wary ice
#

!p leaderboard

unkempt canyonBOT
#
Bad argument

Converting to "int" failed for parameter "pep_number".

wary ice
#

Ok sry

slate swan
green bluff
#

3.10.1

#

latest one cause i got it a day ago

slate swan
green bluff
slate swan
#

All right

#

So it's member.avatar_url

green bluff
#

oh i see

boreal ravine
green bluff
#

what pypi

#

still nothing

#

but @slate swan

slate swan
#

What if you print the avatar url?

green bluff
#

this works

boreal ravine
slate swan
#

Oh well yeah