#discord-bots
1 messages · Page 438 of 1
Go on
that you can't save pictures locally when they are sent to a channel
ig u learn sum every day
yea but it's not letting me save it to my file path
i forgot to add @ in client.event that we never noticed
Well, how do you save?
BOI
no?
I tried attachment.save
in the code block it was in there
hey i need help with parsing of discord bot
well that’s why the event wasn’t gettint called lmao.
code block
ig tho
rep codeblock
given attachment is a single attachment and not a list of them
Bot, not bot
repl
return
relative-path
Go in #bot-commands or something please @velvet yarrow
how to parse codeblock
print("hello")
i want lang, code from this how can i do that
what
is
Here's how to format Python code on Discord:
```py
print('Hello world!')
```
These are backticks, not quotes. Check this out if you can't find the backtick key.
No, like he said: parsing the content in the code block including the language
capital M for member
In the type hint
discord.Member
i was about to say i was wrong lol
lol
discord.member -> discord.Member, to actually access the member object @slate swan
dude what are you asking for?
parsing codeblock
getting data from it
File "C:\Users\sharp\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "C:\Users\sharp\PycharmProjects\imamBot\quran_audio.py", line 378, in quran
await ctx.send(embed=embed, components=[action_row])
File "C:\Users\sharp\AppData\Local\Programs\Python\Python39\lib\site-packages\discord_components\dpy_overrides.py", line 354, in send_override
return await send(channel, *args, **kwargs)
File "C:\Users\sharp\AppData\Local\Programs\Python\Python39\lib\site-packages\discord_components\dpy_overrides.py", line 279, in send
components = _get_components_json(components)
File "C:\Users\sharp\AppData\Local\Programs\Python\Python39\lib\site-packages\discord_components\utils.py", line 27, in _get_components_json
return [row.to_dict() for row in lines] if lines else []
File "C:\Users\sharp\AppData\Local\Programs\Python\Python39\lib\site-packages\discord_components\utils.py", line 27, in <listcomp>
return [row.to_dict() for row in lines] if lines else []
File "C:\Users\sharp\AppData\Local\Programs\Python\Python39\lib\site-packages\discord_components\component.py", line 476, in to_dict
"components": [component.to_dict() for component in self.components],
File "C:\Users\sharp\AppData\Local\Programs\Python\Python39\lib\site-packages\discord_components\component.py", line 476, in <listcomp>
"components": [component.to_dict() for component in self.components],
AttributeError: 'dict' object has no attribute 'to_dict'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\sharp\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\ext\commands\bot.py", line 939, in invoke
await ctx.command.invoke(ctx)
File "C:\Users\sharp\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\ext\commands\core.py", line 863, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "C:\Users\sharp\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\ext\commands\core.py", line 94, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'dict' object has no attribute 'to_dict'
buttons = [
create_button(style=ButtonStyle.grey, label="Previous Page",
custom_id="user_previous_page"),
create_button(style=ButtonStyle.green, label="Next Page",
custom_id="user_next_page")
]
action_row = create_actionrow(*buttons)
await ctx.send(embed=embed, components=[action_row])```
Error occurs in the last line. Why can't I send the action_row as a component?
you're trying to convert dict to a dict from what i can see
components=action_row might work
worth a try
When I do that it gives Command raised an exception: KeyError: 0
So let me give more context
I have two bots with that chunk of code but it only works in one of them
I have application.commands selected in the developer portal
but it only works in one of them
Is there anything else I would need to send buttons?
did they change how it works?
So I uninstalled discord-components and installed 1.14 instead and it worked, it was because of 2.0 afterall. thank you
just write a regex for it
yeah
yeah i am trying
!d argparse.ArgumentParser
class argparse.ArgumentParser(prog=None, usage=None, description=None, epilog=None, parents=[], formatter_class=argparse.HelpFormatter, prefix_chars='-', ...)```
Create a new [`ArgumentParser`](https://docs.python.org/3.10/library/argparse.html#argparse.ArgumentParser "argparse.ArgumentParser") object. All parameters should be passed as keyword arguments. Each parameter has its own more detailed description below, but in short they are:
thanks
I'm sure R. Danny uses argparse often too
something already available in discord.py ?
flags?
it will be in v2, but cause the development is stopped, i dont think it will be available

@visual island it's past 11 
it's AM 
no...
Oh, my bad
good joke


bruh spotify ads
I know lmao. I use the modified version (not allowed to talk about it but I only use the ad free feature, else I don't download music or something haha)
i would never buy the premium thing anyway....
just use yt for music
Same cz me poor
I don't want to finish my data lmao
modified version exists?
it's breaking their tos?
Mhm
||imagine||
Lmao
wait wrong markup
😂🤣
how
Well, for me... I don't really use Spotify much nowadays cz exams
exams + listening to spotify = 100/100 score
!projects
Kindling Projects
The Kindling projects page on Ned Batchelder's website contains a list of projects and ideas programmers can tackle to build their skills and knowledge.
What are you trying to do lol
what do i have to put in my code to make it join a channel and rick roll someone
am trying to find a discord bot codes
wdym
if you want you can just take my code and change it to your liking
voice channel ?
yes
well, let's not spoonfeed
just wanna help the dude out
yeah but still
Generally if you spoonfeed, the user won't understand the code
Which is not good
ah
well im learning and still dont have it down
guess we all learn at different paces
but do you know what to put into the code to make it join and rick roll
Nah, I got spoonfed a few times, I just used the code that was given and learned what it did, and that pretty much got me started.
Everyone's different, although now I understand that getting spoonfed is pointless, even though people that need it may consider it beneficial and helpful in some sense.
Same 😂
how do i add /repissu:(example) and the example shld print in run?
this is my doubt pls help
heya, can someone help, I found this in the docs
async for entry in guild.audit_logs(action=discord.AuditLogAction.ban):
if I were to limit the number of entries, how would I unban all of the users from the entries found 
Hi, I was wondering if there is any way to make when my bot joins a server to send the following on a specific channel
I have joined [Server name] (Invitation link to server)
I have this code but I can't get it to work properly, could someone help me?
@bot.listen()
async def on_guild_join(guild):
channel = bot.get_channel(882529879445352498)
link = guild.link
embed2 = discord.Embed(title='\n', description='\n', color=0xcd5c5c)
embed2.add_field(name=f'Bot Agregado Al Servidor {guild}', value=f'[Link Del Servidor]({link})')
await channel.send(embed=embed2)```
What is guild.link?
I want to get the discord link of my bot is joined, but i dont know how to make it
Do you mean invite link?
Same but for me when I first joined discord and saw bots that was the first time I thought of making one and after that I got confused that there are so many Libs what should I use and then after 4 days I choose python and then tried to understand but wasn't able to, that's why I took help of GitHub and tried to understand the code but one day when I was asking for help about that code to someone in the other server they rejected to help me and that's what raged me towards programming and made me learn dpy and others libs in python 🤣🤣🤣
I need that when my bot joins another server it sends me a message to a specific channel with the name of the server that has joined and the link of that server
dont know if i can make this
Lmao
Iterate through the guild's text channels with a for loop and try to create an invite link for each channel. Use try...except to try to create an invitation link, and if it doesn't then continue.
Should be something like this:
@bot.event
async def on_guild_join(guild):
invite = None
for channel in guild.text_channels:
try:
invite = await channel.create_invite()
break
except:
continue
if invite == None:
msg = f"Joined **{guild.name}** with `{guild.member_count}` members and couldn't create an invite link."
else:
msg = f"Joined **{guild.name}** with `{guild.member_count}`. Invite: {invite}"
channel = bot.get_channel(882529879445352498)
await channel.send(msg)
Im going to try it ty
No problem.
Works good, ty

if invite is None
Also, be ready to get rate limited
== > is.
No lol
It will try, if it could it will break.
So the for loop would stop.
!e
a = None
print(a is None)
print(a == None)
@maiden fable :white_check_mark: Your eval job has completed with return code 0.
001 | True
002 | True
Hmm
Hello there.
Just use asyncio.sleep for each loop
Ik
Mhm.
I forgot about that mb.
anyone know the ban limit for users who arent in the server? 
I don't really think there is any ngl
await bans()```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Retrieves all the users that are banned from the guild as a [`list`](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.9)") of [`BanEntry`](https://discordpy.readthedocs.io/en/stable/api.html#discord.BanEntry "discord.BanEntry").
You must have the [`ban_members`](https://discordpy.readthedocs.io/en/stable/api.html#discord.Permissions.ban_members "discord.Permissions.ban_members") permission to get this information.
Try checking the len
yeah I know, around 8.5k bans 
It is a coro...
Oh right.
anyone know the exact limit? I wanna unban some so I can still ban users who arent in the server 
I still download most of songs locally 
Exact time limit? Is there some cooldown on unban?
Limit on number of bans in a server bro...
Well it's very normal that I don't have availability of internet a lot of times, so 
^ @slate swan
Yes I was seeing that
there's a limit on users you can ban who arent in the guild
I never knew there's something like this
As in he won't be in the guild
if a user is banned, and they were in the guild while they were banned, it adds up to the limit
Wrong words
Banned user is thrown out of thee guild
^
still adds on to limit afaik
Wdy want to do
So you need to wait for some time to let the bucket reset..
Idk what's the exact duration of cooldown, but you can ask at discord.gg/discord-developers
I think they need to know how much time is left for this cooldown to reset
Is he trying to make a cooldown for a cmd or what
They would never give an exact number, so people won't abuse it.
@valid patio slash cmds?
no like any even !say is ok
Ok
bot shld say hello
Pass a text parameter to your function.
Then make the bot send the text.
i am new to discord bots so help
@bot.command()
async def say(ctx, *, text):
await ctx.send(text)
ok
What is that * for?
Well yea that is better @dapper cobalt
If the text is hello there it won't only read hello.
what is ctx?
Context
!d discord.ext.commands.Context
class discord.ext.commands.Context(**attrs)```
Represents the context in which a command is being invoked under.
This class contains a lot of meta data to help you understand more about the invocation context. This class is not created manually and is instead passed around to commands as the first parameter.
This class implements the [`Messageable`](https://discordpy.readthedocs.io/en/stable/api.html#discord.abc.Messageable "discord.abc.Messageable") ABC.
k
Oops
@valid patio don't just copy & paste tho. Try to understand the code. There's still some ways to make a simple say command better.
@dapper cobalt well there are more ways but ur that way was the best lol
That directly says what u sent
Nope. That was very simple and may even cause some issues. He can make it return if the text contains mentions.
Yep
k
I don't spoonfeed unless it's not the best code, so they would learn.
It's something like a chat bot like if we say a chat bot to say @ everyone it mentions the whole server lol
how to check if the channel has certain permissions on discordpy?
That's what happened with my bot too
What do you mean?
Want to check channel text permissions on discordpy
!d discord.TextChannel.permissions_for if you want to check permissions of a certain member in the channel.
permissions_for(member)```
Handles permission resolution for the current [`Member`](https://discordpy.readthedocs.io/en/stable/api.html#discord.Member "discord.Member").
This function takes into consideration the following cases...
What about permissions like sending messages?
It shows all permissions.
@dapper cobalt what's the event you hate the most?
I don't know tbh lol. All of them are useful.
All are useful but I hate 1 of them
class discord.Permissions(permissions=0, **kwargs)```
Wraps up the Discord permission value.
The properties provided are two way. You can set and retrieve individual bits using the properties as if they were regular bools. This allows you to edit permissions.
Changed in version 1.3: You can now use keyword arguments to initialize [`Permissions`](https://discordpy.readthedocs.io/en/stable/api.html#discord.Permissions "discord.Permissions") similar to [`update()`](https://discordpy.readthedocs.io/en/stable/api.html#discord.Permissions.update "discord.Permissions.update").
* makes every parameter after that a key word only
canu tell a api refrence sheet for discord bots ?
sheet?
or docs?
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
@bot.command()
async def foo(ctx, arg1, arg2, *args):
...
# Invoking "?foo one two three four" will have
# arg1 = 'one'
# arg2 = 'two'
# args = ('three', 'four')
@bot.command()
async def bar(ctx, arg1, arg2, *, args):
...
# Invoking "?bar one two three four" will have
# arg1 = 'one'
# arg2 = 'two'
# args = 'three four'```
Make it add the mute role to the targeted member.
!d discord.Member.add_roles
await add_roles(*roles, reason=None, atomic=True)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Gives the member a number of [`Role`](https://discordpy.readthedocs.io/en/stable/api.html#discord.Role "discord.Role")s.
You must have the [`manage_roles`](https://discordpy.readthedocs.io/en/stable/api.html#discord.Permissions.manage_roles "discord.Permissions.manage_roles") permission to use this, and the added [`Role`](https://discordpy.readthedocs.io/en/stable/api.html#discord.Role "discord.Role")s must appear lower in the list of roles than the highest role of the member.
embed.add_field(name = "Arguments", value = f"``{''.join(',') for i in ctx.args}``", inline = False)
returns
how do i fix this
You closed the parentheses for .join() in the wrong place
am i meant to close it after ctx.args?
Yeah
i am confused that worked always
`Traceback (most recent call last):
File "C:/Users/jakob/Desktop/QEmotes_Beta/bot.py", line 872, in <module>
bot.run(bottoken.read())
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\discord\client.py", line 723, in run
return future.result()
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\discord\client.py", line 702, in runner
await self.start(*args, **kwargs)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\discord\client.py", line 666, in start
await self.connect(reconnect=reconnect)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\discord\client.py", line 601, in connect
raise PrivilegedIntentsRequired(exc.shard_id) from None
discord.errors.PrivilegedIntentsRequired: Shard ID None is requesting privileged intents that have not been explicitly enabled in the developer portal. It is recommended to go to https://discord.com/developers/applications/ and explicitly enable the privileged intents within your application's page. If this is not possible, then consider disabling the privileged intents instead.
Process finished with exit code 1
`
Pycharm sucks use vs code
@rough ledge
oh nvm
Go to developer your bot application then enable intents there
ty
Yea
Oh you used ',' for i in ctx.args in join()
Change to i for i in ctx.args
not sure that'll work
Hello I had a question,
Is there a way that my bot can get the emoji.url of any emoji without having to be inside the server where said emoji is located?
Or is impossible?
My Code
@bot.command() # Ver Emoji
async def emoji(ctx, emoji: discord.Emoji = None):
if emoji is None:
await ctx.reply("> ⛔️ No se pudo encontrar el emoji proporcionado o se le olvidó de proporcionar uno.")
else:
await ctx.reply(emoji.url, mention_author=False)
Syntax is separator.join(i for i in iterable)
Or just separator.join(iterable)
ctx.args is your iterable
@wary ravine
embed.add_field(name = "Arguments", value = f"``{','.join(i for i in ctx.args)}``", inline = False)
embed.add_field(name = "Arguments", value = f"``{','.join(i for i in ctx.args)}``", inline = False)
TypeError: sequence item 0: expected str instance, roblox found
roblox is the name of my cog
Aah
Try str(i) for i .....
<cogs.FOWcogs.roblox object at 0x7581ac30>,<discord.ext.commands.context.Context object at 0x736a8210>,1
Yeah, seems like self and ctx also come in ctx.args
You can use slicing syntax on ctx.args inside join()
surely that's overcomplicating it
I dont see another option
ctx.args[:2] will work
[2:]
yes my bad
its still possible yes
we gave you an answer earlier on
bot hasnt got perms
ok but does it have perms
clearly not since its returned a missing permissions error
do you have permissions
what is the bot trying to do
yeah
cant
thats like if my highest role was admin and i tried to remove it
what is the error
send_message isn't a thing
use ctx.send or channel.send depending on what you're trying to send to
i want to dm that user
mm
no workking
!d discord.Member.avatar
avatar```
Equivalent to [`User.avatar`](https://discordpy.readthedocs.io/en/stable/api.html#discord.User.avatar "discord.User.avatar")
and what if we talking about a specific id
like 531507203811573762
id```
Equivalent to [`User.id`](https://discordpy.readthedocs.io/en/stable/api.html#discord.User.id "discord.User.id")
get member then do member.acvatar
ight
Sorry to bother but I have a question.
Right now I have in my bot music commands that I have downloaded and inserted in the source code of the bot, so that it plays those specific songs, but when one of those songs is finished it does not go to the next inserted song. I'm testing but I can get it to work properly, can someone help me?
guild.me.roles will return the bots roles
because
I'm doing an invite system in discord py but I don't understand why it doesn't work even though I gave the command
here the code:
@ commands.command (pass_context = True) async def invites (ctx, time_in_seconds, uses): invitelink = await discord.abc.GuildChannel.create_invite (ctx.message.channel, max_uses = uses, max_age = time_in_seconds) await ctx.send (invitelink)
pip install discord.py ?
yea
do pip show discord.py
@spring flax
help please
error?
@slate swan what did you import
one momente let me try
moment*
its import discord not import discord.py
there is no space, it is discord that makes it look like this
!d discord.Member.avatar_url
avatar_url```
Equivalent to [`User.avatar_url`](https://discordpy.readthedocs.io/en/stable/api.html#discord.User.avatar_url "discord.User.avatar_url")
hmm
so just do console.log(avatar_url)
i tried lol
AttributeError: 'str' object has no attribute 'avatar_url'
this is not js lol
still works
lol
huh
It will still work if you do:
class console():
def log(value):
print(value)
console.log("Hello world!")
how to check whether the message.author have a specific role
ignore me
ok
!d discord.Member.roles
roles```
A [`list`](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.9)") of [`Role`](https://discordpy.readthedocs.io/en/stable/api.html#discord.Role "discord.Role") that the member belongs to. Note that the first element of this list is always the default [‘@everyone](mailto:'%40everyone)’ role.
These roles are sorted by their position in the role hierarchy.
That won't work, you forgot the self parameter before the value in the log function parameters
Oh right, my bad.
can you give me a example i tried this
guild = client.get_guild(878488858277339176)
for role in guild.roles:
if role.id == 882506067387514890:
return
what is wrong with it?
File "C:\Users\GLzbc1qcqwjujg2h3dp3n9k0fa6ysset8u87xr95x547uam.py", line 6, in <module>
losyimg = id.avatar_url_as(format=png, static_format='png', size=512)
AttributeError: 'builtin_function_or_method' object has no attribute 'avatar_url_as'```
😦
i want it to return if the member has that specific role but doesn't seem to work
Why it isn't set the thumbnail
@bot.command()
@commands.has_permissions(administrator = True)
async def clear(ctx, amount : int):
await ctx.channel.purge(limit=amount)
emb=discord.Embed(title="Messages deleted successfully", description="🗑")
emb.add_field(name=f"Responsible moderator : {ctx.author.name}", value=f"Responsible channel {ctx.channel.mention}")
emb.set_thumbnail(url=member.avatar_url)
msg=await ctx.send(embed=emb, delete_after=3)
?
role = ctx.guild.get_role(role_id)
if role in ctx.author.roles:
# do something
thumbnail does not have a url attribute. Either icon_url or text.
!d discord.Embed.set_thumbnail
set_thumbnail(*, url)```
Sets the thumbnail for the embed content.
This function returns the class instance to allow for fluent-style chaining.
Changed in version 1.4: Passing [`Empty`](https://discordpy.readthedocs.io/en/stable/api.html#discord.Embed.Empty "discord.Embed.Empty") removes the thumbnail.
Wait, it does?
can i do it with a specific id
async def dp(ctx, *, member: discord.Member = None):
if not member:
member = ctx.message.author
userAvatar = member.avatar_url
await ctx.send(userAvatar)
no i mean im trying to get my pfp's link print to terminal
you can do log = print
not in like a bot
ok so do
async def dp(ctx, *, member: discord.Member = None):
if not member:
member = ctx.message.author
userAvatar = member.avatar_url
print(userAvatar)
Hoi
I was talking about set_thumbnail as if it was set_footer. My bad. 😬
does anyone know how the Python bot's !e command works?
!source eval
Run Python code and get the results.
async def dp(ctx, *, member:discord.Member=None):
if member is None:
member = ctx.author
print(member.avatar_url)
That's shorter and easier. 🙂
hmm
can you do it vith ids?
thanks
It will take member IDs, usernames, nicknames, or @.
no i mean a specific
like mine
531507203811573762
see
You want it to print only your avatar url?
yeaa
oh
nein
async def dp(ctx):
print(bot.get_user(531507203811573762).avatar_url)
hmmm
it refuses to print
@dapper cobalt u know discord.py internals?
You did not put a decorator..
Nope.

bruh
uummm
bot = commands.Bot(command_prefix=prefix)
indent @sage mural
👍
yea sorry
TypeError: 'set' object is not callable 
u have an object named set somewhere
@bot.commands()
async def test(ctx):
print(bot.get_user(531507203811573762).avatar_url)
a command or something
import shutil, discord
from pyfiglet import figlet_format
from discord.ext import commands
bot = commands.Bot(command_prefix="!")
def print_c(s):
print(s.center(shutil.get_terminal_size().columns))
def print_big(x):
x = figlet_format(x, font = "standard")
print(x)
@bot.commands()
async def dp(ctx):
print(bot.get_user(531507203811573762).avatar_url)
ik a bit
I need help
Did u do "prefix test"? on your test server?
You didn't run the bot.
i used to read the source code for fun
used to
@slate swan you need a bot to test it on
but i just want to print it
do i need a token for that
Ye
Yes.


How are you going to make a bot without specifying which bot? 
you can use a public api to parse your id and return the url that way
What's public api?
i dont need a bot tho
where can i get that
Uh
that would be ig better
What..
You need a bot.
You won't get the link from thin air buddy.
You need something to get the link.
Request URL: https://lookup.discord.id/api/lookup/sendLookup
How can you see without eyes?
but you need to post
inputid: "idhere"



how do you use it
fnjljnegjedgkjkdfkdf
oh god
this is much harder then i thought lmao
Guys, i want to add reactions, 👍 and 👎 to an embed, can anybody help me?
is it author.user.tag or something else?
ctx.add_reaction i guess
can someone help
But how do i write the name of the emojis?
i see
@tasks.loop(seconds=5)
async def remind():
channel = self.bot.get_channel(881283121532788746)
await channel.send("test")
remind.start()
Should I start the loop in the setup() function?
probably
I just tried, and as I expected, remind is not defined.
Probably it should be ClassName.remind.start().
Nope. 'VoteReminder' has no attribute 'remind'.
You can use !charinfo
!charinfo 👍
\U0001f44d: THUMBS UP SIGN - 👍
Oh its ok, i copied the emojis from google
You should also add await bot.wait_until_ready()
But thanku
I had an indentation problem. The loop was inside a function lol.
is it possible to send data from django to my discordbot ? for instance, I send a message on my website then django sends this message to my discord bot and the bot post this message on a channel
guys how to make a category
you can start it in __init__ if you want
someone tell me how to make a category and add some restrtiction to it
Yeah I've figured that out and did
def __init__(self, bot):
self.bot = bot
self.remind.start()
bot.remove_command('help')
@dapper cobalt can u plz help?
oh 
!d discord.Guild.create_category
await create_category(name, *, overwrites=None, reason=None, position=None)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Same as [`create_text_channel()`](https://discordpy.readthedocs.io/en/stable/api.html#discord.Guild.create_text_channel "discord.Guild.create_text_channel") except makes a [`CategoryChannel`](https://discordpy.readthedocs.io/en/stable/api.html#discord.CategoryChannel "discord.CategoryChannel") instead.
Note
The `category` parameter is not supported in this function since categories cannot have categories.
whats that position for
how can i use it
i wanna use that position
It's the position of the category in the server's categories' index.
how can i keeep it on the first
position=0.
thanks
guys is it even possible to get the everyone role
What do you mean by get it?
i wanna write overwrites for @sturdy shoalone role but how can i get a role that is default in every server
The everyone role's ID is as same as the guild's ID.
wait is it ???
Yeah.
!d discord.Guild.get_role
get_role(role_id)```
Returns a role with the given ID.
thanks

guys how can i get image url in message ?
message is a lot i just want a image link
how can i get this from message ?
please help me
how do u mention a rank in the code
.
I have a question
I want my bot to send a message when the user sends
hello [bot mention]
how?
I would like to learn how to code a Discord BOT in Python pls I want it
!resources
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
Can I be friending you'
!d discord.Message.attachments
A list of attachments given to a message.
Will return a list of attachments (discord.Attachment) which has a url attribute.
!d discord.Attachment
class discord.Attachment```
Represents an attachment from Discord.
`str(x)` Returns the URL of the attachment.
`x == y` Checks if the attachment is equal to another attachment.
`x != y` Checks if the attachment is not equal to another attachment.
`hash(x)` Returns the hash of the attachment.
Changed in version 1.7: Attachment can now be casted to [`str`](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.9)") and is hashable.
I would like to be friending you.
I don't help in DMs sorry.
@ocean trail I can help, what is the issue
And I will help you if I can.
thx I want it
how would i make json list for guilds + list of members inside of them
heeeelp
you would want to append a array
Why make a JSON list when you can get them from the bot's cache?
!d discord.on_message
discord.on_message(message)```
Called when a [`Message`](https://discordpy.readthedocs.io/en/stable/api.html#discord.Message "discord.Message") is created and sent.
This requires [`Intents.messages`](https://discordpy.readthedocs.io/en/stable/api.html#discord.Intents.messages "discord.Intents.messages") to be enabled.
Warning
Your bot’s own messages and private messages are sent through this event. This can lead cases of ‘recursion’ depending on how your bot was programmed. If you want the bot to not reply to itself, consider checking the user IDs. Note that [`Bot`](https://discordpy.readthedocs.io/en/stable/ext/commands/api.html#discord.ext.commands.Bot "discord.ext.commands.Bot") does not have this problem.
You want it to reply when someone sends "hello @bot" right?
yes
Then you need an on_message event.
whut
And check if the message.content is equal to "hello <@bot_id>"
no like this
{
"1234567890": {"12345678901234567890": "something","2345678901234567890": "something2"}
}
Example:
@bot.event
async def on_message(message):
if message.content == "hello":
await message.channel.send("Hi")
if message.content.lower().startswith("hello ricardo" or "hello ricardo bot"):
if (not message.author.id in devs):
await message.channel.send("Hello " + "<@!" + str(message.author.id) + ">! :yum:")
elif (message.author.id in devs):
await message.channel.send("Hello dev! :smile:")```
I want another or
embed = discord.Embed(title=title,description=f":one: {a}\n\n:two: {b}",color = discord.Color(0x5d018f))
msg = await ctx.send(embed=embed)
await msg.add_reaction(":one:")```
it says that the emoji is unknown
Do you want to save some data for every member in the guild?
ofc it does as it's not into the server
hmmmm
!charinfo 1️⃣
\u0031 : DIGIT ONE - 1
\ufe0f : VARIATION SELECTOR-16 - ️
\u20e3 : COMBINING ENCLOSING KEYCAP - ⃣
\u0031\ufe0f\u20e3
well not every member but yes
Use its unicode.
what is the attribute used for get_role
I don't suggest using JSON. It's not good as a database.
why do you want it
!d discord.Guild.get_role
get_role(role_id)```
Returns a role with the given ID.
!chardinfo 2️⃣
what am i supposed to do then
ctx.get_role
or
self.bot.get_role
!charinfo 2️⃣
\u0032 : DIGIT TWO - 2
\ufe0f : VARIATION SELECTOR-16 - ️
\u20e3 : COMBINING ENCLOSING KEYCAP - ⃣
\u0032\ufe0f\u20e3
You can use an actual database like MongoDB.
oh you mean the class it belongs to
!charinfo 😋
\U0001f60b: FACE SAVOURING DELICIOUS FOOD - 😋
ctx.guild.get_role
yep
its Client/Bot and Guild
ok thanks
Does commands.Bot have a get_role attribute?
its a function
Nope. Only discord.Guild.
@hasty iron having a issue
!charinfo 😄
\U0001f604: SMILING FACE WITH OPEN MOUTH AND SMILING EYES - 😄
?
my embed output is like this
var = "verification"
everyone = ctx.guild.get_role(ctx.guild.id)
perms = var.overwrites_for(everyone)
perms.send_messages = False
perms.read_messages=False
perms.speak=False
perms.read_message_history=False
await ctx.guild.create_category(var, overwrites=perms, reason="verification system", position=0)```
i wanna get the overwrites for that verification category but how
i am dm the message athour
use the embed kwargs
Is there a way to join a server where your bot is in but dont know any invite codes
!d discord.CategoryChannel.overwrites
overwrites```
Returns all of the channel’s overwrites.
This is returned as a dictionary where the key contains the target which can be either a [`Role`](https://discordpy.readthedocs.io/en/stable/api.html#discord.Role "discord.Role") or a [`Member`](https://discordpy.readthedocs.io/en/stable/api.html#discord.Member "discord.Member") and the value is the overwrite as a [`PermissionOverwrite`](https://discordpy.readthedocs.io/en/stable/api.html#discord.PermissionOverwrite "discord.PermissionOverwrite").
no i mean
"i wanna get the overwrites for that verification category but how"
"the overwrites for that verification category "
output
use the embed kwarg
perms = var.overwrites_for(everyone)
in here its telling that the str var has no attribute category but i want that for the verification category but how
@hasty iron ^ this one
create_category returns the created category channel
Try permissions_for instead of overwrites_for.

i don't understand
var is a string, still wouldn't work
so will it require any class
Try to create an invite for any channel in the server.
Ah right.
You need to get the category first.
?? just get the retruned value of create_category and use that instead
use the embed keyword argument of send
create_category will return a CategoryChannel object of the category created.
can u just gimme a example and tell me what u mean
!d discord.CategoryChannel
class discord.CategoryChannel```
Represents a Discord channel category.
These are useful to group channels to logical compartments.
`x == y` Checks if two channels are equal.
`x != y` Checks if two channels are not equal.
`hash(x)` Returns the category’s hash.
`str(x)` Returns the category’s name.
create_category returns a CategoryChannel
i dont know what you dont undertsnad
ok
categ = await ctx.guild.create_category(name="something")
print(categ)
@dapper cobalt wht should i put instead of var
me getting confused at that cpoint
point
var = await ctx.guild.create_category(*kwargs)
ok
lemme try
@dapper cobalt
everyone = ctx.guild.get_role(ctx.guild.id)
perms = var.overwrites_for(everyone)
perms.send_messages = False
perms.read_messages=False
perms.speak=False
perms.read_message_history=False
var = await ctx.guild.create_category("Verification-Logger", overwrites=perms, reason="For zenesis verification system", position=0)```
still its wrong in the second line i need to assign something valid
What do u think the problem is? 🙂
var = await ctx.guild.create_category("Verification-Logger",overwrites=perms, reason="For zenesis verification system", position=0) needs to be before perms = var.overwrites_for(everyone)
these are basic issues
if you can't fix them alone
yep so how will i overwrite it
By overwriting it.
i mean i know what u r talking about but i am facing a different issue
Give me your full code.
How do I start writing a Discord BOT in Python?
Google.
i think overwrites is a dict[Role | Member, PermissionOverwrites]
Ask for help with your code here, not how to start from the zero.
I'm not?
!d discord
In order to work with the library and the Discord API in general, we must first create a Discord Bot account.
Creating a Bot account is a pretty straightforward process.
Heres the docs, go look into what you want and build a bot from it. Theres also examples
well is there anyway i can get the required category in overwrites_for
@hoary gusthttps://discordpy.readthedocs.io/en/stable/api.html?highlight=create_cate#discord.Guild.create_text_channel look at the overwrites argument
the category isn't even created yet ?? how do you expect to get overwrites for something that doesn't even exist
yes
thats the issue
refer to this then @hoary gust
oops
message before it
??
look at the overwrites argument
look at what it takes
it takes in a dictionary
overwrites = {
guild.default_role: discord.PermissionOverwrite(read_messages=False),
guild.me: discord.PermissionOverwrite(read_messages=True)
}
channel = await guild.create_text_channel('secret', overwrites=overwrites)
thats the example
or "hello <@bot_id_here>"
@hasty iron i am using overwrites_for
They made you lose it. 
are you even listening
to what i am saying
the category doesn't even exist???
overwrites = {
guild.default_role: discord.PermissionOverwrite(read_messages=False),
guild.me: discord.PermissionOverwrite(read_messages=True)
}
channel = await guild.create_text_channel('secret', overwrites=overwrites)
``` this is how you're supposed to do it
yes
replace create_text_channel with create_category and change the overwrites dict
so i need to make it exist first

wait a sec i have written create_category
what
lol
Can you show us the full code?
wait a sec
man i give up, good luck
!paste if it's too long
Pasting large amounts of code
If your code is too long to fit in a codeblock in discord, you can paste your code here:
https://paste.pydis.com/
After pasting your code, save it by clicking the floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.

hmmmmm?
Can I test your Discord BOTs pls I want it
@dapper cobalt
stats = w.find_one({"guild": ctx.guild.id})
print(3)
category = discord.utils.get(ctx.guild.categories, name='Verification-Logger')
print(4)
if stats is None:
print(5)
if category is None:
everyone = ctx.guild.get_role(ctx.guild.id)
perms = var.overwrites_for(everyone)
perms.send_messages = False
perms.read_messages=False
perms.speak=False
perms.read_message_history=False
await ctx.guild.create_category("Verification-Logger", overwrites=perms, reason="For zenesis verification system", position=0)
Ok
guys can i use member token instead bot token ?
That's called self-botting
Against TOS
@dapper cobalt ^
ok,but how can i do that ?
You will get banned if you get caught doing that
!rule 2
2. Follow the Discord Community Guidelines and Terms Of Service.
Lets not do that
how can i do self-botting ?
Don't do it.
stop it bud
Okay did you just ignore the 3 above messages
o.O
why ?
u can get banned
@compact field We won't be helping you with ToS breaking projects
@dapper cobalt
Please don't ask for help with it
ok sorry
stats = w.find_one({"guild": ctx.guild.id})
print(3)
category = discord.utils.get(ctx.guild.categories, name='Verification-Logger')
if category is None:
overrides = {ctx.guild.default_role: discord.PermissionOverwrites(send_messages=False, read_messages=False)}
category = await ctx.guild.create_category(name="Verification-Logger", overwrites=overrides)
@hoary gust
is that default role everyone
Yes.
i see lemme try it
@dapper cobalt got a error
discord dont have any permission overwrites
Replace PermissionOverwrites with PermissionOverwrite
i think its discord.PermissionOverwrite
My bad, I added an s.
ok
i have a problem, when someone joined my server then nothing happening why?
code:
import discord
from discord.ext import commands
from datetime import datetime
from discord import Game
client = commands.Bot(command_prefix=".")
@client.event
async def on_ready():
print("Bot is ready!")
@client.command()
async def on_member_joined(member):
channel = client.get_channel(id=882282531276345416)
embed=discord.Embed(title="Sample Embed", url="https://realdrewdata.medium.com/", description="This is an embed that will show how to build an embed and the different components", color=0xFF5733)
embed.set_author(name=member.mention,url="https://twitter.com/RealDrewData", icon_url=member.default_avatar_url)
embed.set_thumbnail(url="https://i.imgur.com/axLm3p6.jpeg")
embed.add_field(name="Title 1", value="his is the value for field 1. This is NOT an inline field.", inline=True)
embed.set_footer(text="This is the footer. It contains text at the bottom of the embed")
await channel.send(embed=embed)
client.run(TOKEN)
Using intents in discord.py
Intents are a feature of Discord that tells the gateway exactly which events to send your bot. By default, discord.py has all intents enabled, except for the Members and Presences intents, which are needed for events such as on_member and to get members' statuses.
To enable one of these intents, you need to first go to the Discord developer portal, then to the bot page of your bot's application. Scroll down to the Privileged Gateway Intents section, then enable the intents that you need.
Next, in your bot 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
intents = Intents.default()
intents.members = True
bot = commands.Bot(command_prefix="!", intents=intents)
For more info about using intents, see the discord.py docs on intents, and for general information about them, see the Discord developer documentation on intents.
First, it's on_member_join
Second, it's @client.event
Third, you don't need to pass id in get_channel
Fourth, embed.set_author is outside the function
Fifth, enable member intents.
Learn me how to make a enmbed in Python
!d discord.Embed
class discord.Embed(**kwargs)```
Represents a Discord embed.
`len(x)` Returns the total size of the embed. Useful for checking if it’s within the 6000 character limit.
Certain properties return an `EmbedProxy`, a type that acts similar to a regular [`dict`](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.9)") except using dotted access, e.g. `embed.author.icon_url`. If the attribute is invalid or empty, then a special sentinel value is returned, [`Embed.Empty`](https://discordpy.readthedocs.io/en/stable/api.html#discord.Embed.Empty "discord.Embed.Empty").
For ease of use, all parameters that expect a [`str`](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.9)") are implicitly casted to [`str`](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.9)") for you.
When I make the intent error I get, I already had this problem!
What's the error?
Traceback (most recent call last):
File "D:\discord\main.py", line 35, in <module>
client.run(TOKEN)
File "D:\python\lib\site-packages\discord\client.py", line 723, in run
return future.result()
File "D:\python\lib\site-packages\discord\client.py", line 702, in runner
await self.start(*args, **kwargs)
File "D:\python\lib\site-packages\discord\client.py", line 666, in start
await self.connect(reconnect=reconnect)
File "D:\python\lib\site-packages\discord\client.py", line 601, in connect
raise PrivilegedIntentsRequired(exc.shard_id) from None
discord.errors.PrivilegedIntentsRequired: Shard ID None is requesting privileged intents that have not been explicitly enabled in the developer portal. It is recommended to go to https://discord.com/developers/applications/ and explicitly enable the privileged intents within your application's page. If this is not possible, then consider disabling the privileged intents instead.
Exception ignored in: <function _ProactorBasePipeTransport.del at 0x000002CB072C9EE0>
Traceback (most recent call last):
File "D:\python\lib\asyncio\proactor_events.py", line 116, in del
self.close()
File "D:\python\lib\asyncio\proactor_events.py", line 108, in close
self._loop.call_soon(self._call_connection_lost, None)
File "D:\python\lib\asyncio\base_events.py", line 746, in call_soon
self._check_closed()
File "D:\python\lib\asyncio\base_events.py", line 510, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
When I experience this error, it is always written to cover leaks, but as soon as I delete it it's okay
what's the problem??
It tells you in the error.
Traceback (most recent call last):
File "D:\discord\main.py", line 35, in <module>
client.run(TOKEN)
File "D:\python\lib\site-packages\discord\client.py", line 723, in run
return future.result()
File "D:\python\lib\site-packages\discord\client.py", line 702, in runner
await self.start(*args, **kwargs)
File "D:\python\lib\site-packages\discord\client.py", line 666, in start
await self.connect(reconnect=reconnect)
File "D:\python\lib\site-packages\discord\client.py", line 601, in connect
raise PrivilegedIntentsRequired(exc.shard_id) from None
discord.errors.PrivilegedIntentsRequired: Shard ID None is requesting privileged intents that have not been explicitly enabled in the developer portal. It is recommended to go to https://discord.com/developers/applications/ and explicitly enable the privileged intents within your application's page. If this is not possible, then consider disabling the privileged intents instead.
Exception ignored in: <function _ProactorBasePipeTransport.del at 0x000002CB072C9EE0>
Traceback (most recent call last):
File "D:\python\lib\asyncio\proactor_events.py", line 116, in del
self.close()
File "D:\python\lib\asyncio\proactor_events.py", line 108, in close
self._loop.call_soon(self._call_connection_lost, None)
File "D:\python\lib\asyncio\base_events.py", line 746, in call_soon
self._check_closed()
File "D:\python\lib\asyncio\base_events.py", line 510, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
Now it works .......
message.channel
thanks
@lament mesa is there any event for category delete?
on_guild_update
elif isinstance(error, discord.errors.ClientException):
await ctx.send(embed=discord.Embed("Sorry im already playing audio. Do !stop to stop it",color=discord.Color.random()))```
Whenever i play audio, and if it is already playing audio, why isnt this handling it?
_run_event
await coro(*args, **kwargs)
File "bot.py", line 100, in on_message
await bot.process_commands(message=message)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 976, in process_commands
await self.invoke(ctx)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 943, in invoke
await ctx.command.dispatch_error(ctx, exc)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 422, in dispatch_error
await injected(cog, ctx, error)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 71, in wrapped
ret = await coro(*args, **kwargs)
File "/home/runner/chad-the-discord-bot/cogs/fun.py", line 964, in vcmeme_error
raise (error)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 939, in invoke
await ctx.command.invoke(ctx)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 863, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 94, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: ClientException: Already playing audio.
Timed out oops
172.18.0.1 - - [01/Sep/2021 13:23:44] "HEAD / HTTP/1.1" 200 -
The Great Hall
The Great Hall
Ignoring exception in on_message
Traceback (most recent call last):
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "/home/runner/chad-the-discord-bot/cogs/fun.py", line 909, in vcmeme
voice.play(discord.FFmpegPCMAudio(
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/voice_client.py", line 558, in play
raise ClientException('Already playing audio.')
discord.errors.ClientException: Already playing audio.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/client.py", line 343, in _run_event
await coro(*args, **kwargs)
File "bot.py", line 100, in on_message
await bot.process_commands(message=message)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 976, in process_commands
await self.invoke(ctx)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 943, in invoke
await ctx.command.dispatch_error(ctx, exc)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 422, in dispatch_error
await injected(cog, ctx, error)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 71, in wrapped
ret = await coro(*args, **kwargs)
File "/home/runner/chad-the-discord-bot/cogs/fun.py", line 964, in vcmeme_error
raise (error)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 939, in invoke
await ctx.command.invoke(ctx)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 863, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 94, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: ClientException: Already playing audio.
Timed out oops
Timed out oops```
playing voice memes, not against tos
also how to stop what it is playing?
@lament mesa is it even possible cause i am not getting anything related to category in this event in the dpy docs
on_guild_update
but how
how can i create one in my embed?
i didnt get anything about category in the docs
check if before.categories is equal to after.categories
what!
check if the members joined in the vc is equal to one
on_guild_update triggers on changes done on categories
what is needed for it!?
For the bot ban?, just wanna make my server secured
some people use bots to nuke servers
So I wanna make my bot ban
those
I meant that
you misunderstood i don't know your problem i wanted to solve my own!
Yeah, I know embeds
What do you mean "that wasn't invited"?
For example, raid bots, that my staff didnt agree on adding, just randomly showing up
A bot can't join a server without being added by someone who has manage server permissions, and no user can join a server without a valid invite link.
The problem can be solved by decreasing the staff permissions. manage server permissions are pretty dangerous to grant.
Thank you.
Well anyways
how do I make my bot ban bots
that wasnt invited
!d discord.Member.ban
by me
await ban(**kwargs)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Bans this member. Equivalent to [`Guild.ban()`](https://discordpy.readthedocs.io/en/stable/api.html#discord.Guild.ban "discord.Guild.ban").
Bruh
So
!d discord.AuditLogAction.bot_add
@bot.event
async def on_message(message):
if message.channel.id == 823882816160661232:
channel1 = bot.get_channel(8280224876213124)
await channel1.send(message.content)
guys what is wrong ?
Error : discord.errors.HTTPException: 400 Bad Request (error code: 50006): Cannot send an empty message
please help me :)
how do i add a role to someone?
member = ctx.message.author
guild = ctx.message.guild
for role in ctx.guild.roles:
if role.name == 'S1':
role1 = get(member.guild.roles, name="S2")
await member.add_role(role1)
Command raised an exception: AttributeError: 'Member' object has no attribute 'add_role'
somebody can help me ?
You can't send a empty message
my message is not empty
Emoji limit?
do you have intents
how do I make emoji limit
@slate swan also what is your bot prefix
so why not use commands?
you don't know what commands are ?
guys what is wrong please help me :(
are you sure no one sent a blank message
What's the best alternative for discord.py?
im sure i test it
I think user join message also counts as a blank message
what can i do ?
Pycord?
You can just use on_member_join instead of on_message
Pycord?? Hmmm
for guild in bot.guilds:
for member in guild.members:
print(member)
testerbotlolaaaaaddd#1519
@everyone
testerbotlolaaaaaddd
why is this the output, the bot is only in one server with me, and 2 other bots
no when member sent message i need this
Can you replicate the error and send me what message you sent in the channel
yes wait
Is this available too if discord.py will be uhh phased out I think?
Yeah
Sounds wrong
Do you have any code below that one
yes
Pycord is active
for guild in bot.guilds:
for member in guild.members:
print(member)
for role in member.roles:
print(role)
if role.name == 'S1':
role1 = discord.utils.get(message.guild.roles, name = "S2")
await member.add_role(role1)
it gets only the bot then
for some reason
Are you sure the bot has enough permissions to add the role
Are you sure the bot's role is higher than S2
discord.errors.HTTPException: 400 Bad Request (error code: 50006): Cannot send an empty message
test is my text
@bot.event
async def on_message(message):
print(message.content)
if message.channel.id == 823882816160661544:
channel1 = bot.get_channel(828022487660494867)
await channel1.send(message.content)
and my code
the problem is it doesnt find any other members
Just take a screenshot if you can
it only finds itself
Because it raises an error
And stops the function right after that
I guess ¯_(ツ)_/¯
@vagrant brook
Ah I mean your message
no, i gave it the highest role and still doesnt work
what ?
The message you sent that caused the error
yes but what is wrong ?
how can i fix it ?
no im sure about that my message has content
plus what is the code before it?
Content means plain text
Embeds or images don't count as content
Uhmmm
You need a colon after the )
why are people doing on_message
imo you should go back and learn some basic python before using discord.py
I just told him he's missing a colon after )
@slate swan just post it here
You should really learn basic python first smh
That's why I told you to learn python first
discord.py isn't a beginner library
How is that even possible

you can't just detect it
lol
Oh ok
I guess you can check if someone sent an embed with an user account

Btw discord TOS requires you to be at least 13
how to do that?
Im 13 so I can be here
That's called button components

AI Chatbot!!!
how?
Anyone know how to add timestamp in embed footer?
guys how can i get message text from message id ?
yes yes
send the code you have already
!d discord.Embed.timestamp
The timestamp of the embed content. This could be a naive or aware datetime.
I'm not on pc rn
!pypi dislash.py
?
!pypi dislash.py
Thx
here
embed.timestamp = datetime.datetime.utcnow()
embed.set_footer(text='\u200b',icon_url="https://i.imgur.com/uZIlRnK.png")
\u200b = Empty Line
!d discord.TextChannel.fetch_messagr
No documentation found for the requested symbol.
!d discord.TextChannel.fetch_message
await fetch_message(id)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Retrieves a single [`Message`](https://discordpy.readthedocs.io/en/stable/api.html#discord.Message "discord.Message") from the destination.
This can only be used by bot accounts.
i want content of this
!d discord.Message.content


