#discord-bots

1 messages · Page 403 of 1

vapid parcel
#

in most cases yes. Im not saying you truly need it to make hybrid cmds work, but in almost all cases you will be using a keyword only marker.

tawny junco
#

In my example here I don't even need to use it. because I don't need to pass more than 1 arguments. I just always use it just in case lol

vapid parcel
tawny junco
#

Meh. It's just 1 single character. I don't see how it makes life hard 🤣

vapid parcel
#

and another thing is, using ctx with interaction for an example, its another painful thing, for views n stuff when you have to pass in ctx. I always hated that.

vapid parcel
tawny junco
#

💀

vapid parcel
#

also with hybrid, it makes argument arrangement more important because of the keyword only marker.

tawny junco
#

Because the dictionary jisho can query words in 2 ways. For example if you search for same then what happens is, it gives you sa-me the word for shark in Japanese lol. So you gotta search for "same" instead

#

So yeah if you wanna include quotation then * is the way to go

vapid parcel
#

making it a keyword only marker, which i have stated

#

but okay 😭

tawny junco
#

why are you adding "but okay" at the end

#

You do realize I'm not arguing right

vapid parcel
#

I never said we were arguing, I would never argue over something like this, I am just having a conversation, but you completely ignored the statement I made earlier, and then bring it back up at the end as if I didnt mention it earlier.

tawny junco
#

What did I ignore?

vapid parcel
vapid parcel
# tawny junco What did I ignore?

You brought up "so yeah if you wanna includ quotation then * is the way to go" meaning me saying its a keyword only marker was completely ignored.

vapid parcel
#

Well you brought it up back at the end almost as if you just figured it out 😭

#

so assuming that is pretty valid imo

tawny junco
#

I was simply correcting myself for stating my example doesn't need it

tawny junco
#

I was not ignoring you in anyway

#

I was more acknowledging your point

vapid parcel
#

Idk, just seems like you ignored that statement and then brought it backup

tawny junco
#

Hence why I say "so yeah"

quick gust
#

miscommunication guys it's okay move on pithink

timber dragon
quick gust
#

@viscid hornet how's the fishing bot going

tawny junco
wanton current
viscid hornet
vapid parcel
quick gust
tawny junco
vapid parcel
vapid parcel
tawny junco
#

arguing has the nuance of heated debate. an argument is just one side of a debate

quick gust
vapid parcel
timber dragon
#

Bros are arguing about what an argument is 💀

vapid parcel
#

it was the most random thing shrugs

timber dragon
#

Smh

tawny junco
#

Is anything wrong with that tho?

quick gust
tawny junco
#

If you scroll up for 10 seconds you can find his message from 3 days ago

#

this chat is slow

vapid parcel
vapid parcel
#

alright, we get it 🙏

tawny junco
#

Who is we

#

Am I included

vapid parcel
#

all the voices in my head

viscid hornet
vapid parcel
#

thats whos WE. Trust

vapid parcel
#

did you ever FINISH the AI?

#

doubting hard rn

#

bro def never finished it

viscid hornet
vapid parcel
#

connect 4?

#

i think

viscid hornet
#

oh no i never got that working

vapid parcel
#

😭

viscid hornet
#

tried like 8 times and eventually just gave up

vapid parcel
#

bro gave up, sad

viscid hornet
viscid hornet
vapid parcel
#

bro couldve tried ONE MORE TIME

#

9th time is the try

viscid hornet
vapid parcel
#

trust me. The voices in my head told me 🙏

vapid parcel
viscid hornet
#

think about it

vapid parcel
#

Nooo pls dont 🙏

viscid hornet
naive briar
#

What's happening

vapid parcel
#

talking about AI in py projects

#

thats all.

viscid hornet
vapid parcel
#

no

#

I think they hate cats, just assuming ofc

vapid parcel
#

ilyt bro

wanton current
#

that's it

#

i'm moving your clip down

slate swan
#

quick question. how do i make a command that is something like
.help <other info thing>
i have the prefix set up its just the command needed and i dont know how to

fast osprey
#

You may want to consider migrating to app commands, where documentation is embedded into when the user runs the command

slate swan
#

and how do i do that?

fast osprey
#

depends on the library you're using

hearty basalt
#

or do you want to specifically use a prefix command?

loud socket
#

Or you can use @bot.commands() with async def <command name> (cxt):

#

For slash commands that I highly recommend you can use @bot.tree.commands() with a similar way to @bot.commands but also make sure to bot.tree.sync()

crisp tree
#

@anyone can someone help me creating a discord bot

#

i am almost complete

#

but due to various issues i cant complete it

#

for example everything was going well until my openai ran out

#

im currently using replit

#

i want my bot to send specific replies

#

how do i do all of this

#

can someone suggest an ai which is freee

slate swan
#

you won't get an ai suggestion here so that you can code a bot with pure ai and having zero knowledge of what you're doing. this channel (server) is not made for that.
it's made for people who want to actually learn the language and build something with their knowledge, and not copy paste whatever random words an LLM throws at you.

south shell
#

Hello everyone ! does anyone knows how to send a message to the user when it add my app to there account?

woeful hill
#

don't do that

#

if they add the bot to their account, they know what they are doing, you don't need to send an instruction on how to use the bot

slate swan
#

worth mentioning that it may lead to your bot getting into quarantine for spam/suspicious behavior

south shell
#

fair

timber dragon
south shell
#

okkayy thanks you

south shell
#

how to make the bot say thanks you for inviting me or something like that when it join a discord server

quick gust
#

!d discord.on_guild_join

unkempt canyonBOT
#

discord.on_guild_join(guild)```
Called when a [`Guild`](https://discordpy.readthedocs.io/en/stable/api.html#discord.Guild) is either created by the [`Client`](https://discordpy.readthedocs.io/en/stable/api.html#discord.Client) or when the [`Client`](https://discordpy.readthedocs.io/en/stable/api.html#discord.Client) joins a guild.

This requires [`Intents.guilds`](https://discordpy.readthedocs.io/en/stable/api.html#discord.Intents.guilds) to be enabled.
south shell
#

is there any way to get the channel id?

quick gust
#

what channel id?

south shell
#

where the bot join

#

like the first one it shows

quick gust
#

a bot joins a server not a channel

quick gust
south shell
#

aww, ig i'm just gunna check for system_channel

slate swan
#

You can use that or for example search for a general name channel, or just any channel where the bot has permissions to send messages in

south shell
#

i'll just do

try system_channel
if no
check all channel until works

slate swan
#

No need to try to send the message, check if the bot has permissions

south shell
#

yes

#

thanks you

fast osprey
#

Or just don't send random messages people haven't asked for

south shell
#

How to use custom bot emoji (like the one uploaded to the bot?

slate swan
#

Like any other custom emoji

#

<name:id> / <a:name:id>

south shell
#

Had to use
discord.PartialEmoji(name='', id=)

viscid hornet
#

just write it literally?

south shell
#

Now it works, like to add reaction from custom bot emojis

#

I used this

viscid hornet
#

ah ok makes sense

#

i thought you meant for sending them

viscid hornet
#

discord issue with discord-rpc
-# yes i know it's a JS library, but the main focus isnt JS

what the hell is this: ```ts
{
code: 5000,
message: 'OAuth2 Authorization Error: Unknown Error'
}

#

i've genuinely never seen a more uninformative error message

slate swan
#

A standard OAuth2 error occurred; check the data object for the OAuth2 error details.

You have that data object?

viscid hornet
#
Error: [object Object]
    at RPCClient._onRpcMessage (C:\Users\james.griggs\Desktop\i hate programming pt 2\typescript projects\testing-purposes\node_modules\discord-rpc\src\client.js:178:19)
    at IPCTransport.emit (node:events:519:28)
    at C:\Users\james.griggs\Desktop\i hate programming pt 2\typescript projects\testing-purposes\node_modules\discord-rpc\src\transports\ipc.js:138:18
    at decode (C:\Users\james.griggs\Desktop\i hate programming pt 2\typescript projects\testing-purposes\node_modules\discord-rpc\src\transports\ipc.js:92:5)
    at Socket.<anonymous> (C:\Users\james.griggs\Desktop\i hate programming pt 2\typescript projects\testing-purposes\node_modules\discord-rpc\src\transports\ipc.js:120:7)
    at Socket.emit (node:events:519:28)
    at emitReadable_ (node:internal/streams/readable:832:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:81:21) {
  code: 5000,
  data: { code: 5000, message: 'OAuth2 Authorization Error: Unknown Error' }
}
slate swan
#

otherwise show the code, even though it's js

viscid hornet
viscid hornet
# slate swan otherwise show the code, even though it's js
import { Client } from 'discord-rpc';
import { CLIENT_ID, CLIENT_SECRET } from './vars.js';

const client = new Client({
    transport: 'ipc'
});

client.on('ready', () => {
    // console.log(`Logged in as ${client.application!.name}`);
    console.log(`Authed for user ${client.user!.username!}`);
});

async function main() {
    await client.login({
        clientId: CLIENT_ID,
        //  clientSecret: CLIENT_SECRET,
        // scopes: ['rpc', 'rpc.activities.write']
    });
}

main();

for the login i was tryna copy discord-vscode since that seems to work

viscid hornet
#

no

#

nearly two hours

slate swan
#

the .login() part you shouldn't use that require thing but rather your current way of doing it

#

same for the imports, keep your currents

#

also make sure the client id is a string

south shell
#

is there anyway to get all the user that added my discord bot to there APPs?

timber dragon
#

Nope

south shell
#

Aww, sad

sonic island
#

hello

south shell
#

Yes?

#

Oh you're asking here

#

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

#

Use something like fiverr

slate swan
#

!rule paid work

unkempt canyonBOT
#

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

south shell
#

Or on any marketplace

slate swan
#

go to fiverr or upwork

sonic island
south shell
#

Or any discord that accept this

sonic island
#

ok

south shell
#

Like disboard and search for marketplace or idk

sonic island
unkempt canyonBOT
viscid hornet
#

also why are you adding buttons manually

#

you dont even set a callback on any of them

south shell
#

How to explain a command

#

@app_commands.command(name="set_verification", description="Set verification role, challenge level, and optional verification channel.")

to explain which is what

#

founded

#

@app_commands.describe(
first_value='The first value you want to add something to',
second_value='The value you want to add to the first value',
)

fast osprey
#

Can also use docstrings

viscid hornet
#

yeah docstrings are the easiest way

cunning blade
#

Hello, everyone?
Anyone knows how to get user's bio information using discord bot?

fast osprey
#

Bots are not given access to that

cunning blade
#

So, you mean we can't get that information?

fast osprey
#

Not with a bot, no

stark ingot
#

Automod can access it if you are looking to do some simple moderation of it

south shell
fast osprey
#

"Private api" here means impersonating a user, which is against tos

south shell
#

How to detect when someone reply to your bot??

naive briar
#

!d discord.Message.reference

unkempt canyonBOT
#

The message that this message references. This is only applicable to message replies (MessageType.reply), crossposted messages created by a followed channel integration, forwarded messages, and messages of type...

south shell
#

Thanks!

frosty thorn
#

whats the best way to integrate music functionality to your discord bot? i've tried ydtl with ffmpeg and doesnt seem to be working

slate swan
#

!ytdl

unkempt canyonBOT
#
Our youtube-dl, or equivalents, policy

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)
frosty thorn
#

what about any free music api's?

slate swan
#

It's not about being paid or free

#

Music is copyrighted, we won't help you breach copyright laws

#

Will also likely lead to your bot getting terminated, eventually discord account as well, so don't do it

#

If not, then you'll likely get a C&D letter from the service you're breaching the ToS, e.g. Google

fast osprey
#

There is unlikely to be an api that hosts things for you for free that consists entirely of music that artists have signed away their copyrights to. They get absolutely nothing from doing that, and even then it's not going to be music you or users will want.

#

There are already music sharing services that properly compensate their artists. Do something else with your time

sage flint
#

hello

#

where do I go to get help configuring a Solana trading bot with Py

south shell
#

how to make so my commands does not show on other discord server (app)

#

@app_commands.allowed_contexts(guilds=True, dms=True, private_channels=True)
@app_commands.user_install()

i use this

#

but even when i remove them they stiull shows up

timber dragon
#

Wdym "other discord server"

#

Do you want it to only show up in...

  • certain servers?
  • thr bot's dm?
  • anyone's dm?
  • dm group?
  • any combinations of the 4?
south shell
#

found

#

@app_commands.guild_only()

#

okay no it does not work

#

just want to make app command to only works on guild

#

because like it is installed on account and dont want them to show up there

timber dragon
#

Make sure you've synced

south shell
#

@bot.event
async def on_ready():
try:
await load_cogs()
except Exception as e:
print(e)
await bot.tree.sync()

#

I got this but my bot use app_commands

#

so feel like bot.tree.sync

#

like it updates the commands but not the status

#

maybe they should be synced in the cogs too?

fast osprey
#

You shouldn't be doing any of this in on_ready

#

read the docs for it

timber dragon
#

Try reloading your app

south shell
#

I reloaded it 10 times haha

#

i've maked eeverything app_commands so no more tree

timber dragon
#

What

south shell
#

@app_commands.guild_only()
@discord.app_commands.command(name="", description="")
@app_commands.choices(action=[
app_commands.Choice(name="enable", value="enable"),
app_commands.Choice(name="disable", value="disable"),
app_commands.Choice(name="status", value="status")
])
@app_commands.default_permissions(administrator=True)

#

like this

timber dragon
#

@bot.tree.command() is the same as @app_commands.command(), with the addition that it also adds the command to the tree.

#

Else you need to add the command to tree manually if not inside a cog

south shell
#

there all inside a cog

timber dragon
#

Ah

south shell
#

async def setup(bot):
await bot.add_cog(MuteCog(bot))

#

here how it looks in case

timber dragon
#

Make sure they're all intended correctly and that the extension is actually loaded

south shell
#

yep there all loaded

timber dragon
#

And manually sync them

south shell
#

how?

timber dragon
#

Preferably using a prefix command

#

Call <bot>.tree.sync and check the output

south shell
#

okkay

#

let me try

#

all of them still shows

timber dragon
#

Did sync return the command that you're trying to sync

south shell
#

@bot.command(description="sync all global commands")
@commands.is_owner()
async def syncslash(ctx: commands.Context):
if ctx.author.id == 1219523120919220225:
try:
await bot.tree.sync()
print("Synced")
except discord.Forbidden:
await ctx.send("Unexpected forbidden from application scope.")
else:
await ctx.send("You must be the owner to use this commands

it printed out Synced

#

wait

#

now, nothing shows up

#

my bad i removed the on ready

#

@discord.app_commands.allowed_installs(guilds=True)
@app_commands.allowed_contexts(guilds=True, dms=False, private_channels=False)

timber dragon
#

you don't need to set everything to False explicitly

#

just like you didn't for installs

stark pulsar
stark pulsar
#

u dont have to add @app_commands.allowed_contexts(guilds=True, dms=False, private_channels=False)

south shell
#

like only if you have a lot of things to sync

fast osprey
#

Do you understand how on_ready works?

smoky sinew
#

Every other lib does it fine

slate swan
#

It doesn't matter which library, the events are sent by Discord the same way for everyone

#

Other libs have some on_connect or whatever event where they also auto-sync in the background, which does what people think the ready event does. It doesn't mean discord.py is the issue, it's just devs not reading the docs and assuming what an event does

#

Maybe other libs do some checking in the background to see if it effectively needs to sync the command(s) again, but I guess that would involve other requests or something to get the current commands.

#

If they don't, which I doubt when they implement an auto-sync, then it's a great way to get rate limited for the day

timber dragon
#

Ya afaik the dpy forks check the current commands against those in the code on startup and reloading etc requires manual syncing

slate swan
#

Then it's definitely some convenience and personal choice, I'd prefer the bot to sync its commands when I want it to sync

timber dragon
naive briar
#

I did something like that a year-ish ago

#

It's for an argument if I remember correctly

dark holly
#

hey yall, its my first time trying to make a discord bot, im following this tut on youtube and I wrote all code the same way he did but for some reason there is a bunch of errors in the terminal that dont make sense to me... Could anyone be able to help me?

fast osprey
#

People on YouTube make shit up or just flat out lie. I strongly suggest you don't use that as a foundation

#

It's a bunch of kids in their basement guessing at stuff for internet points. You're much better off following the official documentation and examples from the library you're using

shrewd apex
#

https://github.com/FallenDeity/discord.py-masterclass/blob/master/examples%2Fsmart-sync%2Futils%2Ftree.py I was experimenting with something similar for smart sync, via building a diff object between the current commands and the global synced commands, not sure how sound the current impl is but last i checked it was working for most stuff

GitHub

A tutorial/guide explaining all features in discord.py and how to make a discord bot from scratch. - FallenDeity/discord.py-masterclass

humble nacelle
#

!e print('hello')

unkempt canyonBOT
dry kelp
#

Could this type of comparation issue? using a boolean comparasion and a XOR check?

quick gust
#

What's your question?

fast osprey
#

Also discord already grants a role when someone boosts that you can customize and/or grant permissions to. There shouldn't be a need for you to track this

dry kelp
dry kelp
slate swan
#

honestly props to you because we barely see code like that in this channel

#

most of the time it's code thrown by an llm or copy pasted off 5 years old tutorials

fast osprey
#

There's not a functional reason to make more roles, when you're already given one role that does what you want and can be customized. But you do you

dry kelp
dry kelp
fast osprey
#

Your call what to do with your time. People want all sorts of trivial useless junk that doesnt actually mean anything

dry kelp
#

and i remember we've argued about that

#

but sadly discord cannot do this, and neither limit actions, i do love the threshold logical system into limiting the actions, since discord does not provide and actual limitations towards that

quick gust
fast osprey
#

Anywho you shouldn't be looping and calling add_roles or remove_roles multiple times with one role each time. Just send them all at once

dry kelp
dry kelp
quick gust
dry kelp
#

That we do mention in tier differences, as in free we mention channel protection may work in limited scenarios

#

if a category gets deleted, we do not re-edit childs to parent

#

For level 2, we use the bulk restore method of the saved snapshot into our database, to ensure everything gets back as it was previously saved

dry kelp
#

and we actually manage to recover big servers, as you can see in home page, our bot may not be in a lot of servers, but it is in lots if big servers used as main bot

tawny junco
viscid hornet
tawny junco
#

I do agree tbh. If you already have an automatic role that a booster receives, just edit that same role to fulfil the purpose of a reward role. It just feels right.

#

But the antinuke I gotta give you credit for lol. It looks satisfying

dry kelp
#

but that's members choice, if they want to authoritize the bot.

tawny junco
dry kelp
dry kelp
dry kelp
dry kelp
#

we do mention it here

tawny junco
dry kelp
#
  • it would be very very bad
tawny junco
#

What about faqs and rules list

#

resources

#

all gone

dry kelp
#

So, the only problem i see doing that it's

#
  1. Affecting user's privacy
#
  1. Lots of data stored (if big servers, multiple channels, storing even 100 messsages per channel its already a big nono)
dry kelp
#

i might finish up the embed creator feature by today, since i've already globalized the ui

#

This type of editor, 1 developer that sadly is not in the team anymore, done this for us, but he done it just for welcomer, i've already revamped it and globalized it, so for our booster message we use the same builder

hearty basalt
#

ay wsg spooky

dry kelp
dry kelp
#

oh ic ur in memeified

hearty basalt
#

i have no clue what servers im in

#

😭

dry kelp
#

memeified 😭

#

it's one of our biggest supporters

hearty basalt
#

got like 8 folders

#

most of the servers ive joined are for stickers n emotes lmao

dry kelp
#

it's a big server that supported me a lot 🙏

hearty basalt
#

W

#

i remember i joined memefied for exactly 1 or 2 stickers

dry kelp
#

Yeh, it's very nice ppl

#

really supported me a lot, and they mostly main bot for features, including our security

hearty basalt
#

i remember you showed me get to get a user's discord badges

#

rahhh

dry kelp
#

i dont remember 😭

#

i stopped my dms

#

had so many dms one day i just couldn't keep up

hearty basalt
#

famous

dry kelp
#

na bro, i really dont act holywood

#

most ppl on this app act hollywood

#

like they selena gomez or sum shit

hearty basalt
#

im jus fuckin around on bandlab cs im way too bored

dry kelp
#

not fun

slate swan
#

the amount of files joe_salute

hearty basalt
#

seems exciting

dry kelp
#

we globalized everything we could of had

#

there's no such as repetitive code

hearty basalt
#

the first bot i made i put everything in main.py cs i didnt know how cogs work 🗣️ 🗣️

slate swan
#

yeh it's just overwhelming

hearty basalt
#

neither do i now 🗣️

dry kelp
#

This is all globalized used in multiple files 😭

slate swan
#

i tend to split projects in various repos to prevent that

dry kelp
slate swan
#

yeah definitely

dry kelp
#

im used to this file tree, if you would spend 30-40 mins reading it, im 100% sure you'll understand it

slate swan
#

oh yeah that's not the issue, i just find it like too much - not a personal fan of monorepos

#

though if i'd make a project in a monorepo pretty sure i'd get used to it fast

dry kelp
#

i mean, ofc website is on a different repo bahahahhaa

dry kelp
slate swan
slate swan
dry kelp
#

whenever a new commit is done, it gets queued, then deployed

slate swan
#

mmkay, looks nice

dry kelp
#

old instance will run till the new one is ready

slate swan
#

yeah i use k8s etc.

dry kelp
#

bot will dispatch once on_ready is fired

slate swan
#

it probably uses k8s in the background tbh

dry kelp
#

also easy to manage databases, for testing

#

since the production bot is connected to an actual database cluster

tawny junco
dry kelp
dry kelp
#

they load inside of the init files

slate swan
#

would be one hell of a mess otherwise

tawny junco
#

oh

dry kelp
dry kelp
#

i also need to make these docstrings omfgggg

#

and i need to find out how to delay dispath method by 10 seconds

#

last time i tried, it never dispatched

hearty basalt
#

are docstrings the things that popup when youre using a function

#

the luh description

dry kelp
#

docstrings is whatever you see inside of the """

dry kelp
#

it helps to understand the purpose of that specific thing

slate swan
#

i hate how it's in python tbh

dry kelp
slate swan
#

the fact that it's below the function definition and not above

#

when you have a long function definition, pain

dry kelp
#

i'll have lots of fun

slate swan
#

when it's relatively small, yeah sure

#

but otherwise, pain pain

dry kelp
#

for me, this looks way better

#

i've refactored this already

#

food arrived, quick break

south shell
#

Is there any on_webhook_create?

dry kelp
#

its all related to webhook protection

dry kelp
dry kelp
#

what you are looking for is on_webhook_update, thats what keeps track of created webhooks

south shell
#

Haha, yes that what i was thinking

#

I'm working on multipurpose bot too

#

Thanks !!

dry kelp
#

no problem 😉

dry kelp
south shell
#

Haha yes

dry kelp
#

its not easy😭😭

south shell
#

Rn I have custom antirais

#

Antiraid, spam

#

Now gotta do bot, webhook

dry kelp
#

yeah, these are basic rulers, can easily keep track

#

i ll get into anti raid soon

#

but the antinuke is really master done

south shell
#

You check like for 3 channels deleted

#

And it bans

dry kelp
#

lol

south shell
#

It would work

dry kelp
#

we have threshold system

south shell
#

Yes logiv

dry kelp
#

to adapt to the users needs

south shell
#

Logic

dry kelp
#

we also have this

#

being sent rn

#

we reduced api calls, all existing checks for params to only update, if not existing it creates

south shell
#

I will work on this too

dry kelp
#

but ofc we have a priority list, so we can sort channels and categories

#

good luck, i spent 50 hours doing a refactor on it

#

and base was started by another in the development team and took like a week

#

can raise so many issues

south shell
#

Oh lol

dry kelp
#

its easier if you make a safe execute and u pass the coro in it

#

and dont do try except pass, use contextlib instead

#

you save up some lines

frosty thorn
#

how do i keep my bot on replit running for 24/7?

timber dragon
#

Pay up

quick gust
timber dragon
#

Or rent an actual host

quick gust
#

No point paying for replit just to be able to host properly, buy a cheap vps at that point

frosty thorn
fast osprey
#

The way around is to use an environment designed for what you're trying to do

stark ingot
frosty thorn
#

what other alternatives are there except railway?

stark ingot
sick birch
unkempt canyonBOT
#
Discord Bot Hosting

Using free hosting options like repl.it for continuous 24/7 bot hosting is strongly discouraged.
Instead, opt for a virtual private server (VPS) or use your own spare hardware if you'd rather not pay for hosting.

See our Discord Bot Hosting Guide on our website that compares many hosting providers, both free and paid.

You may also use #965291480992321536 to discuss different discord bot hosting options.

sick birch
#

some popular ones are AWS, Azure, Digital Ocean and Hostinger

#

personally I prefer AWS but it's a bit pricey

keen dune
#

I used replit before but the downtime was atrocious

sick birch
#

nice. aws downtime should be minimal

dry kelp
#

it's very cheap, and very good and safe

#

personally we run our application on ipv6, thru firewall you can allow connections that you only want to connect

#

and a pro top, for max security if you have a website, use clouflare 20$ tier

#

very safe

#

@slate swan

scarlet tiger
#

GalaxyGate is also very good, I've been using their service for a year

dry kelp
#

86k commands usage in 4 days 🤣

timber dragon
#

What does the vape command do 💀

dry kelp
#

then they can steal from each other

#

while vaping, with default vape u have a chanhe to earn spukies

#

u can buy better vapes, earn more money

#

we also post unique limited vapes

#

there is also achievements

quick gust
#

💀

timber dragon
#

Oh god

quick gust
#

were there no better options for an item than a vape

timber dragon
#

That's amazing

dry kelp
#

its honestly a feature that got lots of people addicted

#

and these achicements will be badges on our custom profiles

dry kelp
timber dragon
#

So can you prevent it from being stolen?

dry kelp
#

its overall a nice feature

timber dragon
#

Nice

dry kelp
dry kelp
#

just people inventory

#

@timber dragon as u can see thats how limited vapes get displayer

#

displayed

timber dragon
#

Ooh

dry kelp
#

thats embed of user inventory

timber dragon
#

Good stuff

dry kelp
#

and to keep a easy track, all vapes are inside of an enum, they're marked with 1,2 etc. to keep an easy track of user inventory

#

and if i change the enum with the attributes, it will change very easily

#

i just need to add the docstrings... but it's what im currently working on

#

i just finished doing it on economy

#

been doing it for a long time and im just half done...

timber dragon
#

Nice nice

fast bane
#

Is there a channel where I can sort of advertise a need for a dev for a bot? If so is this it?

dry kelp
south shell
#

is there any way to set guild image from url

#

because

#

because url under /icons are blocked to be seen

dry kelp
#

I think i know what your problem is

#

you're trying to reverse the action as anti icon and anti banner?

south shell
#

restore

dry kelp
#

cdns of discord now expire, once image is changed, the old image cannot be retrieved anymore

south shell
#

well it seem to still

dry kelp
#

its not possible

south shell
#

or maybe it is in cache

#

of discord

dry kelp
#

reason why we've set it to premium security to level 1, and we store the assets bytes

south shell
#

oooh okay

dry kelp
#

Nope... once image of guild changed

#

it's not possible to retrieve it anymore

#

You can get current one, that's set, but if that's changed, old one is unfindable

south shell
#

remove so no flood

#

it still shows

#

guild icon is not the same

dry kelp
#

I may didn't understand your point, but if your point, is to get an old icon, that got changed, you cannot retrieve it

south shell
#

nooo

#

update the image from url

dry kelp
#

welp, u need to convert it to image bytes

south shell
#

ah

dry kelp
#

so u need to use aiohttp

#

to get that url

south shell
#

oooh okay

#

i undestand but the url is blocked by discord

dry kelp
#

and to convert u could do a variable, as image_bytes = response.content response being the response from aiohttp

south shell
#

like you can't get it from only the url it goes to image-1 cdn

dry kelp
#

what do you mean?

south shell
#

you can't because it only shows if you go on a sub domain with some kind of token behind

dry kelp
#

yeah but u need the actual url of the image

#

not this

#

or i may just not understand what you're trying to do, since im so fucking tired

#

and im still doing docstrings... ill dream of docstrings tonight

south shell
#

me on google it is not able to scrap it

dry kelp
#

by reading it

glad cradle
#

or if they have the actual url to the asset they just need to make a GET request to it

vapid parcel
#

Is discords API down?

dry kelp
#

everything looks operational

slate swan
#

it has issues

vapid parcel
#

that status page is not up to date.

slate swan
#

oauth2 and interactions have issues

vapid parcel
#

Alr, thank you

#

Interactions were the issue on my end

#

Love the API issues sometimes lmao

slate swan
#

it's weekend + middle of night at discord, probably will get updated in some time

vapid parcel
#

yeah

slate swan
vapid parcel
#

like next year

dry kelp
#

i see

slate swan
#

the only things at discord that they try super hard to get to 100% uptime

vapid parcel
#

I love this dude 😭

#

points out something ive never noticied and I fucking love that its THOSE 2 things out of EVERYTHING lmao

slate swan
#

gotta be realistic right :^)

vapid parcel
#

i love you bro, god thats actually crazy.

#

Love this company lmao

buoyant saffron
slate swan
#

obv

dry kelp
#

can't even access it from a phone, only thru link is accesible

wise mica
#

is there a way to edit just a single part of an embed from a different command?

wise mica
dry kelp
#

I don't think that's true, since we use that on our bot

wise mica
#

not on bots but on the server itself

dry kelp
#

ohhh

wise mica
fast osprey
#

You don't edit embeds. You edit messages. You can pass whatever embeds you want to be on the message after the edit

wise mica
#

nevermind i figured it out, had to use the . to change rather than overwrite

glad cradle
wise mica
vapid parcel
#

But yes, Server Subscription is only locked to the US, but Discord Store is not.

wise mica
vapid parcel
#

ah alr, mb

dry kelp
#

Yes, you can edit the embed message

#

just certain parts

wise mica
#

yea i got it working, ty though

dry kelp
#

my apologies for late reply 🙏

wise mica
#

i was trying to do it via field="whatever

#

rather than embed.title = "whatever"

dry kelp
#

i mean im quite sure u had to check old content then update to the desidered content

wise mica
#

yea i had that i was just rewriting over it

dry kelp
#

i see i see, im happy u got it working, not something i've personally done..,

vapid parcel
#

its easier to make an embed builder, and then an embed editor

dry kelp
#

agreed

#

waiting for buttons in embed

wise mica
#

i agree, i should do that, but i would find it easier to do it this way

wise mica
vapid parcel
#

Something like this ^

wise mica
# vapid parcel

unless im missing something i couldnt add that into my code though ?

vapid parcel
#

Why is that?

#

thats just an embed builder lol

wise mica
#

im making a trade command and id want the embed to reflect changes when a user adds or removes stuff, how would the embed builder enhance that ?

vapid parcel
#

oh, i thought you were talking about an embed editor n embed builder

#

mb

wise mica
#

all good i can be bad at explaining things, i appreciate the help always

vapid parcel
#

Yeah ofc

#

I just love that embed builder a lot though, so I thought thats what you meant tbh

wise mica
#

im hoping i can get someone else to design my embeds for me after im done with everything, since design is not my speciality at all

vapid parcel
#

it should be easy

wise mica
#

my first thought of embed builder was a function that takes all the arguments youd want in an embed and then spits it back out without typing all the embed syntax every time lol

vapid parcel
#

ah,i was thinking of an actual embed builder for users to use lmao

#

ig im slow xD

quick gust
timber dragon
#

Why are author etc supposed to be in **kwargs instead of being part of the signature?

south shell
#

i saw some discord bot that are able to read discord message to detect keywords is there any way (it worked on javascript) (discord apps)

fast osprey
#

Sure it is possible. It depends what you're trying to do

stark ingot
#

It should just be a simple on_message event that checks if "keyword" in message.content

quick gust
south shell
#

because when i do on_message and send any message in dm it does not print at all

stark ingot
#

DM with the bot or some random user?

south shell
#

random user

stark ingot
#

well... how would a bot see your DMs with a different user

timber dragon
south shell
#

i saw a bot do this

stark ingot
#

Bots cant read your DMs with other users

south shell
#

and apps can? or not

quick gust
stark ingot
#

technically there is a way but you need to be a partner with discord. I think only xbox or something is allowed to use that feature

south shell
#

hmm okay ! by checking it back it seems to not work, or maytbe i'm just crazy haha

stark ingot
#

You can use app commands in DMs but you cant view random messages

south shell
#

Yea, fair

#

is it allowed to make a discord app join a discord server on add?

#

just a 1 time join no spam or those goofy backup bot

fast osprey
#

Humans have to add bots to servers

south shell
#

I mean like when you add the bot to your personal app with the join server for you permission

stark ingot
#

If you are talking about a bot that adds a user to a server:
You need to get the users permission.

fast osprey
#

That lets the bot make you join servers

#

That doesn't let the bot join servers

south shell
fast osprey
#

That's an oauth operation, not a gateway bot operation

stark ingot
#

I think that is out of scope for most discord bot libraries but I dont use discord.py. You can look to see if there is a python OAUTH library

south shell
#

client = discordoauth2.Client(849930878276993044, secret="very-secret-code",
redirect="https://findingfakeurlsisprettyhard.tv/oauth2", bot_token="bot-token-only-required-for-guild-joining-or-updating-linked-roles-metadata")
app = Flask(__name__)

client.update_linked_roles_metadata([
    {
        "type": 2,
        "key": "level",
        "name": "Level",
        "description": "The level the user is on"
    },
    {
        "type": 7,
        "key": "supporter",
        "name": "Supporter",
        "description": "Spent money to help the game"
    }
])

@app.route('/')
def main():
  return redirect(client.generate_uri(scope=["identify", "connections", "guilds", "role_connections.write"]))

@app.route("/oauth2")
def oauth2():
    code = request.args.get("code")

    access = client.exchange_code(code)

    access.update_metadata("Platform Name", "Username",  level=69, supporter=True)

    identify = access.fetch_identify()
    connections = access.fetch_connections()
    guilds = access.fetch_guilds()

    return f"""{identify}<br><br>{connections}<br><br>{guilds}"""

app.run("0.0.0.0", 8080)```
#

like this lib?

#

But you don't need a website domain?

stark ingot
#

I have never worked with OAUTH ¯_(ツ)_/¯

south shell
south shell
fast osprey
#

Oauth flows require you to host a site for the callback redirect so that discord can send you the token

south shell
#

ye that what i think

fast osprey
#

What's the actual goal you're trying to accomplish here?

#

Typically you really only need this oauth scope if you're actively gating a sensitive server behind custom verification

#

Otherwise people can just join on their own or be given a link

stark pulsar
#

can someone help me design this ugly ass embed

#

im ass at designing

stark ingot
#

looks fine to me, you might want to include the ID of users as well. Also the timestamp in the embed is not needed if the time that the message was sent is the same

timber dragon
#

Last field looks unnecessary

shadow vigil
#

also make use of the author part

timber dragon
#

I would put everything in the description instead to make it smaller

Reporter: mention (ID)
Reported by: mention (ID)
Reason: repr()
Thread: ... (ID: )

But I am also bad at designing lol

stark pulsar
stark ingot
timber dragon
#

Yeah you don't need to delete it all haha

shadow vigil
stark pulsar
stark ingot
#

fair enough

stark pulsar
#

but archived threads delete after 7 days, and i suppose he wants a permanent transcript

stark ingot
#

archived threads delete after 7 days
this is not true

#

There are threads that are 3-4 years old in a server I am in and have been inactive for that long as well

fast osprey
vale bough
#

need help anyone?

#

@tight obsidian

naive briar
vale bough
naive briar
#

Sure

vale bough
#

i have one slash command bot is not syncing that command

#

let me send here

vale bough
south shell
hearty basalt
#

also if it's a new command make sure to ctrl r

hearty basalt
south shell
#

anbd yes restart discord too

vale bough
#

i restart bot so many times

#

and discord toobut not working

#

try:
synced = await bot.tree.sync()
print(f"Synced {len(synced)} command(s)")
except Exception as e:
print(e)

#

await bot.load_extension("commands.owner")
print("Owner commands Loaded!!!")

shrewd apex
#

did it print the amount of commanda synced?

vale bough
#

yes

shrewd apex
#

did it match with the amount of commands you have, you might wanna print that resulting list and check

vale bough
#

yes

south shell
#

you restarted discord

#

like the command don't show up at all?

shrewd apex
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 Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.

vale bough
#

in termimal command succesfuly syced

#

but in discord not

#

ok

#

wait i will send full cog

shrewd apex
#

are u sure ur checking the correct server and the bot was added with application.commands scope

slate swan
#

have you done a ctrl+r

vale bough
slate swan
#

you still haven't replied to that

vale bough
slate swan
#

alt+f4 discord and start it again

vale bough
#

i did

#

many time

slate swan
#

then one of the questions above was answered wrongly

vale bough
#

which one

shrewd apex
#

which command is not syncing?

vale bough
#

/give-account

dry kelp
# vale bough last one

Seems like you using discord.py, i am quite sure they handle them and they will sync, always... You could either force sync them, but from the looks of it, you either didn't load cog, or didn't refresh discord, since you need to restart you discord for the interaction commands to update

shrewd apex
#

u always need to sync manually

#

but yeah prolly something wrt to the latter is true

south shell
#

arez the cogs loaded?

vale bough
#

other command working fine

#

see

#

and i already restart discord and bot

south shell
#

Nothing shows in console

#

no cogs error?

vale bough
vale bough
timber dragon
#

How have you restarted the discord app?

vale bough
#

yes

#

i did

#

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

timber dragon
#

How

timber dragon
#

Very helpful

#

Goodluck then

dry kelp
#

@vale bough since you seem to be a begginer using ai to code, i recommend swapping to disnake library

shrewd apex
#

how would ai help in either case?

dry kelp
#

if you want to focus on interaction commands

dry kelp
#

since disnake it's much better for interaction commands, and the library i personally use for my bot

shrewd apex
#

but how would that help with coding using ai? wouldn't it better to recommend resources to learn how to develop?

dry kelp
#

this is the code they've sent

#

Why would u put an comment saying "# Optionally include more info if available"

vale bough
#

bro i gave that to ai to fix that error

dry kelp
#

as a developer if you do something, and dont even knwo the data you have, it's already a bad start

shrewd apex
#

i am not saying its not ai generated code

vale bough
#

he wrote every thing

#

and modify the code

dry kelp
#

@vale bough Yeah, i am not blaming you, i am suggesting you, to swap to disnake, if your bot it's not an prefixable bot

shrewd apex
#

but how would disnake resolve the issue of a beginner attempting to code using ai

slate swan
dry kelp
#

disnake it's much better for interaction

shrewd apex
#

fair enough that i agree with

dry kelp
#

Disnake is friendly for interactions, MUCH more friendly

#

and you don't need all that sync logic, force sync or whatsoever

shrewd apex
#

i like the interaction client concept

dry kelp
#

Yeah, overall d.py is good, especially for prefixable bots.

#

But since i am planning to stand on interaction commands, i would rather use disnake

#

and not a big deal creating custom methods in case i really want an extra

vale bough
#

bro when i create other command bot sync that command smoothly

#

wth litterly

dry kelp
#

But since you use AI promts, i recommend swapping to disnake the whole bot, shouldn't be a big change overall, just the way you use interactions

#

No need for that @app route, with all tree logic, i personally didn't look into and can't understand

vale bough
dry kelp
#

this is how easy you can create interaction comamnds using disnake

dry kelp
#

that's very bad practice and definitely not recommended

vale bough
#

just kidding

dry kelp
#

most imports are very similiar

vale bough
dry kelp
#

It's just an recommandation tho, but you do you.

wise mica
dry kelp
#

apparently, don't have information on that, but that's what it seems, and what they've mentioned in above messages.

viscid hornet
dry kelp
wise mica
viscid hornet
dry kelp
wise mica
#

Also based on his print counting the commands he has, I wouldn't be surprised if his code is the same as mine that I got from a tutorial some time ago

dry kelp
#

i mean we have this massive tree, but shit, 300 commands grassROFL

wise mica
dry kelp
#

1 more thing i've noticed is that they use mongodb, mongo is fine, for a private bot, but not when it comes to a public application...

#

Personally for a public application, i would recommend PostgreSQL database cluster (or locally thru psql) since they're made perfectly for long term storing data.

wise mica
dry kelp
#

So an option is definetely PostgreSQL

wise mica
#

Sure, but I don't think mongo is a bad choice at all

#

Especially since it means he won't have to learn SQL alongside learning python

dry kelp
#

There are ORMs, that automatically migrate / upgrade / downgrade database for you

#

It may slow down a bit the process, but don't think it's a 10 minutes delay, it's a few miliseconds

#

So no, you don't need to learn "SQL" (would be helpful for query for hand modifications if needed all these can be found online) but what you would need is to read another library that handle this.

fast osprey
#

Mongo is a horrid choice, especially if your data is relational

dry kelp
fast osprey
#

Takes about 5 min of googling to find legions of posts regretting they chose mongo. It's absolutely not a decision someone should make without knowing what relational data even means. But that's very much a #databases subject

dry kelp
#

^^

wise mica
#

What even is there bot

dry kelp
wise mica
#

Like, what's it's goal

dry kelp
#

Which bot are you talking about?

wise mica
#

Pikachu's, that's the bot we were talking about, no?

dry kelp
#

Oh, he doesn't seem to be among us anymore

#

🤣

unreal owl
#
@commands.Cog.listener()
    async def on_message(self, msg):
        print("message received")

Anyone got an Idea why msg is always empty?

wanton current
#

do u have message content intent

unreal owl
#

good call, will check now

fast osprey
#

Your code doesnt even check the content

unreal owl
# fast osprey Your code doesnt even check the content
@commands.Cog.listener()
    async def on_message(self, msg):
        print("message received")
        # Ignore messages from bots, DMs, empty messages, or very short messages
        if msg.author.bot:
            print("Message is from a bot")
            return
        if not msg.guild:
            print("Message is a DM")
            return
        if not msg.content:
            print("Message content is empty")
            return
        if len(msg.content) < 3:
            print(f"Message too short: '{msg.content}'")
            return
fast osprey
#

🤨

unreal owl
unreal owl
fast osprey
#

What is this code trying to accomplish, this just does some prints

unreal owl
#

Yeah, dont wanna post the whole code... My question is about the content being empty nothing else, so I dont see a reason to flood this channel with unnecessary code

#

Fixed the problem tho

fast osprey
#

If you're unwilling to even describe what you're trying to do with peoples' messages, that's not a good look

unreal owl
#

Yeah... But my problem was that the content was empty and nothing else...

#

I dont get that point tbh

wanton current
#

!intents

unkempt canyonBOT
#
Using intents in discord.py

Intents are a feature of Discord that tells the gateway exactly which events to send your bot. Various features of discord.py rely on having particular intents enabled, further detailed in its documentation. Since discord.py v2.0.0, it has become mandatory for developers to explicitly define the values of these intents in their code.

There are standard and privileged intents. To use privileged intents like Presences, Server Members, and Message Content, you have to first enable them in the Discord Developer Portal. In there, go to the Bot page of your application, scroll down to the Privileged Gateway Intents section, and enable the privileged intents that you need. Standard intents can be used without any changes in the developer portal.

Afterwards in your code, you need to set the intents you want to connect with in the bot's constructor using the intents keyword argument, like this:

from discord import Intents
from discord.ext import commands

# Enable all standard intents and message content
# (prefix commands generally require message content)
intents = Intents.default()
intents.message_content = True

bot = commands.Bot(command_prefix="!", intents=intents)

For more info about using intents, see discord.py's related guide, and for general information about them, see the Discord developer documentation on intents.

fast osprey
#

The point is that if you're asking a question for the purpose of building something you're not even willing to talk about, that's problematic

#

And people might want to be aware of that before helping

dry kelp
dry kelp
dry kelp
#

please annotate your codes!

dry kelp
# unreal owl Yeah, dont wanna post the whole code... My question is about the content being e...

First of all, in that code you're doing LOTS of early returns, this could be simplified much more just by doing a if elif minigame yk? Besides, you're expecting the msg from on_message, PLEASE add the annotation to msg, as Message from your library, and since you're expecting to get the content, right, print(msg.content) should do the job, it's either you never loaded the Cog with this event, or you never Enabled the message_content intent on the bot, discord dev portal, and using it to wherever you define your bot in the baseclass, ALSO consider if you verified your bot, which can be quite easily done now, you need approval from discord to receive that intent with a valid reason + demonstration.

quick gust
#

they already fixed the problem lemon_smug

last cradle
#

how to determine if a user has a banner set and if they bave a custom emoji in there status and bio

south shell
#

user = await bot.fetch_user(user.id)
banner_url = user.banner.url

#

and for the bio you can't without acting liek a real user, and using user api

fast osprey
#

Which is against tos

south shell
#

Yes forgot to add this xD

#

Still dont know why they allow bot token to do request like this, and same for discord account doing bot stuff

fast osprey
#

they don't allow it

slate swan
#

Because otherwise you wouldn't be able to use discord? And there would be only bots?

#

@stone dust selfbot

south shell
#

Just vlocking bot token on user request, and blocking user token on bot request wont be that hard

fast osprey
#

They do

#

not sure what you're on about

slate swan
#

There's not a separate API for that

#

There are restrictions where bots can't use endpoints like users, hence why the bio of users is not retrievable as a bot, the other way around wouldn't be possible, otherwise you, as a user, wouldn't be able to use discord at all

dry kelp
#

it's such a pain in the ass, i aint even gonna lie

last cradle
#

hm

#

im jst tryna find a work around for displaying if user has nitro

hearty basalt
fast osprey
#

discord won't tell this to you by design. Anything else mentioned is a guess

#

people can see if someone has nitro anyways already

wanton current
#

no!

#

i need a bot to tell me

stark ingot
#

You can buy standalone boosts tho
You can also just not set a banner/pfp even if you have nitro

shadow vigil
stark ingot
#

I can buy a boost and apply it to a server without having nitro
If I have nitro I can also choose not to set a custom banner or set a per server profile picture

shadow vigil
#

ah okay

fast osprey
#

Looking for people doing nitro things gives false positives and false negatives on whether or not they actually have nitro. It's not a particularly meaningful thing to worry about anyways

timber dragon
slate swan
#

there are single boost plans

timber dragon
#

Ah it says "Nitro + xxx" when you have nitro

timber dragon
#

Couple of reliable ways:

  • animated avatar
  • custom emoji in status
  • has sent animated emoji or an emoji outside guild this month
  • has sent sticker from outside guild this month
quick gust
#

Its not reliable if it's not guaranteed to not give false negatives/positives

#

Plus it's really not worth all that work to actually code something like that when

  1. It can give false negatives
  2. I can just open your profile to see if you have nitro
timber dragon
#

Reliable as in if the user has nitro, it should be true

#

And 2 isn't relevant here

slate swan
stark ingot
#

The last 2 will result in false positives because you don't know if they sent it on the first day or last day of nitro

#

Also for number 2, does discord clear your status when nitro runs out?

slate swan
#

They should all be checked together

quick gust
#

I still don't see how that's gonna get you accurate results
People don't always have an animated profile picture or have an emoji in their bio even if they have nitro

#

You're only making guesses

fast osprey
#

It's a bit of a moot point, people really don't need to know this at all in the first place. They'll probably accept whatever guesses they need to because it makes their carbon copy user info command look cooler

slate swan
fast osprey
#

Not sure what the use case is for "this user might have nitro, we just guessed" when someone can literally get a 100% answer in one click

slate swan
#

yeah, just like most commands in bots are useless; e.g. userinfo, ban, mute, kick, timeout/mute, etc.

#

People like to have them, we offer ways to deliver

quick gust
drifting arrow
#

Uhh

unkempt trellis
#

I have been learning python for the last two weeks and would like to learn to do discord bots using discord-y, would y’all recommend it and how could I start learning?

drifting arrow
#

I usually pair those commands up with other actions, is why I have them

#

Also it's great to force people to put a reason

stark ingot
#

Wolfy Was Banned Reason:sijgisuch to bad that this probably happens

stark ingot
# unkempt trellis I have been learning python for the last two weeks and would like to learn to do...

Whatever you do please do not follow YouTube or online tutorials that are not specially recommended by the library you use. I went through the top 10 Google results for discord bots and not a single one was up to date. I personally do not recommend discord.py but I am biased. You can find a list of all of the major libraries here https://libs.advaith.io/#python

dry kelp
#

first of all, if you wwnt a prefixable bot, use d.py, if you want an interaction bot having / commands, definitely choose disnake

drifting arrow
dry kelp
sick birch
#

you don’t have to be rude about it

dry kelp
wise mica
dry kelp
#

but it wasnt said in any rude ways

sick birch
#

disagree with choosing disnake for app commands though, discordpy will be fine for the most part

wise mica
#

But also ban command allows additional functionality like being able to ban someone not in the server

dry kelp
#

why would someone waste time learning to do all that stupid tree as @app.tree groups and whatever they have

sick birch
drifting arrow
dry kelp
#

It's a high visible difference between how d.py and disnake manage interaction commands.

quick gust
sick birch
#

and yes, I am aware that the interface is simpler

quick gust
#

But if your goal is to learn, you shouldn't go for the simple things imo

dry kelp
#

On d.py you need to follow a logic tree as @app. etc. using disnake, has much easier ways to handle commands, in the attached screenshot is a code of mine, showing HOW SIMPLE the interaction commands can be used and managed

#

With a MUCH more friendly interface faced to d.py

stark ingot
sick birch
#

when does disnake sync with discord?

dry kelp
stark ingot
#

^ by default, you can change it if you want

dry kelp
#

u js ctrl + r your discord lol

#

d.py requires you to sync commands

#

another -

tender bobcat
# dry kelp another -

Sorry, can I not prefer manual sync? I don't like the argument of one interface is better than another than another when it's personal preference

dry kelp
#

So they basically are life savers, and you expect to make an interaction bot, without syncing the commands you do, why even making a bot?

#

If you don't want your commands to be on discord, then don't code it 🤷‍♂️

tender bobcat
#

Well, I don't like how you say one thing is better than another, and insult the other who disagree

sick birch
#

yeah personally i prefer explicit by default but i guess for someone new making a discord bot they don’t really care about it

dry kelp
stark ingot
#

You can prefer all you want, but the user was asking for recommendations and likely has no preferences as of now. If they have strong preferences they can choose the library they want

dry kelp
#

I only came with an example why disnake it's better than d.py for interaction commands.

sick birch
#

it’s better according to you, subjectively. It depends on what the user is looking for in a framework

dry kelp
#

Clearly preferences, but don't say stuff as this:

disagree with choosing disnake for app commands though, discordpy will be fine for the most part

Because it can affect a beginner choice

sick birch
dry kelp
sick birch
dry kelp
#

hostile != insult

dry kelp
dry kelp
#

And this is basis sense, why wouldn't u want ur commands to auto sync??? That makes no sense for me.

sick birch
#

because some people want control and some people don’t care

dry kelp
#

Why wasting lines to sync them yourself 🤣

sick birch
#

it’s situational

dry kelp
#

various options

stark ingot
sick birch
#

most of these libraries have the same feature parity so it just comes down to preference