#discord-bots

1 messages · Page 829 of 1

slate swan
#

What extension are you using?

sacred reef
#

@slate swan tried it again

#

still doesnt work

#

i dont think you can run the thing more than twice from here idk

cold sonnet
#

where did tray1 come from

#

and why's there a number parameter if you don't use it

sacred reef
#

thats not the point, i want to make 2 multiple tasks

cold sonnet
#

and it's not undefined

sacred reef
#

but that doesnt seem to work

sacred reef
# cold sonnet and it's not undefined

thats not the issue like i said, your going over the real issue
I said i want to make 2 multiple tasks but that wont work
hikari&rin lover got me to do plant_growth.start() at the end of my task which made the 2 seperate tasks but returned RuntimeError: Task is already launched and is not completed.

cold sonnet
#

use create_task()?

slate swan
#

yeah so the idea wont always come out exactly like you wanted it to and btw discord had a api outage again

spring flax
#

What's the format?

sacred reef
#

i never saw create_task in the docs

#

unless thats a async version thing

slate swan
#

It belongs to asyncio

sacred reef
#

oh

slate swan
spring flax
slate swan
slate swan
cold sonnet
#

you use create_task() on bot.loop

kindred drum
#

hey!

@commands.command(name="check")
    async def check(self, ctx, type:str, id=None):
        if type in index:
            if type == "id":
                for i in range (0, len(Json_Items)):
                    for x in Json_Items[i]:
                        if int(x) == int(id):
                            print(Json_Items[i][x]['P Method'])
                            print(Json_Items[i][x]['P '])
                            print(Json_Items[i][x]['User IGN'])
                            print(Json_Items[i][x]['Discord_Name'])
                        else:
                            print("User not found")
                            

this prints "User not found" every time it doesn't find a user when the command is run, how do I make the loop only print this phrase once instead of doing it for every item in the json file which is not the user

spring flax
maiden fable
sacred reef
spring flax
#

On PC it embeds

blissful bone
cold sonnet
slate swan
#

discord flags github links now as files lmfao

spring flax
sacred reef
cold sonnet
#

you define that in the task itself?

maiden fable
#

!siurce

#

!source

unkempt canyonBOT
slate swan
#

just use the alias src lol

haughty quartz
#

how do i dm a member?

maiden fable
#

not for me

sacred reef
slate swan
haughty quartz
#

ah alr

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, mention_author=None, view=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://discordpy.readthedocs.io/en/master/api.html#discord.File "discord.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.9)") of [`File`](https://discordpy.readthedocs.io/en/master/api.html#discord.File "discord.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://discordpy.readthedocs.io/en/master/api.html#discord.Embed "discord.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.9)") of [`Embed`](https://discordpy.readthedocs.io/en/master/api.html#discord.Embed "discord.Embed") objects. **Specifying both parameters will lead to an exception**.
haughty quartz
#

thansk!

slate swan
#

python slow smh

cold sonnet
#

!d discord.ext.tasks.loop

unkempt canyonBOT
#

discord.ext.tasks.loop(*, seconds=..., minutes=..., hours=..., time=..., count=None, reconnect=True, loop=...)```
A decorator that schedules a task in the background for you with optional reconnect logic. The decorator returns a [`Loop`](https://discordpy.readthedocs.io/en/master/ext/tasks/index.html#discord.ext.tasks.Loop "discord.ext.tasks.Loop").
slate swan
sacred reef
#

appearently its a decorator

cold sonnet
#

yeah this is a decorator

#

bot.loop.create_task is a function

sacred reef
#

oh

cold sonnet
#

you pass your task in there

#

weird how it's not documented

sacred reef
#

so do i create the task and variable it then use it in tasks.loop(seconds=1,loop=task_variable)

#

like

task_variable = bot.create_task(plant_growth(args))
f = tasks.loop(seconds=1,loop=task_variable)

?

sacred reef
slate swan
#

from a class?

#

need context

tardy atlas
#

The command does not work and does not display an error in the console, why? the command worked a few days ago

cold sonnet
#

uh

#

that's a paradox

slate swan
#

just access the file

slate swan
cold sonnet
#

wait no I missed it

sacred reef
slate swan
cold sonnet
#

I thought he made a loop about a variable he made from the loop he just made

slate swan
#

lol

sacred reef
#
@tasks.loop(seconds=10.0)
async def plant_growth(self,ctx,trayid,number):

i put the params as args because that was a demonstration

cold sonnet
#

so what you wanna do is

tardy atlas
#

The command does not work and does not display an error in the console, why? the command worked a few days ago.

cold sonnet
#

var = bot.loop.create_task(plant_growth())

sacred reef
#

kk

cold sonnet
#

atleast big github music bot maker said this

slate swan
#

reinstall dpy

#

its having an internal error

cold sonnet
sacred reef
sacred reef
#

is that all

cold sonnet
#

what's args there

sacred reef
#

self, ctx, trayid, number

cold sonnet
#

you gotta pass something to that

sacred reef
#

did so

cold sonnet
#

I don't think you can patch out args like that tho thonk

sacred reef
#

let me see

slate swan
#

vars smh

tardy atlas
#

Help me please.The command does not work and does not display an error in the console, why? the command worked a few days ago

sacred reef
#

and if i wanna stop it or interval it i use

task_ = tasks.loop(seconds=10,loop=var)
cold sonnet
#

fuck wrong guy

sacred reef
#

and then do task_stop

scarlet aurora
#

async def choice(): how do i call this choice function?

slate swan
#

as i said its an internal error

#

reinstall dpy

sacred reef
#

so i just do

#

var.stop() ig

cold sonnet
#

I guess so too

sacred reef
#

well that was easy and it took me 3 hours to figure that out

cold sonnet
#

but your decorator takes count for your interval

scarlet aurora
#

async def choice(): how do i call this functikon

slate swan
#
pip uninstall discord

and then

pip install discord.py
sacred reef
#

so i had to use that for my interval?

slate swan
#

no

cold sonnet
#

you don't have to, you can...

sacred reef
#

right

slate swan
#

the wrapper has nothing to do with your api auth token

sacred reef
#

or using whatever it says in the docs

sacred reef
tardy atlas
#

@cold sonnet

@bot.event
async def on_member_update(before, after):
    entry = list(await after.guild.audit_logs(limit=1).flatten())[0]
    user = entry.user
    if after.bot:
        return 
    if before.display_name != after.display_name:
        channel = bot.get_channel(935160414965211179)
        emb=discord.Embed(title="Изменение ника", description="**__Информация:__**", color=discord.Color.from_rgb(255, 128, 0))  
        emb.set_footer(text="© Все права защищены The Greatest", icon_url=before.avatar_url)
        emb.set_thumbnail(url = before.avatar_url)
        emb.add_field(name="**Пользователь ника:**", value=f"**{before.name}**", inline=False)
        emb.add_field(name="**Ник до Изменений:**", value=f"`{before.display_name}`", inline=False)
        emb.add_field(name="**Ник после Изменений:**", value=f"`{after.display_name}`", inline=False)
        emb.add_field(name="**Сменил:**", value=f"**{user}**", inline=False)
        await channel.send(embed=emb) 
#

Command doesnt work

cold sonnet
#

that's not a command either

slate swan
#

just say you need to change the bots token to your actual token

cold sonnet
#

what doesn't work on your event?

#

Glacier

slate swan
#

you need intents if it doesnt work at all

cold sonnet
slate swan
#

!intents

unkempt canyonBOT
#

Using intents in discord.py

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

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

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

from discord import Intents
from discord.ext import commands

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

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

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

sacred reef
cold sonnet
#

if it exists

slate swan
#

you said after you reinstall dpy which makes it look like the wrapper logs your token or something

sacred reef
#

it does

cold sonnet
#

then sure

sacred reef
#

ok thanks

slate swan
#

lol

tardy atlas
sacred reef
cold sonnet
#

yes

sacred reef
#

epic

cold sonnet
#

maybe on discord

#

or you updated dpy

slate swan
#

!traceback

unkempt canyonBOT
#

Please provide the full traceback for your exception in order to help us identify your issue.
While the last line of the error message tells us what kind of error you got,
the full traceback will tell us which line, and other critical information to solve your problem.
Please avoid screenshots so we can copy and paste parts of the message.

A full traceback could look like:

Traceback (most recent call last):
  File "my_file.py", line 5, in <module>
    add_three("6")
  File "my_file.py", line 2, in add_three
    a = num + 3
TypeError: can only concatenate str (not "int") to str

If the traceback is long, use our pastebin.

cold sonnet
#

-it does not give errors
-traceback

slate swan
#

lolllll

hoary cargo
cold sonnet
#

you could've atleast said maybe you made an error handler

slate swan
#

have youve been listening to me??????????

slate swan
#

NOT LIKE IM EXPERIENCED WITH THE LIB

cold sonnet
#

definitely not

slate swan
#

😠

cold sonnet
#

noob

hoary cargo
#

pip install disnake

slate swan
cold sonnet
#

noob

slate swan
cold sonnet
#

did you make an error handler?

slate swan
#

do you have intents

cold sonnet
slate swan
slate swan
cold sonnet
#

!d discord.on_error

unkempt canyonBOT
#

discord.on_error(event, *args, **kwargs)```
Usually when an event raises an uncaught exception, a traceback is printed to stderr and the exception is ignored. If you want to change this behaviour and handle the exception for whatever reason yourself, this event can be overridden. Which, when done, will suppress the default action of printing the traceback.

The information of the exception raised and the exception itself can be retrieved with a standard call to [`sys.exc_info()`](https://docs.python.org/3/library/sys.html#sys.exc_info "(in Python v3.9)").

If you want exception to propagate out of the [`Client`](https://discordpy.readthedocs.io/en/master/api.html#discord.Client "discord.Client") class you can define an `on_error` handler consisting of a single empty [raise statement](https://docs.python.org/3/reference/simple_stmts.html#raise "(in Python v3.9)"). Exceptions raised by `on_error` will not be handled in any way by [`Client`](https://discordpy.readthedocs.io/en/master/api.html#discord.Client "discord.Client").
sacred reef
#

@cold sonnet this day keeps on getting better '_asyncio.Task' object has no attribute 'change_interval'

cold sonnet
#

jokes on u homie, again

slate swan
slate swan
#

i thought you mean a custom error handler🏃

sacred reef
#

pretty sure change_interval is a non-asyncio thing so it doesnt know what that is

cold sonnet
#

change_interval is for discord's tasks

tardy atlas
sacred reef
#

yes and you told me to do something like var.change_interval()

#

for the new task i created

slate swan
#
pip install disnake
cold sonnet
#

oh cuz create_task made it an asyncio task

slate swan
#

do that

sacred reef
#
       var = self.bot.loop.create_task(plant_growth(self, ctx, trayid, number))
       var.change_interval(seconds=10.0)
slate swan
#

how did it not work

cold sonnet
sacred reef
#

k

cold sonnet
#

yo bee you won't believe it

sacred reef
#

?

cold sonnet
slate swan
#

show

#

it probably says the same error since youre running it with dpy

#

just replace everything with disnake since its a fork of dpy

sacred reef
#

huh.

#

do i put that in the loop function im guessing

slate swan
#

it probably will

cold sonnet
sacred reef
#

well sure

naive spoke
#

how do you do random thing like you give multiple things and it give 1 randomly each time you use the command

slate swan
#

you can use .choice

naive spoke
hoary cargo
#

MultiHmm a module

slate swan
#

so .choice which gets a random element from a list randint which gets a random int from a given range

#

etc

pliant gulch
#

You can also gives random.choice a list of weights

#

Useful for some stuff

slate swan
#

mr.andypithink

pliant gulch
#

!e ```py
import random

for _ in range(4):
print(random.choice(["foo", "bar"], weight=[100, 0]))

unkempt canyonBOT
#

@pliant gulch :x: Your eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 4, in <module>
003 | TypeError: Random.choice() got an unexpected keyword argument 'weight'
slate swan
#

like chances?

pliant gulch
#

OK holdon let me look at it again

sacred reef
slate swan
#

to have an off chance

sacred reef
#

it doesnt repeat, i put the change interval at the start of the code

dry kelp
sacred reef
#

10 seconds to be exact but it doesnt seem to run after its first been ran

tardy atlas
#

Help me please.The command does not work and does not display an error in the console, why? the command worked a few days ago!

slate swan
#

andy

pliant gulch
#

!e ```py
import random
print(random.choices(["foo", "bar"], weights=[100, 0]))

unkempt canyonBOT
#

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

['foo']
slate swan
#

bro.

pliant gulch
#

There we go

slate swan
#

so chances as said

pliant gulch
#

But yea, in here foo is always chosen

slate swan
#

yes chances

#

for each argument youre given it a chance?

cold sonnet
#

@slate swan

pliant gulch
#

For each element in the sequence I give at the first argument

slate swan
#

which if set by default it should all be equal

cold sonnet
#

you know much about asyncio tasks don't you, homie

slate swan
#

uh maybe

pliant gulch
#

create_task doesn't loop over

#

create_task makes a new asyncio.Task

cold sonnet
#

andy does

pliant gulch
#

You'd use it for running coroutines or whatever

slate swan
#

yes andy does

pliant gulch
#

You want to actually use the exts.loop from discord.py

slate swan
#

andy probably uses Trio

pliant gulch
#

Trio?

slate swan
#

thats how cool he is

slate swan
#

the async and concurrency module?

pliant gulch
#

Oh, you're talking abut that library

sacred reef
slate swan
pliant gulch
#

It will get you through the basics

cold sonnet
#

and there he's getting sent to the docs already

sacred reef
#

i know how tasks work, well the basics. what i want to do is create multiple tasks, like only 2 at a time

pliant gulch
unkempt canyonBOT
#

Pasting large amounts of code

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

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

pliant gulch
#

You are using asyncio.AbstractEventLoop.create_task

slate swan
#

no one will click a random url

sacred reef
pliant gulch
#

Then just use the discord.py's task framework, if you want to create multiple just create another task

#

You can have N amount of tasks, you just need to use the framework

sacred reef
#

thats the problem, it wont let me create another task

pliant gulch
#

You're gonna need to show the code you had trouble with

#

It shouldn't be blocking you from creating the second task

slate swan
#

@pliant gulch so are you gonna accept novas core pr🏃

naive spoke
#

for the random module can i do rand = (randit(<emoji>,<emoji>))

pliant gulch
#

what core pr

sacred reef
#
plant_growth(self, ctx, trayid, number) #params already defined
@tasks.loop(seconds=10.0)
async def plant_growth(self,ctx,trayid,number):
slate swan
sacred reef
#

wait

slate swan
#

the rin pfp confused me

sacred reef
#

i forgot to put start real quick

slate swan
#

lol

#

I disapprove this rewrite 👁️👁️

sacred reef
#

@pliant gulch Task is already launched and is not completed.

pliant gulch
#

You seem to have started it else where already

#

Perhaps it was the call you did earlier?

sacred reef
#

yes, im trying to multi task that very task

#

using a function that'll start it

pliant gulch
#

Not sure exactly what you mean, but do keep in mind, plant_growth isn't a function anymore. It's a dicord.ext.tasks.Loop

#

Why are you calling it, E.g plant_growth(...)?

sacred reef
#

hydrotray() is the function that calls the plant_growth

sacred reef
pliant gulch
#

Yes, but it isn't a function anymore

naive spoke
#

for the random module can i do rand = (randit(<emoji>,<emoji>))

pliant gulch
#

the decorator makes the plant_growth into a Loop instance

naive spoke
#

so it chooses random emoji

sacred reef
pliant gulch
#

And Loop implemenets __call__ but as a coroutine. Your call is just gonna create a coroutine object

sacred reef
#

its not that important other than to check a few things, and to start the loop

#

so whats the best thing for me to do?

pliant gulch
#

The context here is pretty important

#

I'm not you, I can't see your code unless you send it

tardy atlas
#

Will Somebody help me?

sacred reef
#

i know that but its really not that important other to check if the bot has a random seed generated, which it plants (starts the loop) but ok

tardy atlas
#

Help me.The command does not work and does not display an error in the console, why? the command worked a few days ago

sacred reef
#
async def hydrotray(self, ctx,number,trayid):
    if plt.endswith("Plant"):
      try:
       plant_growth.start(self, ctx, trayid, number)
      except Exception as e:
        await ctx.send(f"ERROR: {e}")
    else:
      return
pliant gulch
#

How many times is hydrotray presumed to be called?

#

As you know, are you mentioned earlier this runs after a user runs a command

#

I think, at least. But you never stop the loop afterwards

sacred reef
#

once per the command is runned

pliant gulch
#

So if the user ran the command twice, it would attempt to run the loop twice

#

You can see the issue there perhaps

sacred reef
tardy atlas
#

Then help me with it.
Not working

@bot.event
async def on_member_update(before, after):
    channel = bot.get_channel(942917598079762492)
    if before.display_name != after.display_name:
        await channel.send("nickname edit")
        print("work") 
pliant gulch
#

Yea, but you need to gracefully stop the loop first, then you may run it again

#

Is there a reason you need to overlap the loops?

sacred reef
#

yes because i got 4 trays for the users to experiment with

cold sonnet
#

maybe if it's for multiple guilds

sacred reef
#

1 tray for per user usually

cold sonnet
pliant gulch
#

It doesn't make sense to use multiple loops here

#

You should just have one genesis loop, which starts at the beginning, then making the command append a data to a mutable object inside of the task, which then checks it

#

E,g a dictionary, then having the commands append new data to the dictionary, then when the interval comes around you read it, parse it, etc

slate swan
pliant gulch
#

It would be a lot easier, and safer then what you are trying to do

sacred reef
#

thats what i tried to do but my brain started to suffer from brain failure and i backtracked alot

pliant gulch
#

As the behaviour your gonna get is pretty much undefined

sacred reef
#

mk

slate swan
tardy atlas
#

Ok

tardy atlas
slate swan
tardy atlas
slate swan
#

nvm it probably does

#

if it worked before

slate swan
tardy atlas
#

As here?

@bot.event
async def on_member_update(before, after):
    channel = bot.get_channel(942917598079762492)
    if before.display_name != after.display_name:
        await channel.send("nickname edit")
        print("work") 
slate swan
#

no rn its inside of an if statement just on the start of it

#

so no matter the condition it will get triggered

slate swan
#

at which step

#

then why

#

just do a few prints in between steps

#

to check from where it stops working

tardy atlas
#

Ok

#

Thank,i will try now

#

If problem will be solved.Then thank very much.

royal jasper
#

how can i check if a member created discord account at least 7 days ago (using if else estructure)

slate swan
#

docs for disnake looking crispy since menudocs collab

#

whats the exception that gets raised when a bot cant dm a user forbidden or a http?

tardy atlas
pliant gulch
slate swan
#

then youre missing intents

slate swan
slate swan
pliant gulch
#

Technically speaking yes

#

But in DMs that are off it's Forbidden

slate swan
slate swan
slate swan
tardy atlas
#

Ok

pliant gulch
slate swan
# tardy atlas Between what steps?
@bot.event
async def on_member_update(before, after):
    print("shite 1")
    channel = bot.get_channel(942917598079762492)
    if before.display_name != after.display_name:
        print("shite 2")
        await channel.send("nickname edit")
        print("work") 


something like that

tardy atlas
#

Ok,Im going to try now

slate swan
#

show tb

cerulean olive
#

[!] shanghai bot initialized | version: 2.0
> Guilds: 1

Ignoring exception in on_message
Traceback (most recent call last):
  File "C:\Users\jackr\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\ext\commands\core.py", line 690, in _parse_arguments
    next(iterator)
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\jackr\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\client.py", line 343, in _run_event
    await coro(*args, **kwargs)
  File "fear.py", line 85, in on_message
    await client.process_commands(message)
  File "C:\Users\jackr\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\ext\commands\bot.py", line 976, in process_commands
    await self.invoke(ctx)
  File "C:\Users\jackr\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\ext\commands\bot.py", line 939, in invoke
    await ctx.command.invoke(ctx)
  File "C:\Users\jackr\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\ext\commands\core.py", line 855, in invoke
    await self.prepare(ctx)
  File "C:\Users\jackr\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\ext\commands\core.py", line 789, in prepare
    await self._parse_arguments(ctx)
  File "C:\Users\jackr\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\ext\commands\core.py", line 693, in _parse_arguments
    raise discord.ClientException(fmt.format(self))
discord.errors.ClientException: Callback for about command is missing "ctx" parameter.

tardy atlas
slate swan
#

?

pliant gulch
tardy atlas
#

Ok

tardy atlas
slate swan
tardy atlas
pliant gulch
#

intents

slate swan
#

...

tardy atlas
#

Console does output.{'guilds': True, 'members': True, 'bans': True, 'emojis': True, 'integrations': True, 'webhooks': True, 'invites': True, 'voice_states': True, 'presences': False, 'guild_messages': True, 'dm_messages': True, 'guild_reactions': True, 'dm_reactions': True, 'guild_typing': True, 'dm_typing': True}

#

What is it?What i am doing wrong?

pliant gulch
#

Can you show the spot where you added the on_member_update event? Like where it is in the code

tardy atlas
#

Wait

#
@bot.event
async def on_member_update(before, after):
    print("B 1")
    channel = bot.get_channel(942917598079762492)
    entry = list(await after.guild.audit_logs(limit=1).flatten())[0]
    user = entry.user
    if before.display_name != after.display_name:
        print("B 2")
        await channel.send("nickname Edit")
        print("work")
pliant gulch
#

I mean where it is in the code

tardy atlas
#

Ok

slim ibex
tardy atlas
#

It looks like it's starting to work.

#

Thank

pine crypt
#

When running paginator how do you tell it how many commands per page you want?

final iron
pine crypt
final iron
#

helpEmbed should be in snake_case

#

camelCase should never be used in python

pine crypt
#

why

final iron
#

PEP8

pine crypt
#

okay

pine crypt
hoary cargo
# final iron PEP8

pepeannoyed pep8 is just a style guide, improves readability, it's not something holy, but still recommended to follow if it improves your code readability

slim ibex
#

in Python terms

#

follow it or else

#

you will be hunted down

trim barn
#

Can the discord bot reply to a message with an embed?

pine crypt
#

How would you use paginator to split commands into groups of 6, each command having a field in an embed. This embed is appended to embeds which paginator will automate.

final iron
#

helpEmbed

#

💀

pine crypt
#

I changed it the screenshot is from before

pine crypt
final iron
#

It does help

final iron
unkempt canyonBOT
#

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

A shortcut method to [`abc.Messageable.send()`](https://discordpy.readthedocs.io/en/master/api.html#discord.abc.Messageable.send "discord.abc.Messageable.send") to reply to the [`Message`](https://discordpy.readthedocs.io/en/master/api.html#discord.Message "discord.Message").

New in version 1.6.
boreal ravine
#

you can use discord-ext-pages to do that

trim barn
final iron
#

await reply(embed=your_embed_variable_here)

trim barn
#

k

#

I tried

#

wait did I/

#

alright whatever, it's not necessary but I will need it in the future

pine crypt
boreal ravine
#

ok

#

then use the paginator you have right now

#

make it split stuff every 6 items/commands)

pine crypt
#

is this of any use for me?

boreal ravine
#

idk

cedar stream
boreal ravine
pine crypt
#

how would i do that? append to a different list in groups of 6?

cedar stream
#

Are you making a help command?

pine crypt
#

yes

cloud dawn
#

!d disnake.ext.commands.Command.help

unkempt canyonBOT
cedar stream
#

Ty panda

#

@pine crypt subclass this

cloud dawn
#

!d disnake.ext.commands.MinimalHelpCommand preferably use this though since .help is a kwarg of commands

unkempt canyonBOT
#

class disnake.ext.commands.MinimalHelpCommand(*args, **kwargs)```
An implementation of a help command with minimal output.

This inherits from [`HelpCommand`](https://docs.disnake.dev/en/latest/ext/commands/api.html#disnake.ext.commands.HelpCommand "disnake.ext.commands.HelpCommand").
boreal ravine
#

why disnake

cloud dawn
#

!d disnake.ext.commands.DefaultHelpCommand you can also use this if you only want to add pagination

unkempt canyonBOT
#

class disnake.ext.commands.DefaultHelpCommand(*args, **kwargs)```
The implementation of the default help command.

This inherits from [`HelpCommand`](https://docs.disnake.dev/en/latest/ext/commands/api.html#disnake.ext.commands.HelpCommand "disnake.ext.commands.HelpCommand").

It extends it with the following attributes.
cedar stream
#

Subclass HelpCommand class

boreal ravine
pine crypt
#

I dont use disnake what is it?

cedar stream
cloud dawn
cedar stream
#

Dont bother

boreal ravine
cloud dawn
#

Disnake is currently along with nextcord the best maintained fork of discord.py

pine crypt
#

Do I have to go learn disnake because I want my command to be as simple as possible

cedar stream
#

Also It’ s a fork

boreal ravine
#

ffs use the correct documentation

cedar stream
#

So It’ s almost the same

cedar stream
boreal ravine
#

use the proper documentation

#

stop misleading people

cedar stream
#

Dw they know now

cloud dawn
#

He/she hasn't even told us what library their using.

cedar stream
#

It’ s all good

pine crypt
#

Hmm?

pine crypt
#

ye

cedar stream
# pine crypt Hmm?

Just make a class that inherits from HelpCommand class and help urself with the docs to make ur own help command

sick birch
cedar stream
#

Wdym

trim barn
#

Does anyone know why I no longer receive error messages to my logs in pycharm>

#

so I can't see the error

#

like only when a command fails

cedar stream
trim barn
#

lemme see if thats the issue

cedar stream
pine crypt
cedar stream
#

What I told u to do works with both

pine crypt
#

Imma go watch yt tutorials

slate swan
cloud dawn
slim ibex
boreal ravine
slim ibex
#

^

slate swan
cedar stream
cloud dawn
boreal ravine
#

Yes

cloud dawn
cedar stream
slate swan
cloud dawn
slate swan
cloud dawn
#

:3

slate swan
cedar stream
#

Dpy tutorials on YouTube makes me gotta shit

pine crypt
#

how would you split groups of commands into 6

slate swan
#

whos making you not

cedar stream
slate swan
cloud dawn
cedar stream
#

Ok but it aint dpy related

#

It’ s just python

pine crypt
#

ok

cloud dawn
unkempt canyonBOT
#

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

[(0, 1, 2, 3, 4, 5), (6, 7, 8, 9, 10, 11), (12, 13, 14, 15, 16, 17), (18, 19, 20, 21, 22, 23), (24, 25, 26, 27, 28, 29), (30, 31, 32, 33, 34, 35), (36, 37, 38, 39, 40, 41), (42, 43, 44, 45, 46, 47), (48, 49, 50, 51, 52, 53), (54, 55, 56, 57, 58, 59), (60, 61, 62, 63, 64, 65), (66, 67, 68, 69, 70, 71), (72, 73, 74, 75, 76, 77), (78, 79, 80, 81, 82, 83), (84, 85, 86, 87, 88, 89), (90, 91, 92, 93, 94, 95)]
pine crypt
cloud dawn
#

But as long as it is iterable i don't see why not

slate swan
torn sail
#

button.callback=button_callback may be what you mean

cloud dawn
unkempt canyonBOT
#

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

[(0,), (1,), (2,), (3,), (4,), (5,), (6,), (7,), (8,), (9,), (10,), (11,), (12,), (13,), (14,), (15,), (16,), (17,), (18,), (19,), (20,), (21,), (22,), (23,), (24,), (25,), (26,), (27,), (28,), (29,), (30,), (31,), (32,), (33,), (34,), (35,), (36,), (37,), (38,), (39,), (40,), (41,), (42,), (43,), (44,), (45,), (46,), (47,), (48,), (49,), (50,), (51,), (52,), (53,), (54,), (55,), (56,), (57,), (58,), (59,), (60,), (61,), (62,), (63,), (64,), (65,), (66,), (67,), (68,), (69,), (70,), (71,), (72,), (73,), (74,), (75,), (76,), (77,), (78,), (79,), (80,), (81,), (82,), (83,), (84,), (85,), (86,), (87,), (88,), (89,), (90,), (91,), (92,), (93,), (94,), (95,), (96,), (97,), (98,), (99,)]
slate swan
#

hi i wanted to create some kind of users private channel but text channel is there a way to allow them to add members to this channel but to not allow them break anything
and i dont know what permission it would be if thats possible

cloud dawn
#

It creates an iter object that gets unpacked then packed into * x

slate swan
#

you need channel name

torn sail
#

you should be able to fix that.

slate swan
unkempt canyonBOT
#

@slate swan :white_check_mark: Your eval job has completed with return code 0.

0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99
slate swan
#

thats better for () tho

#

which putting each int in () seems cool

torn sail
#

!d discord.Interaction.user

unkempt canyonBOT
pliant gulch
unkempt canyonBOT
#

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

0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99
pliant gulch
#

A faster way of doing what you did

torn sail
#

show code

slate swan
slate swan
torn sail
#

no button_callback takes the argument interaction. then use interaction.user

slate swan
pliant gulch
slate swan
#

thats really good

pliant gulch
slate swan
#

1.03s of difference

slate swan
storm fable
#

Yo guys!
I want to include a font. I've done this like that. The font-file is in the same dir as the bot but I want to access to the file if it is in a fonts folder. How I have to change that?

pliant gulch
slate swan
pliant gulch
#

List comp and map are usually around the same speed, it depends on what you are using as the function in map that determines the speed other than the element amount

torn sail
#

so in interaction.guild.create_text_channel make the the first and only arg interaction.user

pliant gulch
#

If it was a lambda I'm sure the list comp would've been faster in this case

#

But since we can construct a str via str it would be faster

slate swan
#

thats cool

torn sail
#

so you get the user object with interaction.user. YOu pass that as the argument for interaction.guild.create_text_channel so it would be await interaction.guild.create_text_channel(interaction.user)

#

oh maybe try interaction.user.name

cloud dawn
#

You can't put objects in a file

torn sail
#

add interaction.user.discriminator

#

add what i just showd to the name

#

name + discrim

visual island
#

str(member)

#

returns name#discrim

torn sail
#

or what xCirno said

#

i forgot abt that

visual island
#

no

#

str(interaction.user)

#

what do you mean by "didn't work"

#

I said str(interaction.user)

torn sail
#

I don’t see the str()

visual island
#

put it inside the await interaction.guild.create_text_channel()

torn sail
#

With interaction.user inside the brackets for str

left crater
#

how do i handle a timeout error

#
        await ctx.send("stuff")``` i tried this but it doesnt work
naive spoke
#

what does async def mean

oblique laurel
naive spoke
#

ok

final iron
left crater
#

oh

#

still doesnt work mate

final iron
#

It should work

#

Can we see your code?

left crater
#

i mean

#

i can send in dms

#

its an rps command

#
Traceback (most recent call last):
  File "C:\Python310\lib\asyncio\tasks.py", line 456, in wait_for
    return fut.result()
asyncio.exceptions.CancelledError

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

Traceback (most recent call last):
  File "C:\Users\nikit\PycharmProjects\test\venv\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "C:\Users\nikit\PycharmProjects\test\main.py", line 481, in rpsco
    msg = await bot.wait_for("message", check=check, timeout=5)
  File "C:\Python310\lib\asyncio\tasks.py", line 458, in wait_for
    raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError

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

Traceback (most recent call last):
  File "C:\Users\nikit\PycharmProjects\test\venv\lib\site-packages\discord\ext\commands\bot.py", line 939, in invoke
    await ctx.command.invoke(ctx)
  File "C:\Users\nikit\PycharmProjects\test\venv\lib\site-packages\discord\ext\commands\core.py", line 863, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "C:\Users\nikit\PycharmProjects\test\venv\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: TimeoutError: 
```gives me this
naive spoke
#

hello im trying to make a random emoji command and i get this error saying discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: can only concatenate str (not "list") to str and i dont know what to add or remove
here's my code

rand = [':smile:', ':smiley:', ':grinning:']
@client.command(name= 'mood')
async def mood(ctx: commands.Context):
    await ctx.send("your emoji is ".format(random.choice(rand)))
left crater
#
async def mood(ctx):
    rand = ["emoji1", "emoji2", "emoji3"]
    randemj = random.choice(rand)
    await ctx.send(f'your emoji is {randemj}')```
#

you can do it like this

#

just replace bot with client

#

@naive spoke

naive spoke
#

oh ty

slate swan
left crater
#

its the same thing really

naive spoke
#

um

#

i still get the error

#

discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: can only concatenate str (not "list") to str

left crater
#

hmm

#

which IDE are u using

slate swan
left crater
hoary cargo
#

pepeannoyed why people use .format stuff when f strings exist

pliant gulch
#

It could be useful in applications where otherwise f-strings wouldn't work

#

Imagine having placeholder text and formatting that

oblique laurel
pliant gulch
#

E,g a on member join message that the user can set

#

You wouldn't use f-strings for that, rather keep it as a regular string and call .format

hoary cargo
#

You have a point but still, most of the times you would want to use f string over format and in his case is not really necessary .format

pliant gulch
#

Sure, most cases you can use f-strings but in your message you asked why people still use .format when f-strings exist

#

I agree on that part, that you wouldn't really use .format often

#

Although it does keep backwards compatibility as well for older version of python

oblique laurel
#

O

slate swan
#

”" arent the same thing

#

and your code isnt following pep 8

oblique laurel
#

!e say you had this

user = "Anonymous4045"
message = "lol"
#you wouldnt do
print(f"Message from {user}!/n{user} said; {message}")
#instead, you would do
print("Message from {0}!/n{0} said {1}".format(user, message))
unkempt canyonBOT
#

@oblique laurel :white_check_mark: Your eval job has completed with return code 0.

001 | Message from Anonymous4045!/nAnonymous4045 said; lol
002 | Message from Anonymous4045!/nAnonymous4045 said lol
slate swan
#

not following pep8

oblique laurel
#

And i used / not \ lol

#

Idc, u get my point

slate swan
#

atleast make code that follows pep8

oblique laurel
#

I dont see how that’s relevant lol

slate swan
oblique laurel
#

I question why the frick u care man lol

slate swan
#

pep8 is a code guide which every developer should follow if you dont, dont think youll get a job or will succeed

oblique laurel
#

👍

slate swan
#

youll get bullied for it and allot

oblique laurel
#

print ("got it")

slate swan
#

most devs do care about it @final iron aka my friend here

hoary cargo
oblique laurel
slate swan
#

pain isnt it?

oblique laurel
#

But the var also could be smth like guild.fetch_member(id).roles or smth long

hoary cargo
pliant gulch
#

A good case would be templating

slate swan
#

that aswell i forgot about that

#

andy whats the ms difference?

slate swan
#

its quicker

pliant gulch
#

!e ```py
placeholder = "Hello {0}, welcome to {1}"

def fmt(name: str, place: str) -> str:
return placeholder.format(name, place)

print(fmt("Andy", "Home"))

unkempt canyonBOT
#

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

Hello Andy, welcome to Home
pliant gulch
#

Now this, would be a good example

#

Or, a good use-case

oblique laurel
#

By like how much tho lol. Doubt its very significant for smth like this

slate swan
#

most companies do care about ms differences

oblique laurel
#

This is abt discord bots fam lol

slate swan
#

and?

hoary cargo
#

Doesn't mean you shouldn't be aware of stuff like this

oblique laurel
#

U seem to rlly like that word ngl

slate swan
#

your point is irrelevant just saying

pliant gulch
#

The difference in time is huge actually

slate swan
#

send it

pliant gulch
#

In [3]: name = "Andy"

In [4]: place = "Home"

In [5]: def func() -> None:
   ...:     return f"Hello {name}! welcome to {place}"

In [6]: placeholder = "Hello {0}! welcome to {1}"

In [7]: def func2() -> None:
   ...:     return placeholder.format(name, place)

In [8]: %timeit func()
81.9 ns ± 1.05 ns per loop (mean ± std. dev. of 7 runs, 10,000,000 loops each)

In [9]: %timeit func2()
206 ns ± 4.38 ns per loop (mean ± std. dev. of 7 runs, 1,000,000 loops each)
slate swan
#

JEEZ

#

about like 3 seconds

pliant gulch
#

125 nanosecond difference

slate swan
oblique laurel
#

Doesnt seem like much lol

pliant gulch
#

I'm looking at the total to the very left

slate swan
slate swan
#

🏃

cinder quiver
#

does anyone here have a discord bot that does auto-roles

candid maple
#

hmm

hoary cargo
#

Right here .

candid maple
#

!e

unkempt canyonBOT
#
Command Help

!eval [code]
Can also use: e

*Run Python code and get the results.

This command supports multiple lines of code, including code wrapped inside a formatted code block. Code can be re-evaluated by editing the original message within 10 seconds and clicking the reaction that subsequently appears.

We've done our best to make this sandboxed, but do let us know if you manage to find an issue with it!*

cinder quiver
slate swan
#

no

candid maple
#

@hoary cargo why i cant get it

hoary cargo
#

Get what

slate swan
unkempt canyonBOT
#

@slate swan :white_check_mark: Your eval job has completed with return code 0.

what
candid maple
#

oh

slim ibex
#

🗿

candid maple
#

ok

#

!e bot

unkempt canyonBOT
#

@candid maple :x: Your eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 1, in <module>
003 | NameError: name 'bot' is not defined
slate swan
#

!e

print("hi binds")
unkempt canyonBOT
#

@slate swan :white_check_mark: Your eval job has completed with return code 0.

hi binds
slate swan
candid maple
#

!e

unkempt canyonBOT
#
Command Help

!eval [code]
Can also use: e

*Run Python code and get the results.

This command supports multiple lines of code, including code wrapped inside a formatted code block. Code can be re-evaluated by editing the original message within 10 seconds and clicking the reaction that subsequently appears.

We've done our best to make this sandboxed, but do let us know if you manage to find an issue with it!*

slate swan
#

anyways #bot-commands

slim ibex
#

!e

print(“hi okimii”)
unkempt canyonBOT
#

@slim ibex :x: Your eval job has completed with return code 1.

001 |   File "<string>", line 1
002 |     print(“hi okimii”)
003 |           ^
004 | SyntaxError: invalid character '“' (U+201C)
slim ibex
#

wtf

pliant gulch
#

Mobile moment

slate swan
#

“” what are thoseeeeeeee

candid maple
slim ibex
#

“”

oblique laurel
#

Cant relate

slate swan
unkempt canyonBOT
#

Here's how to format Python code on Discord:

```py
print('Hello world!')
```

These are backticks, not quotes. Check this out if you can't find the backtick key.

candid maple
#

!code hi

sick birch
#

this is a certified iphone moment

pliant gulch
#

!src eval

unkempt canyonBOT
#
Command: eval

Run Python code and get the results.

Source Code
candid maple
#

!code

slate swan
slim ibex
#

fucking mobile

sick birch
#

fact

oblique laurel
#

Hold down on the ‘

sick birch
#

though some people still code on mobile for some reason

hoary cargo
#

Pain

slim ibex
#

^

cinder quiver
#

@hoary cargo i dmed you..

slate swan
#

ares if you spoonfeed i swear

hoary cargo
#

pepekek I was joking when I said right here

cinder quiver
#

sadge

candid maple
#

!e !code print (12

unkempt canyonBOT
#

@candid maple :x: Your eval job has completed with return code 1.

001 |   File "<string>", line 1
002 |     !code print (12
003 |     ^
004 | SyntaxError: invalid syntax
slate swan
cinder quiver
#

!e

unkempt canyonBOT
#
Command Help

!eval [code]
Can also use: e

*Run Python code and get the results.

This command supports multiple lines of code, including code wrapped inside a formatted code block. Code can be re-evaluated by editing the original message within 10 seconds and clicking the reaction that subsequently appears.

We've done our best to make this sandboxed, but do let us know if you manage to find an issue with it!*

sick birch
# slate swan ares if you spoonfeed i swear

that's one of the reasons dm help is usually discouraged because 1. we don't know if they're being taught something wrong, and 2. they could spoonfeed and we would be none the wiser

slate swan
#

#bot-commands 😠

candid maple
#

!e

unkempt canyonBOT
#
Command Help

!eval [code]
Can also use: e

*Run Python code and get the results.

This command supports multiple lines of code, including code wrapped inside a formatted code block. Code can be re-evaluated by editing the original message within 10 seconds and clicking the reaction that subsequently appears.

We've done our best to make this sandboxed, but do let us know if you manage to find an issue with it!*

pliant gulch
#

Yea, most of the times people selfbotting will want low-key help

candid maple
#

!e !code print (90)

slate swan
unkempt canyonBOT
#

@candid maple :x: Your eval job has completed with return code 1.

001 |   File "<string>", line 1
002 |     !code print (90)
003 |     ^
004 | SyntaxError: invalid syntax
pliant gulch
#

You can usually tell right away someone is self botting by the print stattements, E.g a lot of Fore.RED etc

pliant gulch
#

It's hilarious

sick birch
#

You could be put at risk for assistance someone to break TOS so it's discouraged

candid maple
#

!e print(2)

sick birch
#

I mean

pliant gulch
sick birch
#

Didn't discord.py at one point allow you to use your own token?

pliant gulch
#

Since discord supports ANSI escape codes

candid maple
#

//sd//

slate swan
pliant gulch
#

They are pretty handy to know, you should take a look at the wiki https://en.wikipedia.org/wiki/ANSI_escape_code

ANSI escape sequences are a standard for in-band signaling to control cursor location, color, font styling, and other options on video text terminals and terminal emulators. Certain sequences of bytes, most starting with an ASCII escape character and a bracket character, are embedded into text. The terminal interprets these sequences as command...

#

Very informative

pliant gulch
#

read the above 🗿

slate swan
#

no but is it a term?

#

American National Standards Institute hm ic

sick birch
slate swan
#

😭

#

i know now tho

#

and the raw text tho

sick birch
#

check the pins

slate swan
#

ik

#

done it

sick birch
#

cool stuff

slate swan
#

yes but i still dont know them lol

sick birch
#

same

slate swan
#

🏃

pliant gulch
#

Making the ANSIBuilder rn

#

😎

slate swan
#

someone good at python discord bot pls dm me fr

#

i need to add a role when bot starts

#

i know discord ID and role ID

#

how i do it ? please help

hazy oxide
slate swan
#

OK ty

slate swan
hazy oxide
#

Wait

hoary cargo
#

you should use tasks

slate swan
#

no bro

#

i got autoban from my server

#

ive no idea how

#

just need to do that when my bot starts

#

or how do i unban on on_ready?

#

with my bot

#

!d discord.Guild.unban

unkempt canyonBOT
#

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

Unbans a user from the guild.

The user must meet the [`abc.Snowflake`](https://discordpy.readthedocs.io/en/master/api.html#discord.abc.Snowflake "discord.abc.Snowflake") abc.

You must have the [`ban_members`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.ban_members "discord.Permissions.ban_members") permission to do this.
slate swan
#

!d discord.Client.get_guild

unkempt canyonBOT
slate swan
#

Utilise these

hoary cargo
#

wdym you got auto ban from your server mike is that possible

slate swan
hoary cargo
#

bru

slate swan
#

I NEED TO CHECK WHAT HAPPENED MAN

#

i ve never opened python

#

but ive this bot with perms

#

on the server

hoary cargo
#

so basically you know nothing about python nor discord bots

final iron
slate swan
#

Do you know any python basics?

slate swan
#

but i watch on yt

#

its easy to do with add_role thing

slate swan
#

learn python first, then make a bot.

#

atleast the basics.

#

just need to add to a specific member a specific role

#

ITS A ONE TIME THING

#

i will enver need python again

hazy oxide
#

Anyway

slate swan
#

just help if u can pls

hazy oxide
#

My command won't work when I use @client.event to auto delete message

slate swan
#

Why do you need python for that

slate swan
#

this is strange af

slate swan
#

just help idk why i explained why i need it

hazy oxide
#

Oh okay thx

slate swan
slate swan
#

the only support

#

im sacred i got hacked

#

pls no.

#

but doesnt seem

#

so if u can

#

ive my ID

#

where do i put it

#

you need the server's id too

#

ok ive

#

but the bot already start

#

on the server when i run it

#

it logs just fine

keen sage
#

Hii everyone, just a basic question... So, actually i was wondering is there any discord bot which can be integrated with Google Calendar or any Calender and then could be used to notify give friendly reminder to members about upcoming meetings and just 5 min prior to the event if it could share the Google meeting link automatically?

slate swan
#

its my member id

#

will work?

#

You don't have a context

hazy oxide
#

Member

#

Wait

#

Does bot.event need bracket?

slate swan
slate swan
slate swan
#

can u just tell me the command pls pls?

slate swan
keen sage
slate swan
#

pls help a poor guy

slate swan
# keen sage Yaap

well then you might like integration the API with your bot and use tasks.loop

slim ibex
#

we won’t spoon feed

slate swan
#

BUT MAN u really cant?

#

Idk how an owner gets banned from his own server.

#

ME EITHER

#

THATS WHY I WANNA MAKE IT FAST

hoary cargo
#

hmmnote what if you are not the owner

#

because it's impossible to get banned from your own server

slate swan
#

I KNOW RIGHT

oblique laurel
slate swan
hazy oxide
#

Even if you use ban command to ban yourself

hoary cargo
slate swan
keen sage
final iron
slate swan
#

enough proof @hoary cargo

final iron
hazy oxide
#

Are you the owner or just have role "owner"

slate swan
#

the account got termed

#

i was a second account with owner perms

#

bruh

scarlet rune
#

what

final iron
#

So you aren't a owner. You just have administrator perms

oblique laurel
#

Only one acc can be the owner

slate swan
#

termeddddd by discord

hoary cargo
final iron
oblique laurel
#

XD

slate swan
#

if yall help me ill let u know how i got ban

#

looking at register

scarlet rune
#

How do i set avatar url as variable?

owner_avatar = bot.get_user(owner_id).avatar url #uhh????```
I don't understand the documentation
slate swan
#

Not interested in knowing it.

#

ok then just help

#

lmao what is this discord for

#

just to say "there is google"

final iron
slate swan
#

yes

oblique laurel
slate swan
#

i am still but im banned

#

i dont need to give u reasons

final iron
#

That is impossible

slate swan
#

just tell me the command

hoary cargo
final iron
#

A server owner cannot get banned

slate swan
#

I KNOW THATS IMPOSSIBBLE

#

SERVER OWNER ACCOUNT WAS TERMED

#

I WAS JUST OWENR WITH PERMS

final iron
#

Yeah I'm not helping you. You're sketchy at best

hoary cargo
#

so you were not the owner

slate swan
#

u know python?

#

yes i was

#

fuckin mfs

hoary cargo
oblique laurel
#

So what does he want lol

slate swan
#

I'm out.

hoary cargo
#

man this really gives me vibes from yesterday

slate swan
#

theres no way

scarlet rune
keen sage
hoary cargo
slate swan
#

bro

scarlet rune
keen sage
#

and python haave lib for bots I didn't knew that thanks

slate swan
oblique laurel
#

Theres a lib for everything

slate swan
#

@slate swan Either learn how to behave properly or leave

#

lmao

#

another 16 yo

slim ibex
#

🤨

slate swan
#

why can't this chat ever be clean.

slim ibex
slate swan
#

cuz u cold have helped me hour ago and i was out

oblique laurel
#

Yea theres always smth goin on

keen sage
slate swan
hoary cargo
slate swan
#

u dont know python

#

no neeed u

#

fortunatly i think i didnt got hacked

oblique laurel
#

Y u even selling accs if u cant program lol

hoary cargo
#

you're too sus for someone to help you

slate swan
#

or the karma would have been looking for u soon

#

u piece ofuseless bitchies

slate swan
hoary cargo
slate swan
#

come dm

oblique laurel
#

<@&831776746206265384>

slate swan
#

to see proof

slate swan
# slate swan cuz u cold have helped me hour ago and i was out

cause I can't help you with that.

  1. I won't spoonfeed
  2. I provided you with the docs
  3. Why would someone help you in getting unbanned from a server you claim to be your's and you don't want to share the reason for getting banned
  4. "This would be the last time I'll be using python" if that's only to get yourself unbanned wait for the friend to wake up?
#

if u dont believe me

hollow quarry
slim ibex
#

dawn is a pythonisto 🙃

slate swan
oblique laurel
#

Curse us out then ask for help, smh

hazy oxide
#

Th

final iron
#

@slate swan DM advertising is not pog champ

slate swan
hollow quarry
#

@slate swan Calling people "useless bitches" is not acceptable here and will not be tolerated.

slate swan
slate swan
hollow quarry
#

I do not

slate swan
slate swan
#

u will tell everyone sorry

slim ibex
#

someone ban this dude 💀

slate swan
#

ok

#

come pls

sick birch
#

Alright, what's the matter here?

slate swan
#

send me dm request someone who knows python discor bot

#

it will take 5 mins

sick birch
#

I doubt that's going to happen after what you said, I suggest you calm down and ask your question with a level head

oblique laurel
sick birch
slate swan
#

thats not true

oblique laurel
#

Judging by this lol

slate swan
#

lmfao never said that dont give a fuk of that

sick birch
slate swan
sick birch
#

I don't do friend requests sorry

#

Ask your question here

slate swan
scarlet rune
#

what is happening in this chat 💀

sick birch
#

Which is against Discord's terms of service

slate swan
#

just need the command to unban discord ID

#

with my bot

sick birch
slate swan
#

could you show more of you code
And please don't use words like that even for yourself :)

sage otter
#

Or it could be the fact

sick birch
#

You can construct your own snowflake like so:

discord.Object(id_here)
sage otter
#

You trying to use context in on_ready

keen sage
# slate swan

hey dont worry.... I believe everyone is say right it would be bto wait for your friend to come back

sick birch
#

Don't use on_ready for much except printing, it has the tendency to get called multiple times for seemingly no reason

sage otter
#

And you have parenthesis on on @bot.event

slate swan
hazy oxide
slate swan
#

no its no

sick birch
hazy oxide
#

Then it can't be

sick birch
#

!resources has some excellent guides

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
scarlet rune
# slate swan could you show more of you code And please don't use words like that even for yo...

No hard feeling with saying the r word on myself
anyways,

import ...
owner_id = int(settings["owner"])

intents = discord.Intents.default()
intents.members = True
bot = Bot(command_prefix=settings["prefix"], case_insensitive=True, intents=intents)



@bot.event
async def on_ready():
    print('Hey, I have connected to the internet.')
    await bot.change_presence(activity=discord.Game(name='Bot Testing'))
    owner_avatar = bot.get_user(owner_id).avatar_url #uhh????
    bot_avatar = bot.user.avatar_url
    bot_name = bot.user.name
    bot_id = bot.user.id
    onreadyembed = discord.Embed(description=f'I am now online as {bot_name}.', color=0xF44AFF)
    onreadyembed.set_author(name="Status Report", icon_url=bot_avatar)
    onreadyembed.set_footer(text="by Circle", icon_url=owner_avatar)
    onreadyembed.timestamp = time
    await bot.get_channel(channel_cmd).send(f"||<@{owner_id}>||", embed=onreadyembed)

it's in this

slate swan
#

i dont need to make bots with python

#

i just need help this time