#discord-bots

1 messages · Page 892 of 1

flat flower
#

Click url generator as shown on my screen

slate swan
#

you turned on 0AUTH in the bot options

velvet tinsel
#

oh nice

slate swan
#

turn it off

desert cosmos
#

alr

flat flower
#

Click on the url generator, then click bot, then the url is there

#

Make sure your clicking url generator

#

Tell me if you understand that.

slate swan
#

brb

flat flower
#

Ok

#

@desert cosmos did it work?

desert cosmos
#

yeah

flat flower
#

Ok, happy to help 😁

slate swan
mellow barn
#

Hello, is there a method to edit interaction response? (interaction.response.edit_message not works, gives me nextcord.errors.InteractionResponded: This interaction has already been responded to before)

slate swan
maiden fable
unkempt canyonBOT
#

await edit_original_message(*, content=..., embeds=..., embed=..., file=..., files=..., view=..., allowed_mentions=None)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).

Edits the original interaction response message.

This is a lower level interface to [`InteractionMessage.edit()`](https://discordpy.readthedocs.io/en/master/api.html#discord.InteractionMessage.edit "discord.InteractionMessage.edit") in case you do not want to fetch the message and save an HTTP request.

This method is also the only way to edit the original message if the message sent was ephemeral.
slate swan
#

I'm too slow 😔

maiden fable
maiden fable
#

Lmao indeed

#

Ash do be speechless lmao

slate swan
maiden fable
#

I hate this emoji now, thanks

slate swan
honest vessel
#

#generalchatting 🙂

#

anyone tried code with speech-to-text?

slate swan
#

anyone tired of coding in spanishAG_Angry

honest vessel
#

si'mon

#

pitón.exe

maiden fable
honest vessel
#

text-to-speech-to-speech-to-text

maiden fable
honest vessel
slate swan
#

atleast answer his question

honest vessel
#

lol

slate swan
#

Ye

honest vessel
#

i will tell him to dm okimii

#

and @slate swan

slate swan
#

Ofc

#

no

spark cloud
#

What

honest vessel
slate swan
#

i dont do dm helpAG_Angry

honest vessel
maiden fable
honest vessel
#

see exposed

spark cloud
#

Can you help ?

#

Sorry for my english il french

honest vessel
#

@spark cloud-> @slate swan is thebest of thebest when it comesto RPG

#

he loves making them n will gladly help u

slate swan
slate swan
honest vessel
slate swan
spark cloud
#

I need developper

slate swan
#

whos a good dev here02comfy

slate swan
maiden fable
#

Ash

slate swan
#

Hunter

slate swan
#

hunters smort

honest vessel
#

and blocked,

maiden fable
slate swan
spark cloud
slate swan
spark cloud
#

So pls translate "c'est pas gentil d'être méchant ! "

slate swan
fierce ocean
#

hello guys

#

why are libraries so frustrating

slate swan
slate swan
honest vessel
#

@spark cloudits not nice to randomly just DM peoples asking them to make u a bot.

slate swan
maiden fable
candid pilot
#

dm me hehe boi

#

@spark cloud ill make it for you

#

100$

#

😅

slate swan
slate swan
honest vessel
#

@candid pilotbreaking rules but trolling i guess

spark cloud
#

I dont have money

candid pilot
#

calm down im kidding g

slate swan
#
  1. breaking the rules
  2. probably horrible code
candid pilot
slate swan
slate swan
honest vessel
candid pilot
slate swan
honest vessel
#

kek

spark cloud
#

Same

paper sluice
#

how do i remove all buttons from view after timeout

honest vessel
#

just make a bot upload to github for all to copy pasta n we can close this channel

candid pilot
slate swan
#

frog_sip just use carl bot

spark cloud
#

Idk

candid pilot
#

its not that hard

spark cloud
#

Same

honest vessel
#

@spark cloudno one gonna make u a bot

spark cloud
#

Lmao

slate swan
slate swan
slate swan
maiden fable
#

@spark cloud stop being so Toxic, I don't like blocking people but u forced me lemon_pensive

spark cloud
#

Allez bye les gars je vais aller jouer a clash royale

honest vessel
#

we would help if u showed code and was trying to make it urself first and had issues with it. we aint gonna make it from scratch for u.

slate swan
spark cloud
#

De même

#

🙂

slate swan
#

whatever kek

spark cloud
candid pilot
# spark cloud xD
from discord.ext import commands

token = '#your token here'
bot = commands.Bot(command_prefix='.')

@bot.event
async def on_ready():
  print('ready')

@bot.command()
async def hello(ctx):
    await ctx.send("hello")

bot.run(token)```
spark cloud
#

Tu es trop drôle

candid pilot
#

here

honest vessel
maiden fable
unkempt canyonBOT
#

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

slate swan
spark cloud
slate swan
#

smh

candid pilot
#

??

maiden fable
#

Why u making me ping the mods now 😔

slate swan
honest vessel
#

!timeout @spark cloud oui oui

candid pilot
honest vessel
#

First

#

(did yall also have discord fuzzed for an hour or so?)

vital badge
slate swan
#

the file isnt even supposed to be runned

winged crane
#

whats up with the new system on changing bot info

vital badge
#

api seems to be up now

manic wing
unkempt canyonBOT
manic wing
#

just look at the discordstatus

slate swan
manic wing
slate swan
#

my client isnt caching pfps

#

not even mine

manic wing
slate swan
#

on mobile lol

manic wing
#

sisi is the only person who's pfp i cant see

slate swan
#

i canr see a single one

slate swan
manic wing
#

~~maybe if you werent such a rude person i wouldnt of accused you 😩 ~~

naive light
#

Hey does anyone have experience with why my discord bot is offline when I've got my program running

manic wing
#

best to give it a breather

#

abuse the api

slate swan
#

on ready would probably trigger btw

#

on connect prob not

naive light
#

forwarding from telegram to group to another group is working but to discord isnt

manic wing
naive light
#

Nah it wasn’t working yesterday too @manic wing

manic wing
trail dove
#

Can anyone help me, I already installed the package

slate swan
#

restart editor, wrong channel

unkempt canyonBOT
#

Per Python Discord's Rule 5, we are unable to assist with questions related to youtube-dl, pytube, or other YouTube video downloaders, as their usage violates YouTube's Terms of Service.

For reference, this usage is covered by the following clauses in YouTube's TOS, as of 2021-03-17:

The following restrictions apply to your use of the Service. You are not allowed to:

1. access, reproduce, download, distribute, transmit, broadcast, display, sell, license, alter, modify or otherwise use any part of the Service or any Content except: (a) as specifically permitted by the Service;  (b) with prior written permission from YouTube and, if applicable, the respective rights holders; or (c) as permitted by applicable law;

3. access the Service using any automated means (such as robots, botnets or scrapers) except: (a) in the case of public search engines, in accordance with YouTube’s robots.txt file; (b) with YouTube’s prior written permission; or (c) as permitted by applicable law;

9. use the Service to view or listen to Content other than for personal, non-commercial use (for example, you may not publicly screen videos or stream music from the Service)
slate swan
trail dove
#

hm

naive light
manic wing
#

bots are toasted rn

#

no error is odd

naive light
#

Ok thanks

trail dove
manic wing
slate swan
modest plover
#

Hey so uh, how do I clone an emoji kind of?

#

So it's like /clone_emoji emoji: yikea

#

You'd need nitro obviously

manic wing
#

bots have nitro

modest plover
#

But idk how to actually clone the emoju

modest plover
#

Also I meant the user themselves

manic wing
modest plover
#

me

pliant gulch
#

Bots can't have animated profile pictures afaik

modest plover
#

Ah ok

#

What about the actual question tho? How do I make it so the bot takes the emoji entered into the option, then add that to the specific server?

cold sonnet
#

you don't

#

you need a .png, .jpg or .gif file

#

actually

#

absolutely bamboozled

manic wing
#

!d discord.Emoji.url

unkempt canyonBOT
honest vessel
#

ddos

manic wing
#

1.7.3

cold sonnet
#

you mean they removed it

manic wing
#

!d discord.PartialEmoji.url

unkempt canyonBOT
#

property url: str```
Returns the URL of the emoji, if it is custom.

If this isn’t a custom emoji then an empty string is returned
honest vessel
#

did yall feel the ddos?

manic wing
honest vessel
#

hmm

cold sonnet
#

what are you talking about

manic wing
#

there has been no ddos

honest vessel
#

discord was down for an hour

manic wing
honest vessel
#

no it can be noobdevs but

cold sonnet
#

I don't think somebody would ddos discord

honest vessel
#

ye what i ment downtime

cold sonnet
#

maybe you got ddos for statements like this

honest vessel
#

just trying to meme n u think putin aha! or china! lol

manic wing
#

w h a t

cold sonnet
#

??

honest vessel
#

prob someone on discord dev crew git

#

wrong code

#

my client even begged for an update

#

but no connection lol

#

TTL=30sec

cold sonnet
#

bad internet

honest vessel
#

bad internet

#

world wide huh

modest plover
#

Satellite crashed

honest vessel
#

elon musk must

cold sonnet
modest plover
#

Imagine Google went down for more than a few hours

honest vessel
#

imagine if google was banned

modest plover
#

China

honest vessel
#

is google open for russians?

modest plover
#

Probably

#

But not for long most likely

cold sonnet
#

!ot

unkempt canyonBOT
honest vessel
#

i know google did 8.8.8.8

#

dns to to a country back in like 2011

cold sonnet
#

hello?

honest vessel
#

ping

#

pong

#

i forgot the country but i have it on my thoung

cold sonnet
#

haven't been ignored more in a while

honest vessel
#

anyway lets talk discord bots

modest plover
#

So how do I make it so the emoji gets cloned?

#

Sorry I'm very tired lmao

honest vessel
#

huh?

#

fromo a server to another srv?

modest plover
#

Yes

#

Well, kind of

honest vessel
#

fetch em download em

#

and upload em voila

modest plover
#

Is there a way to without downloading them?

honest vessel
#

copy names too 😄

#

i dunno dont u need to upload it?

#

so then u need to download it

#

or read it*? with request as bytes?

#

i dunno

#

website -> read bytes -> discord.File() -> "send" / "upload"

#

or download as a cached and upload that n remove local file

#

@modest ploveram drunk i go bed 😄

bronze bone
#

Hello, does anyone here know of anyone who is good at creating Discord bots?

placid skiff
#

Someone knows how to create a custom event?

manic wing
manic wing
placid skiff
manic wing
#

😑

placid skiff
#

One that you create by yourself

manic wing
placid skiff
#

Yee. Can i trigger it like when a file get updated? Lol

manic wing
unkempt canyonBOT
#

discord.on_message_edit(before, after)```
Called when a [`Message`](https://discordpy.readthedocs.io/en/master/api.html#discord.Message "discord.Message") receives an update event. If the message is not found in the internal message cache, then these events will not be called. Messages might not be in cache if the message is too old or the client is participating in high traffic guilds.

If this occurs increase the [`max_messages`](https://discordpy.readthedocs.io/en/master/api.html#discord.Client "discord.Client") parameter or use the [`on_raw_message_edit()`](https://discordpy.readthedocs.io/en/master/api.html#discord.on_raw_message_edit "discord.on_raw_message_edit") event instead.

The following non-exhaustive cases trigger this event...
placid skiff
bronze bone
manic wing
#

?

bronze bone
#

I'm looking for someone to make a bot for me and a friend. Please contact me if your interested.

manic wing
#

!rule 7

unkempt canyonBOT
#

7. Keep discussions relevant to the channel topic. Each channel's description tells you the topic.

manic wing
#

crap

#

!rule 8

unkempt canyonBOT
#

8. Do not help with ongoing exams. When helping with homework, help people learn how to do the assignment without doing it for them.

manic wing
#

😑

unkempt canyonBOT
#

9. Do not offer or ask for paid work of any kind.

bronze bone
#

oh

#

sorry

placid skiff
# manic wing ?

Essentially, i will have a script written in Java that add rows to a database, i need to check when the database get modified so i can run a script to do stuff on discord

#

And i don't want to use tasks because it needs to get updated when the database get modified

manic wing
#

oh when an actual file gets updated lol

#

thats not really discord-bot related

#

!ot on ya bike

unkempt canyonBOT
placid skiff
#

.-.

#

It is an event that my bot will have

#

Well fine, i'll read the source code lol

manic wing
#

you can make a help channel if you need some help

limpid otter
#

What's wrong?

async def create_db_pool():
        bot.pg_con = await asyncpg.create_pool(database="database", user="user", password="password")
  

bot.loop.run_until_complete(create_db_pool()) 
slim ibex
#

you can't say whats wrong and not say what the issue is

limpid otter
#
  File "/app/.heroku/python/lib/python3.9/asyncio/selector_events.py", line 537, in _sock_connect_cb
2022-03-08T21:40:06.173139+00:00 app[worker.1]:     raise OSError(err, f'Connect call failed {address}')
2022-03-08T21:40:06.173139+00:00 app[worker.1]: ConnectionRefusedError: [Errno 111] Connect call failed ('127.0.0.1', 5432) 
limpid otter
#

And what hosting to use? Free (even if time is limited) and with git binding.

sick birch
#

AWS has a free tier on t2.micro instances

final iron
#

Oracle has a free tier

modest plover
#

How do I do the joined at timestamp?

	).add_field(
					name = "Join Date",
					value = f"<t:me.joined_at.timestamp():D>"
sick birch
slim ibex
#

you aren't actually calling the function there

sick birch
#

!e

print(f"5+5 is 5+5")
print(f"5+5 is {5+5}")
unkempt canyonBOT
#

@sick birch :white_check_mark: Your eval job has completed with return code 0.

001 | 5+5 is 5+5
002 | 5+5 is 10
sick birch
#

Same thing in your case

modest plover
#

It isn't..? I get an invalid f-string syntax

sick birch
#

How does your code look like with the curly braces?

modest plover
#

value = f"{<t:me.joined_at.timestamp():D>}"

sick birch
#

Yeah no

#

You need it around just the expression

modest plover
#

Ohhhh ok I get it

sick birch
#

In your case you would use the braces around me.joined_at.timestamp()

manic wing
#

!f-strings

unkempt canyonBOT
#

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

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

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

modest plover
#

Ok, I did that, now I get this

sick birch
#

Yes, because it includes decimals

modest plover
#

How do I make it like a UNIX Timestamp?

sick birch
#

You might want to int() (more accurate) or round() it

modest plover
#

Like one of these

sick birch
#

Yes, you have to round it or floor it

modest plover
#

Idk how I had it before, because I had it, but lost the file

modest plover
#

The way I'm thinking it works doesn't work

modest plover
#

value = f"{round(<:{me.joined_at.timestamp()}:D>)}"

sick birch
#

round() takes a float

modest plover
#

That's what I've got, I thought it might work..? But it doesn't

sick birch
#

That's not a float

#

It'd be easier if you extracted the timestamp into its own variable

#
timestamp = int(me.joined_at.timestamp())
string = f"something <t:{timestamp}:R> something"
fallow mauve
#

hey why cant i import cooldown from discord.ext

modest plover
#

Yep, got it now. Thanks Robin :)

sick birch
fallow mauve
#

it needed to be imported from discord.ext.commands

slate swan
#

Is it possible to make a repository private on repl.it?

royal jasper
#

my bot is not responding my commands, is this a code problem or not?

torn sail
slate swan
#

What hosting can you use? Free (at least limited hours) and with git binding?

tidal hawk
#

Can somebody tell me, why can't I pass that keyword through that class?

torn sail
slate swan
torn sail
torn sail
slate swan
torn sail
#

However it’s underpowered and you get the problem of rate limits

#

If you want a good host, I’m not the person to ask

slate swan
#

What about hosting?

torn sail
#

U asked about it

left crater
#

why can i not use bot when making slash commands?

tidal hawk
left crater
#

can i use bot?

tidal hawk
torn sail
#

You need to use tree and bot

left crater
#

ok

#

i made a simple slash command but it is not showing for some reason

torn sail
tidal hawk
#

No I'm not? Aghh

torn sail
tidal hawk
torn sail
torn sail
#

Did u sync?

left crater
#

whats that\

torn sail
left crater
#

oh

left crater
torn sail
#

Yeah but I think if u want them to come instantly u would have to specify the guild like how u do in the tree command decorator

left crater
#

ok

#

await tree.sync(813472094657445929) so this?

#

oh wait nvm

#

i found it in the docs

torn sail
#

guild=discord.Object(id=some_id_here)

left crater
#

got it

final iron
left crater
# torn sail `guild=discord.Object(id=some_id_here)`
Traceback (most recent call last):
  File "C:\Users\nikit\PycharmProjects\dpamong\discord\client.py", line 384, in _run_event
    await coro(*args, **kwargs)
  File "C:\Users\nikit\PycharmProjects\dpamong\docs\main.py", line 30, in on_ready
    await tree.sync(guild=discord.Object(id=699577686795747349))
  File "C:\Users\nikit\PycharmProjects\dpamong\discord\app_commands\tree.py", line 655, in sync
    data = await self._http.bulk_upsert_guild_commands(self.client.application_id, guild.id, payload=payload)
  File "C:\Users\nikit\PycharmProjects\dpamong\discord\http.py", line 501, in request
    raise Forbidden(response, data)
discord.errors.Forbidden: 403 FORBIDDEN (error code: 50001): Missing Access```
#

what

torn sail
torn sail
#

Unless it’s getting the wrong application id

left crater
#

is it something to do with permissions?

torn sail
#

Oh do u have the app commands Scope for the server?

left crater
#

no

#

do i have to reinvite the bot

torn sail
#

Yeah

left crater
#

ok it works

cyan hare
#

how do u invite a bot from discord devealpor portal
because now i finding it hard
pls dm me if u know how to do it

final iron
#

Variables should be in snake_case, not mixedCase

#

Oh I see your issue

#

I don't know what that means

sick birch
#

message_delete() is not a function of commands.Context

#

And unban() is a function, not an attribute

#

Can I see the code for the other command that it works for?

#

Yeah, assuming you didn't create a custom context by subclassing it

#
await ctx.guild.unban
#

.unban() is a function (a coroutine to be exact), not an attribute

#

Add ()

#

Right now you're just using it as a first-class function

#

You need to actually call it

cyan hare
#

can anyone fix my bot

sick birch
cyan hare
#

ok

sick birch
#

Well yeah, how is it supposed to know who to unban

compact crow
#

anyone know if discord is having issues, my bot is literally not doing anything upon typing commands

cyan hare
compact crow
#

no error just nothing

sick birch
#

It should be resolved by now though, check to see if your bot has message intents enabled

cyan hare
#

py bot.run(token, bot = True)

compact crow
#

i legit made a simple ping bot and reset its token

sick birch
# cyan hare

It says exactly what the problem is, go to your dashboard and enable the privileged intents

compact crow
#

to check if it was my code

sick birch
#

Code please?

compact crow
#

its still doing nothing rn

sick birch
sick birch
cyan hare
#

where is it

sick birch
#

Where are you providing ID?

compact crow
#

my code was running perfect and bam nothing now so i think its api but to double check what do you mean message intents

sick birch
#

!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.
cyan hare
#

nvm found it

sick birch
#

Sure, but you need to specify in the code

#

Right now you're just telling it "unban from guild"

sick birch
#

Also it's a discord.abc.Snowflake so keep that in mind

sick birch
compact crow
#

alright cheers sorry about that

cyan hare
sick birch
#

Without it, your bot doesn't know when someone sends a message, so obviously, none of the commands will work

cyan hare
#

i just enable it why is this happening

sick birch
#

It's a new "feature" meant to motivate people to switch to slash commands

compact crow
#

ahhh

#

i see, i didnt realise lmao

sick birch
#

I know, you need to pass in a snowflake object to discord.Guild.unban()

#

You can create your own snowflake object like so:

my_snowflake = discord.Object(...)
#

!d discord.abc.Snowflake

unkempt canyonBOT
#

class discord.abc.Snowflake```
An ABC that details the common operations on a Discord model.

Almost all [Discord models](https://discordpy.readthedocs.io/en/master/api.html#discord-api-models) meet this abstract base class.

If you want to create a snowflake on your own, consider using [`Object`](https://discordpy.readthedocs.io/en/master/api.html#discord.Object "discord.Object").
sick birch
#

Ok, ping me if you need further assistance

cyan hare
#

it been enable

compact crow
sick birch
# cyan hare

How about the server member intents underneath it?

sick birch
#

!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.

compact crow
#

what a stupid change lmao

sick birch
#

For testing discord.Intents.all() works but in production it's best to limit the intents to what you only use to reduce computational strain on the machine

cyan hare
#

ahh it off i turn it on and run it

sick birch
quaint epoch
#

my bot has raw_reaction_add and i set it so when i reacted to a certain message with an emoji, it would give me a role. But i only reacted one and unreacted then, and it sent me THESE many messages!

#

no, i don't have the bot running on parallel

sick birch
#

Code?

quaint epoch
#
@commands.Cog.listener()
    async def on_raw_reaction_add(self, payload):
        data = reacting.get((payload.guild_id, payload.message_id))
        if type(data) == tuple:
            pass
        else:
            return
        if str(payload.emoji) == data[1]:
            guild = await bot.fetch_guild(payload.guild_id)
            member = await guild.fetch_member(payload.user_id)
            role = guild.get_role(data[0])
            await member.add_roles(role)
            try:
                await member.send(f'You got the **{role.name}** role in **{guild.name}** for reacting!')
            except (discord.HTTPException, discord.errors.HTTPException, discord.ext.commands.errors.CommandInvokeError,
                    commands.CommandInvokeError, commands.CommandError, AttributeError, discord.Forbidden):
                print(f'Cannot direct message {str(member)}')```
#

i tried restarting it on heroku but to no avail

sick birch
#

How about the part where it removes the role?

quaint epoch
# sick birch How about the part where it removes the role?
    @commands.Cog.listener()
    async def on_raw_reaction_remove(self, payload):
        data = reacting.get((payload.guild_id, payload.message_id))
        if type(data) == tuple:
            pass
        else:
            return
        if str(payload.emoji) == data[1]:
            guild = await bot.fetch_guild(payload.guild_id)
            member = await guild.fetch_member(payload.user_id)
            role = guild.get_role(data[0])
            await member.remove_roles(role)
            try:
                await member.send(f'You lost the **{role.name}** role in **{guild.name}** for unreacting!')
            except (discord.HTTPException, discord.errors.HTTPException, discord.ext.commands.errors.CommandInvokeError,
                    commands.CommandInvokeError, commands.CommandError, AttributeError, discord.Forbidden):
                print(f'Cannot direct message {str(member)}')```
sick birch
left crater
#

ight

quaint epoch
#

reacting_data is a dict like {(guild_id, message_id): (role_id, emoji)}

sick birch
#

I see

quaint epoch
#

when i run it locally it doesn't happen

compact crow
#

weird question, but i install pycord since i was gonna move over to that instead of discordpy, could that be the issue maybe

sick birch
sick birch
compact crow
#

well i was thinking since all the issues of it being discontinued etc

sick birch
#

That way we can trace it down to a code issue vs something on discord

sick birch
#

Well at least not anymore

compact crow
#

thats what i mean

sick birch
#

No, I mean, it was back as of yesterday

compact crow
#

he could just dip again if you know what i mean

sick birch
#

Oh I see

#

Yeah fair reason, I don't know about pycord though. I'm not gonna tell you which fork to use or which not to use, but regardless, your fork of choice is not the issue

#

This is something discord implemented

compact crow
#

i think its a discord issue tho i literally just tested

import discord
from discord.ext import commands
from discord import Intents

intents = Intents.default()
intents.members = True
bot = commands.Bot(command_prefix=".", intents=intents)


@bot.command()
async def ping(ctx):
    await ctx.send("pong")


bot.run('token')
sick birch
#

Bots under 75 guilds need to explicitly enable message intents on the dashboard or the events won't be dispatched to your client

compact crow
#

i made a new file and this didnt even work either so i think its just a api issues for me rn

sick birch
quaint epoch
#

now my bot should print added when on_raw_reaction_add is run and removed when on_raw_reaction_remove is run

#

let me start it up

sick birch
#

And hopefully it doesn't spam "removed"

compact crow
#

oh 🤦‍♂️

quaint epoch
#

i'll drink to that

sick birch
#

Cross your fingers and run it

quaint epoch
#

(still underage tho)

sick birch
#

If it does spam removed it's gonna be a bit of an issue

#

!d discord.Object

unkempt canyonBOT
#

class discord.Object(id)```
Represents a generic Discord object.

The purpose of this class is to allow you to create ‘miniature’ versions of data classes if you want to pass in just an ID. Most functions that take in a specific data class with an ID can also take in this class as a substitute instead. Note that even though this is the case, not all objects (if any) actually inherit from this class.

There are also some cases where some websocket events are received in [strange order](https://github.com/Rapptz/discord.py/issues/21) and when such events happened you would receive this class rather than the actual data class. These cases are extremely rare.

x == y Checks if two objects are equal.

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

hash(x) Returns the object’s hash.
sick birch
#

Pass the ID from your command to the snowflake

#

Or just typehint to snowflake and pass it in directly (easier method)

quaint epoch
#

uhhhhh

#

well, this might be an issue

sick birch
#
@bot.command()
async def someCommand(..., snowflake: discord.abc.Snowflake, ...):
  ...
  await ctx.guild.unban(snowflake)
  ...
sick birch
quaint epoch
#

could it be because im getting good ping?

sick birch
#

Doubt

quaint epoch
#

17 ms

sick birch
#

Try printing out where the reaction is coming from

#

Perhaps print the guild name/ID

sick birch
final iron
#

Can't unban a user

#

🗿

sick birch
#

You still need to specify which member to unban

#

Also why does your command take in both a user and an ID

#

All it needs to take in is a snowflake

final iron
#

!ot

unkempt canyonBOT
compact crow
#

@sick birch i appreciate that man i was pissedddd trying to understand what was up

sick birch
#

Why do you need both a snowflake and an ID...

#

the snowflake is the ID

#

wait hold on let me check the docs to see if you can actually typehint to snowflake

#

oops guess you can't

left crater
sick birch
#
@bot.command()
async def someCommand(..., user_id: int, ...):
  ...
  snowflake = discord.Object(user_id)
  await ctx.guild.unban(snowflake)
  ...
final iron
#

Then take a user param that's type hinted to discord.User?

sick birch
#

That would work too

final iron
#

You can get the id with the id attribute

#

!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.
sick birch
#

except only the ID would realistically work

#

if the user was banned (they would be if you're unbanning them) then you can't mention them, and the bot won't be able to see their name and discrim

final iron
#

Sure but almost everyone uses an id to ban/unban anyway

sick birch
#

Again, you don't need snowflake

#

You only need the ID

#

Yes

#
async def unban(ctx, user_id: int):
  ...
#

The icons?

#

!d discord.Guild.icon

unkempt canyonBOT
quaint epoch
#

hey i fixed it

#

turns out in the cog i needed to do @commands.Cog.listener("event_name_here")

#

thanks @sick birch

maiden fable
#

Thanks discord

supple thorn
slate swan
somber sky
slate swan
#

message is a str it must be a Message obj

#

which you forgot the positional argument for the Context obj

somber sky
#

how do i fix

slate swan
#

you add ctx in params and you do

await ctx.message.delete()
slate swan
slate swan
#

and argument naming lol

somber sky
left crater
compact crow
#
icon = ctx.guild.icon_url

embed.set_thumbnail(url=icon)

await ctx.send(embed=embed)
slate swan
slate swan
compact crow
#

is there a reason im not getting the attribute icon_url when using that?

slate swan
#

!d discord.Guild.icon

unkempt canyonBOT
slate swan
#

not sure if icon_url is a method

final iron
#

That's before 2.0. Remember, the asset object was added in 2.0?

compact crow
#

i could have swore i had it working earlier

#

so i need to use the class discord.asset?

final iron
#

No

#

There is no discord.asset class

compact crow
#

ah

somber sky
compact crow
#

what would i use then

compact crow
slate swan
somber sky
#

i fixed it nvm

supple thorn
#

how would you change buttons when a button is pressed

torn sail
#

You change the buttons label, style, disabled etc and then edit the message with the view

torn sail
#

You probably should edit the view instance

#

Not create a new one

supple thorn
#

Hmm

#

so i can just add a button to change to for later

jade tartan
#

Hi can someone help me set up to check the users age and like saving it on deta am using deta

torn sail
#

!d discord.User.created_at

unkempt canyonBOT
#

property created_at```
Returns the user’s creation time in UTC.

This is when the user’s Discord account was created.
jade tartan
#

no not that

torn sail
#

Oh then what?

supple thorn
#

do you want the users actual age?

torn sail
#

That’s not accessible

supple thorn
#

cause that would be not possible

#

yeah

jade tartan
torn sail
#

Yeah I don’t even know if a user can check their own age

supple thorn
torn sail
#

Edit components in view

#

Then edit the message the view was in with the view

supple thorn
#

Man i should of not put button aside for learning later fuck

supple thorn
supple thorn
#

can you give like an example on how to change components inside the view

unkempt canyonBOT
#

examples/views/ephemeral.py lines 28 to 34

if number + 1 >= 5:
    button.style = discord.ButtonStyle.green
    button.disabled = True
button.label = str(number + 1)

# Make sure to update the message with our updated selves
await interaction.response.edit_message(view=self)```
torn sail
#

View has a property children which are all the components in a view

supple thorn
#

hmm thanks

#

ill play around with it to see what works

fallow mauve
#

i want to make it so that when a paerson uses a commdn, the bot will send a message and react with an emoji, then if the user reacts with the same emoji it will edit the message. how should i do this?

hushed galleon
#

wait_for() would be good for handling the user's reaction

slate swan
#

just use buttons and wait_for

fallow mauve
#

i dont know how buttons work, could you send me a tutorial?

slate swan
#

lib?

hushed galleon
#

depends on the buttons implementation you have

fallow mauve
#

i dont know how anything related to buttons works

slate swan
fallow mauve
#

what do you mean lib?

slate swan
#

what library are you using

fallow mauve
slate swan
hushed galleon
#

the dpy master branch has support for message components (buttons)

slate swan
#

!code

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.

midnight gorge
#

Code its to big for discord :(

fallow mauve
slate swan
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.

fallow mauve
#

@hushed galleon im following a tutorial for buttons and it says to put from discord.ui import Button, View but i keep getting an error saying that discord.ui isnt a thing

slate swan
#

you need 2.0

fallow mauve
#

huh?

worldly bane
slate swan
hushed galleon
#

yeah the examples on the github demonstrate how to use buttons pretty well

fallow mauve
#

i dont know my way around github

fallow mauve
#

never used it before, where do i go?

midnight gorge
#

why does this dont work? it has no error it just doesn't kick or ban the person who creates roles

slate swan
unkempt canyonBOT
#

examples/views/confirm.py line 24

self.value = None```
hushed galleon
supple thorn
hushed galleon
#

showing how to get the user's response with buttons in a command is useless?

slate swan
#

not what i ment

midnight gorge
#

or what do you mean by that?

supple thorn
slate swan
#

checking a value of an instance variable to respond on a button press yikes

#

i mean in the examples its just to print what has been pressed but thats just useless tbh you can just do it on callback

hushed galleon
#

implementing a callback would be more complex/messy than just checking a boolean, which i see no problem with

slate swan
#

how is implementing a callback complex?

midnight gorge
supple thorn
slate swan
#

then checking the value of the variable with multiple buttons yikes

midnight gorge
#

also what about except: pass do I remove that too?

worldly bane
#

yes

supple thorn
#

yes since you're also removing try

worldly bane
#

if you remove try you should automatically remove except

hushed galleon
# slate swan how is implementing a callback complex?

well there's two ways you can program that callback, either you code it inside the View itself which means losing reusability or at least having to subclass Confirm every time, or you pass the callback as an argument to Confirm which means defining an inner function in your command

maiden fable
#

4 hours downtime lemon_pensive

supple thorn
maiden fable
#

Russia do be DDOSing Discord

supple thorn
#

thats a f

worldly bane
hushed galleon
#

either way the code is no longer straight-forward, you have to jump around when you're reading it to figure out what it does

maiden fable
worldly bane
#

I was sleeping that time

worldly bane
#

double indentation lemon_glass

slate swan
supple thorn
worldly bane
#

the edits always make me look akward 💀

supple thorn
#

you just removed try and except and hoped it worked

hushed galleon
supple thorn
fallow mauve
#

how to make it so bot detects when a user adds a specific reaction

fallow mauve
#

to delete the message

hushed galleon
#

the confirmation view

fallow mauve
#

?

#

oh not me

maiden fable
#

@slate swan remember that person Surgy who was becoming a pain last night?

hushed galleon
fallow mauve
#

wait_for(what here?)

hushed galleon
#

lets you do a one-time listener for a certain event and also add a check for it

#

!d discord.Client.wait_for

unkempt canyonBOT
#

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

Waits for a WebSocket event to be dispatched.

This could be used to wait for a user to reply to a message, or to react to a message, or to edit a message in a self-contained way.

The `timeout` parameter is passed onto [`asyncio.wait_for()`](https://docs.python.org/3/library/asyncio-task.html#asyncio.wait_for "(in Python v3.10)"). By default, it does not timeout. Note that this does propagate the [`asyncio.TimeoutError`](https://docs.python.org/3/library/asyncio-exceptions.html#asyncio.TimeoutError "(in Python v3.10)") for you in case of timeout and is provided for ease of use.

In case the event returns multiple arguments, a [`tuple`](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.10)") containing those arguments is returned instead. Please check the [documentation](https://discordpy.readthedocs.io/en/master/api.html#discord-api-events) for a list of events and their parameters.

This function returns the **first event that meets the requirements**...
hushed galleon
#

if you open that documentation there's an example on using it to listen for a reaction

fallow mauve
#

ok

#

ill check that out

maiden fable
# slate swan yes

Lmaoo was gonna report him to @novel apex but by chance, at the fricking exact time, Discord API went boom boom lmao

maiden fable
#

Yea

#

That works for only once whenever a command is invoked

slate swan
#

doesnt it dispatch many times until an event meets the requirement?

maiden fable
#

But wait_for will return ONLY once

slate swan
hushed galleon
#

yeah that happens

worldly bane
#

I still remember when I thought @bot.event() was what wait_for message was doing 💀
I put a bot.event inside a command

hushed galleon
#

ye that happens a fair amount

maiden fable
fallow mauve
#

its not working, but i gtg in like 5 minutes so ill probably just do without for today

hushed galleon
slate swan
supple thorn
hushed galleon
#

but at least you wouldnt have to modify them for every command

#

just have one single Confirm class that handles getting yes/no from the user, and let the commands do what it pleases with that response

slate swan
#

if its a class that will be used for many commands then just check boolean but thats not quite what theyre showing

hushed galleon
#

they're combining the send_message with checking inside a command, but i think it's still understandable while serving two purposes

#

though thats just our opinions now

slate swan
hushed galleon
#

the class is reusable, i could use that exact confirm class in an entirely different command and have no issues with it

slate swan
#

i ment the buttons arent reuseable

#

you cant press the buttons twice

hushed galleon
#

oh sure

slate swan
#

yes its a confirm class but idk if that should be the way of showing the example idk

#

i.e the value variable is kinda useless as you can print the strings in the callback

#

¯_(ツ)_/¯

final iron
#

@slate swan what the sus is going on

hushed galleon
#

the design shows that you dont need to hardcode your prints or other complex code into the class itself

hushed galleon
slate swan
hushed galleon
#

this quote from Raymond Hettinger i still remember in reference to using keyword arguments: "it slows down your code a bit, but really what are you trying to save, microseconds, or hours of programming time?"

#

👉 hours of programming time

slate swan
hushed galleon
slate swan
#

lol

whole tiger
#
#Our Package
from email import message
from functools import _Descriptor
from turtle import color
import discord


#Client
client= discord.Client()

@client.event
async def on_ready():
   #Do Stuff
   general_channel=client.get_channel(844067710152605719)
   await general_channel.send("We make you fun")

@client.event
async def on_message(message):
    if message.content ==">version":
     general_channel=client.get_channel(844067710152605719)

     myEmbed=discord.Embed(title="Current version",description="The bot is in beta 0.1", color=0x00ff00)
     myEmbed.add_field(name="Version code",value="beta0.1",inline=False )
     myEmbed.add_field(name="Date released/New Update Time:",value="9 March 2022 ", inline=False)
     myEmbed.set_footer(text="This is a sample footer")
     myEmbed.set_author(name="Float Water")




     await general_channel.send(embed=myEmbed)
     await client.process_commands(message)```
#

File "c:\Users\HP\Desktop\My music,and game\python test\Energy_bot.py", line 3, in <module>
from functools import _Descriptor
ImportError: cannot import name '_Descriptor' from 'functools' (C:\Users\HP\AppData\Local\Programs\Python\Python310\lib\functools.py)

#

Any error?

slate swan
#

you cant import it lol and dont make a request on ready and use the command ext

final iron
#

I would highly suggest you ditch whatever tutorial you're watching

#

It's very, very bad

cosmic agate
#

I have a problem

#
button = Button(label="Click rn ", style=nextcord.ButtonStyle.green, emoji="🤣")
        async def button_callback(interaction):
            await interaction.response.vc.stop
            await interaction.response.send_message("hey guys never gonna give you up!")

        button.callback = button_callback
        view = View()
        view.add_item(button)
        await ctx.reply(embed=embed, view=view)
#

this is a button

#

so i wanted it so that when the button is clicked, the music would stop playing

#

but

#

Traceback (most recent call last):
File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\site-packages\nextcord\ui\view.py", line 359, in _scheduled_task
await item.callback(interaction)
File "c:\Users\Admin\Downloads\test\main.py", line 47, in button_callback
await interaction.response.vc.stop
AttributeError: 'InteractionResponse' object has no attribute 'vc'

#

@maiden fable

#

@worldly bane

#

sory for pings just need an answer

slate swan
#

ignore if you wanted the answer from them

cosmic agate
worldly bane
worldly bane
cosmic agate
#

but i need a button where on button click it should vc.stop

slate swan
#

that whole line gave me a stroke

slate swan
#

inter.guild.voice_client.stop()
is a thing iirc

cosmic agate
slate swan
cosmic agate
#

ok

#

kinda trueXD

slate swan
worldly bane
slate swan
cosmic agate
slate swan
#

what......

cosmic agate
#

so can i use the same code for pause

#

and resume

slate swan
#

it doesnt matter its just argument naming bruh

cosmic agate
slate swan
cosmic agate
#

thats why i change

worldly bane
slate swan
slate swan
#

just change it to interactionAG_PepeClap

slate swan
#

car go vroom vroom

worldly bane
#

this is getting off topic already

slate swan
frigid pendant
#

    role = message.guild.get_role(943243423446605834)
    buyers = len(role.members)

    print(buyers)

y this code returning 0?

slate swan
#

because it doesnt return anything

frigid pendant
#

how would i get the number of users with a role then?

slate swan
#

like that lol

frigid pendant
#

but i have over like 30 members with the role, y isnt it working then

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.

cosmic agate
slate swan
frigid pendant
#
welchannel = client.get_channel(950922040729288756)
    await client.edit_channel(welchannel, "WORKS!")

y does this code error?

#

im using a on message event to fire this

#

so it only runs if fired unde certain args

quick gust
#

show error

cosmic agate
#
    button.callback = button_callback
NameError: name 'button' is not defined
#

help

slate swan
#

code

static lintel
#

hey so i just switched over to hikari and im trying to make a message to send when a member joins the server. i run the code shown but i get an attribute error for respond.

async def memberJoin(ctx):
    await ctx.respond(f'Thank goodness {users.User} has joined {guilds.GatewayGuild}')


@client.listen(hikari.MemberDeleteEvent)
async def memberRemove(ctx):
    await ctx.respond(f'Thank goodness {users.User} has left {guilds.GatewayGuild}')```
frigid pendant
#

@quick gust ```py
Ignoring exception in on_message
Traceback (most recent call last):
File "/home/runner/AutoPurchaseHandler/venv/lib/python3.8/site-packages/discord/client.py", line 343, in _run_event
await coro(*args, **kwargs)
File "main.py", line 41, in on_message
await client.edit_channel(welchannel, "WORKS!")
AttributeError: 'Client' object has no attribute 'edit_channel

boreal ravine
#

it can

slate swan
frigid pendant
#

how can i fix the error then?

#

@slate swan

slate swan
#

ask sift frog_sip

boreal ravine
unkempt canyonBOT
#

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

Edits the channel.

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

Changed in version 1.3: The `overwrites` keyword-only parameter was added.

Changed in version 1.4: The `type` keyword-only parameter was added.

Changed in version 2.0: Edits are no longer in-place, the newly edited channel is returned instead...
boreal ravine
#

no

slate swan
#

this man really said no to himself

boreal ravine
#

nope

#

ash deleted her message Bruhmoment

boreal ravine
boreal ravine
#

also ashley that method could only be used on non-bot accounts which discord doesn't allow anymore

frigid pendant
#

keyle tht doesnt rlly help me, i cant figure out how to change the channel name

boreal ravine
slate swan
#

which of all

boreal ravine
#

every method which is considered self-botting

slate swan
#

name them alllemon_smirk

boreal ravine
boreal ravine
frigid pendant
#
Ignoring exception in on_message
Traceback (most recent call last):
  File "/home/runner/AutoPurchaseHandler/venv/lib/python3.8/site-packages/discord/client.py", line 343, in _run_event
    await coro(*args, **kwargs)
  File "main.py", line 40, in on_message
    welchannel = bot.get_channel(950922040729288756)
NameError: name 'bot' is not defined

i get this error now

#
    welchannel = bot.get_channel(950922040729288756)
    await bot.edit_channel(welchannel, "WORKS!")

heres the code

slate swan
#

well is bot and instance of the Bot class?

frigid pendant
#

Its using a in message event

slate swan
#

you havent quite answered my question

frigid pendant
#

Would u like me to send the repl link thats hosting the bot?

slate swan
#

No.

jade tartan
#

And btw if i am putting a embed field would my value be Age?

slate swan
frigid pendant
# slate swan No.
intents = Intents.default()
intents.members = True
client = discord.Client(intents=intents)


@client.event
async def on_ready():
    print("Ready! and logged in as {0.user}".format(client)

@slate swan this is the sttartup code im using

slate swan
#

format frog_sip

slate swan
frigid pendant
#

then how would ichange the channel name if i cant use client then?

slate swan
#

bro

#

use the client class instance

frigid pendant
#

what does that mean?

#

so i use client?

#

instead of bot

slate swan
#

the client variable yes

#

yes

boreal ravine
frigid pendant
#

ooh

#

@boreal ravine now i get this errror ```py
TypeError: edit() takes 1 positional argument but 3 were given
80
Ignoring exception in on_message
Traceback (most recent call last):
File "/home/runner/AutoPurchaseHandler/venv/lib/python3.8/site-packages/discord/client.py", line 343, in _run_event
await coro(*args, **kwargs)
File "main.py", line 41, in on_message
await welchannel.edit(welchannel, "WORKS!")
TypeError: edit() takes 1 positional argument but 3 were given

#
    welchannel = client.get_channel(950922040729288756)
    await welchannel.edit(welchannel, "WORKS!")
#

theres the code

slate swan
#

well you gaved it 3 positional arguments

slate swan
frigid pendant
#

This makes no sense to me

#

thaw do i put as the reason variable?

#

my smal; ass brain cant take this

boreal ravine
frigid pendant
#

MY GOD

#

NOW I GET INVALID SYNTAX

#
 welchannel = client.get_channel(950922040729288756)
    await welchannel.edit(*, "WORKS!")
slate swan
#

bro

frigid pendant
#

its nut a function cuz im using a on message event

frigid pendant
#

even when i remove it, it doesnt work

boreal ravine
#

do name='WORKS!'

boreal ravine
#

does this mean that bots won't be able to reply anymore to commands if they're in 100+ servers or?

jade tartan
#

Can someone help me save the users age like this ?

slate swan
boreal ravine
slate swan
#

yeah that lol

jade tartan
#

Well in this case am using deta

#

at this point

boreal ravine
#

deta.sh?

jade tartan
#

But i dont really know how to set it it up to where it actually knows the users age

#

and stuff

slate swan
boreal ravine
#

and i'm pretty sure bots can't get a users age IRL

slate swan
boreal ravine
#

yea

slate swan
#

sql betterkek

slate swan
#

pg sqlite etc so much to pick

green bluff
#

there is a file called requirements

slate swan
slate swan
slate swan
green bluff
#

about dpy*?

slate swan
#

try ./requirements.txt

green bluff
slate swan
#

weird

green bluff
#

idk why it doesnt work

boreal ravine
jade tartan
green bluff
green bluff
#

but i got a second error

clever cliff
#

Path not found..

slate swan
green bluff
boreal ravine
green bluff
#

it would literally do nothing

green bluff
slate swan
green bluff
#

I tried it already

#

it will not do anything if i reset

#

fine

#

and kayles one worked

boreal ravine
#

ok

green bluff
#

help? there is a second error

slate swan
green bluff
green bluff
#

it did this then

boreal ravine
#

thats a warning lol

green bluff
#

oh

boreal ravine
green bluff
#

nope

#

when i do this it returns nothing

quick gust
#

try python -m setup.py .. or whatever the thing is

jade tartan
#

can someone help me

clever cliff
jade tartan
#

I am but i dont know how to set up age pary

#

age part

maiden fable
worldly bane
supple thorn
#

Maybe?

slate swan
slate swan
#

though its not recommended

#

sending requests from one ip, getting the ip ratelimited, resulting in downtime of all the bots

worldly bane
#

welp

maiden fable
#

Indeed

#

That's why replit sucks

#

@slate swan I always feel like yr pfp is a character from the movie Avatar istg

maiden fable
#

Seems like it hurted

slate swan
formal basin
#

Anyone know how I can make this into roles

formal basin
slate swan
#

huh?

formal basin
#

What do I change the channel.id to to make it roles

queen linden
#

can someone help me im still learning how to make databases
im making a levelling system and i want it to delete the user information if they leave the server im using aiosqlite

slate swan
#

message.author.roles will return a list of Role objects of the author

formal basin
#

Instead of channels

mental bison
#

Hi, Can someone point me to a wiki to handle exception in Slash commands?
Exception handling works fine but it fails in Slash commands

maiden fable
unkempt canyonBOT
#

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

The default slash command error handler provided by the bot.

By default this prints to [`sys.stderr`](https://docs.python.org/3/library/sys.html#sys.stderr "(in Python v3.10)") however it could be overridden to have a different implementation.

This only fires if you do not specify any listeners for slash command error.