#discord-bots

1 messages Β· Page 891 of 1

maiden fable
#

Ah gotcha

slate swan
#

Databases are a very deep rabbit hole, please don't fret when picking one and just focus on what it is you wanted to get done initially

maiden fable
#

Me who uses discdb: 😢

slate swan
#

waiting for the "json is best" person

maiden fable
#

πŸ‘€ that's me

slate swan
#

It's probably better if you use a more popular database to become familiar with them (will be useful if you decide to pursue software development further)

maiden fable
placid skiff
maiden fable
#

Idk about CD, but u can store str objects lol

#

Like, every type which can be stored in a JSON

small igloo
#

ok

slate swan
small igloo
#

am i doing it right

                    def check(id):
                        if id == 828182019841327115:
                            return True
                        else:
                            return random.randint(1, 30) == 16
                    if check(name) == True:```
cosmic agate
#

AttributeError: 'str' object has no attribute 'removeprefix

slate swan
cosmic agate
#

some one help

#

``py

small igloo
cosmic agate
#
@bot.command(aliases=["pl"])
async def play(ctx: commands.Context, *, search: wavelink.YouTubeTrack):
  if not ctx.voice.client:
    vc: wavelink.Player = await ctx.author.voice.channel.connect(cls=wavelink.Player)
    embed = discord.Embed(title="Music", description=f"> Now Playing: {search.title}\n> duration: {search.duration}\n> author:  {search.author}", color=discord.Colour.random())
    embed.set_footer(text="noice")
    await vc.play(search)
    await ctx.reply(embed=embed)
  elif not getattr(ctx.author.voice, "channel", None):
        return await ctx.send("you have to be in voice channel!")
  else:
    vc: wavelink.Player = ctx.voice_client

  vc.play(search)

slate swan
#

can I see more code

small igloo
slate swan
#

What's name there?

cosmic agate
#

some one pls help

small igloo
slate swan
small igloo
slate swan
#

That would work

small igloo
cosmic agate
#

u mean you can help?

slate swan
small igloo
barren sand
placid skiff
#

!d discord.ext.commands.Context.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**.
slate swan
queen linden
placid skiff
#

send has a file parameter, add the link to the file and the bot will send it

barren sand
slate swan
queen linden
slate swan
barren sand
#

when i try from stackoverflow

small igloo
small igloo
barren sand
queen linden
placid skiff
#

!d discord.File

unkempt canyonBOT
#

class discord.File(fp, filename=None, *, spoiler=False)```
A parameter object used for [`abc.Messageable.send()`](https://discordpy.readthedocs.io/en/master/api.html#discord.abc.Messageable.send "discord.abc.Messageable.send") for sending file objects.

Note

File objects are single use and are not meant to be reused in multiple [`abc.Messageable.send()`](https://discordpy.readthedocs.io/en/master/api.html#discord.abc.Messageable.send "discord.abc.Messageable.send")s.
barren sand
barren sand
#

you mean ? C:\Users\centu\Desktop\Everything\Discord\Attachments\101.txt

queen linden
small igloo
queen linden
#

ill try that ty

#

levelling leaderboard thing

unkempt canyonBOT
barren sand
#

orr howw ??????

small igloo
maiden fable
#

Oh hi there Reptile πŸ‘€

barren sand
#

await ctx.send(file=discord.File("C:\Users\centu\Desktop\Everything\Discord\Attachments\101.txt"))

maiden fable
#

Reptile and Hunter. Hmmmmm

small igloo
maiden fable
#

🀣 someone did get the joke

#

Nah I won't hurt them. They are a friend πŸ«‚

small igloo
#

or is that embed only?

barren sand
#

I got 1 million Error so sad

small igloo
small igloo
placid skiff
#

you have to use the escape character or use os.path to reach the path of the file

barren sand
#

@bot.command()
async def send(ctx):
await ctx.send(file=discord.File("C:\Users\centu\Desktop\Everything\Discord\Attachments\101.txt"))

small igloo
barren sand
#

all \ ?

small igloo
small igloo
barren sand
small igloo
#

disclaimer: the number is my id

so, the issue is IT DOESNT RETURN 16 REEEEEEEEEE

barren sand
#

let's see

buoyant quail
small igloo
buoyant quail
#

^

small igloo
#

yes, that reptile cute

gaunt ice
#

:C

small igloo
#
                    def check_lb(test):
                        print(test)
                        if test == 828182019841327115:
                            return 16
                        else:
                            return random.randint(1, 30)
                    if check_lb(name) == 16:``` not give a single thing :tumbleweed:
#

what is the name :V

#

yes :sad:

buoyant quail
#

mbe it's an empty str

placid skiff
#

it would give NoneType object when you print it

#

the function is not calling for some reason

small igloo
buoyant quail
#

if random.randint(1, 5) == 3: blocks it

#

in line 86

paper plinth
#

Pls bal

placid skiff
paper plinth
#

Pls itemlb blob

#

:(

small igloo
placid skiff
#

D_D

#

Btw that code is weird

gaunt ice
placid skiff
#

i mean, why you create a function to check a variable?

paper plinth
#

@gaunt ice lol

gaunt ice
#

dank memer

small igloo
placid skiff
#

your check function

buoyant quail
#

for example this

barren sand
#

@slate swan can you add me ?D:

placid skiff
paper plinth
#

@gaunt ice add dank memer when

buoyant quail
paper plinth
#

I need blobs

gaunt ice
small igloo
placid skiff
# small igloo whch one

probably you code with haste, you should take your time, analyze what you want to do, create a sort of mental map and then code

buoyant quail
#
                if ti == "noon":
                    pass
                else:
                    exp = exp*2
#

why not just if ti != "noon": ?

placid skiff
#

this is just a tip of course, it's not like the code won't work now, but it could be better. When you'll need to modify it would be a mess

small igloo
leaden plaza
#

Can u guys tell me how to update username and avatar of bot?

small igloo
placid skiff
leaden plaza
placid skiff
#

if the code doesn't run you have to check this if now: if energy > req

leaden plaza
small igloo
small igloo
leaden plaza
small igloo
#

the check system, i try that but remove that again :V

small igloo
# placid skiff whic message?

await ctx.send(
f"{ctx.author.mention} found a {mobEmoji} {mob_}, getting friggin {exp*level} EXP, and {money} coins, lose {total} health, {hp}/{str(m)}")

#

lemme add again, wait

#

828182019841327115 <class 'int'>
828182019841327115 <class 'int'>

buoyant quail
#

and it didn't return 16?

small igloo
#

OT name idea: Rapptz-never-pay-tax

leaden plaza
small igloo
small igloo
buoyant quail
small igloo
buoyant quail
#

val = check_lb(name)
print(val)

small igloo
buoyant quail
#

i think i know why

small igloo
buoyant quail
#

if randint == 3
it will print yes
else it won't

small igloo
buoyant quail
# small igloo this?

yeah. this:
f"{ctx.author.mention} found a {mobEmoji} {mob_}, getting friggin {exp*level} EXP, and {money} coins, lose {total} health, {hp}/{str(m)}" doesn't print yes

slate swan
maiden fable
#

Imagine not using f strings but concatenation operator (+)

buoyant quail
#

some people do this

#

It frightens me

maiden fable
#

including me well that's scary

heavy folio
#

!d discord.ClientUser.edit

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.
heavy folio
#

bot.user is an instance of ClientUser

leaden plaza
slate swan
#

Thx

strong plover
#

How to chain buttons in disnake? Once button is pressed new button is generated in replace of that button

placid skiff
#

Change the button that is pressed in your view class

#

then you have to modify the message and send it the modified view class

opaque tiger
#

how can i check if a update is made on the server, in disnake, for ex: the server's name is changed, the owner is changed

placid skiff
#

!d discord.on_guild_update

unkempt canyonBOT
#

discord.on_guild_update(before, after)```
Called when a [`Guild`](https://discordpy.readthedocs.io/en/master/api.html#discord.Guild "discord.Guild") updates, for example:

β€’ Changed name

β€’ Changed AFK channel

β€’ Changed AFK timeout

β€’ etc...
opaque tiger
boreal ravine
placid skiff
#

f string are the best

maiden fable
#

Cz my school cs teacher dk wtf is f string/str.format function

placid skiff
#

i don't even use it to add two lists

maiden fable
#

Lmao

#

list.extend ftw!

oak warren
maiden fable
#

Meh my teacher deducts marks, but this talk is ot

slate swan
maiden fable
#

idk if my school teacher knows about it ^^^

buoyant quail
#

we haven't even started programming yet

#

in my school

maiden fable
#

for my school, it was optional if I wanna take cs or not and I was like: Let's do it, the worst that could happen is that I will fail in it

placid skiff
#

What is cs? i'm italian lol

maiden fable
#

computer science

oblique adder
#

its been 3 hours do I need to wait lil bit more ? it is still not there

maiden fable
#

code

#

oh nvm didn't see it was a reply

maiden fable
#

I did ask for their code, but eh seems like they want help from u lmao

slate swan
maiden fable
#

Wait, didn't u drop out of school for the year πŸ‘€

maiden fable
#

Lmao

slate swan
#

anyways ot

maiden fable
#

@oblique adder mind sharing yr code?

maiden fable
slate swan
maiden fable
#

Lmao then quit the match

#

πŸ˜” he still not sharing his code DUDEEEEEEEE

slate swan
maiden fable
#

lmao

unkempt canyonBOT
placid skiff
#

Just want to ruin your party once in a while

maiden fable
#

I'm out

maiden fable
placid skiff
#

Hahahaha

slate swan
#

πŸ˜” stop pinging me unnecessarily

maiden fable
#

πŸ˜” pings u after 5 min again

slate swan
placid skiff
#

usually i ping only those who develop in d.py without knowing python

maiden fable
#

πŸ‘€ then why me no ping?

placid skiff
#

Because at least you know how to code hahaha

maiden fable
#

πŸ˜” I just copy code off stack overflow

placid skiff
#

Well, if it is already done who you should do it again? just copy it.

maiden fable
#

eh stop it before someone warns us lol

gaunt ice
maiden fable
#

why do u make me use the rule command, I am already sick of it πŸ˜”

oblique adder
maiden fable
#

which file

#

are there multiple slash commands in yr server?

oblique adder
oblique adder
serene lynx
#

discordpy back again?

slate swan
#

yes

maiden fable
#

Any idea how many commands are there?

#

Oh Ash back, nvm I will just go and study then cya

slate swan
maiden fable
#

Don't select an Agent

slate swan
#

penalty

#

πŸ˜”

maiden fable
#

That is what I want u to incur Rip

slate swan
maiden fable
#

Okay then u help him cyaaaaaaaaa

oblique adder
maiden fable
#

πŸ˜” first decide

#

2 or 22 or 12

oblique adder
#

12

#

2 bot total 12 commands

maiden fable
#

Hmm, idrk nextcord, but try printing bot.slash_commands or smth

#

idk, try asking in the nextcord server

dense swallow
#

how do i delete old bot msgs?

maiden fable
#

!d discord.TextChannel.purge

unkempt canyonBOT
#

await purge(*, limit=100, check=..., before=None, after=None, around=None, oldest_first=False, bulk=True)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).

Purges a list of messages that meet the criteria given by the predicate `check`. If a `check` is not provided then all messages are deleted without discrimination.

You must have the [`manage_messages`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.manage_messages "discord.Permissions.manage_messages") permission to delete messages even if they are your own. The [`read_message_history`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.read_message_history "discord.Permissions.read_message_history") permission is also needed to retrieve message history.

Examples

Deleting bot’s messages...
maiden fable
#

u cannot delete messages more than 14 days or smth old

#

Uhh, yea that too

#

πŸ˜” Reptile, your pfp do be winking too much

#

πŸ‘€ imagine type hinting and not using a lambda

#

Uhhh, I beg to disagree

#

A check? Totally me

#

wait it is wrong

#

they wanna delete bot's messages

#

Just saw lol

#

Indeed

slate swan
dense swallow
#

actually i need it as bot.. im writing a command where bot deletes its own msgs... so the one in docs is good

maiden fable
maiden fable
#

πŸ˜” So called "communication etiquettes"

slate swan
modest plover
#

How do I make the bot send a message to a specific channel when it loads up and then shuts off, probably by ctrl+c

#

I want it to send an online / offline embed whenever the bot goes on or offline

maiden fable
#

You cannot shut down a bot with CTRL+C

modest plover
#

Yyyyes you can.

#

At least that's how I'm doing it.

#

Go to the terminal, hit ctrl+c

maiden fable
#

Oh wait, nvm. Yea it ends the bot gracefully

modest plover
#

gracefully?

maiden fable
#

See the try except

#

It isn't just calling exit() lol

modest plover
#

Oh also Hunter, you use Deta/NoSQL databases for databases, right?

maiden fable
#

I don't really use DBs much, since I hardly code nowadays, but yea. I prefer using Deta to Mongo personally

modest plover
#

Lol

#

But yeah, no how do I make it so a column not take duplicates?

maiden fable
#

iirc its a JSON DB

#

Calm down calm down, we don't want anyone to cry in here

#

Uhhh, goes away silently

modest plover
#

whagsfhe relational database

maiden fable
#

SQL DB

modest plover
#

pat pat

maiden fable
#

Let's code a new DB together

#

NoSQL Relational DB!

modest plover
#

Lol

maiden fable
#

Go on, I would love to use that (:

#

Make that 15 days, thanks

#

Oh cool! Would be appreciated. Only reptiles are able to achieve that, we humans are too busy in world wars

placid skiff
maiden fable
#

@placid skiff istg if u use the ot command

placid skiff
#

Hhahaha

final iron
#

!ot

unkempt canyonBOT
maiden fable
#

Oh well

#

repscript!

#

or scriptile

placid skiff
#

then i will write an OS in binary code to only manage a Database

maiden fable
#

(:

placid skiff
#

yeah, but i will write a compiler which converts the binary code in human language to run the OS πŸ˜†

maiden fable
#

Will I get a credit for being the most innocent Hunter? πŸ₯Ί

#

Anyways ot

#

(-:

tiny ibex
#
@bot.event
async def on_message(message):
    if isinstance(message.channel, discord.channel.DMChannel):
        query_url = f'http://api.brainshop.ai&{channel.id}&msg={message.content}'
        async with aiohttp.ClientSession() as session:
            async with session.get(query_url) as resp:
                res = await resp.json()
        message = res['cnt']
        await message.channel.send(message)
    else:
        pass```
#
Ignoring exception in on_message
Traceback (most recent call last):
  File "C:\Users\phoen\AppData\Local\Programs\Python\Python310\lib\site-packages\disnake\client.py", line 532, in _run_event
    await coro(*args, **kwargs)
  File "c:\Users\phoen\OneDrive\Desktop\some-random-shit\main.py", line 81, in on_message
    await message.channel.send(message)
AttributeError: 'str' object has no attribute 'channel'
#

Whyyyyyyyyyy

tiny ibex
honest vessel
#

query_url = f'http://api.brainshop.ai&{channel.id}&msg={message.content}'

#

didnt u mean query_url = f'http://api.brainshop.ai/{channel.id}&msg={message.content}'

honest vessel
#

def not a valid url

tiny ibex
#

I don't want to show my key and brain

honest vessel
#

ah ok

tiny ibex
#

Β―_(ツ)_/Β―

paper sluice
#

how to disable commands from working in dms?

honest vessel
honest vessel
slate swan
#

Hey guys idk if yall can see the difference but the second image is when discord.Color.random picks out the color and the first is when its discord.Orange there is a slight difference in the sharpness. I came across this which might explain it? But I am not sure how to fix it

paper sluice
paper sluice
honest vessel
#

i dont know...

#

check if author is bot owner, return true.
check if message was a DM, return false

maiden fable
hushed galleon
slate swan
#

I looked up every single hex and this is the only one that came even close

slate swan
maiden fable
#

Yups

hushed galleon
#

@paper sluice you can use @commands.check_any() and then place the checks commands.guild_only() and commands.is_owner() inside it so either of those conditions will be accepted

slate swan
#

Is there a way for me to do that myself?

maiden fable
slate swan
#

Max the saturation and value

red sundial
slate swan
#

Huh no, I just want orange

red sundial
#

and put that in your text colour or whatever

maiden fable
#

Oh wait

maiden fable
#

Nvm, just see the saturation and stuff for the color code returned by Color.orange and use from_hsv classmethod

slate swan
#

Wait would this work?
discord.from_hsv(orange, 1, 1)

#

tyty lemme try that

hushed galleon
#

from_hsv would come from Color but otherwise yeah thats fine

maiden fable
#

Wait no, won't work

slate swan
#

why so

hushed galleon
#

its a classmethod of Color...

maiden fable
#

Lemme see what the method takes in

hushed galleon
#

you wont be able to use it without referring to that class

red sundial
#

discord.Color.from_hsv(orange, 1, 1)

maiden fable
#

It needs a float

hushed galleon
#

it doesnt really

unkempt canyonBOT
#

discord/colour.py line 136

def from_hsv(cls, h: float, s: float, v: float) -> Self:```
hushed galleon
#
>>> import disnake
>>> disnake.Color.from_hsv(1, 1, 1)
<Colour value=16711680>```
slate swan
#

You're right

hushed galleon
#

well we assumed you would define that variable beforehand

slate swan
#

Oh wait right right

maiden fable
hushed galleon
#

yeah that seems about right

maiden fable
#

Told so lol

hushed galleon
#

most arithmetic applies to both ints and floats so they're usually cross compatible, but a Color object is definitely not intended to be compatible with other numbers

maiden fable
#

Cz it isn't an int/float lol

slate swan
maiden fable
#

Huh?

slate swan
#
        orange = 0xe67e22
        color = discord.Color.from_hsv(orange, 1, 1)
#

That hex code is of orange

hushed galleon
#

thats not a hue value

slate swan
#

huh

maiden fable
#

weirdddd

hushed galleon
#

the hue should range from 0 to 1, where orange is around 0.08 and 0.14 i believe

maiden fable
#

Yea

hushed galleon
#

the number that the documentation says is an RGB value in hex

maiden fable
#

Anyways, @slate swan good to know it worked!

slate swan
#

no it didnt 😭

maiden fable
#

Wait what...

#

Why not use from_rgb tho

slate swan
#

I wanted orange- it made it red

maiden fable
#

!d discord.Colour.from_rgb

unkempt canyonBOT
#

classmethod from_rgb(r, g, b)```
Constructs a [`Colour`](https://discordpy.readthedocs.io/en/master/api.html#discord.Colour "discord.Colour") from an RGB tuple.
slate swan
#

I did do that, but their is still a slight difference, its not as sharp

maiden fable
#

Well

#

Then use a color picker to get the exact shade u want?

slate swan
#

Thats what I did to get the rgb

oh wait I can use the rgb of the hex

maiden fable
#

Ah okay cool

cosmic agate
#

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

kindred raven
#

help me!

#

please

slate swan
#

can anybody explain me this?

honest vessel
#

i think u need to wait for some time before it cache it like 10secs @slate swan

slate swan
#

let me try

final iron
# slate swan

Why are you calling int() on something that's already an integer?

maiden fable
slate swan
maiden fable
#

!d discord.Intents.guilds

unkempt canyonBOT
slate swan
placid skiff
#

just use fetch D_D

slate swan
#

doesnt a dm return a TextChannel obj?

#

or is it a privatechannel

placid skiff
#

nope, DM has PrivateChannel

slate swan
#

ye

placid skiff
#

the on_message event returns nothing

#

and has a message object, from the message object you can get the instance of the chat where the message is sent

boreal ravine
slate swan
honest vessel
#

by learning python

slate swan
#

bro thats kayle

placid skiff
#

with a lot of docs, tutorial and source code example, but first of all you should know python

slate swan
#

how does kayle not know python

maiden fable
unkempt canyonBOT
#

class discord.DMChannel```
Represents a Discord direct message channel.

x == y Checks if two channels are equal.

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

hash(x) Returns the channel’s hash.

str(x) Returns a string representation of the channel
placid skiff
boreal ravine
maiden fable
#

Iirc DMChannel is a subclass of Messageable

maiden fable
#

@slate swan go to school, stop lurking

slate swan
#

im free rn

#

my history teacher can waitcatgun

placid skiff
maiden fable
#

Mhm

#

!d discord.abc.PrivateChannel

unkempt canyonBOT
#

class discord.abc.PrivateChannel```
An ABC that details the common operations on a private Discord channel.

The following implement this ABC:

β€’ [`DMChannel`](https://discordpy.readthedocs.io/en/master/api.html#discord.DMChannel "discord.DMChannel")

β€’ [`GroupChannel`](https://discordpy.readthedocs.io/en/master/api.html#discord.GroupChannel "discord.GroupChannel")

This ABC must also implement [`Snowflake`](https://discordpy.readthedocs.io/en/master/api.html#discord.abc.Snowflake "discord.abc.Snowflake").
placid skiff
#

it implements DMChannel and GroupChannel

maiden fable
#

Yups

boreal ravine
slate swan
#

😳

placid skiff
#

i should work but i don't want to finish my ticket today because after that I have to create the docs and a trial card lol

boreal ravine
placid skiff
boreal ravine
brisk helm
#

How to do my struct of code will looke like this :
<guildMemberObject>.edit ....

placid skiff
slate swan
#

nice

brisk helm
boreal ravine
#

uhm

slate swan
#

or you can use the author attr that the context obj has

spice basalt
#

why isn't this working

slate swan
placid skiff
#

depends what error do you have

placid skiff
spice basalt
slate swan
placid skiff
#

Fu....

slate swan
#

iirc you need to call it

spice basalt
slate swan
#

you forgot ()

spice basalt
#

ah

spice basalt
spice basalt
slate swan
#

nvm you dont need to call it but weird it raises an error

maiden fable
#

Remove the () lol

spice basalt
#

i added it because of the dog in the first place

placid skiff
#

if instead you want to make an error handler for 1 command you should do this:

@client.commands(name="my_command")
async def my_command(ctx: Context, *, args):
  #Stuff here

@my_command.error()
async def my_command_error(ctx: Context, error: CommandError):
maiden fable
#

Dog?

maiden fable
#

His name is okimii, and he ain't a dog (:

placid skiff
maiden fable
#

You better not call him that from next time

spice basalt
slate swan
#

im not helping youAG_Angry

spice basalt
#

πŸ˜”

placid skiff
#

You've lost a nice helper

slate swan
placid skiff
#

lucky for you that me and hunter are here

spice basalt
placid skiff
#

but only for a while cuz in 15 minutes i've a call

slate swan
#

im taking hunter with meAG_Angry

placid skiff
#

then you're alone

spice basalt
slate swan
spice basalt
#

πŸ˜”

slate swan
placid skiff
#

there is my work partner who has gone to the toilet like 20 minutes ago and he is not returned yet

#

and he has the call with me lol

spice basalt
honest vessel
slate swan
honest vessel
spice basalt
honest vessel
#

you have same name..

slate swan
#

probably the naming its overwritting itself

honest vessel
#

on two functions

spice basalt
#

2 errors

#

is there another way to add 2 errors without 2 @commandname.error(s)?

honest vessel
#

put those together as 1 function and name it clear_error

placid skiff
spice basalt
#

😳

spice basalt
#

how should i put those 2 together

slate swan
spice basalt
#
@clear.error
async def clear_error(ctx, error):
  if isinstance (error, commands.MissingRequiredPermissions):
    await ctx.send('Imagine no permissions lol xd.')
  if isinstance(error, commands.MissingRequiredArgument):
    await ctx.send('Please specify an amount of messages to delete.')
placid skiff
spice basalt
#

like this?

honest vessel
spice basalt
#

oh yeah

slate swan
spice basalt
#

but there isn't an error message when i run the command on my mini without permissions

honest vessel
#

@spice basalthow did u import has_permissions?

spice basalt
#

yes

honest vessel
#

how

spice basalt
#

oops

#

as you can see, i am getting enough sleep

honest vessel
#

ah ok

spice basalt
#

i read your message as "did you import has_permissions" 😩

placid skiff
#

D_D

slate swan
slate swan
honest vessel
#

well it is in disnake tho

placid skiff
#

There is no MissingRequiredPermission, only MissingPermission D_D

#

and it is in ext.commands

honest vessel
#

ye its MissingPermissions he wants

slate swan
honest vessel
# spice basalt

commands.MissingPermissions not commands.MissingRequiredPermissions

maiden fable
#

And yea, Akeno boi, also see that only I can call okimii names, one of which is wh- nvm

slate swan
#

he calls me a whistleMarinAngry

shut axle
#
AttributeError: 'NoneType' object has no attribute 'channel'
slate swan
#

channel is None

placid skiff
placid skiff
slate swan
#

wait

#

no its context

placid skiff
#

Also why the f*ck are you using brackets like you're in Java or C

slate swan
#

😭

placid skiff
#

that makes me ill

slate swan
velvet compass
#

I wonder how black would format it

honest vessel
#

jesus

buoyant quail
#

xd

placid skiff
#

xD

slate swan
slate swan
buoyant quail
#

make all code 1 line is cool too

placid skiff
buoyant quail
#

i didn't mean full code 1 line

buoyant quail
maiden fable
maiden fable
slate swan
maiden fable
#

Ouh cool

slate swan
slate swan
slate swan
maiden fable
#

πŸ˜” can we take this to an OT channel?

slate swan
spice basalt
#

there isn't an output error message

untold oriole
#

Basically with on_raw_message_delete call HAPPENS even to messages sent when the bot was offline, but there is no way to get the contents right? Or is there any work around to get the contents of those messages cuz wont those messages be in history

placid skiff
spice basalt
maiden fable
#

your wording goes brrrrrrrrr

placid skiff
#

I think

untold oriole
#

Right now, I use payload.cached_message so instead I should use from the payload.message_id?

torn sail
placid skiff
#

!d discord.RawMessageDeleteEvent

unkempt canyonBOT
#

class discord.RawMessageDeleteEvent```
Represents the event payload for a [`on_raw_message_delete()`](https://discordpy.readthedocs.io/en/master/api.html#discord.on_raw_message_delete "discord.on_raw_message_delete") event.
placid skiff
#

it has a message_id so yes

boreal ravine
untold oriole
spice basalt
#

erro

shut axle
#
@buttons.click
async def help(ctx):
    await ctx.reply(f"Hi {ctx.member.name}")
    

@client.command()
async def h(ctx, *, member: discord.Member=None):
    member = member or ctx.author
    if member is None:
        return
    nvc = "Χ”ΧžΧ©Χͺמש לא נמצא Χ‘Χ—Χ“Χ¨"
    if member.voice is None:
        return nvc
    mcontent = f"<@&890317731960868875> | {member.mention} Χ¦Χ¨Χ™Χš Χ’Χ–Χ¨Χ”!\n{member.voice.channel.name}"
    await buttons.send(
        content=mcontent,
        channel = ctx.channel.id,
        components = [
            ActionRow([
                Button(
                    style = ButtonType().Primary,
                    label = "ט׀ל",
                    custom_id = "help"
                )
            ])
        ]
    )

It is not send the message. No Errors.

honest vessel
slate swan
#

she probably regenerated it

maiden fable
slate swan
#

and what you doing in ash's profilehmmcat

maiden fable
honest vessel
#

oh thats cool

#

how it knows its a token tho?

#

using regxp?

slate swan
honest vessel
#

i mean mabe it just a string in token.txt

maiden fable
slate swan
#

😳

honest vessel
#

@spice basaltdo u even read your own code or copypasta too hard?

honest vessel
slate swan
#

it will never be None

honest vessel
#
@client.command()
async def h(ctx, *, member: discord.Member=None):
    member = member or ctx.author
    if member is None: # this willnver run anyway 
        return
#

yeah lol @slate swan same

slate swan
#

and why is member a kwarg

untold oriole
honest vessel
#

yes i think so 404 @untold oriole i think u get same if try delete a message that already been deleted too

spice basalt
#

my bad

#

now back to consuming

untold oriole
honest vessel
#

he ment could't

slate swan
#

yeah typo

snow ibex
untold oriole
#

Yea thats what, so there is no way around? @placid skiff

spice basalt
#

it's so funny, and i don't know why

snow ibex
slate swan
snow ibex
#

dont know why im doing this tbh

slate swan
#

πŸ—

snow ibex
#

HOG RIDDDDDDDDDDDDDDDEEEEEEEEEEEEEEER

honest vessel
#

!ot

unkempt canyonBOT
slate swan
#

HOG RIDERRRR

snow ibex
#

sorry

slate swan
#

loll

placid skiff
placid skiff
#

Ok tell me

untold oriole
#

I have the message id but its quite pointless if it cant find the message

drowsy condor
#

import asyncpg 2022-03-08T15:33:29.869617+00:00 app[worker.1]: ModuleNotFoundError: No module named asyncpg i installed asyncpg

I kind of installed asyncpg, what's wrong?

fallow mauve
#

my discord bot is supposed to send a random message when it's mentioned, but it's not working. here's code:

#####################
mention = ["I'm ignoring you.", "I don't care what you have to say.", "...", "What do you want? Is it important?", "***WHAT'S THE PURPOSE OF THAT PING? THERE'S LITERALLY NO POINT!***", ":unamused: What was that for?"]
#####################
@bot.listen
async def on_mention(message):
  reply = random.choice(mention)
  await message.channel.send(f"{reply}")
fallow mauve
slate swan
#

why make up random eventsok

#

wut

fallow mauve
#

you have to add the intents in the invite link

slate swan
#

wut

placid skiff
#

permissions or role check

honest vessel
#

has_permissions

slate swan
#

isnt it like a normal command

placid skiff
#

!d discord.ext.commands.has_permissions

unkempt canyonBOT
#

@discord.ext.commands.has_permissions(**perms)```
A [`check()`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.check "discord.ext.commands.check") that is added that checks if the member has all of the permissions necessary.

Note that this check operates on the current channel permissions, not the guild wide permissions.

The permissions passed in must be exactly like the properties shown under [`discord.Permissions`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions "discord.Permissions").

This check raises a special exception, [`MissingPermissions`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.MissingPermissions "discord.ext.commands.MissingPermissions") that is inherited from [`CheckFailure`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.CheckFailure "discord.ext.commands.CheckFailure").
honest vessel
#

si'mon

placid skiff
slate swan
honest vessel
#

oh slash commands i dont know

#

now am confused

slate swan
#

depends on what library you use

placid skiff
#

what package are you using?

honest vessel
slate swan
#

it will work

honest vessel
#

ye cause its a fork of d.py

slate swan
#

!d nextcord.ext.commands.has_permissions

unkempt canyonBOT
#

@nextcord.ext.commands.has_permissions(**perms)```
A [`check()`](https://nextcord.readthedocs.io/en/latest/ext/commands/api.html#nextcord.ext.commands.check "nextcord.ext.commands.check") that is added that checks if the member has all of the permissions necessary.

Note that this check operates on the current channel permissions, not the guild wide permissions.

The permissions passed in must be exactly like the properties shown under [`nextcord.Permissions`](https://nextcord.readthedocs.io/en/latest/api.html#nextcord.Permissions "nextcord.Permissions").

This check raises a special exception, [`MissingPermissions`](https://nextcord.readthedocs.io/en/latest/ext/commands/api.html#nextcord.ext.commands.MissingPermissions "nextcord.ext.commands.MissingPermissions") that is inherited from [`CheckFailure`](https://nextcord.readthedocs.io/en/latest/ext/commands/api.html#nextcord.ext.commands.CheckFailure "nextcord.ext.commands.CheckFailure").
honest vessel
#

^

#

i thought u were using a third party or something

slate swan
#

why would it not work in slash command

honest vessel
#

yes it works with slash commands both are ext.commands

slate swan
#

wdym by it not works? errors?

#

and show the code you used

honest vessel
#

yes

slate swan
#

no, you need to mention the permissions too

#

@commands.has_permissions(send_messages=True (etc etc))

honest vessel
#

@commands.has_permissions(kick_members=True)

slate swan
#

yea

honest vessel
#

asking for help now - trying later xD oh well

thick basin
#

sorry if you've seen this question multiple times but we can no longer change bot profile pic can somebody tell the method to do that

slate swan
#

!d discord.ClientUser.edit

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.
untold oriole
thick basin
#

tysm

fallow mauve
#
Traceback (most recent call last):
  File "main.py", line 86, in <module>
    bot.run(os.getenv("token"))
  File "/home/runner/EjxCeoBoSAy/venv/lib/python3.8/site-packages/discord/client.py", line 723, in run
    return future.result()
  File "/home/runner/EjxCeoBoSAy/venv/lib/python3.8/site-packages/discord/client.py", line 702, in runner
    await self.start(*args, **kwargs)
  File "/home/runner/EjxCeoBoSAy/venv/lib/python3.8/site-packages/discord/client.py", line 665, in start
    await self.login(*args, bot=bot)
  File "/home/runner/EjxCeoBoSAy/venv/lib/python3.8/site-packages/discord/client.py", line 511, in login
    await self.http.static_login(token.strip(), bot=bot)
AttributeError: 'NoneType' object has no attribute 'strip'

what does this error mean?

slate swan
#

most probably the getenv function is returning None

fallow mauve
#

so there is not env named token

slate swan
fallow mauve
#

ok

#

i just had to reload thx

slate swan
untold oriole
slate swan
untold oriole
#

I think its fine if I let it go

slate swan
#

whats the issue frog_sip

slate swan
slate swan
slate swan
placid skiff
# untold oriole I think its fine if I let it go

Ok hahaha
I mean you can do it but you need a database that saves uncached message with their id and content so you can retrieve them
Like before you turn the bot off you add an event which loop trough message deleted cache and save them in the db

#

which is a lot of work tbh

slate swan
#

πŸ’€i just realised that the custom emojis in status disappears too if you dont have use external emoji perms in a channel

drowsy condor
#

@slim ibex ?

cosmic agate
#

AttributeError: module 'discord' has no attribute 'ButtonStyle'

#
@bot.command(aliases=["pl"])
async def play(ctx: commands.Context, *, search: wavelink.YouTubeTrack):
    if not ctx.voice_client:
        vc: wavelink.Player = await ctx.author.voice.channel.connect(cls=wavelink.Player)
        await vc.play(search)
        embed = discord.Embed(title="Music", description=f"> Now Playing: {search.title}\n> duration: {search.duration}\n> author:  {search.author}", color=discord.Colour.random())
        embed.set_footer(text="noice")
        button = Button(label="Click rn ", style=discord.ButtonStyle.blue, emoji="🀣")
        view = View()
        view.add_item(button)
        await ctx.reply(embed=embed, view=view)
    elif not getattr(ctx.author.voice, "channel", None):
        return await ctx.send("you have to be in voice channel!")
    else:
        vc: wavelink.Player = ctx.voice_client

    if vc.queue.is_empty and not vc.is_playing():
        await vc.play(search)
        embed = discord.Embed(description=f"> Now Playing: {search.title}\n> duration: {search.duration}\n> author:  {search.author}", color=discord.Colour.random())
        embed.set_footer(text="noice")
        await ctx.send(embed=embed)
        
    else:
        await vc.queue.put_wait(search)
        await ctx.reply(embed = discord.Embed(title = "Queue", description =f"added {search.title} to the queue", color=discord.Colour.random(), set_footer = "love your music choices!"))
    vc.ctx = ctx
    vc.loop = False
    setattr(vc, "loop", False)
maiden fable
#

update to 2.0

#

pip install git+https://github.com/Rapptz/discord.py

slate swan
#

ytdl πŸ˜”

honest vessel
#

how u know?

#

oh i see YouTubeTrack

twilit furnace
#

arent we not allowed to help with youtube music bots

maiden fable
#

idk I never read the code, sorry

unkempt canyonBOT
#

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

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

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

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

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

9. use the Service to view or listen to Content other than for personal, non-commercial use (for example, you may not publicly screen videos or stream music from the Service)
honest vessel
twilit furnace
cosmic agate
cosmic agate
cosmic agate
maiden fable
#

Hmm, that exception was removed from the lib

cosmic agate
#

so what do i do?

final shard
cosmic agate
#

you knew now?

final shard
#

bru

maiden fable
#

just remove it?

cosmic agate
#

these people knew ages ago

final shard
cosmic agate
maiden fable
#

They will, just remove the InvalidArgument from code

cosmic agate
#

there is none

final shard
#

how to revert back

cosmic agate
#

thats from import code

cosmic agate
# maiden fable They will, just remove the InvalidArgument from code
from re import search
from discord_buttons_plugin import  *
import discord
from discord.ext import commands
from discord.ui import Button, View
import os
from discord_components import *
from typing import Optional
from telegram import Bot, Voice, bot_api_version
from discord.ext.commands import Cog, Greedy, Converter
from discord import Embed, Member, NotFound, Object
import wavelink
import random
import asyncio
#

these are my imports

#

this is what vscode shows

maiden fable
#

hmmm

cosmic agate
#

so now what

maiden fable
#

Idk

cosmic agate
#

XD

final shard
#

i reverted back to discord.py 1.7.3 after that error

cosmic agate
#

then

final shard
#

error gone

cosmic agate
#

any success?

#

OH

final shard
#

ill update it

#

after error gets solution

#

Β―_(ツ)_/Β―

cosmic agate
#

could you give code for the revert

final shard
#

there isnt a code

slim ibex
#

you dont need shit like dislash and discord_componenets

final shard
#

i installed from my requirements.txt

slim ibex
#

discord.py is back and added all that stuff plus more

twilit furnace
slim ibex
unkempt canyonBOT
manic wing
#

we all saw that

final shard
slim ibex
#

you gotta install from git i think

cosmic agate
twilit furnace
final shard
#

yea

twilit furnace
#

that isnt 2.0.0

cosmic agate
unkempt canyonBOT
twilit furnace
slim ibex
cosmic agate
#

sed

twilit furnace
slim ibex
#

i said you have to install it through git

cosmic agate
cosmic agate
#
pip install git+https://github.com/Rapptz/discord.py
slim ibex
#

confusion...

twilit furnace
slim ibex
#

ah yeah there it is

twilit furnace
#

poetry makes it so its primary

#

and doesnt get uninstalled by a new update

final shard
#

I wont update to 2.0 until everyone is ok with it

twilit furnace
cosmic agate
# twilit furnace that isnt beta, this is `poetry add "git+https://github.com/Rapptz/discord.py"`

poetry : The term 'poetry' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct
and try again.
At line:1 char:2

  • poetry add "git+https://github.com/Rapptz/discord.py"
  •  + CategoryInfo          : ObjectNotFound: (poetry:String) [], CommandNotFoundException
     + FullyQualifiedErrorId : CommandNotFoundException
twilit furnace
#

the buttons are excuted perfectly

slim ibex
fresh orchid
#

But the slash commands

fresh orchid
final shard
tidal hawk
#

If I use slash command in dm's, does then interaction.guild return None?

slim ibex
tidal hawk
#

Or what's the easiest way to determin if user used command from dms

twilit furnace
slim ibex
#

they're so much better than prefix commands

sacred phoenix
#

mac@MacBook-Pro-de-mac ~ % pip install pyspark
zsh: command not found: pip
mac@MacBook-Pro-de-mac ~ %

placid skiff
tidal hawk
#

Disnake :D

sacred phoenix
#

guys did someone faace this problem before

sacred phoenix
#

yes

slim ibex
#

^

twilit furnace
fresh orchid
# slim ibex why?

In the forks they are much simpler to use

You can easily use them in cogs but in discord.py it’s not that easy

It’s feels like they aren’t made for the beginners

sacred phoenix
#

i tries pip3 and it worked

#

tried

twilit furnace
fresh orchid
#

Nah

twilit furnace
#

april 30th is the schedule

slim ibex
sacred phoenix
#

but black doesn't work for me i don't know why

twilit furnace
fresh orchid
#

I know

#

Thats shit

Why ban people for using forks

twilit furnace
#

nextcord is gonna become outdated quickly as it was made for quick noteriety. same as whatever else was there

twilit furnace
cosmic agate
# twilit furnace `pip install -U git+https://github.com/Rapptz/discord.py`
Collecting git+https://github.com/Rapptz/discord.py
  Cloning https://github.com/Rapptz/discord.py to c:\users\admin\appdata\local\temp\pip-req-build-txu2rjtx
  Running command git clone --filter=blob:none --quiet https://github.com/Rapptz/discord.py 'C:\Users\Admin\AppData\Local\Temp\pip-req-build-txu2rjtx'
  Resolved https://github.com/Rapptz/discord.py to commit 3d74da8d7062f0a61490c7d6cf86a43394aab3e5
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: aiohttp<3.8.0,>=3.6.0 in c:\users\admin\appdata\local\programs\python\python39\lib\site-packages (from discord.py==2.0.0a3786+g3d74da8) (3.7.4.post0)
Requirement already satisfied: async-timeout<4.0,>=3.0 in c:\users\admin\appdata\local\programs\python\python39\lib\site-packages (from aiohttp<3.8.0,>=3.6.0->discord.py==2.0.0a3786+g3d74da8) (3.0.1)
Requirement already satisfied: typing-extensions>=3.6.5 in c:\users\admin\appdata\local\programs\python\python39\lib\site-packages (from 
Requirement already satisfied: attrs>=17.3.0 in c:\users\admin\appdata\local\programs\python\python39\lib\site-packages (from aiohttp<3.8.0,>=3.6.0->discord.py==2.0.0a3786+g3d74da8) (21.4.0)
Requirement already satisfied: multidict<7.0,>=4.5 in c:\users\admin\appdata\local\programs\python\python39\lib\site-packages (from aiohttp<3.8.0,>=3.6.0->discord.py==2.0.0a3786+g3d74da8) (5.2.0)
Requirement already satisfied: idna>=2.0 in c:\users\admin\appdata\local\programs\python\python39\lib\site-packages (from yarl<2.0,>=1.0->aiohttp<3.8.0,>=3.6.0->discord.py==2.0.0a3786+g3d74da8) (3.3)
fresh orchid
cosmic agate
sage otter
#

I mean you wouldn’t want someone talking about alternate libraries and poaching in your server would you?

twilit furnace
quick gust
#

it's not about USING forks, it's about TALKING about them in the dpy server

twilit furnace
#

its literally stealing

twilit furnace
placid skiff
# tidal hawk Disnake :D
@slash_command()
async def something(ctx: ApplicationCommandInteraction):
  #some stuff here
  if ctx.channel.type == "private":
    await ctx.send("private_channel")
cosmic agate
placid skiff
#

i think that it should work

twilit furnace
quick gust
cosmic agate
fresh orchid
slim ibex
final shard
cosmic agate
twilit furnace
slim ibex
#

its literally a fork, of course some shit would be copied

placid skiff
final shard
slim ibex
cosmic agate
fresh orchid
#

What is wrong to use discord.py code in a fork when the original owner retired

slim ibex
#

its not accurate

fresh orchid
placid skiff
#

πŸ˜‰

sage otter
#

that’s so messy.

slim ibex
#

but why LMAO

twilit furnace
placid skiff
#

Dunno you could use a converter and so you need a context xD

sick birch
rocky palm
#

i cant get it to work

slim ibex
#

context manager pls

#
with open("path", "w") as file:
  ...
rocky palm
#

same

slim ibex
#

well its probably poorly indented in relation to code above

rocky palm
#

want me to send the code?

slim ibex
#

also nice pfp. reyna

rocky palm
#

really need it rn

slim ibex
#

!code

unkempt canyonBOT
#

Here's how to format Python code on Discord:

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

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

slim ibex
#

ah yeah

#
ccs.pop(0)
 with open("path", "w") as file:
#

indented one space too far

#

also path was a placeholder for the path to whatever you want to open

rocky palm
#
import discord
from discord.ext import commands
import requests
from read import read
import random
import os

bot = commands.Bot(command_prefix="owo")
bot.remove_command("help")

@bot.event
async def on_ready():
    print(f"{bot.user.name} is now ready!")

@bot.command(pass_context=True)
async def help(ctx):
    await ctx.send("This is a help command")

@bot.command(pass_context=True)
async def gen(ctx, *, message):
      if message == "mc" or message == "MC" or message == "Mc":
          accs =[]
          file = read(f"database/mc.txt").split()
          acc = file[0]
          for line in file:
               accs.append(line)
          ccs.pop(0)
           with open("path", "w") as file:
          for item in accs:
               file.write(item + "\n")
          l = requests.post("hastebin.com/documents", data=acc)
          link = "https://hastebin.com/" + l.json () ['key']
          alias = random.randint(1, 9999999999999)
          r = requests.get(f"https://shrinkme.io/api?api=0d63ec4209864d14d8cb170ef1728985476489bd&url=%7Blink%7D&alias=%7Balias%7D%22")
          await ctx.send(f"Minecraft Account Generated - (r.json() ['shortenedUrl'])")

          bot.run("")```
slim ibex
#

and I would recommend making this code more readable. and pass_context is legacy iirc

rocky palm
slim ibex
#

requests is blocking also

rocky palm
#

i cant fix it

slim ibex
#

and don't use a txt file as a database...

rocky palm
#

json?

slim ibex
#

no

#

an actual RDBMS like SQLite or Postgres

#

SQLite is probably best for beginners

#

its very simple and straightforward

rocky palm
#

i gtg

slim ibex
#

ok

honest vessel
#

wrong

#

put commands decoration above slash_command

#

si

dapper cobalt
#

It doesn't matter afaik

honest vessel
#

well its better easier to read

dapper cobalt
#

I kind of disagree

honest vessel
#

oh ok

buoyant quail
#

slash_command can be used with has_permissions?

honest vessel
#

tbh myself hvnt used slashed so much i just did a test command kinda

#

i am not 100% but should work

slate swan
#

ok not am not sure if nextcord supports it

#

dont see it anywhere in the src

#

disnake supports that tho.

honest vessel
#

another reason why nextcord is :trashbin:

#

dosnt he also need to update the bot constrtuction with sync=true

#

for action to update? or no need?

slate swan
#

dont think its required for a check

honest vessel
#

oh ok

slate swan
#

since thats an internal thing unrelated to the API

honest vessel
#

could be worth a try tho - or simply we can say nextcord is behind

hallow tangle
#

how can I do message.channel.reply?

honest vessel
#

just how u did

#

await ctx.reply()

hallow tangle
#

no there's no ctx, its an event

honest vessel
#

so is it a message object?

hallow tangle
#

yes

honest vessel
#

await message.reply("hello")

hallow tangle
#

it is message.channel.send() currently

honest vessel
#

u dont need channel

hallow tangle
#

oh

honest vessel
#

cause message is from a channel anyway

#

i think u dont need πŸ™‚

hallow tangle
#

lemme try

honest vessel
#

but send/reply works same

#

oh well the message could be like "someone boosted server"

#

!d discord.MessageType

unkempt canyonBOT
#

class discord.MessageType```
Specifies the type of [`Message`](https://discordpy.readthedocs.io/en/master/api.html#discord.Message "discord.Message"). This is used to denote if a message is to be interpreted as a system message or a regular message.

x == y Checks if two messages are equal.

x != y Checks if two messages are not equal.
hallow tangle
#

so let me try removing the channel now

honest vessel
#

try the message.reply

hallow tangle
#

ya doing

#

thanks worked

honest vessel
#

np

desert cosmos
#

whats this error

slim ibex
#

the fuck?

desert cosmos
#

its related to slash commands ig

slate swan
desert cosmos
#

ic

#

but its with administrator perms

slate swan
#

send full traceback

slate swan
desert cosmos
#

alright

slate swan
#

pip uninstall aiohttp
pip install aiohttp

#

seems like bad installation

flat flower
#

I agree, how did you originally install it?

slate swan
flat flower
#

Ok

desert cosmos
#

not its not generating url wth

flat flower
#

@desert cosmos what are you trying to do?

desert cosmos
#

generating a url

#

from discord developer portal

#

its not generating for this specific bot i think because i have generated a few minutes ago and generating for other bots

velvet tinsel
flat flower
#

@desert cosmos send me a screenshot of the first page you land on in the discord developer portal then I will walk you through on how to properly generate the URL.

slate swan
velvet tinsel
desert cosmos
#

@flat flower

flat flower
#

Let me see if I can explain it in one response

slate swan
flat flower
#

@desert cosmos tell me if that works

desert cosmos
# flat flower

oh i know that but actually the problem is when i am selecting everything its just not showing the link

velvet tinsel
flat flower
#

Ok send me a screen shot of the entire page with the link generator

#

I think I know what’s wrong

desert cosmos
#

alright i got it
thanks everyone

slate swan
flat flower
desert cosmos
#

what does this mean ?