#discord-bots
1 messages · Page 1016 of 1
@paper sluice hi is there anything to check in view or i need to add it
try 
await ^
eh? what do u want to check?
any clue why?
like checks in bot waitt for
it is able to get interaction.user.mention in the callback without any issues
no just add it and then u have to make call back functions for interactions
interaction.message.edit worked, thanks guys 🙂
np
@disnake.ui.button(label="Stop", style=ButtonStyle.blurple)
async def but2(self, button: disnake.ui.Button, interaction: disnake.MessageInteraction):
pass
show the full class
omg ty it finally works!!!
class Ststop(disnake.ui.View):
def __init__(self , bot: commands.Bot):
self.bot = bot
super().__init__(timeout=30)
@disnake.ui.button(label="Start", style=ButtonStyle.blurple)
async def but1(self, button: disnake.ui.Button, interaction: disnake.MessageInteraction):
pass
ok thats a little complicated
so u have to take ctx.author as a param in ur class then u have to check if ctx.author == interaction.user
like
class Ststop(disnake.ui.View):
def __init__(self , bot: commands.Bot, author):
self.bot = bot
self.author = author
super().__init__(timeout=30)
@disnake.ui.button(label="Start", style=ButtonStyle.blurple)
async def but1(self, button: disnake.ui.Button, interaction: disnake.MessageInteraction):
if self.author == interaction.user:
....
i didnt wanna have to answer more questions
🤷♂️
embed = discord.Embed(
title = "**Vielen Dank für Ihr Feedback**",
description = "Wenn Sie noch weitere Fragen haben, dann treten Sie dem [Supportserver](supportserver.com) bei.",
color = discord.Color.green()
)
as I understood from this
no cuz you overwrite it instantly
and what you did isn't pep8-like
yes, use the on_guild_join event
then await guild.channels[0].send("hi guys")
!d discord.on_guild_join
discord.on_guild_join(guild)```
Called when a [`Guild`](https://discordpy.readthedocs.io/en/master/api.html#discord.Guild "discord.Guild") is either created by the [`Client`](https://discordpy.readthedocs.io/en/master/api.html#discord.Client "discord.Client") or when the
[`Client`](https://discordpy.readthedocs.io/en/master/api.html#discord.Client "discord.Client") joins a guild.
This requires [`Intents.guilds`](https://discordpy.readthedocs.io/en/master/api.html#discord.Intents.guilds "discord.Intents.guilds") to be enabled.
ok
what's up with your ok
lol
def MyBrain():
pass
return MyBrain()
i send ok cuz ppl usually dont reply if the code works
so i send ok
@bot.event
async def on_guild_join(guild):
#do your thing
no
this doesn't do anything
@bot.event
async def on_guild_join(guild):
await nuke()
that's just how you define the event
I like it
inside the event
await guild.channels[0].send("hi") if you want the first channel
why not?
await guild.channels[0].seond("[hi](https://google.com)")
Seond
yeah
and why do you have so many random imports
They like having imports and cluttering the namespace
Why do you have 2 bot variables@slate swan
and why did i see from onmessage import hackMessage
not seond
is send
Line 16 and 19
non_snek_case, smh
Snek
✅
also,
bot = commands.Bot(command_prefix = "!", intents = discord.Intents.all(), activity = discord.Game(name = "/help"), help_command = None)
replaces those four wrong lines of bot definition
He's a hecker man

seems right
only works in embed btw
almost then
^ ^

no cuz there's nothing to respond to
await guild.channels[0]send(embed=embed)
support...com is not a valid url, FYI
it's a test

Yez
yes
guy prolly doesn't want to thank the feedback when someone joins
but you gotta send the embed....
not hi
yeah you can change the embed
but you have to send the embed
for the third time...
await guild.channels[0].send(embed=embed)
try
what
now wait
!d discord.Guild.channels
property channels```
A list of channels that belongs to this guild.
wait
channels[-1] ?
guild.channels[-1]?
sending to the owner is easy
to who invited the bot isn't
actually
bots always join with the same invite
so there's no way to check who invited ig
if i reply to message, i need that entity as an object.
i worked that out using MessageReference. How would i fetch the data like author and content ?
mm what
it is, through the audit logs
but that data may not be accurate always
so you'd need the last audit log entry
idk where that is
...
I can do many stuff but Ig an economy system would be a bit... advanced for you, wouldn't it?
you need to know how to handle a database normally and in python
It would be great if somebody could help with this
could you send the code you have?
that's the question. What method do i need to do it
reaction, user = await Bot.wait_for("reaction_add", timeout=60, check=check2)
TypeError: Client.wait_for() missing 1 required positional argument: 'event'``` anyone know what this error is?
you don't need any method, once you have the Message object, you only have to get message.author or message.content
is your Bot object saved into Bot or bot?
i replied to you. So, i need your user name and message's content
bot
but it return another error with bot
then do bot.wait_for
!d discord.Message.reference
The message that this message references. This is only applicable to messages of
type MessageType.pins_add, crossposted messages created by a
followed channel integration, or message replies.
New in version 1.5.
yes, i am there but i cant figure how to access the content
Command raised an exception: AttributeError: module 'discord.ext.commands.bot' has no attribute 'wait_for'
aa = discord.MessageReference(
message_id=temp1.message_id, channel_id=temp1.channel_id)
Ahh
you can get the reference message using message.reference.cached_message
there's a low chance that message is in the cache though
and how i would i reply to it ?
thats a message object, you can simply message.reply
so any surefire way
cool
it's very simple. I just need to fetch the message the command user replied to.
message = await bot.get_channel(reference.channel_id).fetch_message(reference.message_id) simple
hm well, you can fetch the message then,
^
oh thanks
shorter way would be await message.channel.fetch_message(message.reference.message_id) since the reference would be in the same channel as the message
is this an on_message event though?
yeah
hm, then message.channel is probably easier like Sarth said
Ig you check if the message is referencing to something
I assume
mmmmm
!d discord.ext.commands.cooldown
@discord.ext.commands.cooldown(rate, per, type=discord.ext.commands.BucketType.default)```
A decorator that adds a cooldown to a [`Command`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.Command "discord.ext.commands.Command")
A cooldown allows a command to only be used a specific amount
of times in a specific time frame. These cooldowns can be based
either on a per-guild, per-channel, per-user, per-role or global basis.
Denoted by the third argument of `type` which must be of enum
type [`BucketType`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.BucketType "discord.ext.commands.BucketType")...
fail if not exists is set to true by default. How would it handle it, or what do i need to add to handle it
Whether replying to the referenced message should raise HTTPException if the message no longer exists or Discord could not fetch the message.
try:
#dunno
except HTTPException:
#dunno
Btw
oh alr
It's in an extension so do I need to do something different?
what would happen if i set it to false
Like commands.wait_for
self.bot.wait_for
Idk but I wouldn't...
right
it's ctx.reply, not ctx.respond
ig
u got it
also the reference thing, would it give an error if there was no reference.
i need to handle 2 cases, 1 if it does not exist , 2 unable to fetch
okay
if message.reference:
exists
else:
doesn't exist
run a check as well
slash commands don't have cooldowns I think
you have to implement it
good question
Whats this error
Is it possible to do like
for members in client.guilds (The bot should dm all those members)
API abuse
ratelimits, bot bans
It is something you can do, yes, but you shouldn't do it, mass DM's may get your bot banned (i'm by no means encouraging you do it)
hello
Oh damn
So that is what some bots dm me about
It was very common but not rn
@client.listen("on_guild_leave")
async def foo(guild):
channel = guild.text_channels[0]
rope = await channel.create_invite(unique=True)
me = client.get_channel(967677661545652264)
await me.send("``I have been removed frm:``")
await me.send(rope)
Is that correct?
Try it and see
Not working
Get back to us if you encounter errors
What do you mean by not working
Is the event even triggering?
Add a print statement
Ok wait
@slate swan
No
I think those are called hybrid commands
the docs could tell you...
I have no experience in v2+ stuff (anything since the release of buttons)
?
yes
you made me think they actually changed reply to respond
just to be satisfied
full traceback we want
oh wait Ig I know
no, but I think it's cuz of the name of the function
rename the function
use name="slots" in slash_command()
no, only this one
where the error happened bro
!rule 4
4. Use English to the best of your ability. Be polite if someone speaks English imperfectly.
yes
@heady sluice I just write through a translator and sometimes I copy the wrong thing
ghost ping?
why after installing the new version discord.py 2.0 have all commands and events stopped working for me ??
eh.. there were some changes in dpy 2 afaik
Next to description you write name=“slots”
u needa migrate accordingly
rename the function
to something random
even ghasduoighaoiuhg works
use name="slots" in bot.slash_command()
rename the function
async def oighsodihgso(ctx, amount = None):
that is , the teams should not look like this now ??
@commands.command(aliases = ['help', 'помощь', '?'])
async def __help__(self, ctx: commands.Context):```
it shuold work tho.. well show me your error btw lmao
@slate swanor 2.0 all commands only via /
see, idk what were the issues.. but afaik.. i had to do changes.. whether small or big there were chagnes
that's the problem there are no errors.
💀 sorry, i'm handicapped then ig
i can't help without that bruh
like.. nothing in terminal?
the terminal is empty as if the bot doesn't see any errors
do u not have anytihng in on_ready event?
@slate swan ```py
@bot.event
async def on_message(message):
await bot.process_commands(message)
if message.author == bot.user:
return
if message.content.startswith('Hello') | message.content.startswith('hello') | message.content.startswith('Hi') | message.content.startswith('hi') | message.content.startswith('Привет') | message.content.startswith('привет') | message.content.startswith('прив') | message.content.startswith('Прив'):
await message.channel.send(random.choice(["Привет","привет","прив","Прив","Hello","hello","Hi","hi","ПОКА!!"]))
that used to work, now it doesn't
you don't know how kwargs work do you
there is a database being created there
@slate swan ```py
@bot.event
async def on_ready():
await bot.change_presence(status = discord.Status.online, activity = discord.Game(',help'))
global base, cur
base = sqlite3.connect('Ругательства.db')
cur = base.cursor()
if base:
print("База данных запущена")
Oh it’s a kwargs error
ew
Ok I can’t help then I haven’t learned kwargs yet
why are you doing all that in the on_ready
it is possible without abbreviations
Don't.
keyword arguments are arguments, of which the order don't matter
nothing working? wtf
why are you connecting to your db and changing your bot's acitivty in the on_ready...?
Ohhh
You can keep them swapped
Don’t swap again
I think I know what is wrong here
nothing at all. The bot type is turned on and that's it. Not a single command does not work
@slate swan pls help him if u can.. i'm kinda occupied rn 💀
You see (ctx,amount = None):
so that the database is also launched with the bot
(ctx, amount = None):
@slate swan but at 1.7.3 everything worked perfectly
same 🫂 I dont want to fail computer science again at school, so i need to complete my work on time
that's the same error
not a good practice
Show your code
🫂 sounds like we got life.. lmao
what issue are you facing?
us uwu
Did you space it out twice?
you're too smart
also
ew
lmao
Looks like you put 2 spaces
lmao
💀
I was about to say hi ashley earlier to eito
I have installed discord.py 2.0 and all commands and events stopped working for me. Although everything worked perfectly before. And yes, there are no errors in the terminal at all.
!rule 7
7. Keep discussions relevant to the channel topic. Each channel's description tells you the topic.
cuz you not ashley
We can see through your tricks
simips
It does look spaced out twice
bruh? now that sounds cringe.. but ok
Ok
Hi ashley
identity thief?
even she's doing the same lmao
How
ew
are you raising the errors in your error handler?
Slash command right?
I think she's just too lazy to change her name
Kek
sigh
I don't have it
💀 r u taking her side?
hm, interesting
Off-topic channel: #ot2-never-nester’s-nightmare
Please read our off-topic etiquette before participating in conversations.
exits quitely
how to make complierbot? (compile python)
Hmmm change amount = None to amount: int
use snekcord probably
jishaku would be a nice choice, at least, it works fine for me
No i think you both just forget about your usernames
ok
If that doesn’t work then put it back to amount = None
Snekcord?
wtf? snekcord?
no wait
@slate swanmaybe he just doesn't perceive the usual command and chi needs to be redone under / commands ??
that was smthing else
Pycord
i've heard nexcord & pycord
Snekbox?
ew no
Wasn't it nextcord
no lol, dpy 2.0 does support message commands, but it would be weird for all the commands to go off, could you actually show on of them?
ok lmao it's a spelling mistake, yeah nextcord
Yeah what i said
snekbox, i actually confused it with snekcord library
There's an actual snekcord library?
mhm
@slate swanI had a mistake with cogs
uh
Did it work? The amount: int
@slate swan but then I just added this "async def on_cogs():" and there were no more errors
You could use Postgres, SQLite, MySQL or MongoDB (or Deta, personal preference after SQLite and PostreSQL)
Oh lol
plenty
weird, I might just hop out, discord.py kills my brain
SQLBolt provides a set of interactive lessons and exercises to help you learn SQL
I'd rather use w3schools tbh
I use json for mine so idk
you can learn raw sql here first
Yes
Learn how to use PostgreSQL in this full course. PostgreSQL is a general purpose and object-relational database management system. It is the most advanced open source database system widely used to build back-end systems.
⭐️ Contents ⭐️
⌨️ (0:03:16) What is a Database
⌨️ (0:05:17) What is SQL And Relational Database
⌨️ (0:09:10) What is Post...
json users be like 🏃♂️
@slate swan this discord.ru is just killing my brain with its stupidity and incomprehensibility
yes, run away
w3schools for learning SQL
grr
same, thats why I dont use dpy anymore, So I HATE discord.py now, I'd rather not help and break more of your code
@slate swan I already wrote yesterday with this problem. But they just threw me links and told me to learn python.
in the dpy server?
yes
What do you use then
not surprised
disnake
currently switching to hikari
interesting
Why hikari
why not
Becoming like sarth
hikari is nice for people who want challenge
All the abstractions you would get in dpy don’t exist in hikari
Eh sqlbolt gives decent exercises
idk, personal preference ig
hikari pog
except for the fact that there's no thread channel support yet 🤡
What’s discord.ru?
Where do you guys get this cats
Ruby wrapper?
I should take a picture of timo
Implement yourself ez
they appear on my insta feed
You have instagram?
there's a pull request for threads already and am using it!
mhm
That’s not really that fair
what
You're using a unstable version of discord.py that’s meant to be a "MAJOR" version change. Why would there not be any breakage
do you have member intents, and is id_ a integer
It floods the chat
Flooding
Russian Discord perhaps
No they don't
People who are getting pissed off by the breaking changes on 2.0 should know they signed up for them when they migrated over
was i not clear with my question?
class MyCog(commands.Cog):
def __init__(self, bot):
self.bot = bot
# New async cog_load special method is automatically called
async def cog_load(self):
...
async def setup(bot):
await bot.add_cog(MyCog(bot))```
Can someone explain this piece of code
It's a subclass of commands.Cog
Cog
No
almost bro
do you mean the cog_load method of complete Cog stuff?
nah rubys file extension is .rb and not .ru
I'm trying to type faster than all of you
What don't you get here? elaborate
Pretty hard when there's 4 people typing at the same time
MyCog is a cog which is subclassing Cog which turns it into a cog so that you can use cogs in your bot to keep your code clean, thats the purpose of a cog
😂 its not a race~
When okimii is here it is
😂
Thank you sift
i am speed😏
I will take that
oh since when is okimii here
I smelled him
😳
and what does this do?
async def cog_load(self):
...```
its just a method to me
Judging by the name it loads itself?
it's called when the cog is loaded
this method is called automatically when the cog is loaded, i.e. when you do bot.add_cog(MyCog())
or when load_extension does it for you
There's a method for that?
so its pretty much useless
load_extensions does nothing but call the setup function in a file, not neccessiary loading a cog
Well no
that's what I said
yo can someone pls help me out here 😅 ive spent hrs on this bot and completely f'd it up and idek what to do lol. can someone whose got a min dm me pls 😄
You can still do shit in it
why dms
just ask here aka a help channel
here is my code i want get banned member name but bot returned <property object at 0x000001CCC6EB0C20> ```py
@bot.event
async def on_member_ban(guild, user):
entry = await guild.audit_logs(action=discord.AuditLogAction.ban, limit=1).get()
user = entry.user
user2 = entry.user.name
member = discord.Member.name
print(member)
you can do shit in setup too
can i dont rlly wanna share my file publicly after spending hrss 😅
Lmao
I'd probably like to do it inside cog_load
he actually put discord.Member.name
everything in programming can be done and will be done better remember that
very useful if you are using some async library and need to attach custom attributes to that cog, i can imagine using this ```py
import aiosqlite
class MyCog(commands.Cog):
def init(self, bot):
self.bot = bot
# New async cog_load special method is automatically called
async def cog_load(self):
self.db = await aiosqlite.connect(...)
async def setup(bot):
await bot.add_cog(MyCog(bot))
``` which __init__ wont be able to suffice
noo ik, but theres a sht ton of copyrighting on it, not the actual prograaming 😄
Why

this two messages are not same
!d discord.ext.commands.Cog.cog_load
await cog_load()```
This function *could be a* [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
A special method that is called when the cog gets loaded.
Subclasses must replace this if they want special asynchronous loading behaviour.
Note that the `__init__` special method does not allow asynchronous code to run
inside it, thus this is helpful for setting up code that needs to be asynchronous...
pretty much what i said about the init thing
thats kinda the idea of the bot.. to explain crypto/nft/hustling concepts and guides thru them.. and i dont just wanna upload here after typing it all up after hrs 😅
Yeah i now know since i just went to the docs earlier
It’s just user.name
the member who got banned is passed into the event
I'll take the bullet
So you don’t have to look for him yourself
hmm?
Obviously real g's bind their db connections to the bot instance.
i can't explain well x user banned y user and i want get y user details but **user.name** is get x user name
right
Hi
Idk if you can see who banned the user. Not very cleanly at least.
!d discord.on_guild_join
discord.on_guild_join(guild)```
Called when a [`Guild`](https://discordpy.readthedocs.io/en/master/api.html#discord.Guild "discord.Guild") is either created by the [`Client`](https://discordpy.readthedocs.io/en/master/api.html#discord.Client "discord.Client") or when the
[`Client`](https://discordpy.readthedocs.io/en/master/api.html#discord.Client "discord.Client") joins a guild.
This requires [`Intents.guilds`](https://discordpy.readthedocs.io/en/master/api.html#discord.Intents.guilds "discord.Intents.guilds") to be enabled.
i can see who ban users but i can't see banned users
send in most active channel (most msg) I suggest
You can see who got banned since that information gets passed in the ban event
Read full
But you can’t see who banned the person
audit logs?
how i can do it
Like I said just user.name
okey thanks
I realised
await guild.text_channels[0].send(....) is better
cuz guild.channels[0] could be a voice channel
where you can't send anything
Ye maybe member count channel
i handle it member2 = entry.target
that was just an example of how it could be used 😔
Cat pfp
👀
mhm
async def inspire(ctx):
quote = get_quote()
await ctx.send(quote)
error:
TypeError: Command signature requires at least 1 parameter(s)
cog?
cuz then you forgot self
assuming from the indentation, this is a cog
len(bot.guilds)
In categories?
Well you have the server counter in your screenshot, don't understand your question.
Then do as they said len(bot.guilds)
my heart stopped
And if you mean categories as cogs, then just append self. before bot
So len(self.bot.guilds)
How can i make a rotating status like all the users in servers*
You mean a changing status every x seconds?
Ye
Make a task loop that changes it, make sure to respect the rate limits.
How do I create new textchannel that only the ctx.author and the people with administrator perms will be able to see it and other won't ?
with a py while loop?
please ping
!d discord.ext.tasks.loop
discord.ext.tasks.loop(*, seconds=..., minutes=..., hours=..., time=..., count=None, reconnect=True)```
A decorator that schedules a task in the background for you with
optional reconnect logic. The decorator returns a [`Loop`](https://discordpy.readthedocs.io/en/master/ext/tasks/index.html#discord.ext.tasks.Loop "discord.ext.tasks.Loop").
@oblique adder
!d discord.ext.tasks.loop discord.py gibes better options
Create a channel with the right function and change the overwrites kwarg for the permissions of that channel
Count?
Also make sure to start the loop
on on_ready or anything that trigger when bot starts

?
U said pls ping
.
BRUH

ok
!f-strings
Creating a Python string with your variables using the + operator can be difficult to write and read. F-strings (format-strings) make it easy to insert values into a string. If you put an f in front of the first quote, you can then put Python expressions between curly braces in the string.
>>> snake = "pythons"
>>> number = 21
>>> f"There are {number * 2} {snake} on the plane."
"There are 42 pythons on the plane."
Note that even when you include an expression that isn't a string, like number * 2, Python will convert it to a string for you.
!d discord.Guild.create_text_channel
await create_text_channel(name, *, reason=None, category=None, position=..., topic=..., slowmode_delay=..., nsfw=..., overwrites=..., default_auto_archive_duration=...)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Creates a [`TextChannel`](https://discordpy.readthedocs.io/en/master/api.html#discord.TextChannel "discord.TextChannel") for the guild.
Note that you need the [`manage_channels`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.manage_channels "discord.Permissions.manage_channels") permission
to create the channel...
u
There is an example "Creating a “secret” channel:" for you
Secreat
We already did
question : Do u ever use console input in ur discord bot for something if yes what's that
Read the message.
no he didnt, many people already told him to learn the basics first
!resources
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
a = 1
f"{a}"
Wrong reply, my bad
!e
x = "world"
print("Hello x")
print(f"Hello {x}")
@slate swan :white_check_mark: Your eval job has completed with return code 0.
001 | Hello x
002 | Hello world
@slate swan we have told u multiple times before to learn python. Learn python before making a bot
lol
ur a skid bruv
U know what are parameters
hi sparky
Down bad u remeber that boaz guy?
uhh, not sure
..
they are clearly two diff people
ah, yes i do lmao
But they both don't know python and they don't accept
yup
oh u meant it like that, ok
i dont really care if people just start with bot development, but saying that they do know python while they clearly dont is just annoying when you try to help them
how do I check if a command has been invoked when another command gets invoked
make your own cache which saves the running state of commands in a cache using on_command and on_command_completion event
Is there a good way to set up a queue for ban logging? I use my bot solely for logging on_member_ban events, but last night when we were raided it got ratelimited by Discord
@client.event
async def on_command_error(ctx, error):
if isinstance(error, commands.CommandOnCooldown):
await ctx.send(f"{round(error.retry_after, 2)} seconds left")
this is the event, but the cooldown is printed in the console
any help on how to send it?
weird, what does it print?
You are on cooldown. Try again in 3.58 seconds
hm, the event is not registered properly, did you try restarting the bot?
or are you in a cog?
⚙️
still prints in console
nope
no
is this code above client.run() ?
yes
um?
is that the same exception that gets raised? and try to print something to check if the event was registered correctly and it gets dispatched
- are you using some fork? make sure the
commandsmodule is imported from the right library, - is there any other
on_command_errorfunction in the file?
i have another on_command_error in the file
thats the issue
use listen instead of event
k
@client.listen("on_command_error")
async def handler1(ctx, error):
...
@client.listen("on_command_error")
async def handler2(ctx, error):
...```
why have 2 of them when you can just have if and elif statements or custom command error handlers?
or probably use a single event that would be noicer
or just dont handle errors 💀
making a bot is just annoying
its like u know all this stuff but still. i guess im lazy
@slate swan where do you pass the intents for a subclass of BotApp 😔
simply use the intents kwarg like you used to in discord.py
or if you mean specifically in a subclass
huh, it doesnt even show.....
use super().init
thats what im using
cause that 's a kwarg of GatewayBot
i added @bot.event then it cant send anything
yeah, just saw
how?
thanks sarthak
slash commands work on discord.py version 1.7.3 ??
no
@paper sluice does the time work on version 1.7.3, that is , mute ban a participant for a certain time ?
required a Lil bit of help with heroku,
I just need to access a static json file. Anyway, i can store it and access it ?
yea? i mean it depends on the type of convertor ur using, if u making ur own then sure
!rule 4
4. Use English to the best of your ability. Be polite if someone speaks English imperfectly.
@paper sluice can you tell from such a spread that it doesn 't work on version 1.7.3 ?
@paper sluice I'm just writing through a translator and copying something else
Any1
please tell me that 100% does not work in discord.py on version 1.7.3 ??
This is not a Discord development related question.
ok so what i want to do is make it so that every 5 days my bot sends a message and i think this would be posssible with cron\
im on linux btw
Can I use author.send ?
Yes, about 6 months ago
how to make avatar slash command?
Recently it was announced development would continue, however
Is it still possible to use it?
Sure. Development has resumed, don’t see why not
Oh really, It is related to it.
.
.
No. Development was ceased for quite a while
Not a false alarm
Things happen, people lose motivation, gain motivation to continue something. I don’t fault Danny for leaving, but people still have reservations if discord.py is going to stick around or get archived again
That decision is up to you when you decide on what library you want to use
.
guys i need help
Is there a good free IDE for discord.py?
Just use the tasks library
ok show me an example
Vscode is FOSS, pycharm had a community edition
is there any way that i could make a command with (ctx, member:discord.member) and then make my bot react if member = None?
hm, what context
it just tells me member is a required argument that is missing but thats what im trying to do
Can I use author.send() ? Would it work
Yeah
i used this on on message
pls help me
it worked for me
I'm going to try pycharm I think.
Ah alr, thnx
its pretty good ngl but i like vsc more
it also accepts more imports
someone please help me out
Vsc >>>>
I wonder if I could get a quick reference to the bot in action..
ok
so can u help me?
ig
very cheap promotion,
?

yes thats what i need help with
what?
give me a moment
ok?
what?
ok watever by
are u messing with me?
weird answer
Wtf are u talking about
me?
no one is making a scene
well
i didnt understand him and we are trying to understand each other
we are not
we are not even talking about math
..
yes
advanced math
i just need help with this
<@&831776746206265384>
wth r u saying
bro jk
Bro
Why
.........
ok have fun with getting banned
I dont mean that
for pinging mods for no reason
How would i get banned lol
Huh?
Ur Messing with me and i want mods to solve this
i dont want to fight or argue
mods pls help this poor man
i just want to end this
with his python thing
Stop
????
is there any way that i could make a command with
(ctx, member:discord.member)
and then make my bot react if member = None?
ok so basicsally
..
if member == None
idk
Ok
Huh???
this guy
What u want I didn't understand
I am new to this but why would members be none ?
i was reposting what he said
i told him to send the context
and he pings the mods
what can u do with a guy like that right
when did u say that?
BRO
If member is not a valid mention that will raise error
then u just started messing with me for no reason
here
u edited that
u do know mods can see edits...
i meant the same thing
i know
are u telling me to stop?!???!?!?!?
yes
??????
selon stop
what am i doing wrong??????
how??
How to make avatar command
i pinged the mod so i wouldnt have to argue with him
it has to be slash
!d discord.Member.avatar
property avatar```
Equivalent to [`User.avatar`](https://discordpy.readthedocs.io/en/master/api.html#discord.User.avatar "discord.User.avatar")
smh there are other ways
did u ever hear about talking in chat
or the art of war by sun tzu
!mute 860520783939239977 6h am not sure why do you believe that telling someone to stfu is anyhow appropriate here. If you don't want to help people then don't help them, don't insult them.
:incoming_envelope: :ok_hand: applied mute to @slate swan until <t:1651440963:f> (5 hours and 59 minutes).
what do u want??
guy got muted lol
i did ask
Can u pls repost
ok
is there any way that i could make a command with
(ctx, member:discord.member)
and then make my bot react if member = None?
not helping
huh?
im making an economy bot and i want people to be able to see others balance
but i also want the bot to tell u ur own balance if member = None
member : discord.Member = None maybe (i never used none on typehint)
i tried that but it just tells me. member is a required argument which is missing
remove
so i came here to ask if there is any way to do that
ok
Ok
im just gonna try googling it
👍
or ask other people for help
oh
i will try that
!d discord.Guild.premium_tier
The premium tier for this guild. Corresponds to “Nitro Server” in the official UI.
The number goes from 0 to 3 inclusive.
it will be 0, 1, 2 or 3
how to get category from id ?
so py if guild.premium_subscription_count == 3: do something( guild is a guild obj btw) would check if its level 3?
you mean a category channel?
guild.get_channel(id) same as the rest (edit: oof, sorry, i accidentally added an await before the get, sorry getch instincts lol)
What is the code BTW?
the code that worked was (ctx, member:discord.member = None)
yes
Literally I said that but u said it doesn't work
bet
whats ur error
<@&831776746206265384>
u told me to remove it, not give member default value None
I said that before
didn't ask
btw is there any tutorial for hikari
builtin discord gif lib
hello Etzeitet, dont see u very often, u dont chat a lot?
wait a sec, what happened to barney
did big bird get him?
😔 rip barney
I spend most of my time in help channels.
Cool
ah nice
etzeitet got him
😬
plot twist: etzeitet is big brib
Why spoiler
Actually Senjan got him, I'm just here to steal the glory.
lol
what is ur question?
either etzietit changed his pfp RIGHT NOW, or his pfp didn't load for me
it didnt load
I haven't touched it in about 2 years.
kek
stay pure
I got him first then I called mods 
without any context, just those two messages, would that be a good adult joke?
hey guys i need help with my code
ye what is it
import discord
from discord import Game
from discord.ext import commands
from discord.ext.commands import Bot
import asyncio
client=commands.Bot(command_prefix="+")
client.remove_command("help")
@client.event
async def on_ready():
print("Bot is ready!")
@client.event
async def on_member_join(member):
embed=discord.Embed(title="Welcome",color=0x9208ea,description=f"{member.mention} Just joined!")
embed.set_footer(text="Made by iOussamato_")
embed.set_thumbnail(url="https://cdn.discordapp.com/attachments/799558210846851076/970350107935526912/unknown.png")
msg = await client.send_message(discord.Object(id="835583387833204779"),embed=embed)
@client.command(pass_context=True)
async def hello(ctx):
await client.say("Hello!")
client.run("token lol")```
I think everything should work fine?
oof try updating your discord
copied old code lol
why did u name the bot client 😔
that looks pretty old
Idh good experience with discordpy haha
There are no errors, the code just doesn't work
run py -m pip install discord --upgrade on your cmdline
Hi ! I get this from newsAPI https://pastebin.com/tvCW7t6d
How can I print the title only if they come from sky.com ?
*ignore the -, i copied this from the website and the formatting is weird
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
^ most things there have been deprecated
data['title']
turn the payload into a dict and index it
check "name" and return the title (idk how this relates to #discord-bots )
data.get('title') 😡
thate better imo
File "<stdin>", line 1
py -m pip install discord --upgrade
^
SyntaxError: invalid syntax
KeyboardInterrupt
there are more titles in there, check the pastebin
not in your code
your command line
lol
this is for a bot, and idk where to ask
loop over the data and get the title ...
~/Welcomo$ py -m pip install discord --upgrade
bash: py: command not found
~/Welcomo$ File "<stdin>", line 1
py
pipbash: File: command not found
~/Welcomo$ py -m pip install discord --upgrade
bash: py: command not found
~/Welcomo$ ^
pip
bash: ^: command not found
~/Welcomo$ SyntaxError: invalid syntax
py
bash: SyntaxError:: command not found
~/Welcomo$
bash: : command not found
~/Welcomo$ KeyboardInterrupt
bash: KeyboardInterrupt: command not found
~/Welcomo$ py
ba
🍿
I'm using repl.it
bruv
BRUH, type exit()
exit()
never used json before, can you show me a sample loop please ?
exit
then do $python3 -m pip install discord --upgrade
it just a dict
json = fancy dict
py -m pip install discord --upgrade
bash: syntax error near unexpected token `py'
~/Welcomo$
its not even fancy

try python3 instead of py
i tried very hard to install python1 today, but couldn't 😔
python3
bash: syntax error near unexpected token `python3'
~/Welcomo$
try python now
Sad :(
more like a hash map
python
bash: syntax error near unexpected token `python'
~/Welcomo$
leave replit
L

download python :)
what
😂 Lol
but idh another host
;_;
Host rly?
replit has a python interpreter?
Imagine
Where can i host my bot for free, only replit ,_,
Use vsc online it exists
idfk, its trash anyway
really?
Yes
link link link
Wait
u can't run ur code in it
😬
its just for editing
what's the point then?
how
i wanna end my life bcz of this 🥲
don't
archaic 😬
is it lucas
im not im just saying its very outdated
Here it is https://vscode.dev/
Coder liam
here a good tutorial thats up to date https://vcokltfre.dev
A tutorial to help you make better Discord bots.
No
:o
They don't have dc. Py 2.0
what
are you replying to me?
no option to run, no terminal, its just for editing
which one is better, nextcord or the other one
ill say main or disnake imo
okie
!pypi disnake
its quite easy and they have a guide for migration
uh idk not from pc rn
is python 3.9.4 enough for this?
yep
is init something standardized or just an arbitrary name in the code I'm studying?
__init__
Ok
__init__ is a special method, it gets called everytime u create an instance of a class
disnake is best lib
its just the initiate of the class which is a dunder/special method which is called on an initiate of a class
