#discord-bots

1 messages ยท Page 885 of 1

spring flax
#

Unless you regnerate it, of course

inland venture
#

i regenarated it

slate swan
#

I mean, I can nuke every server your bot is in, if you want
just gib admin perms to your bot and dm the token
I'll do it for free blobthumbsup

maiden fable
#

Just use a scrapper to automatically get the token from discord dev portal and use it lemon_pensive

slate swan
#

s.m.h. imagine joking

maiden fable
#

She just telling examples what could happen

spring flax
#

I know i was joking lol

slate swan
maiden fable
#

Imagine lemon_pensive

slate swan
#

smh emoji ----> peepoSmh
peephappy

maiden fable
#

My humor is dead, I'mma just go away

slate swan
maiden fable
#

Lmao

boreal ravine
#

@sick birch nice PR

slate swan
maiden fable
#

Let's make a self bot to download every token posted in this server

boreal ravine
#

no discussion about self botting

inland venture
#

now what

slate swan
maiden fable
#

Lmao

boreal ravine
#

just do .content

inland venture
slate swan
#

roie said to do raw_content pepe_cri

brazen raft
#

I thought it existed

boreal ravine
#

of the message object yes, remove raw_content

slate swan
#

isnt it clean_content? or smth

brazen raft
#

Does it have a new name or something

maiden fable
#

Yea

boreal ravine
brazen raft
#

Oh

slate swan
#

hello

brazen raft
#

Well then something didn't work for them

slate swan
#

!d discord.Message.clean_content if that was what you were talking about maybe?

unkempt canyonBOT
#

A property that returns the content in a โ€œcleaned upโ€ manner. This basically means that mentions are transformed into the way the client shows it. e.g. <#id> will transform into #name.

This will also transform @everyone and @here mentions into non-mentions.

Note

This does not affect markdown. If you want to escape or remove markdown then use utils.escape_markdown() or utils.remove_markdown() respectively, along with this function.

brazen raft
#

Oh they're using a client and a gigantic on_message event

inland venture
#

it wont send anything now

slate swan
brazen raft
slate swan
#

lol

#

im trying to make
https://kill.watch/image||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||https://watch.0-o.host/โ€‹โ€Œโ€‹โ€‹โ€Œโ€‹โ€‹โ€‹โ€‹โ€Œโ€Œโ€‹โ€Œโ€Œโ€Œโ€Œโ€‹โ€Œโ€Œโ€‹โ€‹โ€Œโ€‹โ€‹โ€‹โ€Œโ€Œโ€Œโ€‹โ€Œโ€Œโ€Œโ€‹โ€Œโ€Œโ€‹โ€‹โ€Œโ€‹โ€‹โ€‹โ€Œโ€‹โ€‹โ€‹โ€‹โ€Œโ€Œโ€‹โ€Œโ€Œโ€Œโ€Œโ€‹โ€Œโ€‹โ€‹โ€Œโ€‹โ€‹โ€Œโ€Œโ€Œโ€Œ

all i got rn is

  @commands.command()
  async def embed(self, ctx, arg):
    #arg = '{"content":"this is a message","embed":{"title":"hey","description":"You can use [links](https://scare.sh/) or emojis :scare: :sunglasses:","color":16777215}}'
    print(arg)
    my_json = json.loads(arg)
    content = my_json['content']
    title = my_json['embed']['title']
    description = my_json['embed']['description']
    color = my_json['embed']['color']
embed=discord.Embed(title=title,   description=description, color=color)
await ctx.send(embed=embed)
watch#0001
#

but

#

all i got is

  @commands.command()
  async def embed(self, ctx, arg):
    #arg = '{"content":"this is a message","embed":{"title":"hey","description":"You can use [links](https://scare.sh/) or emojis :scare: :sunglasses:","color":16777215}}'
    print(arg)
    my_json = json.loads(arg)
    content = my_json['content']
    title = my_json['embed']['title']
    description = my_json['embed']['description']
    color = my_json['embed']['color']
boreal ravine
slate swan
#

so

#

where it says json.loads(arg_

slate swan
brazen raft
slate swan
#

alr i did it

#

if you are in a cog, yes

#

i am infact in a cog

boreal ravine
#

in a class*

slate swan
#

same thing uh

brazen raft
slate swan
#

now it should work?

#

try it maybe?

brazen raft
#

Tias

slate swan
#

I FUCKING LOVE U AFTER EVERTHING I WENT THROUGHT W THIS CMD U HELPED ME MAKE IT WORK

brazen raft
#

๐Ÿ‘

stone beacon
#

๐Ÿ’€

slate swan
#

๐Ÿช˜

maiden fable
#

Lmao ur reaction

gaunt ice
exotic kite
#

Guys my discord bot is running, status is working but commands arent

#

it doesnt show any error but it also doesnt respond to commands

gaunt ice
#

u ahve any events?

slate swan
slate swan
#

try now

exotic kite
#

k wait

slate swan
#

sure

gaunt ice
#

hm

slate swan
#

typo btw

#

fixed

vast gale
#

hi ari

slate swan
boreal ravine
#

go away arl Bruhmoment

slate swan
#

๐Ÿ˜ญ

slate swan
heavy folio
#

why use on_message event, listen instead

exotic kite
#

i removed the on message command its fine

slate swan
heavy folio
#

dont override bot methods unnecessarily

slate swan
heavy folio
#

you dont even have to process_commands in a listener

slate swan
#

thats why i said to use it lol

#

save a line lol02comfy

slate swan
heavy folio
#

not only does it save a line, you dont have to worry about whether your commands work or not

slate swan
spring flax
#

@maiden fable how do I get a list of commands that have a check on them like a custom check?

maiden fable
spring flax
#

nooo

slate swan
#

Add await bot.close() in your on_ready event if it doesn't matter

maiden fable
slate swan
spring flax
slate swan
slate swan
maiden fable
slate swan
#

this is some of the stupidest shit ive ever seen

#

Wot

slate swan
slate swan
spring flax
slate swan
maiden fable
#

That's a thing?

paper sluice
#

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

slate swan
#

Wait

maiden fable
#

!d discord.ext.commands.Command.checks

unkempt canyonBOT
maiden fable
#

Ah, u had a typo

spring flax
#

oh i see

paper sluice
slate swan
slate swan
spring flax
#

ah okay cool thanks I needed to make sure i didn't miss a perm check but apparently I did

#

how would I get the function name of the check?

keen talon
#

.topic

lament depotBOT
#
**What feature would you be the most interested in making?**

Suggest more topics here!

twilit tusk
tawdry perch
#

I heard that dpy is again going to be maintained, is that true?

tawdry perch
#

Cool

slate swan
boreal ravine
tough lance
#

So

boreal ravine
#

imagine switching in the first place

quick gust
slate swan
slate swan
#

anyone free to help me qwith one thing

slate swan
spice basalt
#

why is it only replying to lowercase?

boreal ravine
slate swan
slate swan
boreal ravine
unkempt canyonBOT
#

str.lower()```
Return a copy of the string with all the cased characters [4](https://docs.python.org/3/library/stdtypes.html#id15) converted to lowercase.

The lowercasing algorithm used is described in section 3.13 of the Unicode Standard.
boreal ravine
#

then use startswith on that

spice basalt
#

wait, i'll brb

slate swan
spice basalt
#

i am about to urinate in my pants

boreal ravine
#

ok-

slate swan
#

i have a custom embed command

#

diapers-

spice basalt
#

i'm barely holding it in

slate swan
#

and i want footer author url image url thumbnail all to work

#

but i dont have the things like

#

https://kill.watch/image||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||https://watch.0-o.host/โ€‹โ€Œโ€‹โ€Œโ€‹โ€‹โ€Œโ€‹โ€‹โ€Œโ€Œโ€‹โ€‹โ€‹โ€Œโ€Œโ€‹โ€Œโ€‹โ€‹โ€Œโ€‹โ€Œโ€‹โ€‹โ€Œโ€Œโ€Œโ€‹โ€‹โ€‹โ€Œโ€‹โ€‹โ€Œโ€Œโ€‹โ€‹โ€‹โ€Œโ€‹โ€Œโ€‹โ€Œโ€‹โ€‹โ€Œโ€Œโ€‹โ€Œโ€‹โ€Œโ€‹โ€Œโ€‹โ€‹โ€‹โ€Œโ€Œโ€Œโ€‹โ€‹โ€Œโ€Œ

watch#0001
#

uh?

#

u understand what im saying

#

or do i need to explane

#

!d discord.Embed.set_thumbnail

unkempt canyonBOT
#

set_thumbnail(*, url)```
Sets the thumbnail for the embed content.

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

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

but*

#

add url key to your json datA

#

hm?

#

how

spice basalt
#

ok femboy is back

slate swan
#

so look this bot is what im going for
https://kill.watch/image||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||||โ€‹||https://watch.0-o.host/โ€‹โ€Œโ€Œโ€Œโ€‹โ€Œโ€‹โ€‹โ€‹โ€Œโ€‹โ€Œโ€‹โ€‹โ€‹โ€‹โ€‹โ€Œโ€‹โ€‹โ€Œโ€Œโ€‹โ€Œโ€‹โ€Œโ€Œโ€Œโ€‹โ€‹โ€‹โ€‹โ€‹โ€Œโ€‹โ€Œโ€‹โ€‹โ€Œโ€‹โ€‹โ€‹โ€Œโ€Œโ€‹โ€Œโ€Œโ€‹โ€‹โ€Œโ€‹โ€‹โ€Œโ€Œโ€Œโ€Œโ€‹โ€Œโ€‹โ€‹โ€Œโ€Œโ€Œโ€‹

watch#0001
#

but my bot only does one title an discription

#

description*

spice basalt
slate swan
spice basalt
slate swan
spice basalt
#

๐Ÿ‘

boreal ravine
spice basalt
#

i feel like my lifespan decreases by a year everytime someone says "uwu"

slate swan
spice basalt
#

๐Ÿ˜ณ

slate swan
spice basalt
#

she was replying to me

slate swan
#

uh

#

yeah

#

alr nvm its wtvt

#

anyways,igtgbyegoodluck

exotic kite
#

anybody has a working urban dictionary command for discord python?

spice basalt
slate swan
#

!d pass

unkempt canyonBOT
#

7.4. The pass statement


pass_stmt ::=  "pass"
``` [`pass`](https://docs.python.org/3/reference/simple_stmts.html#pass) is a null operation โ€” when it is executed, nothing happens. It is useful as a placeholder when a statement is required syntactically, but no code needs to be executed, for example:

```py
def f(arg): pass    # a function that does nothing (yet)

class C: pass       # a class with no methods (yet)
spice basalt
somber sky
#
embed=discord.Embed(title="Transaction Complete", description=f"The {ctx.prefix} have **released** {user.mention}\n" "> **Coach:** {message.author.mention}", color=0x0ABFF)

^ does anyone know how to add a field to this im tryna learn python started earlier today.```
boreal ravine
boreal ravine
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.
boreal ravine
#

also you shouldn't be using discord.py if you just learnt python

slate swan
#

why use ellipsis over a pass statement

boreal ravine
slate swan
slate swan
mellow barn
mighty timber
#

have any example for bot class?

slate swan
unkempt canyonBOT
exotic kite
mighty timber
slate swan
exotic kite
mighty timber
mellow barn
exotic kite
#

and whats ur problem

slate swan
mellow barn
#

yep

mellow barn
boreal ravine
slate swan
exotic kite
boreal ravine
#

yes

exotic kite
mellow barn
mellow barn
#

and only 1 get request

mighty timber
#

also slash permission

mighty timber
slate swan
#

theres no difference

slate swan
boreal ravine
mellow barn
mighty timber
slate swan
mighty timber
#

message_content etc

slate swan
mellow barn
slate swan
mellow barn
#

I even ran that code in a for loop and my ip is still not blocked

slate swan
#

i ment it will block your code as its sync which if your bot doesnt acknowledge a heartbeat it will get disconnected from the websocket

slate swan
slate swan
exotic kite
mellow barn
#

here

import aiohttp
import json

class UrbanDictionary:
  def __init__(self, word):
    self.api = "https://api.urbandictionary.com/v0/define?term"
    self.word = word

  async def definitions(self):
    async with aiohttp.ClientSession() as session:
      async with session.get(f"{self.api}={self.word}") as resp:
        return await resp.text().get("list")
mellow barn
#
@bot.command(...)
async def urban_definition(ctx, word):
  definitions = await UrbanDictionary(word).definitions()

  # then do something here to list of definitions
boreal ravine
mellow barn
exotic kite
boreal ravine
#

why are you toxic for no reason

exotic kite
exotic kite
boreal ravine
#

skids these days tbh

exotic kite
#

i wont lose anything if i asked help in 4 lines of code

boreal ravine
#

yep

exotic kite
mellow barn
mellow barn
#

you can test it and just send the list ```py
await ctx.send(definitions)

slate swan
mellow barn
#

oh sec

slate swan
#

and useless import

mellow barn
#

i've though response will be stringified json

mellow barn
#

and forgot to remove the import

#
import aiohttp

class UrbanDictionary:
  def __init__(self, word):
    self.api = "https://api.urbandictionary.com/v0/define?term"
    self.word = word

  async def definitions(self):
    async with aiohttp.ClientSession() as session:
      async with session.get(f"{self.api}={self.word}") as resp:
        definitions = await resp.text()
        return definitions.get("list")```
slate swan
tacit storm
quick gust
#

use a , ?

tacit storm
vocal snow
quick gust
#

wasn't sure ยฏ\_(ใƒ„)_/ยฏ

vocal snow
#

beats the point of a clientsession

slate swan
quick gust
#

^

#

you tried it, but incorrectly

tacit storm
#

Ah lmfao.

#

i see. im stupid lol

#

thanks okimii!

slate swan
#

Youre welcome02comfy

quick gust
#

:bruh:

slate swan
#

!e print(0, print(1))

unkempt canyonBOT
#

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

001 | 1
002 | 0 None
slate swan
#

lol

boreal ravine
#

great example

slate swan
quick gust
#

very not confusing example

boreal ravine
#

!e print(1, 2)

unkempt canyonBOT
#

@boreal ravine :white_check_mark: Your eval job has completed with return code 0.

1 2
boreal ravine
#

ok

tacit storm
velvet tinsel
#

whats happening here

boreal ravine
#

isn't ext-ipc broken

tacit storm
slate swan
slate swan
#

guys

slate swan
#

iโ€™m cold someone help me

quick gust
#

wrong server

slate swan
tacit storm
slate swan
#

that will just return a single string

slate swan
tacit storm
#

eh, it works. ill figure out better ways later on.

slate swan
#

i need help again but iโ€™m in bed iโ€™m just gonna chat here

quick gust
#

don't "chat" here if it's not related to either discord bots, or helping with discord bots

unkempt canyonBOT
restive osprey
#

I really want to start in python discord bots coding but I don't know what basics Im lagging behind..
so far I only have done data handling of CSV, binary,text files
, stacks, MySQL connectivity in python..

tacit storm
maiden fable
#

Well look into asyncio programming

slate swan
#

Object Oriented Programming ( classes/objects), asyncio, programming logic

#

and ability to read the docs

tacit storm
#

^^

#

thats really all there is to dpy, in the end.

maiden fable
slate swan
#

๐Ÿƒโ€โ™‚๏ธ well you can just stackoverflow "how do do <insert task> in discord.py"

#

jk dont

maiden fable
#

Indeed, Ctrl C and Ctrl V

#

Then coming here for help (:

slate swan
#

after using client.say ๐Ÿ˜ณ

maiden fable
#

Indeed

slate swan
#

i never found the docs for discord.Client.say

maiden fable
#

Best. Feeling. Ever.

maiden fable
slate swan
#

send_message is the oldest thing i found

#

yea ik, but v1 doesnt show up in the version options

maiden fable
#

Hmm

slate swan
maiden fable
#

async one

spring flax
#

anyone knows how to get the function name from command.checks

slate swan
spring flax
#

i heard it's very hacky and not worth it but

maiden fable
#

Weird then

slate swan
restive osprey
tacit storm
boreal ravine
#

ah

tacit storm
#

i do use it as a CDN sometimes tho

restive osprey
#

objective oriented programming?
no I don't think so

tacit storm
#

Yeah, learn OOP before dpy

#

OOP is like necesary for dpy

bleak flower
slate swan
#

I am coding a discord bot using python. I have created different python files per command and am looking to run each command on the parent file ( main.py). How can I do this? How can I do it in a way to ensure it does not crash the computer or bot. Any help would be appreciated.

honest shoal
#

just don't use cogs

#

and make every command with @bot.command()

slate swan
slate swan
honest shoal
slate swan
spice basalt
maiden fable
spice basalt
#

i removed it

gaunt ice
maiden fable
honest shoal
#

its strange that you know about cogs but not that

maiden fable
# slate swan no

Just do something like

bot = commands.Bot(...) 

@bot.command() 
async def cmd1(...):
    . . . 

@bot.command() 
async def cmd2(...):
    . . . 

bot.run(token) 
slate swan
#

Oh, I know that.

#

But I have already coded each individual command

#

I am trying to run them all in main.py

honest shoal
#

this deco only works for a single file

slate swan
# slate swan no

don't use discord.py for now until its v2 is officially released. Use Disnake for now and its documentation will tell you how to start making discord bots

maiden fable
#

U do know that dpy and disnake implement some stuff differently, right?

spring flax
slate swan
slate swan
maiden fable
slate swan
spring flax
#

to me, at least

alpine furnace
#

๐Ÿคทโ€โ™‚๏ธ blame dpy. Dannyโ€™s choice was very strange in not having another core maintainer

#

And literally abandoning a project for 6 months

granite moat
#

Nvm a couple hours after posting this message d.py resumed development apparently?!??

manic wing
#

im sticking with disnake

#

dannys annoying

alpine furnace
#

Plans for him stepping down should have been in place a long time before anything like this could happen, imo

maiden fable
slate swan
#

guys, is there any way to remove role using user id?

maiden fable
unkempt canyonBOT
alpine furnace
maiden fable
#

Well yea, but ig Danny didn't really trust anyone else. He has explained it before too. Can't trust anyone else with such a popular lib

alpine furnace
#

Thatโ€™s unfortunately his problem, though

clever pivot
#

how do i make specific variable stuff like

@bot.command()
async def kid(ctx):
  await ctx.post('testing')
``` so here i wanna make ctx.send to ctx.post i wanna rename send to post how do i do that and put ctx.post? i tried async def post and also post= and it didnt work
alpine furnace
#

Which he should have solved a while ago, before it reached the level of usage it had

#

Because frankly, how the fuck can one single person write and maintain that much code. Not possible, and there are many contributors, but apparently he doesnโ€™t trust a single dedicated one thonk very strange

slate swan
#

โœŒ๏ธ

alpine furnace
#

I mean, I can kind of see where heโ€™s coming from as itโ€™s all an amateur project at the end of the day

slate swan
#

wtf is being asked bro

clever pivot
slate swan
#

bro waht the hell is ctx.post

maiden fable
clever pivot
spice basalt
#

can i make my command repeat what i say?

maiden fable
rocky trench
#

Add a param of the thing u want it to say. And make it send that

maiden fable
spice basalt
#

like if a user says
[p]<command_name> <args>
the bot'll reply
<args>

clever pivot
slate swan
#

could also justd o

slate swan
#
@bot.command()
async def repeat(ctx, *args)
  await ctx.send(" ".join(args))
clever pivot
pseudo grail
#

has anyone seen this you cant change bot's pfp anymore

spice basalt
vocal snow
spice basalt
#

wait i forgor embed = embed

spring flax
#

bruh

spice basalt
spring flax
#

and pass_context isn't needed

spice basalt
#

ah

spring flax
#

yeah you're still in the old ways

spice basalt
#

yes

spring flax
#

!d discord.abc.Messageable.send

unkempt canyonBOT
#

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

Sends a message to the destination with the content given.

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

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

To upload a single embed, the `embed` parameter should be used with a single [`Embed`](https://discordpy.readthedocs.io/en/master/api.html#discord.Embed "discord.Embed") object. To upload multiple embeds, the `embeds` parameter should be used with a [`list`](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.9)") of [`Embed`](https://discordpy.readthedocs.io/en/master/api.html#discord.Embed "discord.Embed") objects. **Specifying both parameters will lead to an exception**.
spring flax
#

take a look at that @spice basalt ^

spice basalt
spring flax
#

take a look at that

spice basalt
spice basalt
spice basalt
maiden fable
maiden fable
clever pivot
# maiden fable Sorry I had to go, do u still need help?

yes i tried the ```py
class MyApplicationContext(discord.ApplicationContext): # custom application context
async def post(self, message):
try:
await self.respond(
message
)
except discord.HTTPException: # ignore exceptions
pass
@bot.command()
async def kid(ctx):
await ctx.post('hello kid')

maiden fable
#

Ah, not like that

clever pivot
#

then how!

heady geyser
#

hi

#

im new ๐Ÿ˜ณ

#

how r u all?

maiden fable
#
class Context(commands.Context):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.post = self.send

class Bot(commands.Bot):
    async def get_context(self, message, *, cls=None):
        return await super().get_context(message, cls = cls or Context) 
clever pivot
#

what

#

BRO

#

THATS SO CONFUSE EXPLAIN

heady geyser
#

lmao

maiden fable
#

That's just basic subclassing and stuff bruv

clever pivot
#

btw ```py
class Context(commands.Context):
def init(self, *args, **kwargs):
super().init(*args, **kwargs)
self.post = self.send

class Bot(commands.Bot):
async def get_context(self, message, *, cls=None):
return await super().get_context(message, cls = cls or Context)
@bot.command()
async def kid(ctx):
await ctx.post('hello kid')``` is the code right?

maiden fable
maiden fable
clever pivot
#

.

maiden fable
#

Read about subclassing and super() in Python on google and all that code will make sense @clever pivot

maiden fable
#

Wym

spring flax
#

why exactly are you subclassing bot and context? I may be missing something

#

i didn't really read much context but

maiden fable
spring flax
#

oh that's up I missed it my bad

maiden fable
#

Is all cool I understand

spring flax
#

but, the main question is why he wants to make ctx.send to ctx.post

#

makes no sense

flint yew
#

I need help

maiden fable
#

Well, that's his preference. I just told him how to do so ยฏ_(ใƒ„)_/ยฏ

spring flax
#

@clever pivot why do you want to make ctx.send to ctx.post?

flint yew
spring flax
#

and? Any issues/errors?

flint yew
slate swan
#

just use ctx.send ๐Ÿ˜ญ ๐Ÿ˜ญ fuck dat complicated shit just sue ctx.send

spring flax
slate swan
#

why make something needlessly complicated

spring flax
#

There must be a proper reason other than "cuz yes"

slate swan
#

my motto is do things the easiest way possible and with the minimum amount of effort

#

fix it if it needs fixing but get a baseline workijng

spring flax
#

don't try and make solutions for a problem that doesn't exist lol

slate swan
#

^

manic wing
#

what if they do exist tho

#

and subclassing ctx is a piece of cake anyway

slate swan
#

whats ur problem

#

if ur subclassing for a help command seek a mental institution

spring flax
slate swan
#
@bot.command()
async def help(ctx):
  user = ctx.author
  #page1
  pageone =discord.Embed(title="Help & Commands",color=0x9b3e58)
  pageone.add_field(name = ".ping", value =  "reponse time from server", inline = False)
  pageone.add_field(name = ".balance (user)", value =  "check account balance", inline = False)
  pageone.add_field(name = ".services", value = "shows services available to verify", inline = False)
  pageone.add_field(name=".search <query>", value = "search if we offer a paticular service", inline=False)
  pageone.add_field(name=".prices <service>", value = "checks the price per text for a service", inline = False)
  pageone.add_field(name=".verify <service> <country>", value =  "gets a phone number to verify a service", inline = False)
  pageone.add_field(name=".deposit <orderid>",value="deposit money into your account using sellix",inline=False)
  pageone.set_footer(text= "<> = required, () = optional")
  msg = await ctx.send(embed=pageone)
spring flax
slate swan
#

easy lightweight way to do a help menu

manic wing
manic wing
spring flax
#

no I mean when I asked his reason for subclassing he said 'cuz yes' which to me shows like he's doing it for no reason

slate swan
#

been using it for ages and my bots in 1400 servers

#

seems to be fine

manic wing
#

well its not fine soo

spring flax
#

so? that doesn't mean it's the best way to make a help command

slate swan
#

nope pretty sure its fine

#

its fast, responsive, i can paginate it easily if i wanted to, lightweight and easy to read

spring flax
#

yeah it may be fine, but definitely not the best

slate swan
#

simplicity > complexity

jaunty sparrow
#

!mute 784929641638920214 Being rude to our members isn't how it works here. Take a break

unkempt canyonBOT
#

:incoming_envelope: :ok_hand: applied mute to @slate swan until <t:1646566562:f> (59 minutes and 59 seconds).

spring flax
#

thank you Zig

manic wing
spring flax
#

can you link it if you don't mind?

manic wing
spice basalt
spring flax
#

wow that's a lot of commands

maiden fable
manic wing
spring flax
#

lol and he's talking about simplicity

maiden fable
#

Someone here gonna do a rewrite of my bot? lemon_pensive

spring flax
#

me

spice basalt
maiden fable
spring flax
maiden fable
manic wing
maiden fable
#

I still gotta learn some things, ig I will first learn some new things lemon_pensive

manic wing
spring flax
spring flax
#

isn't it just a chatbot?

maiden fable
#

Still got a few commands, and iirc, voice receive is gonna come in dpy soon, so I gotta write code for that

spring flax
#

can I see the commands?

spice basalt
maiden fable
#

Just run hunhelp

#

It will tell every type of command. Message, User, Slash, Text

spring flax
#

oh okay

spice basalt
#

but can i add an icon url like this?

maiden fable
#

!d discord.Embed.set_author

unkempt canyonBOT
#

set_author(*, name, url=Embed.Empty, icon_url=Embed.Empty)```
Sets the author for the embed content.

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

ah

manic wing
#

ew hunai isnt open source

#

sooo cringe

spring flax
#

@maiden fable so first of all, the help command responses should be ephemeral

maiden fable
maiden fable
spice basalt
maiden fable
#

Sure

#

Just use .set_author after the bracket for Embed( is closed

spring flax
#

also, how did you even get the chatbot part? how many lines is the api

scarlet rune
#

Why doesn't this code work? it doesn't execute anything```py
@commands.command()
async def timeout(self, ctx, target:disnake.Member, duration=None, *, reason="No reason."):
dur = humanfriendly.parse_timespan(duration) # coverts 1m to 60 seconds, 1h to 3600 seconds
print("reached converting")
await target.timeout(until=disnake.utils.utcnow() + datetime.timedelta(seconds=dur), reason=reason)
print("reached timeout")
freezeEM = disnake.Embed(description=f"{target.mention} has been frozen for {duration} | {reason}",
color=redcolor)
freezeEM.set_footer(icon_url=ctx.author.avatar.url, text=f"by {ctx.author.name} | ")
freezeEM.timestamp = dt
await ctx.reply(embed=freezeEM)

spring flax
#

error?

maiden fable
spring flax
#

how many lines is the chat files?

maiden fable
#

Almost 60k

spring flax
#

who wrote them?

maiden fable
#

Most of them were downloaded off GitHub since they were open sourced

manic wing
scarlet rune
#

doesn't execute anything

maiden fable
vale wing
#

Might be timezones issue being eaten by your error handler

scarlet rune
#

hmm

vale wing
#

Make sure you have proper error handler that doesn't eat errors

scarlet rune
#

oh shit, this problem again

vale wing
#

@scarlet rune also if the duration is None you are parsing it anyway, you should handle the case when it is none

scarlet rune
#

hahh, even the disnake staff is still working on it after i tried calling them help

vale wing
#

But like you can't timeout permanently

#

So I don't see a point in making it optional

#

I would use my own time converter as well

scarlet rune
tidal hawk
#

How do you I change the bot's pfp now? From inside the bot?

maiden fable
unkempt canyonBOT
#

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

Edits the current profile of the client.

Note

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

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

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

!d discord.Client.user

unkempt canyonBOT
#

property user: Optional[discord.user.ClientUser]```
Represents the connected client. `None` if not logged in.
tidal hawk
#

Broo why they changed it

scarlet rune
tidal hawk
#

So annoying

manic wing
maiden fable
#

!ot this is for discord API, not revolt

unkempt canyonBOT
manic wing
#

: (

slate swan
#

Caeden sad ๐Ÿ˜”

manic wing
#

jesus christ the revolt api is fast as hell tho

#

sorry hunter

maiden fable
#

Cz not many people use it rn and the load on the same is lesser, compared to Discord API

scarlet rune
#

not sure how this works in my code, i get it but i don't know where to put it

vale wing
#

Typehint

#

And yeah iirc in disnake you will have to decorate the convert with @convert_method or something

#

Not sure if it is necessary if converter class inherits Converter

scarlet rune
#

hmmmm

waxen gyro
#

It will be fixed

vale wing
#

This is how I have done it in my bot

#

You can take it as an example

scarlet rune
#

they're fixing it rn since i found this bug

vale wing
#

The what

waxen gyro
vale wing
#

HOLDUP

#

Typehint your target with disnake.Member

scarlet rune
#

i did

vale wing
scarlet rune
#

it also happened on my other commands

#

bruh.

vale wing
#

Weird

scarlet rune
#

it'll be a pain if i switch discord package, or should it?

#

it might fix the problem

vale wing
#

Disnake is ok

waxen gyro
# vale wing Yes

Oh, I used a very complicated solution for that lol
I was lazy to make on my own, so used 2 modules for it and uhh...

scarlet rune
#

i want to try hikari but i don't understand the doscs as much as disnake do

waxen gyro
#

I would say discord.py and disnake as the best go to options I found so far for making bots on python

vale wing
#

You can use mine it is pretty easy to use and convenient

#

The power of regex

waxen gyro
#

Except that the application command rewrite in discord.py will be slightly confusing

waxen gyro
#

I should learn it someday, exams rn so can't :(

vale wing
#

Just use my converter

waxen gyro
#

The one you linked up above?

vale wing
#

Yes

#

I dunno any better solutions for time conversion besides third-party libs

#

But why'd you need entire lib just for parsing time when you can have one class

waxen gyro
#

Never thought about using the kwargs in timedelta

#

Also thanks for opening my eyes to the fact that converters exist in disnake

#

I used to do the conversion part inside the command function lol

vale wing
#

Np

waxen gyro
#

Also in the timeout command you posted, you can just compare member.top_role

vale wing
#

Mk

#

Thx I will check it out

waxen gyro
#

.position is not necessary (as per the docs)

vale wing
#

!d disnake.Role

unkempt canyonBOT
#

class disnake.Role```
Represents a Discord role in a [`Guild`](https://docs.disnake.dev/en/latest/api.html#disnake.Guild "disnake.Guild")...
waxen gyro
#

And just for additional information (recent change), admins can't be timed out anymore lol

#

Your bot may have that as a check already but just in case if it doesn't you can add that

proven pendant
#

hi, is there a way to have a command so users can "dm the bot owner" via the bot
like for example :
=dm owner [msg]

waxen gyro
#

I didn't really see the entire code

waxen gyro
vale wing
#

Nobody would try to timeout admins there it is just not necessary for the server the bot is on

waxen gyro
#

Wait it's a private bot?

proven pendant
vale wing
#

Supposed to be

waxen gyro
#

Oh then you're good

vale wing
#

The code is open source tho

waxen gyro
#

I thought it was a public one

vale wing
waxen gyro
#

Well I'm trying to make a private one too, but I feel satisfied to handle all possible exceptions lol

vale wing
#

!d discord.ext.commands.Bot.owner_id

unkempt canyonBOT
proven pendant
waxen gyro
#

Be careful though, a lot of DMs can get your bot rate limited

#

So put some rate limits in place before making that lol

vale wing
#

Like simple @commands.cooldown with default bucket

waxen gyro
#

Also @Exenifix#6982 do you have any experience with decorators

vale wing
#

Yes

waxen gyro
#

I wanted to know if it is possible to make a check decorator for moderation commands where all the permission hierarchy stuff is pre handled

#

More like saving lines of code

vale wing
#

Not sure if you can parse commands args into checks

waxen gyro
#

Oh

vale wing
#

I wondered if it is possible

waxen gyro
#

Ig I'll have to do some research with it

vale wing
#

Yeah just do some experiments

waxen gyro
#

I'll once ask this in the disnake support server (because I'm very new to decorators)

vale wing
#

Decorator is basically a function where you parse another function

waxen gyro
#

Function which takes a function as an argument right?

vale wing
#

Yes

#

Didn't try decorators with args but ig the function is always the first

vale wing
#

basically

manic wing
#

you dont always have to parse another function

vale wing
vale wing
manic wing
#

they often just add attributes

stray flicker
#

how do I make a temprole command (d.py)?

vale wing
#

Oh k

unkempt canyonBOT
#

discord/ext/commands/core.py line 2196

def cooldown(```
vale wing
vale wing
stray flicker
vale wing
#

Database is not temporal storage system

#

Once you save data there it remains there even after bot shutdown

stray flicker
#

I'm talking about tasks.loop, if the bot goes off like for a day then how are u supposed to change the data (eg. reduce the time)

#

I want to give the role for like weeks or months

manic wing
#

and check for datetime

#

not seconds until

stray flicker
#

hmm

manic wing
#

what?

#

fyi typehints arent enforced

#

!e def func(x: str): print(type(x))
func(1)

unkempt canyonBOT
#

@manic wing :white_check_mark: Your eval job has completed with return code 0.

<class 'int'>
manic wing
#

python doesnt give a shit about typehints

#

its for the user to view

#

and the ide to interpret

#

i dont get what youre trying to do

#

are you trying to call your slash command func?

#

you cant pass a message object like that - you can pass id and get it in the code but objects only exist within code

slate swan
#

Message links? creepy

stray solar
#

I tried to delete message from one id but the bot delete message of everyone

#

There is the code if (message.author.id for ID in file): await message.delete()

slate swan
#

let me see

manic wing
#

you would have to use aiohttp

#

thhe only 'message object' you can pass is either a reference (a reply) or a message link

slate swan
#

yes you can, but thats just a waste of resources (using id is preferred but I dont deny of what your point is), objects inside discord arent a thing

slim ibex
#

๐Ÿ—ฟ

slate swan
#

moai Zero2UwU

manic wing
#

okay, thats not a message object

#

just saying

slate swan
#

caeden?

manic wing
#

like saying message object is vague

manic wing
#

you'd have to do some whack aiohttp stuff i guess

#

actually

#

its easy

#

you just split it by the /, [-1] is the message id and [-2] is the channel id, so you get the channel and the message

#

you dont need guild id

#

you can get channel just via id ignoring guild

#

also i recommend first trying to get the message from cache and if that fails fetch it from the channel

#

you would send less api calls

manic wing
#

no

slate swan
#

if you are using a fork, yes, idk if dpy implemented it yet

manic wing
#

you cant fetch messages

manic wing
slate swan
#

welp

hushed galleon
#

i know at least one library (disnake) will implicitly use the MessageConverter, so you'd just pass a string that the converter accepts

manic wing
#

you can only fetch messages from a channel

slate swan
#

oh there isnt a getch for messages

manic wing
maiden fable
manic wing
maiden fable
manic wing
#

first you try and use bot.get_message, then you get the channel and do channel.fetch_message

manic wing
maiden fable
#

I'm talking about dpy, not fork

manic wing
#

!d disnake.Client.get_message

unkempt canyonBOT
manic wing
#

returns None

maiden fable
manic wing
hushed galleon
#

oh they do?

maiden fable
#

Nvm, I'mma just go somewhere else

manic wing
hushed galleon
#

why not use the discord converter then

spring flax
#

yes

hushed galleon
#

even with slash commands disnake will understand your Message typehint

slate swan
#

How to import discord buttons on replit

hushed galleon
slate swan
#

The new discord buttons

slate swan
#

oh

#

Google it

hushed galleon
#

dpy 2.0 and its forks will have support for message components

#

the id of a message that was in the same channel

hushed galleon
maiden fable
#

Replit lemon_pensive

slate swan
maiden fable
#

Well yr code is still public no matter if it's a good code editor or not. That's the main issue

slate swan
#

if that was the name

maiden fable
#

Might get a VPS instead

#

Or the oracle tier

slate swan
#

vps for what?

maiden fable
#

AWS also provides a VPS for 1 usd

maiden fable
spice basalt
#

how can i format as italic in a command?

#

\x1B[3m isn't working?

maiden fable
#

hi

spice basalt
#

i mean in my command

maiden fable
#

Add that to yr command code...?

slate swan
maiden fable
spice basalt
maiden fable
#

Not bad

slate swan
spice basalt
#

how do i add the author's icon?

slate swan
maiden fable
#

icon_url kwarg

spice basalt
slate swan
#

!d discord.Embed.set_author

unkempt canyonBOT
#

set_author(*, name, url=Embed.Empty, icon_url=Embed.Empty)```
Sets the author for the embed content.

This function returns the class instance to allow for fluent-style chaining.
maiden fable
spice basalt
#

icon_url and then how do i make it the author's icon?

slate swan
spice basalt
#

set_author(icon_url=?)

slate swan
#

note that you use instances instead of actual objects

maiden fable
slate swan
#

my bad

#

wait, why is my account changed, brb

maiden fable
#

Lmaoo

spice basalt
maiden fable
#

Might as well delete the other temporary account

maiden fable
#

That, and the error says otherwise

#

Where u using embed=Embed bruv

slate swan
maiden fable
#

Lmao, well the ID which is my alt now was my main in the past, and, uhhh, I better not talk about the stuff I have done with it

slate swan
spice basalt
maiden fable
#

Uhh, I'mma just go away before I'm attacked with questions

spice basalt
#

๐Ÿ˜”

slate swan
#

wait, what am I saying

maiden fable
maiden fable
maiden fable
#

You're welcome

slate swan
#

in the end, the explanation doesnt even matter pepe_cri

#

๐Ÿ˜” but then people say I spoonfeed

maiden fable
#

As if he's gonna read that. Everyone tends to ignore the explanation, so I stopped giving them

maiden fable
#

Sending code after explanation -> You are the best helper
Sending code before explanation -> You are the best spoonfeeder

spice basalt
maiden fable
maiden fable
#

Haha

spice basalt
slate swan
keen talon
slate swan
maiden fable
spice basalt
maiden fable
#

Just, no one knows about it

maiden fable
#

Not embed.set_author
There's a difference

keen talon
slate swan
maiden fable
#

Yea

#

@spice basalt fixed it or confused?

slate swan
maiden fable
#

Idk tbh

#

Imagine ignored lemon_pensive
No one cares

spice basalt
maiden fable
#

Thanks for that

maiden fable
spice basalt
#

nah, no output

slate swan
maiden fable
drowsy thunder
slate swan
maiden fable
#

No

drowsy thunder
#

Oh noooo

maiden fable
#

Actually it's reviving back

spice basalt
slate swan
maiden fable
slate swan
#

power wastage

spice basalt
craggy cloak
#

How to type in a console like pip install discord?

maiden fable
drowsy thunder
boreal ravine
craggy cloak
maiden fable
drowsy thunder
spice basalt
#

there's no output

slate swan
maiden fable
slate swan
maiden fable
#

Hahaha

maiden fable
slate swan
#

again sus1

spice basalt
maiden fable
#

Dude what's even the error?

spice basalt
slate swan
#

the error handler ate that up

slate swan
maiden fable
#

Change the icon_url to this

spice basalt
#

okay

maiden fable
#

And yea, move to dpy 2.0 as soon as it's released cz 1.7 gonna get non functional soon

slate swan
drowsy thunder
maiden fable
#

Since the latest version is v10 now

boreal ravine
drowsy thunder
#

He is a doctor lol

craggy cloak
drowsy thunder
slate swan
maiden fable
# craggy cloak

Just add it to the required modules in the startup tab and enjoy

drowsy thunder
#

Fun fact:
I use Python cause my node version is 12.18 instead of 16+

maiden fable
#

Cool

drowsy thunder
#

Anyone has a knowledge for this bot?
grabbing yt link

maiden fable
#

@drowsy thunder what python version u using?

slate swan
#

huh?

maiden fable
drowsy thunder
#

How to make a bot like this?
https://youtu.be/APY66hYarAc

In this video I made 500+ people perform a reaction speed test in Discord, where the first place of each round would receive a prize of Discord Nitro accompanied by a special role in my server!

Thanks for watching the video!

------------LINKS BELOW------------

โ‡ฉ JOIN MY DISCORD SERVER โ‡ฉ
https://discord.gg/Sound

โ‡ฉ WATCH ANOTHER VIDEO โ‡ฉ
https...

โ–ถ Play video
maiden fable
#

.....?

drowsy thunder
#

Duh,I wanna know this
But in python

#

It was coded in Node.js

maiden fable
#

What does the bot do

drowsy thunder
maiden fable
#

Rip time to let go of music for 10 seconds

drowsy thunder
#

Check the pinned comments

#

It will have a gitlab link
But its in node.js

#

AHHHH

maiden fable
#

It's easy

maiden fable
#

!d discord.on_reaction_add use this event

unkempt canyonBOT
#

discord.on_reaction_add(reaction, user)```
Called when a message has a reaction added to it. Similar to [`on_message_edit()`](https://discordpy.readthedocs.io/en/master/api.html#discord.on_message_edit "discord.on_message_edit"), if the message is not found in the internal message cache, then this event will not be called. Consider using [`on_raw_reaction_add()`](https://discordpy.readthedocs.io/en/master/api.html#discord.on_raw_reaction_add "discord.on_raw_reaction_add") instead.

Note

To get the [`Message`](https://discordpy.readthedocs.io/en/master/api.html#discord.Message "discord.Message") being reacted, access it via [`Reaction.message`](https://discordpy.readthedocs.io/en/master/api.html#discord.Reaction.message "discord.Reaction.message").

This requires [`Intents.reactions`](https://discordpy.readthedocs.io/en/master/api.html#discord.Intents.reactions "discord.Intents.reactions") to be enabled.

Note

This doesnโ€™t require [`Intents.members`](https://discordpy.readthedocs.io/en/master/api.html#discord.Intents.members "discord.Intents.members") within a guild context, but due to Discord not providing updated user information in a direct message itโ€™s required for direct messages to receive this event. Consider using [`on_raw_reaction_add()`](https://discordpy.readthedocs.io/en/master/api.html#discord.on_raw_reaction_add "discord.on_raw_reaction_add") if you need this and do not otherwise want to enable the members intent.
drowsy thunder
#

Oh,example?

boreal ravine
#

just store the message ID, check the messages reactions, store the reactions

maiden fable
boreal ravine
drowsy thunder
#

Looks hard and the fact that I wanna buttons is shit

slate swan
#

imagine the number of times the event is triggered WTFStare

maiden fable
#

I'mma go away, u can have the honours oc explaining him

boreal ravine
#

same

maiden fable
maiden fable
#

Uhhh, let's hope the VPS doesn't crash

drowsy thunder
#

Why

maiden fable
#

@drowsy thunder okay so can u make that with a prefix command?

#

Like simple !firstreact

drowsy thunder
#

I need / commands

drowsy thunder
#

Cause others wont work after April 2022

slate swan
#

its not necessary to use text cmds

slate swan
maiden fable
drowsy thunder
maiden fable
maiden fable
#

Only verified bots need discord permission

drowsy thunder
#

Hmm

slate swan
#

๐Ÿ˜” everybody's like I dont know nothing
me noob noob peephappy

slate swan
drowsy thunder
#

My bot might get verified,just explain me

slate swan
#

and not only slash commands will work, there are user commands too

slate swan
drowsy thunder