#discord-bots

1 messages · Page 427 of 1

gritty inlet
#

That's a different issue
Could be in Program Files or in AppData/Local/Programs

#

that's not related

nimble kindle
gritty inlet
#

check bottom right to see if vscode is set on the right Python instance

nimble kindle
#

python 3.14.4

gritty inlet
#

and does pip surely install for 3.14? could be conflicting with another version maybe?

#

on ur machine

#

and make sure you installed primp if you haven't

nimble kindle
#

so just pip install everything now?

gritty inlet
#

yes

gloomy hollow
#

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

whole shoal
#

The startup ram went from 475 MB to 269 MB, safe enough for sharding right

velvet swan
#

When I start typing a slash command (for example,/warn @user reason) and then switch to another channel before finishing, the partially entered command gets lost when I return, so I have to start over. I tried the modal approach, but that’s not what I want.

fast osprey
#

If it's a discord limitation with how the client behaves, it's not like code you write can fix it. Why would you need to switch channels?

velvet swan
fast osprey
#

I don't know what you're expecting here. There's not a "remember this parameter" flag when you declare a command

celest pelican
fast osprey
#

Just testing on mobile my typed slash command stays after switching back and forth

#

Even when switching between servers entirely too

fast osprey
celest pelican
fast osprey
#

Are you on mobile?

velvet swan
#

On PC.

fast osprey
#

Either way this sounds like a client issue and isn't a code/bot issue

#

Might be your client version or could just be an existing bug

quick gust
velvet swan
fast osprey
#

Can you describe in detail what you're doing and seeing step by step?

quick gust
#

Well, we can't help you here then

This isn't a code issue

#

Unless solstice wants to help you figure it out ofc ^^

velvet swan
#

The bot was using global sync for slash commands, so I switched the bot to server-only sync after clearing the existing synced commands globally.

unkempt canyonBOT
#
Print and return

Here's a handy animation demonstrating how print and return differ in behavior.

See also: /tag return

plain flame
#

Hello

plucky fjord
#

anyone alive here

north kiln
#

No

smoky sable
#

Yo

fast osprey
remote yacht
#

yes

fading oracle
#

I made a discord bot

whole sparrow
#

huge

fading oracle
#

Wanna test? 💖

fast osprey
#

If test here means functional testing to see if the bot does what you think it should, that's something you can very quickly do yourself.

If test here means using it as intended and giving feedback, you will get better feedback from targetting communities who would actually use your bot more than the collection of random developers (who probably wouldn't actually use your bot)

idle wind
#

Hey can someone help me with making a Discord Seller bot

fast osprey
#

Selling what, exactly?

rare lintel
#

why are old slash commands not being removed from my test guild?

#

they still persist even though they don't exist anymore

fast osprey
#

What library are you using?

#

If it's discord.py, the library won't update commands for you. You have to sync, and it's quite possible you synced guild-scoped commands but did not sync on that guild again later once you had removed them from your code

rare lintel
fast osprey
#

Then yeah, you'll want to try syncing on that guild again

stoic minnow
#

simple fix

rare lintel
solid grove
#

Look in my bio 🫣

fast osprey
#

Nah im good

grave sandal
patent lark
#

Anyone know why i get this error when my bot joins a voice channel? The bot will reconnect over and over.

gleaming inlet
gleaming inlet
unkempt canyonBOT
patent lark
#

yikes

gleaming inlet
#

The latest is 2.7.1

patent lark
gleaming inlet
gleaming inlet
patent lark
#

I was running the version that had the issue, upgrading my version fixed it.

woeful hill
#

There was not a bug, discordpy 2.7 added support for dave which discord enforced

timber dragon
#

Nah that's 4017 iirc

#

4006 was the different voice urls thing

north kiln
#

what's dave

#

oh

drifting thunder
stoic minnow
#

otherwise get better latency

#

💀

rare lintel
finite salmon
#

bros on to nothing

white hollow
#

who is good at coding and making stuff

fast osprey
#

You, with enough effort and resources 🙂

twin vigil
urban prism
woeful hill
unkempt canyonBOT
#
Resources

The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.

twin vigil
fast osprey
#

Don't trust randos herding you into dms when they can very well answer questions where everyone else can chime in

twin vigil
#

Bro hey

#

Why would i use the public chat?

#

He wants to learn python

#

Or coding something

fast osprey
#

Because others can correct you if/when you're wrong

twin vigil
#

Believe me, I have several discord bots etc. I'm not going to be wrong

fast osprey
#

Right, the "just trust me bro" approach

#

I've seen the creators of discord libraries get things wrong from time to time. You're human

twin vigil
#

So? I made discord bots for several bigger and smaller Mc servers. They was all good with it and happy. I don't think I would fail doing a discord bot / teaching how to do.

fast osprey
#

You're welcome to think you're infallible and never wrong but that's just not realistic. They also lose absolutely nothing from asking questions in a public forum that encourages them to do so

twin vigil
#

I didn't said I could be never wrong, just don't think I would be wrong after doing discord bots for 9 years now.

fast osprey
#

The implication was "never wrong in the topic you're claiming to never be wrong in"

twin vigil
#

How long did you work in python?

quick gust
twin vigil
fast osprey
#

This isn't about me, I'm not claiming to be a sole source of truth

#

I get things wrong and like having people to fact check me so both me and the person I'm helping can learn

twin vigil
radiant shuttle
#

any trick to align this in container v2?

fast osprey
#

cv2 doesnt have justification. You either have to live with that, make v1 embeds, or generate an image

velvet swan
#

If you’re running multiple Discord bots, is it better to containerize each bot in its own Docker container and manage them with Docker Compose?

fast osprey
#

It depends on what purposes those individual bots serve

velvet swan
#

They serve different purposes, such as moderation, utilities, and study for the same server.

fast osprey
#

Docker is fine but might be overkill for what you're doing. Containerization is a good skill to learn but not strictly necessary for what you're doing

#

#tools-and-devops might be a better place for more nuanced opinions, as the fact you're running a discord bot inside of a container doesnt really impact the nature of the container or orchestration layer

velvet swan
#

My goal is to learn and write code that will be easy for someone else to understand and work on easily in the future.

#

Tysm, for opinion, though!

fast osprey
#

If the bots are truly independent you could just make dockerfiles for each of them

velvet swan
#

Yeah, they’re.

nova anchor
#

Looking for experienced and motivated bot developers to help contribute with a project

timber dragon
#

!rule 9

unkempt canyonBOT
#

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

unreal summit
timber dragon
#

True

#

I thought it was still relevant without the "paid" part

delicate flax
#

Hy, is the discord "apply to join" feature supported by discord.py?

fast osprey
#

It's not supported by the api at all, it's specifically meant for human moderators afaik

delicate flax
#

Hmm ok thank you

stark ingot
#

It's undocumented so it won't be supported by most libraries. But you get an event containing the submission info when the user submits. However approval/denial is still locked to non bot users

urban prism
velvet swan
#

I need an opinion on whether this would be sufficient for running three bots.

stark ingot
#

It really depends on what the bots do, how many servers they are in, and how well you have optimized their performance (in terms of events and caching)

velvet swan
#

Only one server, for context, moderation, tickets/modmail, and study-related. I know it's quite vague as I didn't say what features the bots have.

stark ingot
#

TBH that should be enough for one server, but you could profile them to be sure, and start with that and upgrade if needed

velvet swan
#

Tysm, Ice. That would be an ideal approach I feel like.

sick birch
loud patrol
fast osprey
#

Definitely do not need to request every intent, for starters. It's hard to do a full code review with the readme not in english and the project structure a bit sprawling

loud patrol
fast osprey
#

Seems pretty well structured though. Any particular reason for using redis and postgres instead of just a sqlite db?

loud patrol
fast osprey
#

"better" how?

#

If it's one process running on one machine, a distributed cache (redis) and a client-server db (postgres) are pretty unnecessary

loud patrol
#

I think "comfort stack" is enough to chose, someone suggested me to use cockroach db and that's overkill on overkill.

Redis never used here, I removed part where redis was used, but I have some ideas where redis probably needed.

fast osprey
#

Well you asked for feedback so there it is 😂 . Worth considering tools better suited for the specific problem over things you're comfortable with when you solved different problems

loud patrol
#

Tools partially explained in README, I just went with my comfort stack. And the feedback I'm looking for isn't only about tooling, more about code review, architecture, anything you noticed

fast osprey
#

I mean if you're going to brush off legitimate feedback as just saying you prefer something else, I'm not sure what other feedback is going to be fruitful

loud patrol
fast osprey
#

More isn't the same as better when you don't need those features to solve the problem at hand. But I think the db choice has been discussed enough

loud patrol
#

I understand that

loud patrol
glad cradle
#

the filenames are in general pretty long

loud patrol
vapid parcel
#

!paste

unkempt canyonBOT
#
Pasting large amounts of code

So that everyone can easily read your code, you can paste it in this website:
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.

gritty inlet
#

I'm sure it's possible to really minimize that

#

And why is there a whole file just for a base ✌🏻

woeful hill
#

looks like normal java codebase to me

grave sandal
# loud patrol Tools partially explained in README, I just went with my comfort stack. And the ...

You're not exactly doing clean architecture as your readme says. Your entities/domain is filled with persistence concerns. You look like you're going in the right direction but to be blunt it feels like you're forcing a file structure with it. Should you really have to go to a separate file just to update the fields of a result object?

You're running the risk of structuring your project not what is best to navigate for other developers but based on rigid rules of an architecture.

https://github.com/MagM1go/marionette/tree/main/src/marionette/application/dto

GitHub

Бот-движок для ролевой платформы по мотивам японского шоу-бизнеса, вдохновлённой "Oshi no Ko". - MagM1go/marionette

loud patrol
# grave sandal You're not exactly doing clean architecture as your readme says. Your entities/d...

yeah, readme says it's not "100% clean arch", it explicitly mentions where it steps aside, mostly to avoid boilerplate from mapping orm models to domain models and back.

and fair point on the DTOs, they're probably taking up more space than they deserve. each one is used by a single usecase and not shared, so moving them next to the usecase that returns them makes sense (if I understand you correctly)

grave sandal
#

I can't follow the code that is there or get an idea of what is going on or being dealt with very easily but for development and working with it even though it has some violations I think you structured application and domain (directory structure and filename wise really well).

#

The infrastructure directory is more scattered than necessary imo. And the protocols directory under application isn't intuitive. If character protocol is actually a character repository and the other thing is a manager it would be better to name them that because that'll be what's being looked for, i.e. if you know almost any of these architectures is being used, look for the repositories.

#

The infrastructure directory has a directory for the repositories, which transactions go with, but transactions are in a different directory. It would probably make more sense to just have the repository files at the root of the database directory.

loud patrol
grave sandal
#

You should also consider taking more advantage of the use case pattern. You get to do what you normally don't, name classes with verbs, representing an action a user can do or be taken for them. EntranceUseCase is vague imo. In general you wouldn't be able to do a class like BuyItem (different domain obviously) but you add BuyDomainUseCase you get a noun. Also consider adding more descriptive methods than just execute.
https://github.com/MagM1go/marionette/blob/main/src/marionette/application/usecases/entrance_usecase.py

GitHub

Бот-движок для ролевой платформы по мотивам японского шоу-бизнеса, вдохновлённой "Oshi no Ko". - MagM1go/marionette

loud patrol
grave sandal
#

Layering doesn't cause that. You could have everything in a single file and have logical layers so that stuff can change independently, but with any project you break it down to make it easier to deal with. In your case the database/entities/business logic is independent of presentation logic and to a limited but probably more complicated to change extent your use cases independent of the database (you could technically remove all the database code from the entities and use something different in the future). Context is hard when you structure around technical concerns rather than developer experience. Some of your project structure I think is really good and your effort is better than MANY others. But you sound like you're making the mistake of letting the architecture dictate your project structure, which that probably is best in some places but not others, you have to be pragmatic about it.

loud patrol
# grave sandal The infrastructure directory is more scattered than necessary imo. And the proto...

Maybe a bit scattered, true. Historical context: there used to be a redis repository alongside the sql ones, that's why repositories/ was a separate sibling to database/. Redis is gone for now (probably will come back later for some cases), so right now the split is harder to justify. Either flatten now and re-split when other repo types come back, or keep it anticipating that. Leaning towards flattening for now actually.
About protocols — yeah, I've been told this before. Ironic since I argued ubiquitous language to snipy earlier in this thread, and character_protocol.py is exactly what that argument is supposed to prevent. Naming after the role (repository, manager) makes more sense.

grave sandal
loud patrol
loud patrol
gritty inlet
#

Right now it's more hard to find stuff than it is easy, imo

fast osprey
#

Yeah to be honest I found it hard to really get into reviewing this. It feels very overengineered for a single dev on a single server, like following design patterns dogmatically when you aren't even running into the problems those patterns were made to address

misty torrent
#

Hi I am new person

#

Hello there

misty torrent
#

I am beginner

loud patrol
#

cool

maiden jungle
desert frost
#

Hey guys, I created my own script that retrieves device data and displays it to the user. I'd like to send this collected data to a Discord webhook. Is that possible? In python

fast osprey
#

Yup

#

webhooks are just a rest endpoint you can post whatever data you want to (in the right format). There's also a bunch of libraries that make that easier

fast osprey
unkempt canyonBOT
#
Cooldowns in discord.py

Cooldowns can be used in discord.py to rate-limit. In this example, we're using it in an on_message.

from discord.ext import commands

message_cooldown = commands.CooldownMapping.from_cooldown(1.0, 60.0, commands.BucketType.user)

@bot.event
async def on_message(message):
    bucket = message_cooldown.get_bucket(message)
    retry_after = bucket.update_rate_limit()
    if retry_after:
        await message.channel.send(f"Slow down! Try again in {retry_after} seconds.")
    else:
        await message.channel.send("Not ratelimited!")

from_cooldown takes the amount of update_rate_limit()s needed to trigger the cooldown, the time in which the cooldown is triggered, and a BucketType.

gritty inlet
#

Making my own API spec unpacker cuz I'm bored

timber dragon
#

Nice

slate swan
#

THIS channel has a slowmode?????

grim valve
#

How would I make a bot that spams messages?

full ether
#

why would you want to do that

scarlet tiger
unkempt canyonBOT
#

5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.

unreal summit
unkempt canyonBOT
#

5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.

loud patrol
unkempt canyonBOT
#

5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.

celest pelican
#

Could y'all not, please? One invocation is enough

grim valve
#

My bad

abstract river
#

any guides I could find to learn coding a discord bot?

stark ingot
#

Use only guides that are officially recommended by the library you use. 3rd party guides are generally poor quality.

#

Pick one of these or ask in the library you use support server.
Pycord: https://guide.pycord.dev/introduction
Disnake: https://guide.disnake.dev/
Nextcord: https://docs.nextcord.dev/en/stable/#getting-started and disnakes guide has portions for nextcord as well I think
Discord.py: https://discordpy.readthedocs.io/en/stable/#getting-started or this one that some people like some people don't https://fallendeity.github.io/discord.py-masterclass/
Hikari: https://docs.hikari-py.dev/en/stable/ not sure if they have more of a guide
Hata: https://github.com/HuyaneMatsu/hata not really sure the best place to start for this

celest pelican
#

@fading oracle This is not a meme channel.

fading oracle
#

Where is meme channel

celest pelican
velvet swan
#

I have a question about whether it is more practical to store a bot token in a .env file or in Docker Secrets with Swarm. 621487monkeythink

fast osprey
#

Probably more of a question for #tools-and-devops , secrets aren't a bot specific concept

past rose
#

​Hi all! I’m interested in making my own bot but I’m a total beginner.Does anyone have experience in this and feel like mentoring/walking me through the initial setup? Any help would be awesome! 🙏

stark ingot
#

The first step is to ensure that you have a basic understanding of python fundamentals including classes/objects.
The next step is to choose a library (or use the raw API but that is not recommended for beginners). There is a list of popular libraries on this site: https://libs.advaith.io/#python
Additionally, dont use youtube tutorials or random 3rd party tutorials online. They are often outdated and use bad practices.

split briar
#

!e

unkempt canyonBOT
#
Missing required argument

code

grim delta
stark ingot
#

Classes are pretty essential if you are using a discord bot library.

#

Almost all data that you get from the library will be an object of a class

gritty inlet
#

Everything is an object of a class Clueless

grim delta
#

Fair enough! I believe I’ve done it before without a class but doing it with is probably better 🙂

fast osprey
#

The joke is that you're using classes whether or not you yourself are making new ones

smoky sinew
#

what is the most popular library that is not based off discord.py?

sick birch
#

hikari probably

smoky sinew
#

are there others?

sick birch
#

none that are popular

stark ingot
#

Hata

timber dragon
timber dragon
#

Everything

woeful hill
gritty inlet
#

If you could either have more control over cache or be able to use the library at its "core" level that would be nice

finite salmon
#

yeah thats tru

fast osprey
#

What layer of control do you feel would be useful that you don't have?

novel skiff
novel skiff
gritty inlet
#

Lemme check again without modules tho

#

The smallest it gets (requires using only necessary libraries and modules) is 60 MB

#

But it's not only about the bot process - looks like the library itself weighs a bunch (pre and post import in image)
But for this I cannot blame them at all, that's just usual Python stuff

fast osprey
gritty inlet
#

Well now I'm unsure as I see most of the weight is the whole library

celest pelican
#

!clban 1489292592301609096 some kind of scam

unkempt canyonBOT
#

:incoming_envelope: :ok_hand: applied ban to @edgy wraith permanently.

velvet swan
#

What are possible options for storing ModMail/Tickets’ transcripts besides saving them as HTML files, and plain texts? For context, the bot isn't large or used across multiple servers.

fast osprey
#

Just use threads in discord

rugged shadow
#

or forum channels

fast osprey
#

Forums are just threads under the hood, and they're forced to all be public threads. They're great and easy to use though if you're fine with things being public

stark ingot
delicate mason
nimble kindle
#

sad this channel died i use to ask for help all the time now i understand py a lot more

#

AI ruined it

fast osprey
#

People can still ask questions if they have them though Thonk

torpid cedar
#

@oak blade helloooo

oak blade
torpid cedar
#

Just dnr it

oak blade
#

Ok

tawny canyon
#

i made a discord auto server maker bot who wanna buy it

fast osprey
#

Might want to double check the rules here

wet compass
#

fr💀

timber dragon
#

Just casually promoting a tool that breaks the tos and exactly why the endpoint was restricted

young dagger
#

What would be the best approach to track voice channel status changes?

#

Run a task that fetches audit logs every now and then or is there a better way?

fast osprey
#

iirc they're phasing out that feature anyways, nobody really uses it

young dagger
fast osprey
#

on_guild_channel_update

obsidian void
#

It was for some time not documented due to its future not being known, got documented now that it's staying

fast osprey
#

oh good to know prettythumbsup

young dagger
stark ingot
#

The doc linked by krypton lists the gateway events

fast osprey
#

ah there's a separate event yeah

young dagger
woeful hill
#

They send you the data

#

It's an event, just like on_member_update when someone updates their profile, or other events

fast osprey
#

might not be implemented in dpy

timber dragon
#

Not at all

twin vault
timber dragon
#

Another tos breaking tool!

winter venture
#

No one enforcing tos

timber dragon
#

True but that doesn't mean you shouldn't

twin vault
timber dragon
#

Why would it not work

twin vault
#

This is the first time seeing it work

timber dragon
#

It working doesn't means you aren't risking your account by breaking the tos

twin vault
tawny canyon
fast osprey
#

Readily available llms made by billion dollar corporations can't tell you how many r's are in the word strawberry. Interpreting human language to do something as complex as design a server is laughable

tawny canyon
twin vault
amber dirge
#

.w

winter rain
#

yo can someone help me on how to code something

fast osprey
#

What are you having trouble with?

winter rain
fast osprey
#

there used to be a supported endpoint for bots to make guilds

sly raven
#

Hello

untold hedge
#

Hey

timber dragon
#

Bye

unreal summit
#

morning

#

Is someone considered a developer if they use AI to code ❔ 🤔

obsidian void
#

channel made specifically to discuss that

unreal summit
#

oh lol

stark ingot
#

Is someone considered a chef if they only order takeout?

timber dragon
#

Mehh

strong crescent
#

jhkjh

fading oracle
#

Uh py don't allows emojies in footer right?

slate swan
#

get 200$ just to turn off websites

stark bobcat
#

Bro what

#

Mods

#

Ping

stoic stream
#

depends on the maintainer, no one can say for sure

fast musk
#

discord.js Danny credits to having implemented slash commands. But who knows about the maintainer

slate swan
#

@stark bobcat go ahead

fast musk
#

I'm sure they all talk and Danny taking the first step will lead to others

stark bobcat
#

I gave u challange

fast musk
#

wtf is Heck?

hardy yoke
stark bobcat
#

Hack

slate swan
#

so probably not

fast musk
#

Oh, its Hack mispelled?

stark bobcat
#

Yep

#

A slang or smth

fast musk
#

ah. Ok. That totally doesn't make sense

stoic stream
#

i just hope discord dont end up removing access to message_content just for the sake of slash commands

stark bobcat
#

Sadness

vale pendant
stark bobcat
#

LMAO

#

Hahahahah

trim barn
#

so anyways, back to my question, how do I get my bot to do something at a specific time during a specific day

vale pendant
#

Seems like a skid to me.

stark bobcat
#

Yes

fast musk
#

Discord is either bound by some lind of regulation, or they are really trying to get ahead of the Privacy thing

#

either way, they aren't going to divert

#

If they do, I'll be shocked

light night
#

I know one guy who has already made his own discord.py fork awhile ago so yeah

visual island
trim barn
#

i

stark bobcat
trim barn
#

im guessing d,py will likely just become decentralized

light night
fast musk
stark bobcat
light night
#

but I am trying right now

stark bobcat
light night
#

to try to get as many as people as possible

#

to find a good fork or make one

undone wyvern
vale pendant
forest vortex
stark bobcat
undone wyvern
#

A big part of why discord.py is no longer going to be a thing is because discord didnt care about discord.py's dev

forest vortex
#

idk how much discord gets out of their bots

undone wyvern
#

Or any lib dev for that

forest vortex
#

true

slate swan
#

tinkering with JDA and serenity

#

not sure what i'm gonna go with

boreal ravine
#

jda is java right

forest vortex
#

idk why they are updated with java

slate swan
#

yes

pliant gulch
#

Serenity

light night
forest vortex
#

good luck

slate swan
#

i'd much rather learn rust from 0 than use the small java knowledge i have

pliant gulch
#

Java lmao

fast musk
#

Join Elixir with me

#

or hell, Kotlin. hahahaha

slate swan
#

i'm not sure serenity is reliable regardless

pliant gulch
#

Learn rust def, very amazing documentation

slate swan
#

yeah i'm willing to learn rust

pliant gulch
#

Cargo is amazing as well

#

Very good at managing projects

stoic stream
#

idm learning kotlin 👀 planning to get into android dev anyways

stark bobcat
#

Prolly move on to discord.js

forest vortex
#

whats serenity?

fast musk
#

looks like a Rust framework

pliant gulch
#

Its a discord API wrapper made in rust

#

And iirc they have a commands extension as well

prisma wedge
#
      await message.channel.send('Pls stop')
   await client.process_commands(message)```
#

whats the correct indentation for this

stoic stream
#

this is overwriting the on_message event handler right

forest vortex
#
if message.content.startswith('no thanks'):
      await message.channel.send('Pls stop')
await client.process_commands(message)```
forest vortex
#

the only thing i was good at was d.py 😂

prisma wedge
#

thanks

#
    await message.channel.send('Pls stop')
    ^
SyntaxError: 'await' outside function
 ```
#

error

slate swan
#
    @commands.Cog.listener()
    async def on_member_join(member):
      if '🔪' not in member.nick:
        member.nick=member.nick+'🔪'
#

i m getting an error

light night
gilded kite
forest vortex
#

damn this guy left

vale pendant
#

Is golang worth learning for discord bots?

maiden fable
forest vortex
#

damn

#

btw whats golang even used for

visual island
#

soo... dpy will be gone forever?

forest vortex
steep estuary
#

how to make restricted emojis :/

forest vortex
#

custom emojis

#

ig

#

or idk

visual island
forest vortex
#

same feeling

pliant gulch
steep estuary
visual island
pliant gulch
#

No its not?

#

Discord.py being gone would mean deleting the repo lmao

visual island
#

it won't be compatible with discord in the future right?

pliant gulch
#

In the future discord could drop support for api version

forest vortex
#

would be vunlerable for hack right?

pliant gulch
#

dropping support wouldn't mean you can't use it still

steep estuary
#

:/ any answer?

forest vortex
#

idk if its worth making bots again

stoic stream
visual island
steep estuary
#

like if someone use this 🍬 then my bot should delete it :/

forest vortex
#

so we just wait :/

pliant gulch
forest vortex
steep estuary
#

(-_-)

forest vortex
steep estuary
#

but how i can specify the emoji :/

#

idk how to do that

forest vortex
#

: joy => 😂

#

so : candy => 🍬

steep estuary
#

:/

#

but it is not taking it like emoji

forest vortex
#

if :candy in msg.content:
msg.delete()

#

:candy:

prisma wedge
#
async def on_message(message):
   if message.content.startswith('no thanks'):
        await message.channel.send('Pls stop')
   await client.process_commands(message)```
steep estuary
#

if i will write :joy: it will take it like string only not like -> 😂

prisma wedge
#

someone tell me why this doesn't work

steep estuary
#

use this

prisma wedge
#

r u sure

steep estuary
#

try once :/

prisma wedge
#

still no

#
async def on_message(message):
    if message.content == "cookie":
        await message.channel.send("🍪")
    await client.process_commands(message)```
#

i have this command, which works

prisma wedge
#

just doesnt work

steep estuary
#

wait

#

as my experience @client.event is global

#

change it to @client.listen()

prisma wedge
#

it works^^

forest vortex
#
@client.event
async def on_message(message):
    if message.content.find("cookie") != -1:
        await message.channel.send("🍪")
    await client.process_commands(message)```
#

try this

steep estuary
#

:/

#

i think this one is working?

forest vortex
#

which one ?

steep estuary
steep estuary
prisma wedge
#

i was giving an example

steep estuary
#

i think u should have @client.event only in on_ready()

forest vortex
#

what u want then ?

steep estuary
#

@prisma wedge try changing that to @client.listen() once :/

steep estuary
#

i also got same issue one time

prisma wedge
steep estuary
#

:/

prisma wedge
#

lol

steep estuary
#

np

#

(:

#

oops

#
@bot.listen()
async def on_message(message):
    if ":joy:" in message.content.lower():
        await message.delete()
        await message.channel.send(f":exclamation: The Emoji you are using is Not Allowed, {message.author.mention}")
```not working :/
prisma wedge
#

error?

steep estuary
#

yes

prisma wedge
#

error?

steep estuary
#

no

prisma wedge
#

hm

steep estuary
#

i guess

#

it will take :joy:

#

not emoji

#

:/

prisma wedge
#

ok emoji isnt coming?

steep estuary
#

coming

prisma wedge
#

huh

steep estuary
#

that's why it is doing nothing

#

😂

#

it is not identifing this

prisma wedge
#

😂

#

copy and paate that

#

instead of joy

steep estuary
#

i think it will take this

#
if ":joy:" in message.content.lower():
lament mesa
steep estuary
#

there i wrote :joy:

stoic stream
#

why not u print message.content when u send a emoji

visual island
#

sadly

stoic stream
#

and see what is joy inside content

#

rather than guessing it

lament mesa
visual island
untold token
#

I had so many memories with discord.py and it was truly something, RIP

fickle turret
arctic vapor
hoary gust
#

So dpy is going to end right?

hoary yacht
#

!d any

unkempt canyonBOT
#
any

any(iterable)```
Return `True` if any element of the *iterable* is true. If the iterable is empty, return `False`. Equivalent to:

```py
def any(iterable):
    for element in iterable:
        if element:
            return True
    return False
lament mesa
fickle turret
#

I'll most probably try serenity again

harsh orchid
#

hello wanted to know if this is true

fickle turret
#

Yes it is, sadly

harsh orchid
#

:(

ocean dagger
#

can someone pin it

harsh orchid
#

will this channel be deleted?

fast musk
#

no, this is a generic channel, believe it or not

hoary gust
#

I don't want dpy to be closed 😭😭

maiden fable
#

@lament mesa u making a discord lib in Python or something?

hoary gust
#

Well why does it close?

#

@maiden fable

maiden fable
hoary gust
signal forge
#

yes

#

it's legit

#

not an elaborate prank

oblique herald
#

Hey guys im using the dagpi api , image filters but it aint working! ```py

Code:

@client.command()
async def pixel(ctx):
async with aiohttp.ClientSession() as cs:
headers={"Authorization": "mykey"}
async with cs.get(f'https://api.dagpi.xyz/image/pixel/?url={ctx.author.avatar_url}', headers=headers) as r:
res = io.BytesIO(r.read()) # returns dict
await ctx.send(res)
#Error:
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: a bytes-like object is required, not 'coroutine'

#

Ping me

neat salmon
#

Hopefully Matrix has a library similar to Discord.py

hoary gust
neat salmon
#

This really just goes to show that Discord is really anti-consumer.

hoary gust
#

Wdym?

neat salmon
# hoary gust Wdym?

By that I mean, yeah they have a popular service, but where will that go if they don't listen to their users or provide their users a good service?

#

We have to resort to using client mods to add features that have been demanded for a long time to Discord, which breaks the ToS, for example.

oblique herald
#

Can anyone help me pls

#

if possible

crude skiff
#

R.I.P

oblique herald
#

😭

crude skiff
oblique herald
#

WDYM

maiden fable
#

Hey hey hey @neat salmon please don't talk about breaking ToS here

crude skiff
#

yes

oblique herald
#

SO THERE IS NO DPY ANYMORE?!

maiden fable
crude skiff
maiden fable
#

Except the 2.0 one

neat salmon
slate swan
#

yall still sad bruh, yk you can always make your own wacky wrapper to fit your needs

neat salmon
#

pretty much a lot of client mod users

maiden fable
#

Uhh, well even if I want to make one, I wont be able to

slate swan
#

why

crystal kestrel
#

discordpy and disco are both dead now?

crude skiff
maiden fable
#

Reason- There are many wrappers like snekcord and hikari which already have a good name in the community

crystal kestrel
#

hmm

slate swan
#

that doesnt respond to "i wont be able to make one" but i guess they will take dpys place

oblique herald
#

So there is no more dpy/

#

?

slate swan
#

i am moving to discord.cpp anyways ig

maiden fable
slate swan
#

or whatever that is called

maiden fable
oblique herald
#

will dpy still work

#

can we still use it

crystal kestrel
slate swan
#

yea?

crude skiff
lunar ridge
#

yes

oblique herald
#

so can i still use

slate swan
#

good luck to yall

oblique herald
#

it

maiden fable
maiden fable
oblique herald
#

what will happen to the bots

crystal kestrel
maiden fable
oblique herald
#

like if any bots which used to work on dpy

crystal kestrel
#

oh no
hek

oblique herald
#

will they stop working

#

after that time

maiden fable
crude skiff
#

then which wrapper or module should we use to make discord bots in python.

maiden fable
#

!pypi hikari

unkempt canyonBOT
oblique herald
#

I WORKED FOR MONTHS ON MY DPY BOT 😭

maiden fable
crystal kestrel
maiden fable
#

Well I gotta do something of my AI API now

#

Idk what to use it for, now

oblique herald
crude skiff
crystal kestrel
#

carl-bot

crude skiff
oblique herald
#

and carl bot will stop working?

#

after april?

crude skiff
crystal kestrel
neat salmon
oblique herald
#

😭

maiden fable
#

Nah, they will possibly move to another wrapper

golden hamlet
#

anyone got the link to hikari

oblique herald
#

THIS IS SO STUPID OF THEM 😭

#

well lets say we make it into a keep alive

neat salmon
oblique herald
#

then will it work

#

even after

#

dpy stops?

crude skiff
#

hikari sucks

crystal kestrel
#

discord.py is maintained by 1 person and he isn't even a full-time programmer, he just works on discord.py in his free time

lunar ridge
#

yep

neat salmon
#

if i were you i'd probably just move on to matrix

#

it blows but.. it's the only idea i have in my mind

oblique herald
#

well we still have like 3/4 a year

#

or smth

#

imma use dpy

light night
#

well python's bot here will likely go down but

blazing beacon
#

!pypi matrix

unkempt canyonBOT
maiden fable
oblique herald
#

this is sad

light night
oblique herald
#

😭

maiden fable
#

!pypi hikari

unkempt canyonBOT
light night
#

I will gladly make a project in order to make one

crude skiff
stark bobcat
#

Where is the d.js server

blazing beacon
crystal kestrel
#

now i gotta re-make my entire verified bot in another language

crude skiff
oblique herald
stark bobcat
#

Thanks

crude skiff
#

lol

#

nice @oblique herald

oblique herald
#

YOU HAVE A VERIFIED BOT?!

crude skiff
light night
crude skiff
oblique herald
#

no

crystal kestrel
oblique herald
#

im still making it

oblique herald
light night
oblique herald
#

i will invite to my server

blazing beacon
crude skiff
#

I don't how to verify my one tho

light night
oblique herald
#

you guys are LEGENDS!

crystal kestrel
light night
#

I feel like the fact I help my own communtity of programmers with discord's api

#

is more impresssive lol

maiden fable
golden hamlet
#

how often does d.py api update

oblique herald
crystal kestrel
crude skiff
#

someone discord.py from Rapptz and update it please 😢

crystal kestrel
maiden fable
crude skiff
crisp meadow
#

verified bots are bae 😄

light night
crystal kestrel
#

i might re-make it in another language if discord.py has no activity in the next few weeks

light night
#

and learn it

crisp meadow
oblique herald
#

Ok well imma make the most of dpy

crude skiff
visual island
oblique herald
oblique herald
visual island
#

chill

oblique herald
maiden fable
#

Hi Kylee

#

Again pulling an all nighter?

visual island
#

nah, btw

maiden fable
#

Hm?

crude skiff
visual island
#

does sending an ephemeral message counts as 1 API call?

light night
oblique herald
light night
golden hamlet
#

does anyone know

maiden fable
#

Kylee is a master code and he can fork and maintain it :D

light night
#

and knows what they are doing

#

I will gladly check it out if they do something(anyway I am going to check out my programming guild)

oblique herald
#

what abt one of the owner

#

owners of py

crystal kestrel
oblique herald
#

py

crude skiff
light night
oblique herald
#

like they would know how to handle it very well right

maiden fable
light night
maiden fable
maiden fable
#

No don't

light night
oblique herald
maiden fable
light night
crystal kestrel
#

sad

oblique herald
oblique herald
#

lol

#

i got banned from dpy

crystal kestrel
#

lol

maiden fable
crude skiff
maiden fable
#

He just doesn't wanna accept it

slate swan
#
@bot.command()
@commands.is_nsfw()
async def anal(ctx):
   async with aiohttp.ClientSession() as session:
      request = await session.get('https://nekos.life/api/v2/img/anal')
      anal = await request.json()
   embed = discord.Embed(color=0xf6dbd8)
   embed.set_image(url=anal['url'])
   await ctx.send(embed=embed)
   else:
       await ctx.reply("`Critical Error` - Channel Is Not Marked As `NSFW`")``` im getting an indentation error at "else", i know its simple and basic, but i cant figure it out
maiden fable
#

Anyways, @visual island what do u think u r gonna do now tho? Switch to another lib?

hollow agate
# slate swan ```py @bot.command() @commands.is_nsfw() async def anal(ctx): async with aioh...
@bot.command()
@commands.is_nsfw()
async def anal(ctx):
  try:
     async with aiohttp.ClientSession() as session:
        request = await   session.get('https://nekos.life/api/v2/img/anal')
        anal = await request.json()
     embed = discord.Embed(color=0xf6dbd8)
     embed.set_image(url=anal['url'])
     await ctx.send(embed=embed)
   except:
       await ctx.reply("`Critical Error` - Channel Is Not Marked As `NSFW`")``` Try that
crude skiff
#

anyways how to pick a random element from json list?

maiden fable
slate swan
crystal kestrel
hollow agate
#

Hm one esc

crude skiff
crude skiff
hollow agate
#
@bot.command()
@commands.is_nsfw()
async def anal(ctx):
  try:
    async with aiohttp.ClientSession() as session:
    request = await   session.get('https://nekos.life/api/v2/img/anal')
     anal = await request.json()
    embed = discord.Embed(color=0xf6dbd8)
    embed.set_image(url=anal['url'])
    await ctx.send(embed=embed)
  except:
    await ctx.reply("`Critical Error` - Channel Is Not Marked As `NSFW`")```
maiden fable
visual island
slate swan
crystal kestrel
hollow agate
#

ufhaopwjfkapl kill me I'm using a code editor one sec xd

lament mesa
crystal kestrel
hollow agate
# slate swan request = await session.get('https://nekos.life/api/v2/img/anal') ^ Indent...
@bot.command()
@commands.is_nsfw()
async def anal(ctx):
  try:
    async with aiohttp.ClientSession() as session:
    request = await   session.get('https://nekos.life/api/v2/img/anal')
    anal = await request.json()
    embed = discord.Embed(color=0xf6dbd8)
    embed.set_image(url=anal['url'])
    await ctx.send(embed=embed)
  except:
    await ctx.reply("`Critical Error` - Channel Is Not Marked As `NSFW`")``` This must work, I swear...
crude skiff
maiden fable
#

Bro, u gotta do that yourself

slate swan
maiden fable
#

He just gave u a raw example

hollow agate
#

Bruv what

maiden fable
#

!d json.load use this

crystal kestrel
unkempt canyonBOT
#

json.load(fp, *, cls=None, object_hook=None, parse_float=None, parse_int=None, parse_constant=None, object_pairs_hook=None, **kw)```
Deserialize *fp* (a `.read()`-supporting [text file](https://docs.python.org/3.10/glossary.html#term-text-file) or [binary file](https://docs.python.org/3.10/glossary.html#term-binary-file) containing a JSON document) to a Python object using this [conversion table](https://docs.python.org/3.10/library/json.html#json-to-py-table).

*object\_hook* is an optional function that will be called with the result of any object literal decoded (a [`dict`](https://docs.python.org/3.10/library/stdtypes.html#dict "dict")). The return value of *object\_hook* will be used instead of the [`dict`](https://docs.python.org/3.10/library/stdtypes.html#dict "dict"). This feature can be used to implement custom decoders (e.g. [JSON-RPC](http://www.jsonrpc.org) class hinting).

*object\_pairs\_hook* is an optional function that will be called with the result of any object literal decoded with an ordered list of pairs. The return value of *object\_pairs\_hook* will be used instead of the [`dict`](https://docs.python.org/3.10/library/stdtypes.html#dict "dict"). This feature can be used to implement custom decoders. If *object\_hook* is also defined, the *object\_pairs\_hook* takes priority.
hollow agate
#

oh

visual island
hollow agate
#
@bot.command()
@commands.is_nsfw()
async def anal(ctx):
  try:
    async with aiohttp.ClientSession() as session:
      request = await   session.get('https://nekos.life/api/v2/img/anal')
      anal = await request.json()
      embed = discord.Embed(color=0xf6dbd8)
      embed.set_image(url=anal['url'])
      await ctx.send(embed=embed)
  except:
    await ctx.reply("`Critical Error` - Channel Is Not Marked As `NSFW`")``` Didn't see the : on line 5
hollow agate
#

xd np, sorry that took a while... I'm just stupid

maiden fable
# visual island hbu?

Eh, idk. I still gotta think about what to do of my AI Bot (most probably I'mma shut it down)... And I'mma just find some other python libs to master... I got a friend who does various random projects for real life people and I can just help him finish/code them

visual island
maiden fable
#

And thinking of opening the AI API to everyone

maiden fable
pliant gulch
maiden fable
#

Ah, cool

visual island
maiden fable
#

Well I gotta see how cool down and stuff work, read discord docs and stuff cat_headbang

pliant gulch
#

cooldowns aren't a part of the API

maiden fable
#

Ah

pliant gulch
maiden fable
#

Oh

#

Hmm, gotta see how they implemented it

#

The API Part should be easy

#

Send requests using aiohttp and read the response

visual island
maiden fable
#

Hmm yea

#

Well, let's see what happens

pliant gulch
#

I don't know if I should just create a new wrapper since I don't really like how cluttered discord.py internals are

#

Or if I should just keep editting my fork

#

either way I don't think it would need immediate action

visual island
maiden fable
#

Hmm

pliant gulch
#

Well, I do have some sort of base as I have a private wrapper I made for testing

visual island
#

nice

#

btw @pliant gulch when will your wrapper be public?

maiden fable
#

Since discord.py is gone, I can bet this channel would be dead most of the time, like other channels (cz mostly everyone used it and I don't think anyone would want to switch over to any other wrapper)

pliant gulch
forest vortex
visual island
outer flint
maiden fable
#

Either switch over or kill your bot

light night
final iron
#

Hopefully someone picks up the code

maiden fable
#

Yes

final iron
#

Isn't discord.js now the only way to code your bot?

forest vortex
maiden fable
#

But tbh, the discord.py was is a huge part of my life and that's the place from where I learnt Python from the very start

forest vortex
#

more

maiden fable
unkempt canyonBOT
maiden fable
#

snekcord also

forest vortex
visual island
#

i agree

final iron
#

Everyone will

slate swan
forest vortex
#

damn i thought discord was good

final iron
#

Aren't those all tiny though

slate swan
#

Doubt if anyone will a fully switch

forest vortex
#

idk if this will reduce discord's popularity

slate swan
#

Yeah not big communities

final iron
#

It's gonna kill a lot of bots

slate swan
fickle turret
#

Bot devs specifically

forest vortex
visual island
#

cause not everyone likes slash command

forest vortex
#

userbase also because they use bot

#

and if most bots are gone

outer flint
forest vortex
#

discord - ded

maiden fable
# visual island i agree

I have experienced that... My brother (he's 11) joined discord and I wrote a complaint to discord regarding that... But, the response from discord was This isn't the correct complaint topic to report here. please submit a complaint again after changing the category of the complaint 7408_shrekstare

maiden fable
#

Happened around last October or something

slate swan
#

I mean, large bot devs will most probably port to d.js or something so that they're not affected, to the unsuspecting average Discord user this isn't even a big change

maiden fable
#

Yes

#

The biggest blow is dealt to small bot devs

slate swan
#

^

maiden fable
#

Like me

true slate
maiden fable
#

Cz I don't have the time, resources to port to another language also I don't get anything from rewriting my bot as I do it for fun only

forest vortex
#

alright i have exam rn

maiden fable
#

Best of Luck!

outer flint
#

Or me hyperlul
Although my bot is used in like 2/3 servers of 5k+ people, but still I'm alone and don't have time xD

maiden fable
#

Same

forest vortex
slate swan
#

My friend has a bot that's used in like 1k servers it's going to be a huge blow for him

outer flint
#

So... We should all start preparing and moving over to d.js?

slate swan
#

He's been hosting it for two years now

fickle turret
#

djs isn't the only option

maiden fable
heavy folio
#

could i still ask for help for dpy bots tho

maiden fable
#

Sure

fickle turret
#

yes, why not

outer flint
#

What's the option that won't be killed tomorrow? XD

maiden fable
#

Till April 2022, dpy would work

final iron
#

Oh nice

slate swan
true slate
heavy folio
#
    try:
      if channel == ctx.channel:
        await ctx.message.delete()
        await ctx.send(embed=main_embed)
      else:
        await ctx.reply(embed=main_embed)
    except ctx.subcommand_passed:
      error_embed = discord.Embed(title="Command Error!", description="The subcommand you requested for does not exist!")
      message = await ctx.reply(embed=error_embed)
      await asyncio.sleep(1)
      await ctx.message.delete()
      await message.delete()
      return
```so i have this but it doesnt work. no errors logged.
maiden fable
heavy folio
#

what i want is when the subcommand doesnt exist, it sends error_embed

maiden fable
#

U need an error in except

slate swan
heavy folio
#

oh

visual island
true slate
maiden fable
true slate
#

theres lots of trusted ones

#

that made it onto the docs

maiden fable
waxen granite
#

Is there an on_command_error for NoneType?

maiden fable
#

Sure

#

In the error, pass None

#

if isinstance(error, NoneType):

waxen granite
#

Cool

visual island
maiden fable
#

told ya u, r the pro

waxen granite
#

Are they removing py from discord api or something?

shrewd barn
#

How to get content of an embed?

fickle turret
#

.to_dict()

slate swan
true slate
waxen granite
#

Well its the one that connects discord bots no?

floral fulcrum
maiden fable
slate swan
#

Is there any idea of switching to a whole another language

true slate
maiden fable
slate swan
#

Bruh I was literally so motivated to work on my bot

#

?I vqjwvv??1!?

#

stupid discord

maiden fable
#

Yup

floral fulcrum
#

I hope someone will try to maintain the Library

#

But I don't think it will happen :(

fickle turret
#

they can't, it's archived now

floral fulcrum
true slate
#

best one can do is fork

floral fulcrum
#

Ik

true slate
#

but there will be lots of forks

slate swan
#

Yea

floral fulcrum
#

Yeah

fickle turret
maiden fable
#

Breh, the messages ain't editing 7408_shrekstare

true slate
maiden fable
#

@slate swan what about u tho?

slate swan
fickle turret
#

My bot reached over 75 guilds, turned out around 40 of them were bot farms, i had to remove it from all of them, it was just recovering but meh

heavy folio
maiden fable
heavy folio
#

also how did u know they were bot farms

fickle turret
#

Bot.leave_guild, i forgot what was it

maiden fable
maiden fable
maiden fable
unkempt canyonBOT
#

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

Leaves the guild.

Note

You cannot leave the guild that you own, you must delete it instead via [`delete()`](https://discordpy.readthedocs.io/en/stable/api.html#discord.Guild.delete "discord.Guild.delete").
slate swan
#

Uhm I didn't have much to lose tbh, I've been hosting my bot for only 6 or so months and it's only been in like 100 servers

fickle turret
#

Oh yeah

heavy folio
#

also is it possible for a bot to own a server?

#

oh

floral fulcrum
maiden fable
maiden fable
fickle turret
#

wait nvm you can transfer ownership, yeah

heavy folio
#

yea

slate swan
#

I coded this bot to learn Python and now I know a decent bit so I think I'll just switch to a more advanced langauge because I'll be needing it for uni

maiden fable
#

!d discord.ext.commands.Bot.create_guild

unkempt canyonBOT
#

await create_guild(name, region=None, icon=None, *, code=None)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).

Creates a [`Guild`](https://discordpy.readthedocs.io/en/stable/api.html#discord.Guild "discord.Guild").

Bot accounts in more than 10 guilds are not allowed to create guilds.
maiden fable
#

There

heavy folio
#

oh

fickle turret
#

Bots can create guilds? W h a t

slate swan
maiden fable
fickle turret
#

Oh

slate swan
#

Thanks Hunter and you too ♥️

fickle turret
#

Everytime i feel like i have learnt enough something new comes up

maiden fable
#

Breh my net :c

maiden fable
slate swan
dire panther
#

hey, is it possible to add another tag to this string for "link in soup.find_all('a'):"

slate swan
#

Neural networking was really tough and I didn't have the time to

fickle turret
#

i built a chatbot using pytorch but i have no idea wtf is going on

maiden fable
fickle turret
#

the api is public but without rate limiting, surprisingly no one DDOSed it yet

maiden fable
#

I got about 65k AIML lines of code for the AI

floral fulcrum
maiden fable
#

Yea but it's all a waste cz I can't think of something to do with it

#

It's a general chatbot (it can also remember name, age and stuff)

visual island
maiden fable
#

Never said it can remember your birthday haha. I had to add it in a few days, but no use now

#

And u also made it say things against me rooBulli

visual island
#

lol

slate swan
maiden fable
#

So not even one year since I have been coding

slate swan
#

The fact that Discord doesn't even acknowledge this just shows peak arrogance

maiden fable
#

Yes

slate swan
#

Yet you've managed to do so much

maiden fable
#

Eh, I haven't done so much. Just some basic projects blobpain

slate swan
#

"Just some basic projects"
Proceeds to create an AI API

maiden fable
#

As I said it's just pattern matching. Also, I lose interest/inspiration very easily

slate swan
#

I mean when there's no obvious reward it's natural

#

The teeny euphoria you get when your code runs is all that you can live for

maiden fable
#

Yup haha

#

I was too excited when I made my first bot with discord.py . It was my first day and I used discord.Client and on_message (the example in the docs). I just removed one line if message.author == client.user: return and the bot replied to itself. 😂🤣 I was so fucking happy that I know how to code now

pliant gulch
heavy folio
#
  if not link.startswith("https://discord.com/channels/") or not link.startswith("http://discord.com/channels/"):
    http_embed = discord.Embed(title="Command Error!", description="your link needs to begin with `https://discord.com/channels/` or `http://discord.com/channels`!")
    await ctx.reply(embed=http_embed)
```this `link.startswith` caused an error
fickle turret
#

what is link?

final iron
#

What are some beginner commands to add to my discord bot to help me learn

heavy folio
fickle turret
heavy folio
#
@client.command(aliases=['jtl', 'jumplink', 'jump', 'j'])
async def jumptolink(ctx, link=None, *, message = None):
fickle turret
#

you sure you are passing the arg?