#discord-bots

1 messages · Page 814 of 1

slate swan
#

their public routes and documented as they should be. if you have a problem with tos then take it to Discord support.

#

not this specifically

#

their tos is bs

#

because their api is PUBLIC

#

discord api doesnt make sense in general

#

then don't waste your time ranting about it 🤷

#

ur acting as if ur gonna get sued for searching up how many messages someone has sent

#

its not that big of a deal

#

discord has way bigger things to worry about

#

this convo is making me cringe hard

slate swan
frail mesa
#

tyvm got it working now

slate swan
#

👍

slate swan
boreal ravine
frail mesa
#

so is there any downsides to a task like this? someone mentioned something about rip limit rate?

#

i figured it should be fine. only about 600 members and only runs every 5 hours

slate swan
boreal ravine
#

no

slate swan
slate swan
slate swan
frail mesa
#

ok sweet. well ty for all the help

slate swan
slate swan
#

🥸

boreal ravine
#

guys stop

vale wing
#

Faced this issue - when the user has a default avatar, user.avatar is None and I need the avatar.url. To avoid attribute error I can just do

url = getattr(user.avatar, 'url', 'deafult_url')```
But what would `default_url` be?
maiden fable
unkempt canyonBOT
#

property display_avatar: discord.asset.Asset```
Returns the member’s display avatar.

For regular members this is just their avatar, but if they have a guild specific avatar then that is returned instead.

New in version 2.0.
vale wing
#

O thx

#

That will work for default avatars as well right?

maiden fable
#

Yes

slate swan
#
Ignoring exception in command play:
Traceback (most recent call last):
  File "C:\Users\GUDDU\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "C:\Users\GUDDU\Desktop\Program\Projects with my friends\music_bot.py", line 41, in play
    source = FFmpegPCMAudio(filename)
NameError: name 'FFmpegPCMAudio' is not defined

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

Traceback (most recent call last):
  File "C:\Users\GUDDU\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\bot.py", line 939, in invoke
    await ctx.command.invoke(ctx)
  File "C:\Users\GUDDU\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\core.py", line 863, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "C:\Users\GUDDU\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\core.py", line 94, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: NameError: name 'FFmpegPCMAudio' is not defined

ffmpeg error help me

#

i tried installing ffmpeg using pip

#

that also didnt help

#

what should i do now

boreal ravine
#

!d discord.FFmpegPCMAudio

unkempt canyonBOT
#

class discord.FFmpegPCMAudio(source, *, executable='ffmpeg', pipe=False, stderr=None, before_options=None, options=None)```
An audio source from FFmpeg (or AVConv).

This launches a sub-process to a specific input file given.

Warning

You must have the ffmpeg or avconv executable in your path environment variable in order for this to work.
slate swan
boreal ravine
#

no

#

read the error

slate swan
#

ok wait

slate swan
boreal ravine
#

discord.ext.commands.errors.CommandInvokeError: Command raised an exception: NameError: name 'FFmpegPCMAudio' is not defined

boreal ravine
placid skiff
ashen locust
#

what is the command how to get all of the channels in a server?

maiden fable
unkempt canyonBOT
ashen locust
#

thanks

dreamy sluice
#

What does custom_id do in buttons? (Nextcord)

placid skiff
#
@wr_team.sub_command(name="add_team", description="Crea un nuovo team", guild_ids=[865691556736008213])
    async def add_team(self, ctx: ApplicationCommandInteraction, name: str, members_id: str,
                       leader: Member, coleaders_id: Optional[str] = None,
                       channel: Optional[VoiceChannel] = None):
        members_id = members_id.split()
        print(members_id)
        coleaders_id = coleaders_id.split() if coleaders_id is not None else None
        if all(member.startswith("<@") for member in members_id):
            members: List[Member] = [ctx.guild.get_member(int(member[3:-2])) for member in members_id]
            if all(coleader.startswith("<@") for coleader in coleaders_id):
                coleaders: Optional[List[Member]] = [ctx.guild.get_member(int(coleader[3:-2])) for coleader in coleaders_id] if \
                    coleaders_id is not None else None
            else:
                coleaders = None
            team = Team(name=name, guild=ctx.guild.id, users=[member.id for member in members], leader=leader.id,
                        coleader=[coleader.id for coleader in coleaders]if coleaders is not None else None, voice_channel = channel)

So, I wrote all of this, just want to check if it has some sense or I'm drunk. coleaders_id and members_id are a list of mentions saved as string cuz i can't get a list of members as parameter using slash commands

boreal ravine
dreamy sluice
boreal ravine
slate swan
dreamy sluice
slate swan
#

you need to add a unique id for each button

#

!d discord.Client.persistent_views

unkempt canyonBOT
#

property persistent_views: Sequence[discord.ui.view.View]```
A sequence of persistent views added to the client.

New in version 2.0.
slate swan
#

i mean for discord its for persistent views im not sure if its the same for nextcord i assume yes

#

since its a fork if not im not sure

maiden fable
slate swan
dreamy sluice
slate swan
#

a view thats stuck with the bot so when it resets it you can still use buttons

#

so it wont fail the interaction

dreamy sluice
#

:O

#

That was exactly what I was looking for-

slate swan
#

loll

dreamy sluice
#

damn

#

Will it have a persistent view if I just pass in a custom id?

neat tartan
# slate swan loll

I need to train my brain to recognize its you based on any dog sitting being your pfp instead of one specific thing

slate swan
slate swan
neat tartan
#

Pictures are the first thing i notice and look for. They are more distinct at first glance. Also do you know much about discord bot databases? I think there is an asynchronous one typically used in bots but i forget its name and how it differs from other databases

ashen locust
#

how do i make the bot delete all channels without asking for a argument?

slate swan
ashen locust
#

what

slate swan
#

sqlite uses a file which you can use aiosqlite if youre using pg use asyncpg i think it was the name of the bridge

neat tartan
ashen locust
#

i just asked how to do it

slate swan
slate swan
#

aiosqlite is the async bridge of it tho

slate swan
neat tartan
#

Oh, im at least familiar with sqlite i think ill check out aiosqlite just in case it sounds like the one im thinking of

unkempt canyonBOT
slate swan
#

pretty easy all you need to know is sql

ashen locust
neat tartan
#

I dont see any reason for a bot needing to do something like that when a delete server button does essentially that

slate swan
ashen locust
#

no no its okay

neat tartan
#

It ehrs too much on rule 5 territory for me

slate swan
#

not myself but everyone here its a sensitive topic

ashen locust
#

ye thanks anyway

#

can i just ask that how do u get all the channels in a guild?
i hope thats not against tos

maiden fable
unkempt canyonBOT
slate swan
#

your os couldnt open the source lol

ashen locust
#

i tried that but im new to it to i cant understand that website

slate swan
#

it returns a list which you can iterate through it

#

yes

maiden fable
ashen locust
#

thank you very much

slate swan
#

If I was in the vas code I was download the font and link a path

neat tartan
#

Id suggest learning and familiarizing yourself with the docs. It will be your bible when making bots

#

repl
Dont use repl

slate swan
#

no not for you

#

it was for kuavos

slate swan
hoary cargo
quick gust
halcyon bison
#

why is this underlined

#

my bot crashes on startup and

#

i think thats why

placid skiff
halcyon bison
#

i have to import that?

#

@placid skiff where'd you gooo

placid skiff
slate swan
#

Try using like this

#

@commands.has_permissions(manage_messages=True)

placid skiff
#

he can just import from discord.ext.commands import has_permission, then he can use it like this

halcyon bison
#

then it underlines commands.

slate swan
#

And import permissons from discord

halcyon bison
#

and then shows an error thing

slate swan
placid skiff
#

permissions are role permissions i think

#

!d discord.Permissions

unkempt canyonBOT
#

class discord.Permissions(permissions=0, **kwargs)```
Wraps up the Discord permission value.

The properties provided are two way. You can set and retrieve individual bits using the properties as if they were regular bools. This allows you to edit permissions.

Changed in version 1.3: You can now use keyword arguments to initialize [`Permissions`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions "discord.Permissions") similar to [`update()`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.update "discord.Permissions.update").
placid skiff
#

see? it is not a check

slate swan
halcyon bison
#

i did what u both asked

#

"commands" is underlined

placid skiff
#

did you import commands?

placid skiff
slate swan
#

from discord.ext import commands

halcyon bison
#

started like yesterday

slate swan
halcyon bison
placid skiff
#

Then study python first, you can't develope discord bots in python without knowing python

slate swan
#

Delete the 3 line

#

Instead do from discord.ext import commands

nimble plume
#
embed.add_field(name=f"Message Sent by {message.author} Deleted in #{message.channel}", value=f"Message : {message.content}", inline=True)
``` not pinging the channel
placid skiff
slate swan
#

He is not defined

halcyon bison
#

oh

#

wait i forgot about that lol

placid skiff
#

bro you can't tell him everything, is like it is you who are developin the bot 😆

slate swan
#

You need to put him on the line with bot= commands.Bot(command_prefix”your_sign”)

placid skiff
#

He can help you, but he can't literally tell you what you have to do

#

how are you supposed to learn like this?

slate swan
halcyon bison
#

like this

placid skiff
slate swan
#

Lol right

slate swan
vocal plover
#

discord.py doesn't have discord.Bot(), which library are you using?

vocal plover
#

Yeah I'm pretty confident discord.py doesn't have discord.Bot lol

maiden fable
#

Cz it doesn't

slate swan
# halcyon bison like this

First, do what I told you at first time.
From discord.ext import commands
After, delete the first line here and sty only the second.
After, change at the line instead command_prefix”#” -> command_prefix=“#”

placid skiff
#

Guys, literally he has to learn python xD

nimble plume
#
embed.add_field(name=f"Message Sent by {message.author} Deleted in #{message.channel}", value=f"Message : {message.content}", inline=True)
``` not pinging the channel
maiden fable
#

message.channel.mention

slate swan
#

But let’s help him right now so he can start working

placid skiff
#

Without knowing how to read the docs? XD

slate swan
#

@halcyon bison u good?

halcyon bison
feral lantern
#

no point in attempting to code a bot when you have no experience w python whatsoever

#

you're always going to encounter errors and a result you'll come back to this channel everyday seeking help

halcyon bison
feral lantern
#

it's best to start w the beginners manual before starting on something way beyond your level

placid skiff
nimble plume
slate swan
#

Is it possible to make sure that when a participant is banned, his messages are not deleted?

#

i just explain you step by step

placid skiff
#

But you re tryin to use some methods without even importing the class / method you want to use

nimble plume
#

vc channel join event?

vocal plover
feral lantern
#

he can try but it'll get complicated when people refer to certain functions in python

nimble plume
halcyon bison
placid skiff
halcyon bison
#

no i dont im kidding

slate swan
#

Is it possible to make sure that when a participant is banned, his messages are not deleted?

placid skiff
#

!d discord.Member.ban

unkempt canyonBOT
#

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

Bans this member. Equivalent to [`Guild.ban()`](https://discordpy.readthedocs.io/en/master/api.html#discord.Guild.ban "discord.Guild.ban").
slate swan
#

Okay

placid skiff
leaden hollow
#
    @commands.command(aliases=['w'])
    async def uis(self,ctx,*,user: discord.User = None):
        if user == None:
            user = ctx.author
        await ctx.send(f"{user.banner}")```
i'm getting output as None even if user has a banner
placid skiff
#

Why are you gettin' all the parameters given even if you take only one user?

shadow wraith
placid skiff
#

Minor fix xD

leaden hollow
#

that part doesn't have a issue it's working fine in other commands tho

shadow wraith
leaden hollow
#

okay

nimble plume
#
discord.errors.HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
In embed.fields.0.value: This field is required
``` what does this mean
placid skiff
#

It's just PEP syntax, it works comparing to None but it is better using not variable or variable is None or variable is not None or just if variable

#

variables in if statement returns True if they are not None / empty, otherwise False

leaden hollow
shadow wraith
#

if variable checks if the variable value is a truthy value
if not variable checks if the variable value is a falsy value (and im pretty sure None is a falsy value)

placid skiff
slate swan
#

i want to host my bot is there any website for free?

shadow wraith
#

o ye

placid skiff
#

if variables are boolean then it is taken their value

leaden hollow
nimble plume
#

empty*

dire folio
#

U can't have a empty string

nimble plume
#

okay

dire folio
#

Use an invis char instead

placid skiff
nimble plume
dire folio
#

Just Google it

cloud dawn
nimble plume
#

okay

shadow wraith
placid skiff
nimble plume
placid skiff
leaden hollow
#

try to use this

nimble plume
shadow wraith
placid skiff
#

!e

a = 0
print(True if a else False)
unkempt canyonBOT
#

@placid skiff :white_check_mark: Your eval job has completed with return code 0.

False
cloud dawn
placid skiff
#

interesting

shadow wraith
#

even the return code is falsy 🤯

nimble plume
#
embed.add_field(name=f"{member.name} Joined {after.channel.name}", value="\u1cbc", inline=True)
cloud dawn
unkempt canyonBOT
#

@cloud dawn :white_check_mark: Your eval job has completed with return code 0.

False
cloud dawn
placid skiff
#

empty lists

shadow wraith
#

empty container datatypes returns false as their boolean value ig

nimble plume
#

all working good but 1 issue

nimble plume
#

its not pinging the channel

#

i have tryed <#id>

boreal ravine
#

you need to get the user first using get_user

#

!d discord.User.banner

unkempt canyonBOT
#

property banner: Optional[discord.asset.Asset]```
Returns the user’s banner asset, if available.

New in version 2.0.

Note

This information is only available via [`Client.fetch_user()`](https://discordpy.readthedocs.io/en/master/api.html#discord.Client.fetch_user "discord.Client.fetch_user").
nimble plume
#

boreal ravine
leaden hollow
#

nvm, found the issue

#

it's something related to intents

dreamy sluice
placid skiff
#

Lol you didn't provide a lot of information here

#

if nothing is sent and no error provides it means that the len of temp is greater than 0

dreamy sluice
#

Anyone here know to set up persistent view in a button?

#

(Nextcord)

placid skiff
#

now you're just splittin' the first element of the string line D_D

#

you're like doin this:

#

!e

str_1 = "abcd"
print(str_1.split()[0])
unkempt canyonBOT
#

@placid skiff :white_check_mark: Your eval job has completed with return code 0.

abcd
slate swan
#

how can i create same command as normal command and slash command in nextcord since slash use interaction and normal command use context so i no longer can do ```py
async def call(self, ctx, arg):
# do stuff
@commands.command()
async def command(self, ctx, arg):
await call(ctx, arg)
@nextcord.slash_command(name="command")
async def _command(self, interaction, arg):
await call(ctx, arg)

placid skiff
#

if your file is not empty then you will not find any line with a len of 0, so your code in the if block will not even execute

#

!e

str_1 = ["abcd", "efg"]
for lines in str_1:
  if len(lines)==0:
    print("found nothing")
unkempt canyonBOT
#

@placid skiff :warning: Your eval job has completed with return code 0.

[No output]
placid skiff
#

see?

nimble plume
#
channelslogs = bot.get_channel(927193880116473906)
#

not getting channel for some reason

#

i tryed channelslogs.send("hi")

vocal snow
nimble plume
vocal snow
#

Then where

nimble plume
#

1 colom

vocal snow
#

What

nimble plume
#

how i tell u

vocal snow
#

Send the code

nimble plume
#

it shows None type

#

means channel not getting

vocal snow
dry kelp
#
        with open(add_path, "r") as f:
            bypass = json.load(f)

        if len(guild.members) < 100:

            if guild.id in str(bypass):
                return

            await guild.leave()
            return
nimble plume
#

use string

dry kelp
#

for guild id?

nimble plume
#

what is bypass

dry kelp
#

list

nimble plume
#

of

#

int or str

vocal snow
dry kelp
vocal snow
dry kelp
#

i had that

nimble plume
dry kelp
#

i wasn't working

#

it*

nimble plume
vocal snow
#

Of strings

nimble plume
#

string has number

vocal snow
nimble plume
vocal snow
nimble plume
#

i called it somehow

vocal snow
#

No lol

nimble plume
#
      for member in AFK_PPL:
       user = bot.get_user(AFK_PPL[0])
#

AFK_PPL have ids of members

#

its a list and

vocal snow
#

?? And where are you calling int on a list?

#

Idk what you're talking about anymore

nimble plume
#

?/

dry kelp
nimble plume
nimble plume
#

terminal need both int or both str

nimble plume
#
channelslogs = bot.get_channel(927193880116473906)
@bot.listen()
async def on_message_delete(message):
#

@vocal snow

#

HELO>

slate swan
#

The unban command does not unban a member by id, it does not write anything to the console. Why?

#

show code.

#
@bot.command()
@commands.has_any_role(692760082085183519, 940008547993927691, 863878825376743475)
async def unban(ctx, *, member, reason="Отсутствует"):
        emb=discord.Embed(title="Разбан пользователя", description="**__Информация:__**", color=discord.Color.from_rgb(0, 255, 0), timestamp=ctx.message.created_at)
        emb.set_footer(text="© Все права защищены The Greatest", icon_url=ctx.author.avatar_url)
        emb.add_field(name="**Участник:**", value=f"**{member.name}** ({member.mention})", inline=False)
        emb.add_field(name="**ID:**", value=f"**{member.id}**", inline=False)
        emb.add_field(name="**Разбанил:**", value=f"**{ctx.author.name}**", inline=False)
        emb.add_field(name="**Причина:**", value=f"{reason}", inline=False)
        await ctx.reply(embed=emb) 
slate swan
#

🤔

#

and youre not even unbanning anyone

ashen locust
#

So im creating a purge command and i want to set it so that theres no limit to how many messages it can delete. how do i do that?

placid skiff
#

check purge method in the docs

ashen locust
#

i have used the docs but cant really understand how to

vocal snow
placid skiff
ashen locust
#

i meant i am not able to understand from the docs like how to read from the docs

#

its kinda confusing sorry

slate swan
#

🤔

vocal snow
#

!d discord.TextChannel.purge

unkempt canyonBOT
#

await purge(*, limit=100, check=..., before=None, after=None, around=None, oldest_first=False, bulk=True)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).

Purges a list of messages that meet the criteria given by the predicate `check`. If a `check` is not provided then all messages are deleted without discrimination.

You must have the [`manage_messages`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.manage_messages "discord.Permissions.manage_messages") permission to delete messages even if they are your own. The [`read_message_history`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.read_message_history "discord.Permissions.read_message_history") permission is also needed to retrieve message history.

Examples

Deleting bot’s messages...
slate swan
#

Reason remove?

ashen locust
ashen locust
placid skiff
ashen locust
#

ohh ok thanks so much

vocal snow
#

It might be worth seeing how commands are parsed in discord.py ^

brittle axle
#

I am using nextcord to build a timeout command and even though it executes the ctx.send part the thing is not working for some reason here is the code

unkempt canyonBOT
brittle axle
unkempt canyonBOT
#

Hey @brittle axle!

You either uploaded a .txt file or entered a message that was too long. Please use our paste bin instead.

brittle axle
#

here is the code

#

anyone knows how to solve this?

ashen locust
#

can you purge messages from a discord bots dm?

vale wing
ashen locust
#

how to do that

#

ive tried it many times

#

from the bots message history but i cant seem to be able to do it

vale wing
#

Time conversion?

vale wing
ashen locust
#

okay thanks

slate swan
#

and you would use a check for that

ashen locust
#

i mean to do that

ashen locust
slate swan
#

purge takes a check parameter to make sure what messages to purge

vale wing
#

The what

#

Okbro

slate swan
#

ah

ashen locust
#

??

slate swan
#

use history and delete messages one by one

vale wing
#

I don't remember the name of the class

ashen locust
#

i tried to do that but cant seem to be able to do that

vale wing
#

!d discord.DMChannel

unkempt canyonBOT
#

class discord.DMChannel```
Represents a Discord direct message channel.

x == y Checks if two channels are equal.

x != y Checks if two channels are not equal.

hash(x) Returns the channel’s hash.

str(x) Returns a string representation of the channel
vale wing
ashen locust
#

okay thanks

slate swan
#
async for message in DMChannel.history(range_of_messages):
   if message.author==Bot.user:
     await message.delete()
``` is the only way
ashen locust
#

thanks so much

slate swan
#

thanks for pointing that out, exenifix :3

vale wing
#

Np

heavy belfry
#

gain = 25
for i in gain:

this seems to bring up all sorts of errors, can loops not work when using discord.py?

vale wing
#

You can't iterate an integer?

placid skiff
slate swan
#

you can iterate only in an iterable like a list, tuple or string

ashen locust
#

thanks both of u

vale wing
#

Maybe you meant

for i in range(gain)```
heavy belfry
#

how can i do this then?

heavy belfry
vale wing
#

Anyone needs a normal time converter that uses regex

#

At least I think I made it to be normal

ashen locust
#

@slate swan im really sorry if im disturbing you but it says "DMChannel" not defined

brisk brook
#

aiosqlite hurts my brain im really tempted to use json for my economy since it's easier

vale wing
#

Here's a time converter that uses regex in case anybody would need proper time conversion.

from datetime import timedelta
from re import search

from discord.ext.commands import Converter


class TimeConverter(Converter):
    async def convert(self, _, arg: str) -> timedelta:
        arg = arg.lower().replace(" ", "")  # lower the string and remove spaces
        values = {"days": 0, "hours": 0, "minutes": 0, "seconds": 0}
        for k in values.copy():
            try:
                value = search("\d+" + k[0], arg).group()  # search for a number that stands next to a certain letter
                values[k] = int(value.replace(k[0], ""))  # extract the number
            except:
                pass  # if the number wasn't found, just leave it with the default value - 0

        return timedelta(**values)```

It will convert any string like `1d2h3m4s` to a timedelta:
```py
"5h" -> timedelta(hours=5)
"1d30m" -> timedelta(days=1, minutes=30)

#some non typical examples
"6m4h" -> timedelta(hours=4, minutes=6)
"10days 50minutes" -> timedelta(days=10, minutes=50)```

As you can see it doesn't care about the order and full names and works in any case.
brisk brook
#

oops not here

vale wing
#

But requires knowledge of postgres

brisk brook
#

yeah i don't know what that is either, what's the easiest database to learn

vale wing
#

SQLite

brisk brook
#

for a discord economy

vale wing
#

But in terms of library the aiosqlite is aids if you ask me

brisk brook
#

oh yeah coz im a beginner, and I got json quite easily

vale wing
#

Json is easy of course lol

#

It is similar to common dict

#

And database is a different data structure

#

Which is way more complicated

#

But faster and better overall

placid skiff
vale wing
#

The json can't be used for storing large amount of data

brisk brook
placid skiff
brisk brook
#

it's so hard

vale wing
placid skiff
#

Postgres. Not sqlite

vale wing
#

When I was a beginner I was using pickle and it turned into hell eventually

brisk brook
#

what's a short tutorial that explains aiosqlite quite easily

vale wing
placid skiff
vale wing
#

Easy

placid skiff
#

I have to take them, split them and then convert them any time i want to access a member

vale wing
#

Yeah

#

So for arrays it's better to use postgres

placid skiff
#

i'll just save the object in a binary file and then load it when it is needed

vale wing
#

And if you have like 1k of those files?

placid skiff
#

what's the problem with that?

vale wing
#

Even 100 would be an issue

placid skiff
#

why? xD

placid skiff
placid skiff
vocal snow
#

how so?

vale wing
#

Ok lemme tell you

placid skiff
#

i had no issues so far

slate swan
#

!d discord.User.dm_channel

unkempt canyonBOT
#

property dm_channel: Optional[DMChannel]```
Returns the channel associated with this user if it exists.

If this returns `None`, you can create a DM channel by calling the [`create_dm()`](https://discordpy.readthedocs.io/en/master/api.html#discord.User.create_dm "discord.User.create_dm") coroutine function.
brittle axle
placid skiff
ashen locust
gusty hatch
#

how would i put a custom emoji in a dropdown/select menu

vale wing
#

So I created classes for user, member, and guild data. Each class had its own file that was put into some directory and it all was working fine until some weird stuff started happening, so basically I accidentally added wrong method to the class and everything got corrupted.

Disadvantages of using pickle "database" so far:
- many files != good
- updating data structure is complicated (you would have to overwrite every file)
- any mistake = corruption

gusty hatch
#

When i click the dropdown the dropdown doesn't pop up.. But when i remove custom emoji it works

vale wing
#

@placid skiff

ashen locust
vale wing
#

Not a positional one

ashen locust
#

what?

vale wing
#
history(limit=10)```
vale wing
ashen locust
placid skiff
brittle axle
ashen locust
#

ill try that

placid skiff
#

i'm saving just custom objects

vale wing
vale wing
placid skiff
#

it is more easy to get information from a list of int saved into an object instead of gettin a list of alnum string saved into a database

vale wing
#

Can't show you my implementation unfortunately because the repo is closed source

vale wing
placid skiff
vale wing
#

It contains weakrefs that are not serialisable

ashen locust
#

@vale wing

placid skiff
#

in the end, I'm not saying that using pickle doesn't have any trouble, you have to pay more attention on it of course, but you can do a lot of process in an easiest way

brittle axle
#

@vale wing the time conversion got printed out but the user was not timed out there were no errors on the terminal either

#

what should i do?

vale wing
brittle axle
#

lemme try 1 minute

#

nvm it worked with 1m thank you for the help man

heavy belfry
#

@bot.command(name="sell")
async def sell(ctx, mineral=str, amount=int):
global dirt, iron, stone, coins
if mineral == "dirt":
code code code
else:
await ctx.send("This is not a mineral")

when i run this and type sell dirt 5 it says 'this is not a mineral'

slate swan
#

someone jnows how can i pase the member avatar on a pillow?

#

i have image and the pillow paste text on it

flat solstice
#

https://sourceb.in/w7aXsAQN5VOkay this is my filetree and I have a function called timestamps_av in my info.py file but when I do from .info import timestamps_av,fromcogs .info import timestamps_av or from info import timestamps_avin events.py it errors telling me it can't find it

dreamy sluice
slate swan
ashen locust
#

can anyone help

vale wing
#

By adding = after an argument you set a default value for it

heavy belfry
#

ah, ty :D

#

such big brain xd

vale wing
heavy belfry
ashen locust
#

what?

sage otter
#

You can’t delete messages that aren’t yours.

#

Unless it’s in a guild and the bot has manage messages.

ashen locust
#

I only want to delete message that are my own bots not the other users

#

in dms

sage otter
#

Oh I see, my bad(I honestly didn’t read all of it) .

ashen locust
#

Yes

ashen locust
#

there are 2 images in that

sage otter
#

Oh. You literally just called the class DMChannel.

ashen locust
#

What do I need to correct in that then?

#

Im Kinda new to discord.py so any help would be greatly appreciated

sage otter
#

ctx.author.dm_channel

ashen locust
#

Thank You. I'll try that.

#

wait should i replace dmchannel.history with that?

sage otter
#

replace DMChannel with that

#

Keep the history part.

ashen locust
#

thank you

#

It says "NoneType object has no attribute history"

sage otter
#

There’s no DMChannel between you and the bot then

#

Send some messages to the bot in its dms

#

And try again.

ashen locust
#

okay

#

same error

sage otter
#

Try again but try add
await ctx.author.create_dm()

#

Before trying to read the history

ashen locust
#

Okay

#

@sage otter Like this?

sage otter
#

await it

ashen locust
#

okay

#

It says cannot send messages to this user?

flat solstice
flat solstice
flat solstice
dreamy sluice
#

How do I make sure my bot doesn't pass too many ratelimits?

boreal ravine
#

d.py handles that for you

#

but if you do anything excessive your bot will get rate limited

dreamy sluice
# boreal ravine d.py handles that for you

I still get this error several times

nextcord.errors.HTTPException: 429 Too Many Requests (error code: 0): You are being blocked from accessing our API temporarily due to exceeding our rate limits frequently. Please read our docs at https://discord.com/developers/docs/topics/rate-limits to prevent this moving forward.
dreamy sluice
#

My bot doesn't spam or do anything, but it still got blocked

dreamy sluice
#

is that the reason?

boreal ravine
#

yeah

dreamy sluice
#

Hm

#

What should I do?

boreal ravine
#

replit uses shared IPs, so if someone gets ratelimited on an IP, everyone else gets ratelimited too (read 🧷's for more details )

dreamy sluice
#

oh

boreal ravine
dreamy sluice
#

so now, every single bot running on repl is ratelimited-

brisk brook
#

broo aiosqlite hurts my brain

boreal ravine
#

ok

brisk brook
#

i can't code a simple economy with aiosqlite bruh bruh

boreal ravine
#

whats hard?

dreamy sluice
boreal ravine
#

SQL is easy lol

flat solstice
# boreal ravine show error
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/discord/ext/commands/bot.py", line 606, in _load_from_module_spec
    spec.loader.exec_module(lib)
  File "<frozen importlib._bootstrap_external>", line 848, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/modmail/cogs/events.py", line 14, in <module>
    from .info import timestamps_av
ImportError: cannot import name 'timestamps_av' from 'cogs.info' (/home/modmail/cogs/info.py)

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

Traceback (most recent call last):
  File "/home/modmail/classes/bot.py", line 127, in start_bot
    self.load_extension(extension)
  File "/usr/local/lib/python3.8/dist-packages/discord/ext/commands/bot.py", line 678, in load_extension
    self._load_from_module_spec(spec, name)
  File "/usr/local/lib/python3.8/dist-packages/discord/ext/commands/bot.py", line 609, in _load_from_module_spec
    raise errors.ExtensionFailed(key, e) from e
discord.ext.commands.errors.ExtensionFailed: Extension 'cogs.events' raised an error: ImportError: cannot import name 'timestamps_av' from 'cogs.info' (/home/modmail/cogs/info.py)```and there's about a dozen more errors related to the bot then being unable to open the log file
boreal ravine
brisk brook
boreal ravine
#

it is-

brisk brook
#

it isn't for me

flat solstice
# boreal ravine is `timestamps_av` even a thing in the file?

yeppy async def timestamps_av(self, member, embed, avatar): embed.add_field(name = "Joined Server:", value = f"<t:{int(member.joined_at.timestamp())}:R>", inline = True) if avatar == True: embed.add_field(name = "Avatar", value = f"[PNG]({member.avatar_url_as(static_format='png')})", inline = True) embed.add_field(name = "Joined Discord:", value = f"<t:{int(member.created_at.timestamp())}:R>", inline = True)

boreal ravine
#

import the class first..

#
from .info import MyClass

MyClass().timestamps_av(...)
flat solstice
boreal ravine
#

just do ```py
from .info import Info

await Info().timestamps_av(...)

flat solstice
boreal ravine
#

👍

flat solstice
#

also do I need the from .info or would just from info work?

desert badger
vale wing
vale wing
brazen raft
flat solstice
desert badger
#

i have heard of pycord, is that good ?

brazen raft
#

I have heard PyCord is not as great as the other ones

desert badger
#

now theres the choice, disnake, pycord or nextcord lol

slate swan
#

someone can help?

flat solstice
#

I heard it's mostly pycords support server that let them down, their lib seems decent but I've heard support can be downright rude
which tbh I'm not that surprised about, d.py's support often came across as rude in my opinion and experience

slate swan
#
@bot.command()
async def off(ctx):
    ticket = client.get_channel(940743666014765138)
    embed=discord.Embed(title = "**השרת סגור לרגל תכנות ** `🛠️`", description = '**השרת יחזור בקרוב, תשארו מעודכנים !**' "\n" 'לכל בקשה או קבלת עזרה יש לפתוח טיקט: {ticket.mention} ')
    embed.set_thumbnail(url = ctx.guild.icon_url)
    embed.set_footer(text = f'{ctx.guild.name}', icon_url=ctx.guild.icon_url)
    await ctx.send(embed=embed)
vale wing
desert badger
#

ctx.guild.get_channel()

slate swan
#

why the ticket mention is not working?

vale wing
quick gust
vale wing
#

^ same

vale wing
desert badger
#

ill take a look into that !

brazen raft
flat solstice
slate swan
# vale wing How is `client` defined
@bot.command()
async def off(ctx):
    ticket = bot.get_channel(940743666014765138)
    embed=discord.Embed(title = "**השרת סגור לרגל תכנות ** `🛠️`", description = '**השרת יחזור בקרוב, תשארו מעודכנים !**' "\n" 'לכל בקשה או קבלת עזרה יש לפתוח טיקט: {ticket.mention} ')
    embed.set_thumbnail(url = ctx.guild.icon_url)
    embed.set_footer(text = f'{ctx.guild.name}', icon_url=ctx.guild.icon_url)
    await ctx.send(embed=embed)
#

now

brazen raft
#

Oh

vale wing
#

How is bot defined now

brazen raft
#

Is your bot variable named bot?

desert badger
#

wait how / where do i install disnake

vale wing
#
pip install disnake```
desert badger
#

oh

#

kek im dumb

#

hope my laptop isnt trolling me today, mostly installed packages dont get shown or i get errors like i dont have it lol

vale wing
#

You have such issues?

desert badger
#

example

vale wing
brazen raft
#

Is that replit

desert badger
pliant nacelle
vale wing
#

Vsc doesn't have issues with installing packages as far I am using it

desert badger
slim ibex
#

🗿

desert badger
#

it doesnt matter where i run it lol

brazen raft
#

Maybe you installed dependencies on another Python version

slate swan
#

Did you restart vsc?

desert badger
vale wing
brazen raft
slate swan
#

and download vsc's python extension to configure your interpreter

flat solstice
#

The discord bot space seems swamped with bots, anyone know a good usecase/genre for a bot that isn't as swamped?

desert badger
vale wing
#

It should print the packages you have installed

desert badger
heavy belfry
#

@bot.command(name="chop")
async def chop(ctx: commands.Context):
global chopping, wood
if Forest_card == 1:

    def get_wood():
        global wood
        global chopping
        wood += 1
        await ctx.send(f"\n you have now got {wood}")
        chopping = False

    if chopping:
        await ctx.send("chopping wood already, please wait!")
    else:
        chopping = True
        threading.Timer(180.0, get_wood).start()
        await ctx.send("In 3 minutes you will have 1 extra oak wood!")

this error comes up
SyntaxError: 'await' outside async function

any way i can fix this and still be able to type other commands during the 3 min wait?

vale wing
#

!pypi discord-py-slash-command

unkempt canyonBOT
brazen raft
#

Oh but type pip freeze in your Visual Studio Code terminal window

vale wing
#

@desert badger is py extension installed and the interpreter configured?

placid skiff
heavy belfry
#

ah xd, thanks missed that xd

desert badger
#

im dumb af

#

the extension is installed yes

pliant nacelle
vale wing
#

In the top left corner there should be something like "Python 3.8" or whatever version you have

desert badger
#

where can i find disnakes docs ?

placid skiff
vale wing
placid skiff
vale wing
#

Ok and you are not using venv right

desert badger
#

o

desert badger
placid skiff
vale wing
#

If you don't know that you are not using it that's for sure

#

In vsc it requires some operations to activate

placid skiff
vale wing
#

@desert badger do those packages import in IDLE

vale wing
placid skiff
#

what is the problem?

vale wing
#

Might be an issue with the package itself

desert badger
#

kill me

vale wing
#

Wth

desert badger
#

that shit happens to me since over 2 months

placid skiff
#

did you check if the interpreter that you are using is the local one?

desert badger
#

how do i check that

#

quick information about me: im dumb asfuck

heavy belfry
#

Enable tracemalloc to get the object allocation traceback
how do i enable this?

placid skiff
#

@vale wing do you know how to check the interpreter in VSCode?

vale wing
placid skiff
desert badger
#

this ?

vale wing
#

Yes

placid skiff
slate swan
#

its always shown in the bottom left corner

vale wing
#

Show us what options it has

desert badger
placid skiff
#

it is the local one D_D

desert badger
#

is that bad or sum

slate swan
#

How to unban a user by id?

placid skiff
heavy belfry
#

Enable tracemalloc to get the object allocation traceback
how do i enable this?

desert badger
#

external terminal? 😳

vale wing
#

@desert badger you can DM me in like 4 hours if you don't resolve that issue, I may try to help you with it by using remote access if you would like to

placid skiff
unkempt canyonBOT
#

Hey @flat solstice!

It looks like you tried to attach file type(s) that we do not allow (.log). We currently allow the following file types: .gif, .jpg, .jpeg, .mov, .mp4, .mpg, .png, .mp3, .wav, .ogg, .webm, .webp, .flac, .m4a, .csv, .json.

Feel free to ask in #community-meta if you think this is a mistake.

desert badger
vale wing
#

O

desert badger
vale wing
#

69kb looks sus

placid skiff
desert badger
#

its fucked

placid skiff
#

but back in 2010 xD

desert badger
#

btw it doesnt show

desert badger
placid skiff
heavy belfry
#

Enable tracemalloc to get the object allocation traceback
how do i enable this?

placid skiff
potent spear
vale wing
#

I am pretty much sure you can find that there

potent spear
desert badger
#

@placid skiff Successfully installed disnake-2.3.1

#

:)

vale wing
placid skiff
desert badger
potent spear
placid skiff
potent spear
desert badger
vale wing
#

Below it tells "something was never awaited"

heavy belfry
placid skiff
heavy belfry
vale wing
#

You don't really need the allocation traceback lol

potent spear
placid skiff
vale wing
#

Just look what is not awaited and await it @heavy belfry

desert badger
#

im restarting vsc

placid skiff
potent spear
vale wing
#

@desert badger do you have folders like Lib, Scripts

placid skiff
heavy belfry
# vale wing Just look what is not awaited and await it <@383351821365673995>

i have here is the code
async def chop(ctx: commands.Context):
global chopping, wood
if Forest_card == 1:

    async def get_wood():
        global wood
        global chopping
        wood += 1
        await ctx.send(f"\n you have now got {wood}")
        chopping = False

    if chopping:
        await ctx.send("chopping wood already, please wait!")
    else:
        chopping = True
        threading.Timer(180.0, get_wood).start()
        await ctx.send("In 3 minutes you will have 1 extra oak wood!")

elif Forest_card <= 0:
    await ctx.send("You have not unlocked this yet. Hint: buy a Forest pass in the shop")

it has a problem with the async def get_wood and that error apears

potent spear
vale wing
#

In your project root folder

heavy belfry
# placid skiff what error?

RuntimeWarning: coroutine 'chop.<locals>.get_wood' was never awaited
self.function(*self.args, **self.kwargs)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback

slate swan
#

How do I get a message by an ID in a slash command?

#

How to unban a user by id?

potent spear
placid skiff
vale wing
heavy belfry
#

ty, ill try it

slate swan
desert badger
#

@placid skiff LMAO RELOADING HELPED

slate swan
vale wing
#

Nice

desert badger
#

or ?

vale wing
#

Weird you had a venv there, like how

placid skiff
desert badger
#

"disnake" is not accessed

#

what does that mean

vale wing
#

Not used in code

slim ibex
#

You haven’t used it anywhere

desert badger
#

ahhhh

#

sorry for asking so much :(

slim ibex
#

all g

slate swan
potent spear
slim ibex
#

what lib @slate swan

slate swan
placid skiff
# desert badger ahhhh

python has 2 types of warning, the one you saw before was a critical warning, this one "not accessed" is a normal warning, depending on syntax, variable/package usage and so go on

vale wing
unkempt canyonBOT
#
Huh? No.

No documentation found for the requested symbol.

vale wing
#

Huh

#

It has that attribute I am pretty sure

slate swan
#

lemme check

potent spear
#

!d disnake.ApplicationCommandInteraction

unkempt canyonBOT
#

class disnake.ApplicationCommandInteraction```
Represents an interaction with an application command.

Current examples are slash commands, user commands and message commands.

New in version 2.1.
slim ibex
#

!d disnake.ext.commands.InteractionBot.get_message

unkempt canyonBOT
potent spear
slate swan
vale wing
#

I was using it just yesterday when writing a bot and it all showed up, certainly for guild although there's no guild in docs

placid skiff
vale wing
slate swan
slate swan
desert badger
slate swan
potent spear
vale wing
#

Mostly yes

placid skiff
placid skiff
desert badger
#

oooo

slate swan
#

@vale wing oh wow, thanks, I guess it'll work

placid skiff
# desert badger oooo

it has other features added and it is maintained, you will find them in the docs, and the docs is pretty the same as discord.py docs

placid skiff
desert badger
#

thank you :)

vale wing
desert badger
slim ibex
#

use bot not client

vale wing
#

Ok will python bot fetch code or nah

desert badger
vale wing
#

Ok it won't nvm

slim ibex
heavy belfry
desert badger
slim ibex
placid skiff
desert badger
desert badger
placid skiff
#

You should try it, 8 months are enough experience for doing it, on youtube you can find a good tutorial too if you feel that lost

placid skiff
heavy belfry
potent spear
slate swan
#
async def bm(self, inter: disnake.CommandInteraction, message_id: str):
        await inter.response.defer(ephemeral=True)
        message = await inter.channel.fetch_message(int(message_id))

it says unknown message everytime?

slate swan
#

The user is unbanned, but the embed is not displayed, why?

slim ibex
#

code

slate swan
#

@bot.command()
@commands.has_any_role(692760082085183519, 940008547993927691, 863878825376743475)
async def unban(ctx, member):
    banned_users = await ctx.guild.bans()
    for ban_entry in banned_users:
        user = ban_entry.user
        await ctx.guild.unban(user)
        emb=discord.Embed(title="Разбан пользователя", description="**__Информация:__**", color=discord.Color.from_rgb(0, 255, 0), timestamp=ctx.message.created_at)
        emb.set_footer(text="© Все права защищены The Greatest", icon_url=ctx.author.avatar_url)
        emb.add_field(name="**Участник:**", value=f"**{member.name}** ({member.mention})", inline=False)
        emb.add_field(name="**ID:**", value=f"**{member.id}**", inline=False)
        emb.add_field(name="**Разбанил:**", value=f"**{ctx.author.name}**", inline=False)
        await ctx.reply(embed=emb)
        return
slim ibex
#

ctx.send?

slate swan
#

Remove reply?

ebon island
#

replace reply

slim ibex
slate swan
#

Okay

ebon island
#

await ctx.send(embed=emb)

slate swan
#

Okaayy

ebon island
#

What is the purpose of the return at the end?

#

Do you pass this as a function to something else or just use it for the command route in discord?

#

If the latter you don't need a return

slate swan
#

hello i cant install pip files (python module)
error: can't open file 'C:\Users\aero\Desktop\Discord-Bot\install': [Errno 2] No such file or directory

#

help me please

slate swan
#

The same

slate swan
ebon island
#

What is it doing?

#

What is the error or behavior wzr?

slate swan
#

@slim ibex

slim ibex
#

?

hoary cargo
slate swan
hoary cargo
ebon island
#

Is any exception or error thrown?

civic obsidian
#

waht

slate swan
#

Help

quaint epoch
slate swan
hoary cargo
slate swan
#

oh wow, thanks

slate swan
hoary cargo
#

Howdy good

pliant nacelle
#

how to install asqlite module

slim ibex
#

pip install aiosqlite

slate swan
gilded gull
#
adamya = Image.open(r"C:\Users\prana\Documents\discord_bot\apple.jpg")

  if msg.startswith('!twerk'):
    await ctx.send(adamya)

umm how can i send the variable adamya???

hoary cargo
slate swan
gilded gull
#

could you tell the code?

slate swan
#

also

gilded gull
slate swan
#

wha..... smhh

gilded gull
#

and it didn't work

hoary cargo
slate swan
gilded gull
#

i mean how can i send that variable named "adamya"
in discord.py

gilded gull
slate swan
gilded gull
#

you mean send the whole code?

slate swan
#

!d disnake.abc.Messageable.send

unkempt canyonBOT
#
await send(content=None, *, tts=None, embed=None, embeds=None, file=None, files=None, stickers=None, delete_after=None, nonce=None, allowed_mentions=None, reference=None, ...)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).

Sends a message to the destination with the content given.

The content must be a type that can convert to a string through `str(content)`. If the content is set to `None` (the default), then the `embed` parameter must be provided.

To upload a single file, the `file` parameter should be used with a single [`File`](https://docs.disnake.dev/en/latest/api.html#disnake.File "disnake.File") object. To upload multiple files, the `files` parameter should be used with a [`list`](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.10)") of [`File`](https://docs.disnake.dev/en/latest/api.html#disnake.File "disnake.File") objects. **Specifying both parameters will lead to an exception**.

To upload a single embed, the `embed` parameter should be used with a single [`Embed`](https://docs.disnake.dev/en/latest/api.html#disnake.Embed "disnake.Embed") object. To upload multiple embeds, the `embeds` parameter should be used with a [`list`](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.10)") of [`Embed`](https://docs.disnake.dev/en/latest/api.html#disnake.Embed "disnake.Embed") objects. **Specifying both parameters will lead to an exception**.
slate swan
#

use the file parameter

gilded gull
#

ohhh

#

like
file=that variable name

slate swan
#

not variable

gilded gull
#

ohhh

#

thanks

#

but if you do like image.paste command

slate swan
flat solstice
#

So I have this command https://sourceb.in/GO6fRB56Uu which fetches the history of a channel for me to then iterate through to check for some key words (I use Mee6 for my logging but I want the moderation logs public so I'm making a script to repost them to a different channel). The command is definitely doing something bc I am getting print outs however it is not posting the embeds. i'm getting getting any error's so I'm thinking there is something wrong in py if all([ message.id not in checked_logs, message.author.id == 776782769312628746, # Checks if the message author is my log bot len(message.embeds) > 0, # checks if the mesage contains embeds ]):however I have just realised that Mee6 sends logs as webhooks, would I need to do something else to get a channels webhook messages?

hoary cargo
# slate swan imagine using the file parameter, welp

I don't see necessarily doing this with a discord bot tbh, maybe just when you modify the image like welcome embeds and such but most of the time not worth, because if you ever change the host you need to manually modify the paths too whyareyoulikethisdodge

slate swan
slate swan
gilded gull
#

for frustrating you

slate swan
hoary cargo
slate swan
hoary cargo
slate swan
honest vessel
slate swan
#

some can explain me how to mention room?

#

on embed

cold sonnet
#

use channel.mention

honest vessel
#

<&idofchannel> or something

honest vessel
#

No need for excuse ma'am

#

ma'am

pliant nacelle
slate swan
hoary cargo
slate swan
#

thats all I can say

hoary cargo
#

susFumo I can't see someone sane doing this without a reason

#

hmmmnotes I keep wondering
Why dyno and mee6 or other big bot don't have an option to display user banners because it's almost the same method as for avatars

heavy prawn
#

hey guys

#

hey guyshey guyshey guyshey guyshey guyshey guyshey guyshey guyshey guyshey guyshey guyshey guyshey guyshey guyshey guyshey guyshey guyshey guyshey guyshey guys

#

hey guyshey guyshey guyshey guyshey guyshey guyshey guyshey guyshey guyshey guyshey guyshey guyshey guyshey guyshey guyshey guyshey guyshey guyshey guyshey guys

slate swan
#

In the unban command I use {member .name} and when I unban the user, there is no embed, but the user is unbanned, why?

slow fog
mild harbor
#

how do add buttons like this to my bot

slate swan
#
@bot.command()
@commands.has_any_role(692760082085183519, 940008547993927691, 863878825376743475)
async def unban(ctx, member):
    banned_users = await ctx.guild.bans()
    for ban_entry in banned_users:
        user = ban_entry.user
        await ctx.guild.unban(user)
        emb=discord.Embed(title="Разбан пользователя", description="**__Информация:__**", color=discord.Color.from_rgb(0, 255, 0), timestamp=ctx.message.created_at)
        emb.set_footer(text="© Все права защищены The Greatest", icon_url=ctx.author.avatar_url)
        emb.add_field(name="**Нарушитель:**", value=f"**{member.name}** ({member.mention})", inline=False)
        emb.add_field(name="**Разбанил:**", value=f"**{ctx.author.name}**", inline=False)
        await ctx.send(embed=emb)
        return

@slate swan

hoary cargo
slate swan
#

Aa

#

One minute

slate swan
#

a fork is more considerable since discord.py is no longer developed

mild harbor
slate swan
#

you cant

mild harbor
#

oh...

slate swan
#

install the master branch, 2.0 has it

placid skiff
#

Fork are more recommended btw

mild harbor
#

bruh sorry im dumb

slate swan
#

pip install -U git+https://github.com/Rapptz/discord.py

placid skiff
#

through git

slate swan
#

I removed {member.mention}, but the embed is not displayed

mild harbor
slate swan
#

yea...

#

or just use a fork

mild harbor
#

oof ight thnx ig

placid skiff
#

as said forks are more recommended xD

#

d.py is really obsolete

slate swan
#

forks have slash commands too, which you may be obliged to use in future!!!

#

if your bot gets verified without message intents

mild harbor
#

speechless now tell me how do i use forks

placid skiff
#

a fork is a new package based on another one

#

so they works exactly as d.py

#

but are maintained and has other features

slate swan
#

choose one of the forks, disnake, pycord, nextcord are some famous ones ( ill suggest disnake)
replace discord with the fork's namespace

#

thats it

mild harbor
#

ohh but all my previous discord.py code will still run right

slate swan
#

yes, other than a few minor things which you need to change

#

like member.avatar_url is not member.avatar.url

mild harbor
#

alrit thnx Love

quick gust
placid skiff
#

like if your bot is this:

import discord

client = discord.ext.commands.Bot(prefix="a")
client.run(token)

with disnake it became:

import disnake

client = disnake.ext.commands.Bot(prefix="a")
client.run(token)
pliant nacelle
#

help

slate swan
placid skiff
slate swan
placid skiff
mild harbor
quick gust
#

if they're still running 1.7.3 there might be a bit more breaking changes tho

slate swan
pliant nacelle
placid skiff
slate swan
pliant nacelle
mild harbor
#

ahh got it thnx

pliant nacelle
placid skiff
slate swan
#

as that code is really bad at points

placid skiff
slate swan
#

he didnt, he just downloaded the code from github

placid skiff
#

LOL

pliant nacelle
placid skiff
#

bruh github is not stackoverflow

#

you can't trust everyone on there

#

😆

pliant nacelle
#

lol

quick gust
#

you cant trust everyone on stack overflow either

pliant nacelle
#

so that code isn't work

placid skiff