#discord-bots

1 messages · Page 444 of 1

steep estuary
#

:/

#

then also :/

slate swan
#

so your line would be
last_msg = ctx.channel.last_message

steep estuary
#
@bot.command()
async def react(ctx, chat:discord.Message, emoji):
    try:
        if emoji is None:
            await ctx.send(f":exclamation: {ctx.author.mention} Please Specify the Emoji which you want to React")  
        else:
            message = chat
            await message.add_reaction(emoji)

    except commands.errors.MessageNotFound:
        last_msg = ctx.channel.last_message
        await last_msg.add_reaction(emoji)

code

slate swan
#

right

#

hmm

steep estuary
#

but then also message not found error :/

slate swan
#

what did you type in discord?

steep estuary
#

>react 37583758475894 😂

#

this

waxen tangle
#

is there a way to make it so it doesnt matter if the prefix used is e! or E!, as of now only e! works py client = commands.Bot(command_prefix="e!", intent = discord.Intents.all(), activity=discord.Activity( type=discord.ActivityType.playing, name="with dough", status=discord.Status.online ))

steep estuary
#

nono

#

that work

#

but if i do >react 😂

#

it is not working :/

slate swan
#

then you use your own command wrong

#

oh

#

um

#

a solution would be to switch chat with emoji

#

in the command's arguments

steep estuary
#

:/

#

means i should give emoji first ?

slate swan
#

yes

steep estuary
#

oo i have little bit same command :/

@bot.command()
async def tell(ctx, channel: Optional[discord.TextChannel]=None, *, msg):
    if channel is None:
        channel = ctx.channel
    await channel.send(msg)
slate swan
#

what does that have to do with anything

steep estuary
#

??

#

i didn't understood :/

slate swan
#

oof

#

I would switch chat and emoji

#

and remove the whole try-except

#

nvm

#

but first check if chat is None

steep estuary
#

:/

#

k

slate swan
#

so like

#
@bot.command()
async def react(ctx, emoji, chat: discord.Message=None):
    try:
        if emoji is None:
            await ctx.send(f"❗ {ctx.author.mention} Please Specify the Emoji which you want to React")  
        else:
            message = chat
            await message.add_reaction(emoji)

    except commands.errors.MessageNotFound:
        last_msg = ctx.channel.last_message
        await last_msg.add_reaction(emoji) 
steep estuary
#

ooooops

slate swan
#

then check if chat is None

steep estuary
#

it is working but it is reacting to the command :/

#

:/

slate swan
#

Ig that's the last message in the channel

#

little logical fail

steep estuary
#

:/

slate swan
#

hm

steep estuary
#

chat = ctx.channel.last_message-1 ??

slate swan
#

no

steep estuary
#

:/

fervent surge
#

why? python TypeError: add_field() takes 1 positional argument but 3 were given when python embed.add_field(f'{message.author.name} has been muted', 'They were being very toxic in this message: **{message.content}**')????

blazing beacon
#

add_field(name=, value=)

fervent surge
blazing beacon
#

!d discord.Embed.add_field

unkempt canyonBOT
#

add_field(*, name, value, inline=True)```
Adds a field to the embed object.

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

I don't know if you want to change your command

steep estuary
#

oo

slate swan
#

or find another way to not need to delete your message

steep estuary
#

😕

slate swan
#

what does that mean

steep estuary
#

imma confused :/

#

nvm srry :/

slate swan
#

put
await ctx.message.delete()
above
chat = ctx.channel.last_message
and see if that's okay for you

steep estuary
#

k :/

lament mesa
#

played with the new buttons feature for the past few hours

#

its pretty cool

slate swan
#

probably, since there's no point of the react command if they see who used itbruhkitty

blazing beacon
lament mesa
#

yeah

steep estuary
fervent surge
#

I am confused:python muted[message.author.id] = 300

TypeError: 'Role' object does not support item assignment```
slate swan
#

polls?

steep estuary
#

like quiz which have mcq

slate swan
#

mhm

fervent surge
fervent surge
slate swan
#

as I see

steep estuary
#

it is not working :/

fervent surge
#

right

slate swan
fervent surge
#

sorry

steep estuary
#

it is deleting but not reacting

slate swan
#

because emoji is not None

#

remove the else

vagrant brook
#

I'm not sure what the chat param is for

steep estuary
#

:/

slate swan
#

because it should always react no matter what

steep estuary
#

k

slate swan
#

so no else

steep estuary
slate swan
#

yeah, but if the emoji isn't None, it won't access that statement

#

it should work the opposite way

dapper cobalt
proven elm
slate swan
#

me too lmao

steep estuary
slate swan
#
@client.command()
async def ticket(ctx):
    guild = ctx.guild
    member = ctx.author
    overwrites = {
        guild.default_role: discord.PermissionOverwrite(read_messages=False),
        guild.me: discord.PermissionOverwrite(read_messages=True),
        member: discord.PermissionOverwrite(read_messages=True)
    }
    channel = await guild.create_text_channel(f"{ctx.author.name} `s ticket", overwrites=overwrites)
    await ctx.send(f"Your ticket has been created at {channel.mention}")
    ticket = discord.Embed(title = "KATSA TICKETS!", description = f"Hello {ctx.author.mention} our staff will be with you soon!", color = discord.Colour.random())
    ticket.set_footer(text="Ticket system created by katsa")
    close = discord.Embed(title = "Your ticket is being closed", color = discord.Colour.random())
    close.set_footer(text="Ticket system created by katsa")
    await channel.send(
      embed = ticket,
      components = [
          Button(style = ButtonStyle.red, label = "Close")
      ]
    )
    while True:
      event = await client.wait_for('button_click')
      label = event.component.label

      if label == "Close":
          await event.respond(type = 4, content = "Deleting your channel...")
          await channel.delete()``` hey can anyone help me ? it deletes only the first ticket that i create, in the other ones it said . uknown channel
#

when I answer and I get an :/, I think I said something wrong

steep estuary
#

again same problem

steep estuary
slate swan
#

is there an error?

steep estuary
slate swan
#

nice

#

send that

steep estuary
slate swan
#

did you pass in a wrong id?

dapper cobalt
delicate flax
#

Hello, how can I do something when someone dm my bot? I tried this but the bot is spamming me the mesage

@bot.event
async def on_message(message):
    if not message.guild:
        await message.channel.send("This is a dm")```
maiden fable
#
if message.author.bot: return
#

at the very start 😄

upbeat otter
#

Guys, why am i getting an error, extension "dismusic" could not be loaded

delicate flax
#

😂 I'm so dumb thank you

maiden fable
upbeat otter
fervent surge
#

why is this not happenening every second?```python
@tasks.loop(seconds=1)
async def checks():

guild = bot.get_guild(861260736457998346)
mute = guild.get_role(883380167865667644)

print(muted)
for member, secsLeft in muted.items():
    mem = bot.get_user(member)
    if secsLeft == 0:
        mem.remove_roles(mute)
        del muted[member]
    else:
        muted[member] -= 1
    print('secs left of mute:', secsLeft)

print('starting checks!')
checks.start()```

slate swan
#

await remove_roles?

maiden fable
#

yea

slate swan
#

and isn't this API spamming?

plucky shoal
#

Also yeah this

maiden fable
#

but that should have errored out

maiden fable
upbeat otter
#

@maiden fable

dapper cobalt
dapper cobalt
fervent surge
#

well, yes

upbeat otter
#
client.lava_nodes = [
  {
    "host": "lava.link",
    "port": 80,
    "rest_url": f"http://lava.link:80",
    "identifier": "MAIN",
    "password": "Anything",
    "region": "india"

  }
]

@client.event
async def on_ready():
  print('Logged in as {0.user}'.format(client))
  await client.change_presence(activity=discord.Activity(type=discord.ActivityType.watching, name="One Piece"))
  try:
    client.load_extension("dismusic")
    client.load_extension("dch")
  except Exception as t1:
    print(t1)
  while True:
    await asyncio.sleep(10)
    with open("spam.txt", "r+") as file:
      file.truncate(0)
fervent surge
#

but thats because there is no bot.wait_until_ready()

slate swan
#

not in on_ready brooo

upbeat otter
slate swan
#

anywhere

#

outside of on_ready

upbeat otter
#

oh

slate swan
#

and why is there a while True deleting everything from a file every ten seconds

#

lmao

#

pretty sure that blocks the entire code

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
#

ytdl?

#

oh, the cog's name is dismusic

#

oh....

#

thnx

#

actually the code and everything got duplicated

slate swan
#

thnx boiz

maiden fable
#

Uhhh, did you just ping random people....?

gritty flame
lament mesa
#

it still breaks the tos

cinder horizon
#
try:
            pages = utils.DetailedPages(self.bot, message=ctx.message, entries=entries)
            await pages.paginate()
        except: #utils.CannotPaginate as e:
          await ctx.send("meh")
          #await ctx.send(str(e))
```all it sends is
slate swan
#

okay

#

then print the error ig

dapper cobalt
#

raise e.

slate swan
#

we dunno what you're trying to do

cinder horizon
# slate swan we dunno what you're trying to do
entry = {
                'title': 'Top {} Osu scores for {}'.format(limit, member.display_name),
                'fields': [
                    {'name': 'Artist', 'value': m.artist},
                    {'name': 'Title', 'value': m.title},
                    {'name': 'Creator', 'value': m.creator},
                    {'name': 'CS (Circle Size)', 'value': m.diff_size},
                    {'name': 'AR (Approach Rate)', 'value': m.diff_approach},
                    {'name': 'HP (Health Drain)', 'value': m.diff_drain},
                    {'name': 'OD (Overall Difficulty)', 'value': m.diff_overall},
                    {'name': 'Length', 'value': m.total_length},
                    {'name': 'Score', 'value': i.score},
                    {'name': 'Max Combo', 'value': i.maxcombo},
                    {'name': 'Hits',
                     'value': f"{i.count300}/{i.count100}/{i.count50}/{i.countmiss} (300/100/50/misses)",
                     "inline": False},
                    {'name': 'Perfect', 'value': "Yes" if i.perfect else "No"},
                    {'name': 'Rank', 'value': i.rank},
                    {'name': 'PP', 'value': i.pp},
                    {'name': 'Mods', 'value': str(i.enabled_mods)},
                    {'name': 'Date', 'value': str(i.date)}
                ]
            }

            entries.append(entry)
```tryna get these scores as embeds
slate swan
#
    raise e```
dapper cobalt
slate swan
#

I'm not familiar with these

#

use a database anyways

cinder horizon
slate swan
#

using dictionary as a database?

cinder horizon
dapper cobalt
#

And whatever it is, it does not have an attribute DetailedPages.

cinder horizon
#

figured as much...but how do i correct it?

dapper cobalt
#

Well, I cannot really help you since I don't know what is utils.

cinder horizon
#

aighty...

dapper cobalt
#

Is it discord.utils or some third party package?

cinder horizon
boreal ravine
pliant gulch
#

Not in the documentation but there is some methods of it ig

#

!d discord.utils.get

unkempt canyonBOT
#

discord.utils.get(iterable, **attrs)```
A helper that returns the first element in the iterable that meets all the traits passed in `attrs`. This is an alternative for [`find()`](https://discordpy.readthedocs.io/en/stable/api.html#discord.utils.find "discord.utils.find").

When multiple attributes are specified, they are checked using logical AND, not logical OR. Meaning they have to meet every attribute passed in and not one of them.

To have a nested attribute search (i.e. search by `x.y`) then pass in `x__y` as the keyword argument.

If nothing is found that matches the attributes passed, then `None` is returned.

Examples

Basic usage...
boreal ravine
#

yes you need discord utils for certain things

upbeat otter
boreal ravine
#

use f strings then

#

saves time and much easier

upbeat otter
boreal ravine
#

o

cinder horizon
pliant gulch
#

Are you getting two modules mixed up or something?

cunning dagger
#

Hey guys i stucked at developing a simple bot. I want to create a Bot which makes automatic reactions on any message in specific channel. I'm using microsoft visual studios with python. Every time i want to run and debug the bot there comes the message no module named x. Can you help me?

cinder horizon
slate swan
#

wtf is happening idk

pliant gulch
#

Then whichever github repo you got the command from probably has a utils module its using

#

Perhaps check their repo and look for a file called utils.py or something

regal rapids
#

so im trying to get stuff out of a .json file and then load it but i keep on getting this

#
print('[INFO] Loading DATA')
with open("config.json") as file:
    info = json.load(file)
    token = info["token"]
    welcomechannel = info["welcomechannel"]
    giveaway1 = info["giveaway1"]
    giveaway2 = info["giveaway2"]
    giveaway3 = info["giveaway3"]
    chat = info["chat"]```
hasty iron
#

the json doesn’t contain a "giveaway1" key

slate swan
pliant gulch
slate swan
hasty iron
#

you should be able to know what’s wrong

slate swan
slate swan
hasty iron
#

then i suggest you go back to python basics

slate swan
hasty iron
regal rapids
cunning dagger
#

Can you help me?

hasty iron
slate swan
hasty iron
#

py -m pip install discord.py

slate swan
slate swan
#

I have seen that video lol u skidded all the code of it

hasty iron
cunning dagger
hasty iron
#

in the command line

cunning dagger
#

just paste?

slate swan
#

I code in atom so it’s different

slate swan
#

@hasty iron do u know sqlite3

#

I’m having trouble with an error

hasty iron
#

if it’s a question about databases it’s better suited for #databases

slate swan
#

Ok

#

It is but it isn’t lol

fervent surge
#

why is this only happening once?```python
@tasks.loop(seconds=1)
async def checks():

guild = bot.get_guild(861260736457998346)
mute = guild.get_role(883380167865667644)

print(muted)
for member, secsLeft in muted.items():
    mem = bot.get_user(member)
    if secsLeft == 0:
        mem.remove_roles(mute)
        del muted[member]
    else:
        muted[member] -= 1
    print('secs left of mute:', secsLeft)

print('starting checks!')
checks.start()```

cunning dagger
#

thx guys

slate swan
#

Np*

slate swan
hasty iron
#

just search "python key error"

slate swan
#

@slate swan show me

slate swan
#

wht should i define guild with

#

message

#

It says key error because it’s not a value in the json file

#

Ok now try

#

wht

slate swan
#

Try to see if it works

#

no it does

hasty iron
#

you can return a default prefix if the guild isn’t inside the json

slate swan
#

so how do i do it

#

bruh

#

Dude ur code is fucked

#

why

#

First off

hasty iron
#

something like

prefix = prefixes.get(str(Guild.id))
if not prefix:
    # return default prefix
else:
    return prefix
slate swan
#

Why are u reading it

hasty iron
#

that was a pain

slate swan
#

It stil won’t work

slate swan
hasty iron
#

why not

#

get returns None if the key isn’t found

slate swan
#

Not that

hasty iron
#

well actually

slate swan
#

even if error is there it still registers

hasty iron
#

alternatively you could just do return prefixes.get(str(message.guild.id), default_prefix)

slate swan
slate swan
slate swan
stiff nexus
#

in discord-ext-menus how do i make the bot remove authors reactions when the author uses it????

cunning dagger
#

one finally question: The bot is now running in my server and works but the bot works only when i push start debugging in the app. I want that the bot runs every time without open programm

slate swan
#

now if i want to add code to github so this needs to be changed right????????? help

#

help @slate swan

#

help @hasty iron

gritty flame
#

why tf is it raising this error im using mystbins api

gritty flame
#

what, if you dont know just dont say anything this is a help channel

gritty flame
#

if someone knows they tell you the problem

#

its alright

slate swan
gritty flame
#

its alright chill

upbeat otter
#

Guys why doesnt my bot make any sound? It has a green circle surrounding it, but it does not play anything.

@client.command()
async def play(ctx, url):
  ctx.voice_client.stop()
  FFMPEG_OPTIONS = {"before_options": "-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5", "options": "-vn"}
  YDL_OPTIONS = {"format": "bestaudio"}
  vc = ctx.voice_client

  with youtube_dl.YoutubeDL(YDL_OPTIONS) as ydl:
    info = ydl.extract_info(url, download=False)
    url2 = info["formats"][0]["url"]
    source = await discord.FFmepgOpusAudio.from_probe(url2, **FFMPEG_OPTIONS)
    vc.play(source)
gritty flame
#

!ytdl

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)
upbeat otter
#

same thing happened when i used another module/library too

gritty flame
#

we cant help

slate swan
upbeat otter
slate swan
gritty flame
#

other stuff

#

exactly lol

upbeat otter
maiden fable
slate swan
upbeat otter
slate swan
upbeat otter
slate swan
#

help if i want to add bot to github then?? should i change its location

slate swan
upbeat otter
#

there's no tutorial telling how to use spotify.......

slate swan
# upbeat otter i can?

No, we can't help with it doesn't mean you can't use it. But either way, it breaks ToS, so is it better if you don't use it? Yes. And I'm not telling you to use it.

upbeat otter
#

oh ok thanx

slate swan
#

What?

#

if i want to upload it to github then should i cgnage path

#

change

#

You upload the files

slate swan
#

will it work

#

Do it, just upload each of your file

slate swan
#

From file explorer to Github or something

#

Yes

slate swan
dense walrus
#

Can someone send the docs where it's explaining how to get emojis from other servers so the bot can send them?

stiff nexus
#
emoji = bot.get_emoji(878974222163128351)
guild = bot.get_guild(862915601022058526)
w = discord.utils.get(guild.roles, id=862915601022058527)
e = discord.utils.get(guild.roles, id=865269145007816704)
o = ctx.guild.owner
role = [w,e,o]

await emoji.edit(roles=role, reason="Test")
``` i did this. i am the owner of the guild thats why i added `o` but i cant see the emoji without that role whyy???
slate swan
unkempt canyonBOT
dense walrus
#

thanks

upbeat otter
#

is there something wrong?

await ctx.send(f"{name1} is best person on the server")
  await asyncio.sleep(3)
  await ctx.edit(content=f"{name1} is the dumbest person on the server")
slate swan
#

Can you explain????

upbeat otter
#

plz tell

slate swan
#

it won't work

upbeat otter
#

yes

minor kestrel
#

Hi, I am trying to know if someone is streaming in twitch, by knowing when their activity is in the Streaming category, by now I am trying it using a command, I already have this code inside the command:

guild = bot.get_guild(ID)
member = guild.get_member(ID)

if isinstance(member.activity, discord.Streaming):
  print(f"{after.mention} Is streaming")

But this doesn't works, because there are already some people streaming and this doesn't work, where's the problem??

upbeat otter
#

i need help thats why

slate swan
#

store the first message in a variable and then use message.edit()

upbeat otter
#
message = await ctx.send(f"{name1} is best person on the server")
  await asyncio.sleep(3)
  await message.edit(content=f"{name1} is the dumbest person on the server")
``` like this?
dense walrus
#

Where do I find the emoji ID? @slate swan
Can't find it for some reason when I have developer mode on

slate swan
#

yes, should work

upbeat otter
slate swan
slate swan
#

I don't know wym

final iron
#

Anyone know any good alternatives to asyncpraw I'm having some issues with it

slate swan
#

help if i want to add it to github

slate swan
slate swan
slate swan
slate swan
slate swan
#

how do i connect it on github

#

@slate swan

slate swan
cunning dagger
#

one finally question: The bot is now running in my server and works but the bot works only when i push start debugging in the app. I want that the bot runs every time without open programm

slate swan
#

debugging

slate swan
cunning dagger
#

possible

slate swan
#

use sqlite3

#

so much easier than json

slate swan
#

plus json files tend to crash

#

so they you will loose all your data

slate swan
#

ues

#

ohk

cunning dagger
#

so what do I have to do so that the bot runs continuously

slate swan
final iron
hasty iron
#

use asyncpraw

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.

slate swan
#

I am facing some problems

final iron
#

Asyncpraw is what I'm using rn

minor kestrel
#

but it doesn't work

final iron
#

There are alot of issues with it

hasty iron
#

you could make your own

slate swan
#

I want to make my own

#
sql = ("INSERT INTO main(guild_id, prefixes) VALUES(?,?)")
  prefix = "!"
  val = (guild.id, prefix)
  sql = ("INSERT INTO main(loggingstatus,guild_id) VALUES(?,?)")
  status = "off"
  val = (status,guild.id)
  cursor.execute(sql,val)
  db.commit()
  sql = ("INSERT INTO main(guild_id, invitestatus) VALUES(?,?)")
  status2 = "off"
  val = (guild.id, status2)
  sql = ("INSERT INTO main(verifystatus,guild_id) VALUES(?,?)")
  val = (status2,guild.id)
  cursor.execute(sql,val)
  db.commit()
  cursor.close()
  db.close()

for some reason this doesn't work and its very confusing lol idk if i have to execute the sql after or some shit

final iron
slate swan
slate swan
#

only for storign temp data

#

if u want ur stuff to crash then ig go for it

slate swan
unkempt canyonBOT
cunning dagger
slate swan
#

let it be

#

no change prefix lol

#

or else i will add later

dapper cobalt
#

!pypi pymongo

unkempt canyonBOT
dapper cobalt
#

!pypi motor for async version of pymongo

unkempt canyonBOT
slate swan
slate swan
dapper cobalt
dense walrus
#

Is bot.get_thread a thing? How do I get a thread? like a channel?

slate swan
#

pretty sure you would use guild

#

brtuh

dapper cobalt
stiff nexus
#

also how do i get the vc id where the author is connected

slate swan
dapper cobalt
#

!pypi disnake

unkempt canyonBOT
slate swan
#

Can someone provide me the docs for making a Discord bot

#

?

minor kestrel
# slate swan !d discord.ActivityType.streaming try this

No, and now returns an error

if isinstance(member.activity, discord.ActivityType.streaming):

Error:

    if isinstance(member.activity, discord.ActivityType.streaming):
TypeError: isinstance() arg 2 must be a type or tuple of types
slate swan
slate swan
dapper cobalt
slate swan
#

i can talk also

slate swan
dapper cobalt
slate swan
#

is there any way to return how many threads are in a category or

dense walrus
dapper cobalt
slate swan
hasty iron
minor kestrel
dapper cobalt
hasty iron
#

you could check for TextChannel.category

mild vine
#

fail

#

oops

#

sorry wrong channel

slate swan
hasty iron
#

2.0 isnt on pypi

dense walrus
#

it's pip install repo-link right?

hasty iron
#

git+repi-link

#

and you need to have git

dense walrus
#

yeah of course

cunning dagger
# slate swan wydm

So in this moment the bot only works when i click on run. If i close the program the bot doesn’t work. I want that the bot works when the program is closed and i don‘t know how

dense walrus
#

thanks

slate swan
#

like visual studio?

cunning dagger
#

Yes

agile goblet
#

minimise it

slate swan
#

i like ducks

agile goblet
#

goode

#

goose

slate swan
#

print('duck eaten')

agile goblet
#

FUCK

#

cant type

reef shell
slate swan
upbeat otter
#
await client.change_presence(activity=discord.Activity(type=discord.ActivityType.watching, name="One Piece", status=discord.Status.offline))
```Why is this not working?
#

the status part aint working

reef shell
#

use Status.online

#

or dnd/ idle

slate swan
#

??

reef shell
#

not offline

upbeat otter
#

oh ok

slate swan
#

Offline can also be set iirc

reef shell
#

yes

upbeat otter
hasty iron
#

with offline you can’t have an activity

reef shell
#

but then this will not show the activity

slate swan
#

take it out of activity const

upbeat otter
#

its okay

#

so i take out act?

hasty iron
#

take out whichever

slate swan
#

!d discord.Client.change_presence

unkempt canyonBOT
#

await change_presence(*, activity=None, status=None, afk=False)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).

Changes the client’s presence.

Example

```py
game = discord.Game("with the API")
await client.change_presence(status=discord.Status.idle, activity=game)
reef shell
#

if you want to show the activity then don't use offline status

upbeat otter
#

i see

slate swan
#

Yes, activity and status are separate kwargs

cunning dagger
reef shell
#

status = discord.Status.online

slate swan
cunning dagger
cunning dagger
reef shell
upbeat otter
reef shell
#

vps

slate swan
#

prefer not heroku

upbeat otter
#

@slate swan My bot is still showing online

await client.change_presence(status=discord.Status.offline)
reef shell
#

for small bots its ok

upbeat otter
#

use replit and uptime robot...

#

works best for me

reef shell
#

this shit is so bad

#

i don't recommned it

upbeat otter
reef shell
#

ik

slate swan
upbeat otter
#

i think i shouldnt....

slate swan
#

blobpain Do this in your bot constructor instead

slate swan
#
bot = commands.Bot(..., activity=..., status=...)
upbeat otter
regal rapids
#

how do i make it so only i the owner can run the command

slate swan
#

!d discord.ext.commands.is_owner

unkempt canyonBOT
#

discord.ext.commands.is_owner()```
A [`check()`](https://discordpy.readthedocs.io/en/stable/ext/commands/api.html#discord.ext.commands.check "discord.ext.commands.check") that checks if the person invoking this command is the owner of the bot.

This is powered by [`Bot.is_owner()`](https://discordpy.readthedocs.io/en/stable/ext/commands/api.html#discord.ext.commands.Bot.is_owner "discord.ext.commands.Bot.is_owner").

This check raises a special exception, [`NotOwner`](https://discordpy.readthedocs.io/en/stable/ext/commands/api.html#discord.ext.commands.NotOwner "discord.ext.commands.NotOwner") that is derived from [`CheckFailure`](https://discordpy.readthedocs.io/en/stable/ext/commands/api.html#discord.ext.commands.CheckFailure "discord.ext.commands.CheckFailure").
minor kestrel
tropic sinew
#

how can I have to command names?

#

like```py
@client.command()
async def disconnect/dis(self, ctx):
pass

slate swan
#

make it an aliase

slate swan
hoary gust
#

guys any interesting lib that can be used in bot

#

?

pure reef
#
@bot.event
async def on_member_join(member):
     db = sqlite3.connect('main.sqlite')
     cursor = db.cursor()
     cursor.execute(f"SELECT channel_id FROM main WHERE guild_id = {member.guild.id}")
     result = cursor.fetchone()
     if result is None:
         return
     else:
         cursor.execute(f"SELECT msg FROM main WHERE guild_id = {member.guild.id}")
         result1 = cursor.fetchone()
         members = len(list(member.guild.members))
         mention = member.mention
         user = member.name
         guild = member.guild
         embed = discord.Embed(color=lol,description=str(result1[0]).format(members=members, mention=mention, user=user, guild = guild))
         
         channel = bot.get_channel(int(result[0])
``` full code
``` full code
File "c:\Users\\OneDrive\Desktop\Theft (NEW)\main.py", line 57, in on_member_join
    embed = discord.Embed(color=lol,description=str(result1[0]).format(members=members, mention=mention, user=user, guild = guild))
KeyError: 'member'
#

any ideas ??

hasty iron
#

add member=member

pure reef
#

okay

bronze moth
#

Literally no idea why I keep getting this error. The only things I've not posted are the location of the code within the traceback.

user = self.bot.get_guild(self.config.staff_guild).get_member(x['userid'])
AttributeError: 'NoneType' object has no attribute 'get_member'

self.config.staff_guild is in a json file as "staff_guild": 755251425302544487,
The bot has all intents enabled and is in the guild with the ID specified is the correct ID and the user is in the guild.

hoary gust
#

guys how can i count the number of bots in a guild

slate swan
#

!d discord.Client.guilds len(<--)

unkempt canyonBOT
slate swan
#

deleted?

hoary gust
#

yes

muted viper
#

should i rewrite my bot to another discord wrapper cuz discord.py stopped updating ?

past ermine
#

i figured it out

hoary gust
#

he deleted

slate swan
past ermine
#

ok

hoary gust
past ermine
slate swan
#

wait

hoary gust
#

waiting

slate swan
#

filter members with member.bot = True

hasty iron
hoary gust
hasty iron
#

or something like that

#

give you the number of bots inside a guild

slate swan
#

make a new list with members which has m.bot as True

#

and sum it

#

sum? notlikeblob

hoary gust
slate swan
#

!e ```py
sum(['a', 'b'])

unkempt canyonBOT
#

@slate swan :x: Your eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 1, in <module>
003 | TypeError: unsupported operand type(s) for +: 'int' and 'str'
hoary gust
#

me getting confused

slate swan
#

Not sum ig, it'll be len

hasty iron
#

member.bot returns a bool not a string

slate swan
past ermine
hoary gust
slate swan
hoary gust
#

like this?

hasty iron
#

oh right

#

but m is a Member object

#

not a string either

#

nvm

slate swan
#

it can't be summed still..?

past ermine
#

Hi, so I have the following code or line

cur.execute(f'''INSERT INTO GUILD_{ctx.guild.id} (user_id) VALUES ({x.id})''')
``` and i need it to ignore if the(user_id) already exists
hasty iron
#

why are you making a table for each guild

past ermine
#

idk i just followed a tutorial

hasty iron
#

that’s very terrible table design

past ermine
#

yes

#

i know

#

but it works for me

#

so i dont complain

hoary gust
#

any other way to find the number of bots

slate swan
# hoary gust so ```py len(member.bot) ```
len([m for m in guild.members if m.bot])
     ^^ makes a new list of members which are bots (or member.bot returns True = which is basically the same thing)
^^ find the length of it
past ermine
#

ok

#

does someone has a soloution

hasty iron
#

a Member object

slate swan
#

m is assigned variable to member object

hasty iron
slate swan
#

you can name it anything

#

Oh yes

past ermine
#

pls answer

young estuary
#

Hi I need help. In run docker (20.10.7) with ubuntu 20.04 LTS. I use "python:3.8.12-buster". The problem is the bot can't start for some reason.

ERROR:
iohttp.client_exceptions.ClientConnectorError: Cannot connect to host discord.com:443 ssl:default [Temporary failure in name resolution]

FULL ERROR:

https://ghostbin.com/paste/ePqg0

  • Google not helped lol.
    I would be very thankful for any help. 😀
high flame
#

can you do a list of discord.Members inside sum()??

#

oops

#

already someone said it

hasty iron
#

i saw something like that in a tag

hoary gust
#

and how can i get the total number of members

#

?

high flame
#

including bots ^^

hoary gust
#

kk thanks

hasty iron
# high flame len(Guild.members)

from an rdanny tag

Count your bot's members:
all members: sum([g.member_count for g in bot.guilds])
Human only: sum([m for m in bot.get_all_members() if not m.bot])
bots only: sum([m for m in bot.get_all_members() if m.bot])
Only one guild: ?rtfm guild.member_count

hasty iron
#

no clue

high flame
#

!d sum

unkempt canyonBOT
#
sum

sum(iterable, /, start=0)```
Sums *start* and the items of an *iterable* from left to right and returns the total. The *iterable*’s items are normally numbers, and the start value is not allowed to be a string.

For some use cases, there are good alternatives to [`sum()`](https://docs.python.org/3.10/library/functions.html#sum "sum"). The preferred, fast way to concatenate a sequence of strings is by calling `''.join(sequence)`. To add floating point values with extended precision, see [`math.fsum()`](https://docs.python.org/3.10/library/math.html#math.fsum "math.fsum"). To concatenate a series of iterables, consider using [`itertools.chain()`](https://docs.python.org/3.10/library/itertools.html#itertools.chain "itertools.chain").

Changed in version 3.8: The *start* parameter can be specified as a keyword argument.
high flame
#

iterable rooThink

slate swan
#

"The iterable’s items are normally numbers, and the start value is not allowed to be a string."

hasty iron
#

normally doesn’t mean always

slate swan
#

!e sum([1, 'a', 3])

hasty iron
#

there aren’t just 2 data types in python

#

well you can test it and see if it works

slate swan
hasty iron
#

what

#

there is a start argument

#

it refers to that

slate swan
#

uh oops

#

!e print(sum.doc)

hasty iron
#

!d discord.Guild.create_voice_channel

unkempt canyonBOT
#

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

This is similar to [`create_text_channel()`](https://discordpy.readthedocs.io/en/stable/api.html#discord.Guild.create_text_channel "discord.Guild.create_text_channel") except makes a [`VoiceChannel`](https://discordpy.readthedocs.io/en/stable/api.html#discord.VoiceChannel "discord.VoiceChannel") instead, in addition to having the following new parameters.
hoary gust
hasty iron
#

alternatively you couldve just looked it up in the docs

hoary gust
#

@hasty iron
is it correct

            overrides = {ctx.guild.default_role: discord.PermissionOverwrite(speak = False)}

past ermine
#

guys

#

i need help

#
cur.execute(f'''INSERT INTO GUILD_{ctx.guild.id} (user_id) VALUES ({x.id})''')
``` and i need it to ignore if the(user_id) already exists
gritty flame
past ermine
#

and how?

past ermine
#

how

hoary gust
kindred epoch
#

why are you going around pinging people

kindred epoch
# past ermine how

Do not:
cursor.execute("SELECT * FROM table_name WHERE value = {}".format('peepeepoopoo'))
Do:
cursor.execute("SELECT * FROM table_name WHERE value = ?", ('peepeepoopoo',))

Consider: if a command accepts user input, and they input True; DROP TABLE table_name- The resultant query with format is:
SELECT * FROM table_name WHERE value = True; DROP TABLE table_name which has obvious results.
Utilizing your SQL library's sanitization methods prepares the statement and exclusively inserts the values, without editing the query.
Note postgresql uses $1, $2, ... for value substitution, mysql, %s, so make sure you know your DB!
https://xkcd.com/327

kindred epoch
hoary gust
#

ok

past ermine
#

@kindred epoch

#

so cursor.execute("SELECT * FROM table_name WHERE value = {user.id}")

#

?

slate swan
#

Ping?

past ermine
#

i forgot to reply so i ping

hoary gust
past ermine
#

not you tho

slate swan
past ermine
#

ok

slate swan
#

Oh okay

hoary gust
#

its not locking it

slate swan
#

no idea then

hoary gust
#

ah i see

shell lion
#

how can i make bot go offline for certain amount of time?

#

for example when currenttime == 12:00:
bot(status=discord.Status.offline

#

or idk

#

can i use time.sleep to make it go offline?

void fable
past ermine
noble helm
#
def open_bank_account(userid):
    config = get_individual_config()
    if str(userid) in config["bank"]:
        return False
    else:
        config["bank"][str(userid)] = int(0)
    with open("Individual.json", "w") as f:
        json.dump(config, f)```
```py
def get_purse(userid):
    indivconfig = get_individual_config()
    open_bank_account(userid)
    return indivconfig["bank"][str(userid)]```
why is this not working the first time a user not in the file is triggering the get_purse() thing (ping me if you know)
#

i put checks in them and after stops writing
wait a second i have proven myself to be dumb again

manic wing
#

yo what am i tripping

#

how do you set intents for discord.Client

#

im having a stroke

#
class Integrate(commands.Bot):
    def __init__(self):
        super().__init__(
            command_prefix = 'eee',
            intents = discord.Intents.all()
        )
#

<Intents value=32767>

#

but print([k for k in self.bot.guilds]) prints nothing

#

just []

#

but

#

on_message works

forest blade
#

Where are you printing that?

wicked atlas
#

If you're printing it before the bot is ready and connected to the gateway, it might not have loaded it's list of guilds yet

manic wing
#

i knew i was having a stroke

#

my bad

#

yeah it works

#

fuck me

#

thanks

noble helm
#

i was almost texting something dumb again
but i relearned how to read errors

#

-r

#

lol wrong server

#

today i am just lost

#

-r

#

again
why am i even programming right now

soft trout
#

Im doing a blackjack command (with buttons), and i made the buttons. but i they dont really work. im doing:

if inter.clicked_button.label=="hit":
manic wing
#

can you say the error

soft trout
#

there is none..

#

:|

#

am i doing something wrong?

#
row = ActionRow(
               Button(
                    style=ButtonStyle.red,
                    label="Hit",
                    custom_id="hit"
                    ),
               Button(
                 style=ButtonStyle.red,
                 label="Stand",
                 custom_id="stand"
                   )
                )
                  #bla bla bla
              
              rand1=random.randint(1,11)
              rand2=random.randint(1,11)
              randb1=random.randint(1,11)
              randb2=random.randint(1,11)
              total=rand1+rand2
              em=discord.Embed(title="Black Jack")
              em.add_field(name="You", value=f"`{rand1}` `{rand2}` (Total={total})")
              em.add_field(name="Dealer", value="`?` `?`")
              msg=await interaction.reply(embed=em, components=[row])
    # This is the check for button_click waiter
              def check(inter):
               return inter.author == interaction.author
              inter = await msg.wait_for_button_click(check=check)
  
              if inter.clicked_button.label=="hit":
#

also

#

its a slash command

opaque trail
#

your buttons should be in a list pretty sure

soft trout
#

wdym tho

manic wing
manic wing
#

inter = await msg.wait_for_button_click(check=check) write print(1)

#

to see if it triggers

#

write a bunch of print's to see where it stops printing

#

it should be easy to figure it out if you print it all, to see the bigger picture

opaque trail
soft trout
#

well

manic wing
soft trout
#

i got 1 after inter

manic wing
soft trout
#

yes

#

it is

manic wing
#

now print inter.clicked_button.label after inter = await msg.wait_for_button_click(check=check)

soft trout
#

well

#

it worked

#

it said hit

#

(which is the button name)

manic wing
#

so it printed hit?

#

okay print(1) inside the check (if inter.clicked_button.label=="hit":) to see if it trigger

#

s

soft trout
#

ok

#

gimme seccond

slate swan
#

What's the issue with this?


symbols = "à", "á", "â", "ä", "æ", "ã", "å", "ā"
letters = string.ascii_letters

with open("test.txt") as file:
    test2 = file.read().split('\n')

@bot.listen("on_message")
async def on_message(message):

    guild = message.guild
    bypassedRole = discord.utils.get(guild.roles, name="Bypassed")


    if bypassedRole in message.author.roles:
        return

    for word in test2:
        regex_match_true = re.compile(fr"[{symbols}]*".join(list(word)), re.IGNORECASE)
        regex_match_none = re.compile(fr"([{letters}]+{word})|({word}[{letters}]+)", re.IGNORECASE)
        if regex_match_true.search(message.content) and regex_match_none.search(message.content) is None:
            await message.delete()
            embed = discord.Embed(title="Message Deleted", color=0xD708CC, description= f"{message.author.mention}, You're not allowed to say that.")
            embed.timestamp = datetime.utcnow()
            await message.channel.send(embed=embed)```
#

I have no errors, it's not blocking anything with the symbols which is the issue

#

Like when I'm trying to say àss it's not blocking it

#

And I don't have any error handlers

#

Anyone know the issue?

proven elm
#

tryna do error handling but getting an error lol

#

Anyone know how to fix it

opaque trail
soft trout
#

@manic wing didnt work

proven elm
#

Should say please pass in all required args

manic wing
proven elm
#

Awehhhhh

manic wing
soft trout
#

nope

#

just 1 and hit

manic wing
#

okay, before the if statement print type(inter.clicked_button.label)

soft trout
#

ok

#

wait

manic wing
#

if its not str we know the issue 😎

soft trout
#

so print(type(inter.clicked_button.label))

soft trout
#

before?

manic wing
#

before the if statement

slate swan
manic wing
soft trout
#

it said

slate swan
#

Okay

soft trout
#

<class 'str'>

manic wing
#

interesting

#

so

#

print(inter.clicked_button.label) --> hit?

soft trout
#

yes

manic wing
#

thats odd 🤔

#

if its an str and that str is hit i dont know why the check wouldnt work

hasty iron
#

also you haven’t said what you expected it to do

soft trout
#

i have

hasty iron
#

you sent half code saying if something’s wrong

#

send all your code

soft trout
#

that all you need to see

#

ok

hasty iron
#

how are you so sure the if statement isn’t triggering

#

it could something inside the if statement that caused it to break

soft trout
#

ok

hasty iron
#

could be*

soft trout
#

fair enough

#

too long to send

hasty iron
#

!paste

unkempt canyonBOT
#

Pasting large amounts of code

If your code is too long to fit in a codeblock in discord, you can paste your code here:
https://paste.pydis.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.

manic wing
#

did you print(1) the first line after the if statement?

soft trout
#

yes

hasty iron
#

is the reply working

soft trout
#

which one

hasty iron
#

the first one

#

eee

soft trout
#

nope

hasty iron
#

and the 1 before it is printing?

soft trout
#

none of them are working

hasty iron
#

ur label is Hit

#

not hit

#

hit is your custom_id

soft trout
#

that just hurts me

#

when a error is right under my nose

#

ur right

hasty iron
#

well it happens

#

just be careful next time

manic wing
manic wing
soft trout
#

so i had to capitalize it...

#

INCREDIBLY SORRY

manic wing
#

its ok

manic wing
#

is it possible to see all the dms your bot has received

bronze wigeon
#

is there a way to send a discord embed with raw http requests

bronze wigeon
manic wing
manic wing
#

?

bronze wigeon
#

You literally called me the r slur thonk

#

The mods can see edits

manic wing
#

what?

#

i called you a tart

#

its english slang

#

and then i edited it

#

once again, dont act like a smart ass

bronze wigeon
#

Also it wasn't being a smart ass it was answering your question...

#

"is it possible to see all the dms your bot has received"

#

So I said yes, it is possible considering mod mail exists

manic wing
#

all

#

not on_message, all

bronze wigeon
#

I see

manic wing
#

im asking if there is an iterable for dmmessages

#

or something

bronze wigeon
#

You mean if you wanted to view every message it received in total rather every time it gets DMed send a notification, yes?

bronze wigeon
#

Like if you just did a command it would send a txt or something of all the messages

manic wing
#

every message thats ever been sent to my bot

bronze wigeon
#

I see

manic wing
bronze wigeon
#

I know what you're looking for, now

#

I'm no help though 😩 sorry

manic wing
#

okay

#

is it possible to see all the dms your bot has received

bronze wigeon
#
@client.command()
async def history(ctx, member: discord.Member):
    counter = 0
    async for message in ctx.channel.history(limit = 100):
        if message.author == member:
            counter += 1

    await ctx.send(f'{member.mention} has sent **{counter}** messages in this channel.')```

This code is how to see the history of messages in a server, however you may be able to use the syntax to re-code it into a thing for the bot
manic wing
reef shell
#

you will most probably get rate limited

bronze wigeon
manic wing
reef shell
#

why didn't you set a log channel for that in the first place

bronze wigeon
#

which would more than likely be non-doable without being ratelimited

reef shell
#

lmaoo

#

exactly

manic wing
manic wing
# reef shell exactly

but there might be another method, hence why i am asking here but apparently you guys are all out of ideas ¯_(ツ)_/¯

reef shell
#

I'm not sure but i heard you can log into your bot account

bronze wigeon
manic wing
#

thats against tos if it uses an external app

bronze wigeon
manic wing
bronze wigeon
#

However, I don't do it nor do I look into it so

bronze wigeon
reef shell
manic wing
bronze wigeon
#

But you're still using it..?

reef shell
#

conflicting

manic wing
#

it is if you downloaded an external app that has been officially published i believe

reef shell
#

ownself

#

just asking, why would you need that

bronze wigeon
#

You can join servers I believe, but you can't do anything as the bot

manic wing
bronze wigeon
#

you get a ton of tags and shit

#

because it's technically a real account but also not lol

reef shell
#

no you can't join servers using the bot account

bronze wigeon
#

I think a long time ago I did

#

Maybe it only works with servers it's in

#

Maybe not, I don't remember nor do I care lmao

reef shell
#

if this shit is real then dm spammer bots would take over discord

trim kayak
reef shell
#

read the latest pin

manic wing
#

.

trim kayak
#

Thanks

bronze wigeon
#

Basically that just means no security updates, anything discord adds for bots will not be added, etc, however you can fork the repo still, and contribute on your own time

#

so if you wanna use slash commands you could very well find a way to have that work with discord.py but, I don't know if it's been figured out yet

trim kayak
soft trout
#

what does discord even have let to add?

#

they added buttons, slash commands, menus.

#

I cant think of another thing to add

bronze wigeon
#

What if they added an anti-raid option to servers

#

that'd be cool imo

hasty iron
#

that’s why bots exist

soft trout
#

how would they add it tho

bronze wigeon
# soft trout how would they add it tho

if the user join count spikes up by 1000 in under 30 seconds it's probably safe to say the server may be getting raided and it could warn the owner somehow?

#

Or have some like, lockdown

soft trout
#

yeah

#

close all the channels

bronze wigeon
#

where it makes 2 step verification be required or a phone number

hasty iron
#

just make it?

soft trout
#

yeah

hasty iron
#

why wait until a raid

#

setup verification from the beginning

bronze wigeon
hasty iron
#

you can do it manually?

soft trout
#

you can

hasty iron
#

i know

bronze wigeon
#

Besides, maybe a user just doesn't have a phone number linked yet or doesn't wanna use 2-step, so that's why you could implement the anti-raid option but they don't have to use it

#

and discord bots fuck up sometimes, or they could be configured incorrectly

hasty iron
#

so you expect discord to setup an anti raid system for every server there is?

bronze wigeon
#

no like

#

they can have an option for it to be enabled, they don't need to go to every single server and do it

soft trout
#

oh wait

bronze wigeon
#

Otherwise discord probably wouldn't wanna make updates if they have to go to every single existing server usually using a script but still going to every single server and having the option enabled

soft trout
#

i just noticed

#

something discord can add

bronze wigeon
#

Go on...

soft trout
#

so you know how theres check marks

#

i mean like

bronze wigeon
#

like the emojis?

soft trout
#

no no no

#

wait

hasty iron
#

verified?

soft trout
#

lemme draw a example

bronze wigeon
#

alright

carmine spade
#

Just out of curiosity, why are GCP, AWS, and Azure not as actively recommended as other providers here?

soft trout
#

and the check is a button

#

so it would fill in when you press it

hasty iron
#

like a rule thing?

#

and accepting those rules

soft trout
#

yes

hasty iron
#

it already exists iirc

soft trout
#

HOW

#

WHAT

#

show me

hasty iron
#

i dont have a ss

#

but i remember seeing it

soft trout
#

what would it be called?

#

what is it called*

hasty iron
#

idk

slate swan
#

For me it means free competition.

paper bane
manic wing
#

you want to fork dpy?

bronze wigeon
#

¯_(ツ)_/¯

manic wing
bronze wigeon
#

ah

slate swan
bronze wigeon
#

what new lib is coming out in the next month?

manic wing
#

there are many

#

I personally am going with disnake

#

I like the developer

bronze wigeon
#

are they about discord?

#

oh

manic wing
#

yes

#

Pycord is growing heavily

manic wing
#

i want disnake to be most popular

bronze wigeon
#

are the syntaxes difficult? or similar?

manic wing
#

exactly the same but it will have slash commands

bronze wigeon
#

oh

manic wing
bronze wigeon
#

cool

vale pendant
#

Yeah, imo disnake is the way to go.

hot blade
#

help how do i get my bot to say something

manic wing
manic wing
bronze wigeon
manic wing
#

where messageable is an instance of a channel

hot blade
#

ok thank you

manic wing
bronze wigeon
#

blah blah NerdPepe

hasty iron
#

await is technically not required

manic wing
hasty iron
#

if the coroutine is not garbage collected it won’t raise a warning

manic wing
#

except for the fact that its asynchronous and await is needed

hasty iron
#

and you can run that coroutine by doing coroutine.send(None) although it raise StopIteration

manic wing
#

and technically we are all pointless critters who have 0 meaning

bronze wigeon
#

^

soft trout
#

its easier just using await

#

... lmao

manic wing
#

blanket is cooooooool

hasty iron
#

!e ```py
async def foo(): return 123

coro = foo()
coro.send(None)

unkempt canyonBOT
#

@hasty iron :x: Your eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 4, in <module>
003 | StopIteration: 123
hasty iron
#

im just saying that it’s technically not required

bronze wigeon
#

and technically we're all not nerds

hasty iron
#

okay?

manic wing
#

perfectly valid, just as me saying technically we are pointless

manic wing
#

?

bronze wigeon
#

idk I wanted to join lol

slate swan
#

But prepared for bots from trillions of guilds

hasty iron
#

what api wrapper

#

whats its name

bronze wigeon
#

scroll up

#

I'm too lazy to give the answer lol

hasty iron
#

you said what new lib and they said api wrapper

bronze wigeon
#

true

bronze wigeon
slate swan
#

or more

hasty iron
#

then there is like some quintillion servers?

slate swan
#

wat