#discord-bots

1 messages Β· Page 1086 of 1

shrewd apex
#

how bout we just stick with https here

slate swan
#

!e ```py
class A:
url = "cutegif.png"

list_ = [ A() ]

link = list_[0].url if list_ and list_[0].url.endswith("png") else "No"
print(link)

unkempt canyonBOT
#

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

cutegif.png
slate swan
#

what do you mean

pliant gulch
#

HTTPS is a protocol, itself being a set of procedures & rules for internet communication

slate swan
pliant gulch
#

So, yes it is a protocol

slate swan
#

yep!

pliant gulch
#

KekW

slate swan
#

but okimmi's gonna flex his vocab

keen talon
slate swan
#

im eating cereal

#

i realise that i have my CS exam in a week and i haven't started that chapter yet

slate swan
slate swan
slate swan
slate swan
slate swan
#

cinnamon toast crunch > any cereal

slate swan
slate swan
#

oh wait nvm, I have my CS exam tomorrow too pBear

slate swan
slate swan
slate swan
slate swan
shrewd apex
lament depotBOT
#
**What commands/features are you proud of making?**

Suggest more topics here!

slate swan
keen talon
shrewd apex
slate swan
slate swan
#

sarthak

slate swan
#
for attachment in message.attachments:
            if (
            attch.filename[-4:] in ['.jpg', '.png', '.jpeg']
            and str(message.channel.id) == str(channel_id5) and attachment.endswith((".jpg", ".png", ".jpeg"))
            ):

does this look right

slate swan
slate swan
# slate swan oki

since when does a God read a book? no need when you know everything

#

😳

shrewd apex
#

πŸ‘€

slate swan
keen talon
#

There is always something to learn, even for a master

slate swan
keen talon
slate swan
#

why don't you run it and see y9su

slate swan
slate swan
keen talon
slate swan
slate swan
slate swan
slate swan
stone beacon
slate swan
#

what can I add for a finally? I don't really need anything to happen after

slate swan
#

return statement is usually the "not anything to happen after"

stone beacon
#

Unfortunately not all of us can simulate code execution in our brains faster than a computer

slate swan
#

hm it seems it didn't do anything after sending an image..

#

make dummy classes and run it on @unkempt canyon 's evals

slate swan
slate swan
stone beacon
#

Do you mean attachment

slate swan
#

Snoggy being the 3.10.4 interpreterKannakillyourself

#

πŸ™€

shrewd apex
slate swan
#

Lemme show my code I probably have something wrong

slate swan
#
@client.event
async def on_message(message):
    try:
        if message.author.bot:
            return
        channel5 = discord.utils.get(ctx.guild.channels, name="testchannel")
        channel_id5 = channel.id
        for attachment in message.attachments:
            if (
            attachment.filename[-4:] in ['.jpg', '.png', '.jpeg']
            and str(message.channel.id) == str(channel_id5) and attachment.endswith((".jpg", ".png", ".jpeg"))
            ):
                with open("info.txt", "w+") as f:
                    f.write(attachment)
    finally:
        return
#

my brain just turned on

slate swan
#

oh yes very nice..

#

should be message

#

why is there a try block?

#

you should simply handle the errors instead

#

well for now I just wanna get it to work

#

bad practice

slate swan
dull terrace
#

is it still impossible to attach files to a slash command

slate swan
#

if you guys find out whats wrong here ill send you a funny cat meme

def foo(bar: list["Any"] = []) -> list["Any"]:
    return bar
```😼
keen talon
slate swan
#

you don't need to do the clsss thing lmao, just use that condition

keen talon
#

Stop πŸ›‘

slate swan
#

given that typing.Any is imported?

slate swan
slate swan
#

come sarthak i know you want that funny cat memeπŸ˜΅β€πŸ’«

shrewd apex
#

it's with the -> list ['Any'] ig not sure

slate swan
#

help me πŸ₯Ί

slate swan
#

!pep 484

unkempt canyonBOT
#
**PEP 484 - Type Hints**
Status

Final

Python-Version

3.5

Created

29-Sep-2014

Type

Standards Track

slate swan
#

πŸ˜”

stone beacon
#

Does it relate to None?

slate swan
#

ok ill say it so no funny cat meme for anyone😾

slate swan
slate swan
#

it should not be returning list[Any] ig

#
def foo(bar: list["Any"] = []) -> list["Any"]:
    return bar

the bar argument is created on the function declaration and not when called so it shares states everytime you call itπŸ™‚

stone beacon
#

πŸ—Ώ

slate swan
stone beacon
#

Oh that

slate swan
#

guess ill keep all the cat memes to myselfπŸ˜”

#

can someone help me now πŸ™‚

slate swan
#

nothing its just a tricky problem you can encounter 😳

#

except for the bar variable acting like a.global

stone beacon
slate swan
#

sarthak wants the cat memeπŸ˜”

#

yes i do

#

ill send it to you cuz im nice

stone beacon
#

You'd want the attachment.filename.endswith

#

I'd theorize

slate swan
#

πŸŒοΈβ€β™€οΈ

slate swan
#

I think I needa start from the bases I confused myself

silk fulcrum
#

I think there is no dot before [0]

slate swan
#

yea

#

oh hm

#
if message.attachments[0].url and message.attachments.endswith(("jpg", "png", "jpeg")) if message.attachments else "No image provided"

@slate swan ?

#

should work

#

thats just an condition check though, not a variable assignment

slate swan
#

you don't need that

slate swan
#

the syntax is improper

slate swan
#

so I cant make it all into one variable?

#

i just sent it thrice, you find that complicated

#

Kinda

slate swan
#

😭

#

what

radiant junco
#

i am sending a mention through a webhook, but the mention i'm sending will change so i can't copy the id manually

slate swan
#

@slate swan Ok I just did something it might be completely wrong

slate swan
#

ive been watching too many cat memesπŸ˜΅β€πŸ’«

slate swan
#
@client.event
async def on_message(message):
    try:
        if message.author.bot:
            return
        channel5 = discord.utils.get(message.guild.channels, name="testchannel")
        channel_id5 = channel.id
        if int(message.channel.id) == int(chanel_id5):
            if message.attachments.endswith(("jpg", "png", "jpeg")):
                attch = message.attachments[0].url
                with open("info.txt", "w+") as f:
                    f.write(attch)
            else:
                attch = "Invalid image type"
        else:
            return
    finally:
        return

@slate swan

slate swan
#

old like youπŸ™€

slate swan
slate swan
slate swan
slate swan
slate swan
scarlet sorrel
#

yo, the code for my music bot works on my pc but when i run it on AWS i get a huge error and
[https @ 0x622e400] HTTP error 403 Forbidden <huge link> 403 Forbidden (access denied)
so again, it works on my pc but on the instance it gives 403 Forbidden

slate swan
#
if <check if message has images> and <check first Attachment's url>:
``` is what id do
slate swan
#

I tried it and it didn't error out but it didnt create a txt file

#

I forgot to add the .url 😭

#

nevermind it still doesn't work wtf

#
@client.event
async def on_message(message):
    try:
        if message.author.bot:
            return
        channel5 = discord.utils.get(message.guild.channels, name="testchannel")
        channel_id5 = channel.id
        if int(message.channel.id) == int(chanel_id5):
            if message.attachments[0].url.endswith(("jpg", "png", "jpeg")):
                attch = message.attachments[0].url
                with open("info.txt", "w+") as f:
                    f.write(attch)
            else:
                attch = "Invalid image type"
        else:
            return
    finally:
        return

@slate swan didn't make the txt file or error out

#

you're not allowing it to raise errors why would it?

#

I misspeled channel

#

...

shrewd apex
slate swan
#

still didn't work

scarlet sorrel
slate swan
scarlet sorrel
#

cuh

#

you have the entire thing inside try

slate swan
#

cuh?

scarlet sorrel
#

yes

slate swan
#

what's a cuh

#

like bro?

scarlet sorrel
#

you are 'cuh'

slate swan
#

don't call me that cuh

shrewd apex
#

except:
raise Exception

#

instead of finally

slate swan
#

hm

#

getting
channel_id5 = channel.id
NameError: name 'channel' is not defined

pliant gulch
slate swan
#

does utils.get(message.guild.channels, name="channelname") get the channel id?

slate swan
scarlet sorrel
slate swan
#

I need to get the Id of this channel somehow though

scarlet sorrel
#

just do message.channel my dude

slate swan
scarlet sorrel
#

you dont need channel_id5

#

just use message.channel.id wherever you need the id

slate swan
#

so if it's sent in general I dont want the rest of stuff to happen yk

scarlet sorrel
#

yea

slate swan
scarlet sorrel
#

then just do if message.channel.name == 'cuh':

pliant gulch
unkempt canyonBOT
#

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

<class '__main__._'>
slate swan
#

what the-

scarlet sorrel
slate swan
#

@scarlet sorrel thanks cuh u genius fosho

scarlet sorrel
pliant gulch
#

I just didn't edit it fast enough

#

!e print("bar")

unkempt canyonBOT
#

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

bar
stiff gorge
#

its still not synced for me

#

i can only use the cmnds with prefix

paper sluice
#

(jpg|jpeg|png)$ 😳

#

((jpe?|pn)g)$ 😳 😳

#

(.*?)(?:(jpe?|pn)g)$'

late pike
#
@commands.command()
    async def botstatus(self, ctx, stat: typing.Literal['online', 'idle', 'dnd'] = 'online', *, activity='Working'):
        mapping = {
            "online": discord.Status.online,
            "idle": discord.Status.idle,
            "dnd": discord.Status.do_not_disturb
        }
        await self.client.change_presence(
            status = mapping[stat], 
            activity = discord.Game(activity)
            )β€Š

boom :D
slate swan
#

Playing Working would be cursed though

late pike
#

_ some sort of

#
import discord
from discord import Intents
from discord.ext import commands
intents = Intents.default()
intents.members = True

bot = commands.Bot(command_prefix='+', intents=intents)

@bot.event
async def on_ready():
    print("Online!")

@bot.command(pass_context = True)
async def ping(ctx):
    await ctx.send("Pong! Your ping is " + str(bot.latency) + ".")

token = '(token)'
bot.run(token)β€Š
slate swan
paper sluice
#

in the init or something

slate swan
loud junco
paper sluice
# slate swan wdym

like make it a class variable instead of making that dict everytime the command is invoked

loud junco
maiden fable
late pike
scarlet sorrel
#

anyone know about music bots? because im getting this error when i try and play a song
Server returned 403 Forbidden (access denied)

loud junco
loud junco
#

just stop making music bot, get urself spotify or something

late pike
#

Having problem in source codes of music ones

slate swan
slate swan
#

it was a joke bro

scarlet sorrel
maiden fable
#

He's correct tho, music bots are against ToS @scarlet sorrel

loud junco
slate swan
#

why do you guys get aggressive over a joke?

loud junco
slate swan
scarlet sorrel
maiden fable
late pike
loud junco
#

its only <rm10 with family package

scarlet sorrel
slate swan
unkempt canyonBOT
#

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

001 | Traceback (most recent call last):
002 |   File "<string>", line 4, in <module>
003 |   File "<string>", line 2, in a
004 | UnboundLocalError: local variable 'b' referenced before assignment
loud junco
loud junco
#

lemme show u

slate swan
scarlet sorrel
# loud junco and u get access denied

its a problem to be solved, not like you would know much about that considering you probably just fall down at the first hurdle with everything in your life

maiden fable
#

@scarlet sorrel calm down please

scarlet sorrel
loud junco
#
from progress import my_emote
from progress.my_emote import *

@bot.event
async def on_command_error(ctx, error):
  e = my_emote(ctx)
  if isinstance(error, commands.MissingRequiredArgument):
    elif ctx.command.name == 'trade':
      tradelist = f'''
**__Bob, the Builder__**
~~None~~
      
**__Wagner, the Blacksmith__**
{e.emerald}emerald -> R

**__Skev, the Lumberjack__**
{e.emerald}emerald -> {e.small_sapling}small_sapling
{e.emerald}emerald -> {e.apple}apple

**__Sarth, the Butcher__**
{e.emerald}emerald -> {e.cooked_pogchop}cooked_pogchop
{e.emerald}emerald -> {e.steak}steak

**__Ashley, the Cleric__**
{e.emerald}emerald -> {e.cleansed_dirt}cleansed_dirt
{e.emerald}emerald -> {e.cleansed_water_bucket}cleansed_water_bucket

**__Greg, the Farmer__**
{e.emerald}emerald -> {e.potato}potato
{e.emerald}emerald -> {e.wheat_seeds}wheat_seeds
{e.emerald}emerald -> {e.carrot}carrot
{e.emerald}emerald -> {e.beetroot_seeds}beetroot_seeds

**__Ryuga, the Shepherd__**
~~None~~
'''
      embed = discord.Embed(
        description = tradelist, 
        color = discord.Color.blue())
      embed.set_author(name= f"{ctx.author.display_name}'s trade(Buy)", 
      icon_url = ctx.author.avatar.url)
      await ctx.send(embed=embed)
loud junco
#

if u cant take jokes then dont talk with pepo out there

unkempt canyonBOT
#

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

loud junco
#

πŸ‘

#

go ahead and !rule all of my msg

maiden fable
unkempt canyonBOT
#

5. Do not provide or request help on projects that may break laws, breach terms of services, or are malicious or inappropriate.

scarlet sorrel
loud junco
#

:D

#

yes thank you

loud junco
slate swan
loud junco
#

LOL

#

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

loud junco
paper sluice
#

im confusion, what is my_emote?

loud junco
maiden fable
#

Nice, sarthak and Ryuga also there

paper sluice
#

dog damn

loud junco
maiden fable
#

I'm fine

loud junco
#

farmer builder or blacksmith

paper sluice
loud junco
#

πŸ‘€

slate swan
paper sluice
#

oh in the string

#

nice πŸ‘

loud junco
late pike
#

**```py
Hey, Discord peeps!
What's this?

paper sluice
loud junco
#

server monetization? or what

loud junco
late pike
#

It's now also a mysery to me

maiden fable
late pike
#

What to do with

loud junco
#

its working now

loud junco
#

thanks :D

slate swan
loud junco
#

im just lazy

maiden fable
#

Lmao

slate swan
paper sluice
maiden fable
#

No we ain't same

loud junco
#

just take all of the school books to the school
instead of taking only the books that i need to use that day

maiden fable
visual island
#

@maiden fable I actually made the MaybeAwait decorator working with instance methods

loud junco
#

πŸ‘€

slate swan
paper sluice
maiden fable
#

Especially people in the discord.py server's general chat

slate swan
loud junco
alpine pewter
#
guild_ids = [956462089935941652]

@bot.slash_command(guild_ids=guild_ids)
async def test(interaction : Interaction):
    channel = 982876955554771014
    await channel.send("Test")

If I have the channel.id stored in a database, how would I send a message to that channel?
I just made this command as an example of the issue, not sure how to fix it.

AttributeError: 'int' object has no attribute 'send'

paper sluice
#

hello Scofflaw πŸ‘‹

dusky pine
#

:wave:

maiden fable
blissful lagoon
# scarlet sorrel u stoopid

!tempban 944202890015277106 1w This isn't an acceptable way to treat people. Please take our rules and code of conduct seriously if you decide to return.

unkempt canyonBOT
#

:incoming_envelope: :ok_hand: applied ban to @scarlet sorrel until <t:1655012509:f> (6 days and 23 hours).

loud junco
#

:/

#

actually its ok

maiden fable
loud junco
#

dont temp ban him

alpine pewter
dusky pine
#

dpy server is the definition of "if you don't do it my way you're not cool"

maiden fable
dusky pine
slate swan
#

Oh, my bad

maiden fable
loud junco
maiden fable
loud junco
dusky pine
late pike
#

My code sucks

loud junco
paper sluice
maiden fable
dusky pine
loud junco
shrewd apex
pliant gulch
#

I'd much rather had used some other method than looking at the callstack though

#

Plus regex is slow

loud junco
maiden fable
#

Indeed

shrewd apex
maiden fable
slate swan
#

pBear or statement be like

visual island
maiden fable
loud junco
#

actually i wanna add u also

#

but Hunter, the Builder...

maiden fable
#

Lmao my name don't tho

shrewd apex
#

hunter the hunter....

maiden fable
#

Font*

paper sluice
slate swan
#

Hunter, the Huntering

loud junco
#

LOL

shrewd apex
loud junco
maiden fable
paper sluice
#

hunter the setattr

pliant gulch
# visual island I saw you used c api, I have 0 experience with that
# -*- coding: utf-8 -*-

from __future__ import annotations

import asyncio

from ctypes import POINTER, py_object, pythonapi

pythonapi._PyObject_GetDictPtr.restype = POINTER(py_object)
pythonapi._PyObject_GetDictPtr.argtypes = [py_object]


async def main() -> None:
    async def _get_member(id: int) -> None:
        print(id)

    def __await__(self):
        return _get_member(123).__await__()

    def get_member(id: int) -> None:
        print("sync")

    mapping = pythonapi._PyObject_GetDictPtr(type(get_member)).contents.value
    mapping["__await__"] = __await__

    await get_member(123)

asyncio.run(main())
``` heres the code
maiden fable
#

Lmao Hunter, the Hunter

loud junco
#

@slate swan

maiden fable
pliant gulch
#

Successfully overrides await but the await get_member doesn't call it!!

loud junco
#

u want to become blacksmith or builder

pliant gulch
#

So I could not get it to work

#

I also tried overriding call, same issue; get_member(...) wasn't calling it

maiden fable
#

Sad

loud junco
#

maybe try fetch_member()?

#

he wants to get id right?

maiden fable
loud junco
#

oo ok

maiden fable
#

This is, in no way, related to dpy

pliant gulch
#

I don't know enough of how functions work in the backend so I'll just giveup

maiden fable
#

andy, is it just me or u r doing Python since u were born?

pliant gulch
#

No

maiden fable
#

The amount and level of knowledge tho

pliant gulch
#

There are a lot of people who know more than me

loud junco
maiden fable
#

And the PSF core devs

loud junco
#

nono

#

andy is better than the python core dev

#

🀣

late pike
#

Any python pro here?

#

In terms of bot development

maiden fable
#

andy

#

@slate swan

loud junco
late pike
slate swan
loud junco
#

idk how to output hello world

unkempt canyonBOT
#
Missing required argument

code

maiden fable
#

Can u take the commands to #bot-commands please?

slate swan
late pike
slate swan
#

#bot-commands

unkempt canyonBOT
slate swan
#

why did i get 2 pings and what happened

#

Idk

loud junco
paper sluice
slate swan
#

πŸ˜…

slate swan
loud junco
#

:/

slate swan
#

villager with nothing

loud junco
#

nitwit?

late pike
#

You all are

loud junco
slate swan
#

!ot last

unkempt canyonBOT
late pike
shrewd apex
#

okimii the builder
okimii the blacksmith

#

which sounds better?

slate swan
#

villager

late pike
unkempt canyonBOT
slate swan
#

!

#

!ot @shrewd apex

#

Do this first

late pike
#

!ot @slate swan

unkempt canyonBOT
late pike
#

Like this?

slate swan
#

Don't spam ot

#

.topic

lament depotBOT
#
**What unique features does your bot contain, if any?**

Suggest more topics here!

slate swan
late pike
#

Soon#3

>>> list(discord.Intents.default())
[('guilds', True), ('members', False), ('bans', True), ('emojis', True), ('integrations', True), ('webhooks', True), ('invites', True), ('voice_states', True), ('presences', False), ('guild_messages', True), ('dm_messages', True), ('guild_reactions', True), ('dm_reactions', True), ('guild_typing', True), ('dm_typing', True), ('message_content', False), ('guild_scheduled_events', True)]β€Š
slate swan
#

I suggested some topics

#

But nothing changed

slate swan
#

disconnect from the gateway*

#

huh

late pike
slate swan
#

why ping mepWut

pliant gulch
late pike
#

Btw nuke & apocalypse sounds same

slate swan
late pike
#

If anyone can help me with Bot dashboard... Pls

heavy shard
#

apocalypse is greek for revelation

late pike
#

I don't hve any extra tags or differently designed name

late pike
# slate swan Yes?

Should we rather create our own Web support of bot or depend on some other servers?

slate swan
#

discord server better

late pike
late pike
# slate swan discord server better

Yupp i have one added into 45 servers with 67k users overall!
But Have less staffs for the same, hence i'm some sort of confused right now

slate swan
#

still discord server is my choice

late pike
slate swan
#

Ye faq u can put it on a website

late pike
late pike
maiden fable
#

@slate swan u still finding a hosting?

maiden fable
paper sluice
#

lmao

slate swan
#

I'm thinking of trying termux

late pike
slate swan
dusky pine
#

Termux is not a host

slate swan
#

Ye

maiden fable
dusky pine
#

please just buy a raspberry pi or host on AWS

slate swan
#

Cant

late pike
maiden fable
dusky pine
#

Linode/AWS is an option

maiden fable
slate swan
#

..

maiden fable
#

Use an old phone and host off it

#

Using termux

slate swan
#

Ye that's what I'm talking about

maiden fable
#

Ah cool

#

Actually that's a nice idea

slate swan
#

I have downloaded it now and I have no idea what to do actually

dusky pine
#

download your code and install deps?

heavy shard
#

pkg install python

maiden fable
#

There are a few tuts on yt

slate swan
#

Alr lemee check yt

paper sluice
maiden fable
#

TIL @heavy shard's pfp is animated

heavy shard
#

don't use termux off google play, it's outdated, use termux from f-droid

heavy shard
late pike
slate swan
#

f Droid?

#

!rule 7

unkempt canyonBOT
#

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

maiden fable
slate swan
#

Wrong reply

maiden fable
#

My bad

maiden fable
slate swan
#

hunter

slate swan
#

where is that embed !

#

the in keyword is faster with sets correct right?

slate swan
#

cheers

maiden fable
#

Nvm, not wanna argue

shrewd apex
#

isn't there a & to check for set intersection

maiden fable
slate swan
#

MEE6 is using disabled buttons to decorate msg

heavy shard
#

Sparky: can i pm you?

slate swan
#

pm?

#

Oh..

#

Private

#

I understand

#

can anyone send me the source code of dpys (2.0) async context manager? i see it no where.

elfin island
#

which one

late pike
#

@elfin island

elfin island
late pike
elfin island
#

okay? just ask your question and wait for someone to answer

late pike
#

From a while

elfin island
unkempt canyonBOT
#

discord/context_managers.py line 52

class Typing:```
slate swan
boreal ravine
slate swan
#

sorry i didnt specify it

unkempt canyonBOT
#

discord/client.py line 249

async def __aenter__(self) -> Self:```
elfin island
#

which ext.commands.Bot inherits

boreal ravine
#

Yes

slate swan
elfin island
slate swan
spring flax
#

Currently I am doing a on_reaction_add to get the number of reactions on a poll message.
Would I be able to, instead of doing x for each reaction add, have it do it every y minutes?

late pike
#
const { joinVoiceChannel, createAudioPlayer, createAudioResource, NoSubscriberBehavior, AudioPlayerStatus } = require('@discordjs/voice');
const { MessageAttachment } = require('discord.js');
const googleTTS = require('google-tts-api');

module.exports = {
	name: 'tts',

	async execute (client, interaction) {
		await interaction.deferReply({ ephemeral: true });
        // get audio URL
        const url = googleTTS.getAudioUrl(interaction.options._hoistedOptions[0].value, {
            lang: 'en',
            slow: false,
            host: 'https://translate.google.com',
        });

        const tts_message = new MessageAttachment(url, "tts.mp3");

        if(!interaction.member.voice) return interaction.followUp({content: "Please join a voice channel.", files: [tts_message]});
        if(!client.isReadyForTextToSpeech) return interaction.followUp({content:"Please wait until the last message is complete.", files: [tts_message]});
		interaction.followUp({files: [tts_message]});
slate swan
late pike
slate swan
#

bro

spring flax
#

but how would I get the message object? I know about that, but there are multiple polls

#

so message object of each poll

slate swan
#

im thinking about something but its probably hardcoded so nvm

spring flax
#

is it not possible?

slate swan
#

no it is

spring flax
#

can you give a rough example of the hardcoded one mentioned above?

slate swan
#
async def pollchecker(message: discord.Message, checktime: int) -> None
    poll_message = await message.channel.fetch_message(message.id)
    while True:
        if len(poll_message.reactions[0].members) > len(poll_message.reactions[1].members)
            print("first reaction is winning!")
        else:
            print("second reaction is winning!")
        asyncio.sleep(30)
        
@bot.command()
async def makepoll(ctx: commands.Context, *, topic: str) -> None:
    msg = await giveawaychannel.send(topic)
    ...

    bot.loop.create_task(pollchecker(msg, 30))

bad pseudo code imoπŸ—Ώ

#

Hi how can i add like has_permissions(ban_members = True or kick_members = True)

spring flax
slate swan
slate swan
spring flax
slate swan
#

@commands.has_guild_permissions(**args) @slate swan for guild perms..

slate swan
slate swan
#

how can I listen for messages only on a certain channel?

spring flax
#

why not use check_any?

slate swan
slate swan
#

!d discord.ext.commands.check_any

unkempt canyonBOT
#

@discord.ext.commands.check_any(*checks)```
A [`check()`](https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#discord.ext.commands.check "discord.ext.commands.check") that is added that checks if any of the checks passed will pass, i.e. using logical OR.

If all checks fail then [`CheckAnyFailure`](https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#discord.ext.commands.CheckAnyFailure "discord.ext.commands.CheckAnyFailure") is raised to signal the failure. It inherits from [`CheckFailure`](https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#discord.ext.commands.CheckFailure "discord.ext.commands.CheckFailure").

Note

The `predicate` attribute for this function **is** a coroutine.

New in version 1.3.
slate swan
#

oh wait my bad

heady sluice
#

bru

slate swan
#

How do I delete message sent by user 5 seconds after it's sent?

heady sluice
#

command?

slate swan
heady sluice
#

or on_message

slate swan
spring flax
#

how would I cancel one of those loops?

slate swan
#

uh like this?

def givcheck():
        pass
@commands.check_any(givcheck())
heady sluice
#

task = bot.loop.create_task(task)
task.stop()
?

spring flax
#

no...

slate swan
#

..

slate swan
heady sluice
spring flax
#

here's an example```py
@bot.command()
@commands.check_any(commands.is_owner(), is_guild_owner())

slate swan
unkempt canyonBOT
#

cancel(msg=None)```
Request the Task to be cancelled.

This arranges for a [`CancelledError`](https://docs.python.org/3/library/asyncio-exceptions.html#asyncio.CancelledError "asyncio.CancelledError") exception to be thrown into the wrapped coroutine on the next cycle of the event loop.

The coroutine then has a chance to clean up or even deny the request by suppressing the exception with a [`try`](https://docs.python.org/3/reference/compound_stmts.html#try) … … `except CancelledError` … [`finally`](https://docs.python.org/3/reference/compound_stmts.html#finally) block. Therefore, unlike [`Future.cancel()`](https://docs.python.org/3/library/asyncio-future.html#asyncio.Future.cancel "asyncio.Future.cancel"), [`Task.cancel()`](https://docs.python.org/3/library/asyncio-task.html#asyncio.Task.cancel "asyncio.Task.cancel") does not guarantee that the Task will be cancelled, although suppressing cancellation completely is not common and is actively discouraged.

Changed in version 3.9: Added the *msg* parameter.

The following example illustrates how coroutines can intercept the cancellation request:
spring flax
slate swan
#

not that i can think of right now not really, dont take my word right now its 3:35 am and im tired so probably ask someone elsepithink πŸ˜…

#

is message.content a string?

#

yes

#

Ok

#

!d discord.Message.content

unkempt canyonBOT
slate swan
#

you can check the return type in docs or src

#

@spring flax like this?

@commands.check_any(commands.has_permissions(),commands.has_permissions())
spring flax
#

yeah

slate swan
#

alr

spring flax
#

obviously you have to put the permission to check for though

slate swan
#

i was just confirming that i wrote it right

#

How do loops and tasks work?

stiff gorge
#
    @commands.hybrid_command(description="Displays inspirational quotes.",
                             help="Gives an inspirational quote.")
    async def quote(self, ctx):
        response = requests.get("https://zenquotes.io/api/random")
        json_data = json.loads(response.text)[0]
        embed=discord.Embed(title='Inspirational Quote', colour=0x2f3136,
                            description="❝ " + str(json_data['q']) + " ❞",
                            url="https://zenquotes.io/")
        embed.set_footer(text='- ' + json_data['a'])
        await ctx.reply(embed=embed)

why am i able to use this command only with prefix but not with slash

odd mango
#

oksy so my bot gives output like this

#

how can i make it look like proper columns

#

this is a text but yeah i will embed it

rocky trench
#

And what is your code

odd mango
#

oh just a sec

#
@client.command(name="moves")
async def moves(ctx: commands.Context, *, pokemon: str):
  with open('moves.json') as json_file:
    movedata = json.load(json_file)
    pokemon_moves_list = movedata.get(f'{pokemon}')
    if pokemon_moves_list:
      pokemon_moves = ""
      counter = 1
      for i in pokemon_moves_list:
        if counter % 3 == 0:
          pokemon_moves += f"{i}\n"
          counter = 1
        else:
          pokemon_moves += f"{i}\t\t\t\t\t\t\t\t\t\t\t\t\t\t"
          counter += 1
      await ctx.send(pokemon_moves)```
#

ffs

#

what do i do then 😭

#

how do i divide the output into 3 fields

#

yeah

#

thats the question

#

how do i split it to three 😭

#

its one single string

#

oh sure

#

yeah its the list

#

one sec

quaint epoch
#

anyone need help w/ how to read the contents of attachments (it is a skill a specialize in)

odd mango
#

yeah

#

i convert it to a list

unkempt canyonBOT
#

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

2
odd mango
#

i got the gist but idk how exactly to do that

#

yeah i can find the length and divide it by three but what incase there are number of values which are not divisible by three

#

!e

your_list = ["Fly", "Roar", "Ice Beam", "Blizzard"]
print(len(your_list) // 3)```
unkempt canyonBOT
#

@odd mango :white_check_mark: Your eval job has completed with return code 0.

1.3333333333333333
odd mango
#

how do i deal with this ^^

#

ohh

#

!e

your_list = ["Fly", "Roar", "Ice Beam", "Blizzard"]
print(len(your_list) // 3)```
unkempt canyonBOT
#

@odd mango :white_check_mark: Your eval job has completed with return code 0.

1
odd mango
#

okay.. what next

#

also, i want only 30 values on page 1, similarly on page 2, and so on

unkempt canyonBOT
#

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

['Fly\nRoar', 'Ice Beam\nBlizzard', 'Hyper Beam\ntest']
odd mango
#

LMAO i thought you will make 1 list into 3, but you.. YOU WHAT LOLL

#

man that's genius

#

actually, how about textwrap

#

okayy

#

ohh

honest shoal
#

How can I change server's banner?

slate swan
#

!d discord.Guild.edit has that dunno?

unkempt canyonBOT
#
await edit(*, reason=..., name=..., description=..., icon=..., banner=..., splash=..., discovery_splash=..., community=..., afk_channel=..., owner=..., afk_timeout=..., ...)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).

Edits the guild.

You must have the [`manage_guild`](https://discordpy.readthedocs.io/en/latest/api.html#discord.Permissions.manage_guild "discord.Permissions.manage_guild") permission to edit the guild.

Changed in version 1.4: The rules\_channel and public\_updates\_channel keyword-only parameters were added.

Changed in version 2.0: The discovery\_splash and community keyword-only parameters were added.

Changed in version 2.0: The newly updated guild is returned...
slate swan
#

yeah it does

honest shoal
#

Ty!

stray carbon
ashen perch
#

hey quick question how do I get multiple button rows here is what i have so far
`buttons = [
create_button(style=ButtonStyle.grey, label="name"), create_button(style=ButtonStyle.grey, label="name"), create_button(style=ButtonStyle.grey, label="name"),
]

    grid = create_actionrow(*buttons, )
    await ctx.send(embed=TTT_Game, components=grid.get)`
magic pond
#
File "/home/runner/mv/venv/lib/python3.8/site-packages/discord/client.py", line 393, in _run_event
    await coro(*args, **kwargs)
TypeError: on_message() takes 1 positional argument but 2 were given
    @commands.Cog.listener()
    async def on_message(message):
      if message.content == "hello":
        await message.channel.send(f"Hey {message.author.mention}! Whats up?")
        ```
heady sluice
#

@magic pond self

#

self...

spring flax
#

i get ```py
sum_of_all = sum(product)
TypeError: 'int' object is not iterable

for this in an `on_reaction_add` event
```py
    
    all_reactions = reaction.message.reactions
    
    for idx, r in enumerate(all_reactions):
        product = idx * r.count
    
    sum_of_all = sum(product)
    avg_rating = sum_of_all / sum(single_reaction.count for single_reaction in all_reactions)
    print(avg_rating) 
odd mango
#

okay i got it down

magic pond
#

can i use @commands.Cog.listener() 2-5 times in a cog ?

spring flax
#

python func

#

!d sum

heady sluice
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/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/library/math.html#math.fsum "math.fsum"). To concatenate a series of iterables, consider using [`itertools.chain()`](https://docs.python.org/3/library/itertools.html#itertools.chain "itertools.chain").

Changed in version 3.8: The *start* parameter can be specified as a keyword argument.
paper sluice
heady sluice
spring flax
#

where?

#

oh read that wrong. No i haven't

paper sluice
#

!e

a = [1, 2 ,3]
print(sum(a))
unkempt canyonBOT
#

@paper sluice :white_check_mark: Your eval job has completed with return code 0.

6
spring flax
paper sluice
#

what are you trying to do?

#

sum from 0 to product?

spring flax
#

from this ```py
for idx, r in enumerate(all_reactions):
product = idx * r.count

paper sluice
magic pond
# heady sluice you can use it infinite times
    @commands.Cog.listener()
    async def on_message(self,message):
      if message.content == "hello":
        await message.channel.send(f"Hey {message.author.mention}! Whats up?")
        await asyncio.sleep(2)
        await message.channel.send(f"Hope you are Fine!, Aren't you?")

    @commands.Cog.listener()
    async def on_message(self,message):
      if message.content == "happy birthday":
        await message.channel.send(url='https://cdn.discordapp.com/attachments/969178492002500678/971014900723896320/unknown.png')

when i added this its not working and it shows this

heady sluice
#

this is not an error

#

this is a warning

spring flax
heady sluice
#

because pyflakes doesn't know what dpy does

#

but what's the point of two on_messages

#

it doesn't make sense

magic pond
#

both the commands r not working now wht to do ?

#

when it was in main.py it showed tht warning but it worked

loud junco
#

rpm trade sell a 12

#

how do i spread the command arg

heady sluice
#

!d str.split

unkempt canyonBOT
#

str.split(sep=None, maxsplit=- 1)```
Return a list of the words in the string, using *sep* as the delimiter string. If *maxsplit* is given, at most *maxsplit* splits are done (thus, the list will have at most `maxsplit+1` elements). If *maxsplit* is not specified or `-1`, then there is no limit on the number of splits (all possible splits are made).

If *sep* is given, consecutive delimiters are not grouped together and are deemed to delimit empty strings (for example, `'1,,2'.split(',')` returns `['1', '', '2']`). The *sep* argument may consist of multiple characters (for example, `'1<>2<>3'.split('<>')` returns `['1', '2', '3']`). Splitting an empty string with a specified separator returns `['']`.

For example:
loud junco
#

lemme read the docs

heady sluice
magic pond
heady sluice
#

ok

#

then make the two on_messages one

#

just use if and elif

magic pond
#

ok

loud junco
#

lemme tp#bot-commands

slate swan
#
@commands.command()
    async def edonate(self, ctx, event, prize, *, msg):
        embed1 = discord.Embed(title=f"{ctx.author.name} wants to make an event donation!", description=f" \n:dot_877959363388641300:**Event:** {event} \n:dot_877959363388641300:**Prize:** {prize} \n:dot_877959363388641300:**Message:** {msg}", color = discord.Colour.random())
        embed1.set_author(name=ctx.guild.name)
        embed1.set_footer(text=ctx.user.name, icon_url=ctx.author.avatar.url)
        if msg == None:
            await ctx.send("Please provide a msg, if the message is none use a **.**")
        if prize == None:
            await ctx.send("Please provide the prize for winner.")
        async with ctx.typing():
            await ctx.send(embed=embed1, view=Buttons())

buttons aren't sent

mental hollow
#

how do I use memberConverter in pycord?

regal pulsar
paper sluice
spring flax
#

i have some code that calculates the overall "rating" off of a poll's reaction count.
Now I want to reflect this overall rating in the form of stars, like in the image below.
How would I go around doing this?

spring flax
loud junco
#

command with 4 arguments is breaking my brain with if else statement

paper sluice
spring flax
#

this is a better example

loud junco
slate swan
loud junco
#

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

paper sluice
spring flax
#

I have the code that gets me the overall. I just am not sure how to show it in the form of stars

paper sluice
#

oh u want the image as well

loud junco
slate swan
loud junco
#

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

loud junco
odd mango
#

dont ask man 😭
x = [j+(30-len(j))*" " for i in [pokemon_moves_list[i: i+3] for i in range(0, len(pokemon_moves_list), 3)] for j in i]

y = [x[i: i+10] for i in range(0, len(x), 10)]

loud junco
#

lemme tp again#bot-commands

odd mango
#

i just wanna die after seeing that block

#

with a few modifications, i can now divide the embed into pages and use buttons to navigate

#

@slate swan it would be great if i could increase the distance between move names in horizontal manner

#

you got any clue how i can do that?

#

not fields, just a field

#

can we take this to dms if thats fine by you?

#

i can explain it better there

#

ah okay okay

#

i will just put it here

#

ughh ditch its too much to explain 😭

#

@slate swan do you know how to enter text in embed field name and not get it bold?

slate swan
#

so I used @tasks.loop(minutes=1) . this sends every minute a message to a channel. how can I do it for multiple channels?

odd mango
#

i am already making it empty

heavy folio
odd mango
pearl fjord
#

how do you tell if a message mentions the bot?

trail dove
#
@client.command()
async def kick(ctx, member : discord.Member, *, reason=None):
    await member.kick(reason=reason)

@client.command()
async def ban(ctx, member : discord.Member, *, reason=None):
    await member.ban(reason=reason)

Now the problem is the kick and ban command doesn't work, except the other responds command

heavy folio
# pearl fjord how do you tell if a message mentions the bot?

To handle your bot being mentioned in a message (commonly to respond with a prefix) you can do the following:-

import re

...

@bot.event
async def on_message(message: discord.Message) -> None:
  if re.fullmatch(rf"<@!?{bot.user.id}>", message.content):
    await message.channel.send(f"My prefix is `{some_prefix_here}`!")
    return

  await bot.process_commands(message)β€Š

This will only work if the message is solely a mention, or it will process commands otherwise.

heavy folio
trail dove
#

there are no errors logged

pearl fjord
#

also thanks for responding

trail dove
#

on the screenshot no red marks or something

heavy folio
heavy folio
pearl fjord
heavy folio
#

!d discord.Message.reference

trail dove
#

or wait

#

discord bots only works if they have the prefix as "/" ?

heavy folio
trail dove
#

and by the way no banned users on the audit logs

#

just typed the command, nothing happened

heavy folio
#

do some debugging, try excepts ```py
try:

do stuff

except Exception as exc:

log error

odd mango
#

okay i somehow managed to increase space, quick question
which interface looks better among these two:

#

okay!

slate swan
odd mango
#

and not just put ids

pearl fjord
#

how do you make the bot change its nickname in a server?

slate swan
slate swan
#

how can i fix this guys

odd mango
#

no

#

wait lemme show you

trail dove
#

no errors showed up

slate swan
#

i need him

slate swan
desert cosmos
slate swan
desert cosmos
#

for member in members:

slate swan
trail dove
#

oh its outdated?

slate swan
#

why would you typehint an argument to discord.Client

odd mango
wooden seal
#

why are discord component buttons malfunctioning

#

I can give code

slate swan
#

cause 3rd party librariy

wooden seal
#

how to get this lib

slate swan
desert cosmos
slate swan
#

!d discord.Guild.members

unkempt canyonBOT
slate swan
slate swan
slate swan
#

ok i'll try it

desert cosmos
#
for members in ctx.guild.members:
  ctx.send(member.name)
heavy folio
# slate swan

this... this code breaks every single pep that exists

slate swan
#

pep 9001 is still valid

desert cosmos
#

!pep 9001

unkempt canyonBOT
#
PEP not found

PEP 9001 does not exist.

slate swan
desert cosmos
#

it does exist

slate swan
desert cosmos
#

you can simply do this

async def members (ctx)
  for member in ctx.guild.members:
    await ctx.send(member.name)
stray carbon
#

Here is the log:

Number is 31
15
22
64
68
70
11
49
71
3
72
50
43
None
63
46
27
17
62
59
37
13
31
1
36
16

Why does this always return None

def get_number_coordinates(self, number: int):
        print(f'Number is {number}')
        for y in range(len(self.board)):
                        for x in range(len(self.board[y])):
                            board_number = getattr(self.board[y][x], "number", None)
                            print(board_number)
                            if board_number is None:
                                continue
                            else:
                                if board_number == number:
                                    self.board_x = x
                                    self.board_y = y
                                else:
                                    continue

        return self.board_x, self.board_y

Log given above

slate swan
#

thank you so much bro

desert cosmos
#

✌️.

desert cosmos
dapper tendon
#

Where do I learn to make Discord bots by python ?

desert cosmos
#

you must define button inside view class instance and pass your instance to ctx.send(view=MyView())

pearl fjord
slate swan
heavy folio
#

alright tell me the better way then πŸ’€

slate swan
# desert cosmos button class itself is not view instance ig
class Buttons(discord.ui.View):
        def __init__(self, *, timeout=60):
            super().__init__(timeout=timeout)
        @discord.ui.button(label="Denie",style = discord.ButtonStyle.red,emoji=":cross8:") # or .secondary/.grey
        async def gray_button(self,interaction: Interaction, button: Button):
            await interaction.response.send_message(f"Your donation has been denied by {interaction.user.mention}.")
        @discord.ui.button(label="Hold",style = discord.ButtonStyle.gray,emoji=":load:") # or .secondary/.grey
        async def gray_button(self,interaction: Interaction, button: Button):
            await interaction.response.send_message("Your donation has been put on hold {interaction.user.mention}.")
        @discord.ui.button(label="Accept",style = discord.ButtonStyle.green,emoji=":tick:") # or .secondary/.grey
        async def gray_button(self,interaction: Interaction, button: Button):
            await interaction.response.send_message("Your donation has been accepted by {interaction.user.mention}.")
slate swan
pearl fjord
pearl fjord
#

thanks

slate swan
#

but this one needs Member intents, invalid-user's code will work without intents too so i'd go with regex too

heavy folio
dapper tendon
heavy folio
desert cosmos
pearl fjord
desert cosmos
#

i mean maybe inside on_ready() event listener

slate swan
heavy folio
heavy folio
desert cosmos
slate swan
heavy folio
slate swan
pearl fjord
slate swan
#

Above bot.run right?

heavy folio
#

discord what is this

desert cosmos
slate swan
#

kinda wrong

#

load_extension is now an awaitable

desert cosmos
#

well thats weird

slate swan
desert cosmos
#

i am using py-cord

slate swan
#

well, new methods have been added to make it easier to use

desert cosmos
#

its not the case with py-cord ig

slate swan
slate swan
#

!d discord.ext.commands.Bot.setup_hook

unkempt canyonBOT
#

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

A coroutine to be called to setup the bot, by default this is blank.

To perform asynchronous setup after the bot is logged in but before it has connected to the Websocket, overwrite this coroutine.

This is only called once, in [`login()`](https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#discord.ext.commands.Bot.login "discord.ext.commands.Bot.login"), and will be called before any events are dispatched, making it a better solution than doing such setup in the [`on_ready()`](https://discordpy.readthedocs.io/en/latest/api.html#discord.on_ready "discord.on_ready") event.

Warning

Since this is called *before* the websocket connection is made therefore anything that waits for the websocket will deadlock, this includes things like [`wait_for()`](https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#discord.ext.commands.Bot.wait_for "discord.ext.commands.Bot.wait_for") and [`wait_until_ready()`](https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#discord.ext.commands.Bot.wait_until_ready "discord.ext.commands.Bot.wait_until_ready")...
slate swan
#

life saver pWut

slate swan
slate swan
desert cosmos
#

@dapper tendon well if you are willing to stick by it
you will learn them along the way
but yeah it would be hard
and more time consuming too

slate swan
desert cosmos
#

i had jumped straight to discord bots after learning functions loops and operators

slate swan
#

might have had a hard time in the beginning?

desert cosmos
#

yeah quit 3 time

dapper tendon
desert cosmos
#

lol

paper sluice
# desert cosmos yeah quit 3 time

lol same, i started making bots without having knowledge of functions/keywords etc. i used to think async is some magical word that made this function a "bot function"

slate swan
#

i had issues with variable scoping in the start, since i knew functions and classes but never actually worked with them..m

desert cosmos
paper sluice
#

i dont agree because i have different interests but i can see why

desert cosmos
#

like ?

paper sluice
#

more into learning language in dept, i just made discord bots cuz my friends wanted something

desert cosmos
#

i don't like ai ml and maths stuff much

#

i see

dim tapir
#

python is used for more than ml and maths

slate swan
#

and data science

paper sluice
#

python can be used for everything.

dim tapir
#

^^

paper sluice
#

u might need some other tools

desert cosmos
#

mm

slate swan
#

thats technically true for most of the programing languages...

desert cosmos
#

most of the general purpose programming language

dim tapir
#

u will always find urself using

#

atleast 20 modules locally or 3d party

paper sluice
#

u can anything with a turing complete machine :)

slate swan
paper sluice
#

why don't u like dpy?

desert cosmos
jagged adder
#

if i want to write a command that deletes all channels under a certain category id when i type a certain command word, is that something thats possible to do? i want to be able to delete all channels created by my game bot under x category but im unsure how to go about it

dim tapir
jagged adder
#

is there a delete all command that i can customize to fit my use?

tacit token
#

Guys, how can i log someone name change ? (not a nickname)

desert cosmos
slate swan
#

and too much cache dependent

slate swan
paper sluice
#

slash commands are awful too

unkempt canyonBOT
#

discord.on_member_update(before, after)```
Called when a [`Member`](https://discordpy.readthedocs.io/en/latest/api.html#discord.Member "discord.Member") updates their profile.

This is called when one or more of the following things change...
slate swan
#

check for the name property

dim tapir
#

u guys want a old bot i made with the level system

slate swan
# paper sluice slash commands are awful too

with what in currently using, they are easier, gets registered faster ( due to new API ofc ) and can be intermixed with normal command
kannapogg pain for sm1 who doesn't like decorators tho

dim tapir
#

same as mee6

#

its pretty messy

slate swan
#

same as mee6
πŸ’€ how customisable is it?

dim tapir
#

u can change

#

anything u want thats why its messy

slate swan
#

rank images, exp bucket etc too?

#

they didn't add pycord in @unkempt canyon docs πŸ˜”

dim tapir
unkempt canyonBOT
#
Out of the question.

No documentation found for the requested symbol.

slate swan
#

discord, disnake and nextcord are the current libs included

desert cosmos
#

:o

slate swan
desert cosmos
#

why not py-cord

dim tapir
#

use data from sql server

slate swan
# desert cosmos why not py-cord

most of the regulars here use disnake or nextcord as a fork so yeah
@unkempt canyon itself was being re-written in Disnake before dpy made a comeback

desert cosmos
#

aah

#

so now its on dpy ?

dim tapir
#

whats so bad about dpy

slate swan
#

yeah

dim tapir
#

i stopped doing discord bots a while but still

#

dpy is pretty easy

slate swan
dim tapir
#

what do the forks provide

slate swan
#

easier slash commands interface

vocal plover
#

and pretty server icons

paper sluice
#

@slate swan u use mypy?

slate swan
#

kannapogg ||and awesome devs like vco||

slate swan
west wigeon
#

easier than dpy2 hybrid commands?

slate swan
#

but still i consider using strictly typed libraries even if im not

slate swan
west wigeon
#

that's a killer feature for me

stark ingot
#

Pycord had "bridge" commands that create a slash command and work as prefix commands

#

if that is what you mean by hybrid

west wigeon
#

hybrid_group and hybrid_command decorators that make either act as both

slate swan
#

me casually using @lightbulb.implements() decorator, yeahsasuke

tacit token
#
    if before.name != after.name:
        embed = discord.Embed(title = f"NΓ©v megvΓ‘ltoztatva {badge}", color = 0x66ffcc, timestamp = datetime.datetime.utcnow())
        embed.add_field(name = "ElΕ‘tte", value = before.display_name)
        embed.add_field(name = "UtΓ‘na", value = after.display_name)
        embed.set_footer(icon_url = after.avatar_url_as(size = 128), text=f"{after} β€’ {after.id}")
        embed.set_author(name=f"{after.display_name}", icon_url=after.avatar_url)
        embed.set_thumbnail(url=after.avatar_url)
        await a.send(embed = embed)

This log not work, why? <t:1654429830:R>

maiden fable
pearl fjord
#

why does my message object have no 'content' 😒

slate swan
paper sluice
#

lightbulb is static as well?

slate swan
unkempt canyonBOT
#

Whether message content, attachments, embeds and components will be available in messages which do not meet the following criteria:

β€’ The message was sent by the client

β€’ The message was sent in direct messages

β€’ The message mentions the client

This applies to the following events...

pearl fjord
#
intents = discord.Intents().all()
client=discord.Client(intents=intents)
#

is that right?

slate swan
#

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

slate swan
paper sluice
#

nice, imma use hikari soon

slate swan
pearl fjord
#

yea no content

tacit token
tacit token
#
intents = discord.Intents().all()
intents.members = True