#discord-bots
1 messages · Page 727 of 1
it sill dosnt react
ok so is there anyway to grab messages from threads like on_message() has ?
like an event or
i want bot to be able to moderate the threads
why the command bot.logout doesn't work?
i can't from cogs.utils.checks import embed_perms, cmd_prefix_len
!d from cogs.utils.checks import embed_perms, cmd_prefix_len
7.11. The import statement
import_stmt ::= "import" module ["as" identifier] ("," module ["as" identifier])*
| "from" relative_module "import" identifier ["as" identifier]
("," identifier ["as" identifier])*
| "from" relative_module "import" "(" identifier ["as" identifier]
("," identifier ["as" identifier])* [","] ")"
| "from" relative_module "import" "*"
module ::= (identifier ".")* identifier
relative_module ::= "."* module | "."+
```...
You can use on_message events and check if message.channel is an instance of discord.Thread
yeah i just figured out i might need an update on discord.py
it sais i have 1.7.3
but there should be a version 2.0 right?
(i use discord.py[voice])
python3 -m pip install -U "discord.py[voice]"
Collecting discord.py[voice]
Using cached discord.py-1.7.3-py3-none-any.whl (786 kB)
Requirement already satisfied: aiohttp<3.8.0,>=3.6.0 in ./bot-env/lib/python3.9/site-packages (from discord.py[voice]) (3.7.4.post0)
Requirement already satisfied: PyNaCl<1.5,>=1.3.0 in ./bot-env/lib/python3.9/site-packages (from discord.py[voice]) (1.4.0)
Requirement already satisfied: chardet<5.0,>=2.0 in ./bot-env/lib/python3.9/site-packages (from aiohttp<3.8.0,>=3.6.0->discord.py[voice]) (4.0.0)
Requirement already satisfied: yarl<2.0,>=1.0 in ./bot-env/lib/python3.9/site-packages (from aiohttp<3.8.0,>=3.6.0->discord.py[voice]) (1.7.2)
Requirement already satisfied: async-timeout<4.0,>=3.0 in ./bot-env/lib/python3.9/site-packages (from aiohttp<3.8.0,>=3.6.0->discord.py[voice]) (3.0.1)
Requirement already satisfied: typing-extensions>=3.6.5 in ./bot-env/lib/python3.9/site-packages (from aiohttp<3.8.0,>=3.6.0->discord.py[voice]) (4.0.1)
Requirement already satisfied: multidict<7.0,>=4.5 in ./bot-env/lib/python3.9/site-packages (from aiohttp<3.8.0,>=3.6.0->discord.py[voice]) (5.2.0)
Requirement already satisfied: attrs>=17.3.0 in ./bot-env/lib/python3.9/site-packages (from aiohttp<3.8.0,>=3.6.0->discord.py[voice]) (21.4.0)
Requirement already satisfied: cffi>=1.4.1 in ./bot-env/lib/python3.9/site-packages (from PyNaCl<1.5,>=1.3.0->discord.py[voice]) (1.15.0)
Requirement already satisfied: six in ./bot-env/lib/python3.9/site-packages (from PyNaCl<1.5,>=1.3.0->discord.py[voice]) (1.16.0)
Requirement already satisfied: pycparser in ./bot-env/lib/python3.9/site-packages (from cffi>=1.4.1->PyNaCl<1.5,>=1.3.0->discord.py[voice]) (2.21)
Requirement already satisfied: idna>=2.0 in ./bot-env/lib/python3.9/site-packages (from yarl<2.0,>=1.0->aiohttp<3.8.0,>=3.6.0->discord.py[voice]) (3.3)
Installing collected packages: discord.py
Successfully installed discord.py-1.7.3
``` how the hell do i get it to install the 2.0?
do pip install git+https://github.com/Rapptz/discord.py
wait i misread it it's discord.py[voice]
how do i make it so a command is only available to a specific guild specified by id
maybe voice has not 2.0?
2.0 is a stable beta, it was never released officially so you needd to get it from github
Might be worth looking into a fork because it's not maintained anymore
ok will try disnake then
or does anyone has any other fork recommended? whats most popular?
Make a check or if statement
but how will i make it so it effects the help command
!e `g1="English Merry Christmas"
g2="Dutch Prettige Kerstdagen"
g3="Swedish God jul"
g4="Finnish Hauskaa joulua"
g5="German Frohe Weihnachten"
g6="Italian Buon Natale"
g7="Catalan: Bon Nadal"
g8="Cornish: Nadelik Lowen"
g9="Galician: Bo Nadal"
g10="Irish: Nollaig Shona"
g11="Latin: Felix dies Nativitatis"
g12="Maltese: il-Milied it-Tajjeb"
g13="Occitan: Bon Nadal"
g14="Sami (Lule): Buorre javla"
g15="Scottish Gaelic: Nollaig Chridheil"
g16="Turkish: Mutlu Noeller"
g17="Burmese: Hnit thit ku mingalar pa"
g18="Cebuano: Malipayong pasko"
g19="Javanese: Sugeng Natal"
g20="Japanese: Meri Kurisumasu"
g21="Jingpho: Ngwi pyaw ai X'mas rai u ga"
g22="Karo Batak: Selamat wari Natal"
g23="Malay: Selamat hari Natal"
g24="Sundanese: Wilujeng Natal"
print("Welcome to Xanders Virtual Calendar! Enter a number 1-24")
num=int(input(""))
if 0 < num < 25 :
print("Here is your greeting:")
else :
print("Please enter a number 1-24")
if num == num:
x=num
y=g+X
print(y)`
@slow fiber :x: Your eval job has completed with return code 1.
001 | Welcome to Xanders Virtual Calendar! Enter a number 1-24
002 | Traceback (most recent call last):
003 | File "<string>", line 27, in <module>
004 | EOFError: EOF when reading a line
@client.command()
async def usun(ctx,ilość = 5):
await ctx.channel.purge(limit=
quantity)
await ctx.send("deleted")
``` i have problem with "quantity"
@slate swan you didn't even define quantity
what should I enter there
What is ilosc?
@slate swan how do u make the bot make a new channel because disnake.Guild.create_text_channel() no work 😭
You can use only English characters and numbers with _ in python for variable/class/function/parameter naming
Show code
!d disnake.Guild.create_text_channel
await create_text_channel(name, *, reason=None, category=None, position=..., topic=..., slowmode_delay=..., nsfw=..., overwrites=...)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Creates a [`TextChannel`](https://docs.disnake.dev/en/latest/api.html#disnake.TextChannel "disnake.TextChannel") for the guild.
Note that you need the [`manage_channels`](https://docs.disnake.dev/en/latest/api.html#disnake.Permissions.manage_channels "disnake.Permissions.manage_channels") permission to create the channel.
The `overwrites` parameter can be used to create a ‘secret’ channel upon creation. This parameter expects a [`dict`](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.10)") of overwrites with the target (either a [`Member`](https://docs.disnake.dev/en/latest/api.html#disnake.Member "disnake.Member") or a [`Role`](https://docs.disnake.dev/en/latest/api.html#disnake.Role "disnake.Role")) as the key and a [`PermissionOverwrite`](https://docs.disnake.dev/en/latest/api.html#disnake.PermissionOverwrite "disnake.PermissionOverwrite") as the value.
Note
Creating a channel of a specified position will not update the position of other channels to follow suit. A follow-up call to [`edit()`](https://docs.disnake.dev/en/latest/api.html#disnake.TextChannel.edit "disnake.TextChannel.edit") will be required to update the position of the channel in the channel list...
disnake works fine for me
you. are. cappin
@commands.command(aliases=["cchannel", "createchannel"])
@commands.guild_only()
@commands.has_guild_permissions(manage_channels=True)
async def create_channel(self, ctx, channel_name):
guild = disnake.Guild
channel = await guild.create_text_channel(channel_name)
don't mind the indents there, copy pasting code into discord fucks the indents
Wot , the guild must be an instance of discord.Guild , not the class itself
f**k i forgot parentheses
that's still not it
alr so what's next
A guild object , not a class
Basically use something like ctx.guild ....
use ctx.guild
!d disnake.Guild
class disnake.Guild```
Represents a Discord guild.
This is referred to as a “server” in the official Discord UI.
x == y Checks if two guilds are equal.
x != y Checks if two guilds are not equal.
hash(x) Returns the guild’s hash.
str(x) Returns the guild’s name.
did try with ctx.guild and said 'Guild' object has no attribute 'create_text_channel'
cap
not cap.
true true it looks for documentation not if it exists
!d discord.ext.commands.Context.guild
Returns the guild associated with this context’s command. None if not available.
returns a guild object
It for sure does
oh
which has the create_text_channel() method
You made some mistake
!d discord.Guild.create_text_channel
await create_text_channel(name, *, reason=None, category=None, position=..., topic=..., slowmode_delay=..., nsfw=..., overwrites=...)```
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.
The `overwrites` parameter can be used to create a ‘secret’ channel upon creation. This parameter expects a [`dict`](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.9)") of overwrites with the target (either a [`Member`](https://discordpy.readthedocs.io/en/master/api.html#discord.Member "discord.Member") or a [`Role`](https://discordpy.readthedocs.io/en/master/api.html#discord.Role "discord.Role")) as the key and a [`PermissionOverwrite`](https://discordpy.readthedocs.io/en/master/api.html#discord.PermissionOverwrite "discord.PermissionOverwrite") as the value.
Note
Creating a channel of a specified position will not update the position of other channels to follow suit. A follow-up call to [`edit()`](https://discordpy.readthedocs.io/en/master/api.html#discord.TextChannel.edit "discord.TextChannel.edit") will be required to update the position of the channel in the channel list...
It is
async def on_membed_join(member):
channel = discord.utils.get(member.guild.channels, id=925038725078057029)
await channel.send(f"{member.mention} welcome")``` and error ```Traceback (most recent call last):
File "main.py", line 170, in <module>
@client.event()
TypeError: event() missing 1 required positional argument: 'coro'```
help
i meant ctx.guild.create_text_channel(name=...)
it's same
member
not membed
and maybe save ur file and restart your bot idk
LOL my bad
use that
I am new to this server
Anyone bother helping me ?
error again Traceback (most recent call last):
File "main.py", line 170, in <module>
@client.event()
TypeError: event() missing 1 required positional argument: 'coro'

what's in your error is not in your code
.
@client.event
async def on_member_join(member):
channel = discord.utils.get(member.guild.channels, id=925038725078057029)
await channel.send(f"{member.mention} welcome")
right
@client.event()
TypeError: event() missing 1 required positional argument: 'coro'```
again

Save the file correctly
im using replit
And change every single @client.event() to @client.event
works
learn to read your errors 
discord kept it a secret
🤦♂️
Yes 👍
You can play around with it
We’ll release the findings
Mwahahaha
Discord can’t stop us
lol thats weird
how can i create slash command
A global 50/10 rate limit (meaning, this is the maximum # of messages a bot can send currently across all of discord).
A 5/5 per server rate limit.
A 5/5 global DM rate limit.
I use bot.wait_for(...) to listen for a single event under @bot.command() but how do I listen for multiple events ?
Say the bot proceeds to do something after an confirmation by either an "👌" reaction or user saying "yes", here the bot would need to listen for raw_reaction_add and message but how do I do that?
suppose I write something like this
await bot.wait_for("raw_reaction_add", lambda payload: payload.emoji.name == "👌")
await bot.wait_for("message", lambda msg: msg.content.lower() == "yes")
"""...Bot proceeds with stuff..."""
Here the problem is that the user could only proceed after saying "yes" and reacting with the emoji. I only want the bot to proceed with either of them. How do I do that?
Thanks for the help.
done, pending = await asyncio.wait([
bot.loop.create_task(bot.wait_for('message')),
bot.loop.create_task(bot.wait_for('reaction_add'))
], return_when=asyncio.FIRST_COMPLETED)
try:
stuff = done.pop().result()
except ...:
# If the first finished task died for any reason,
# the exception will be replayed here.
for future in done:
# If any exception happened in any other done tasks
# we don't care about the exception, but don't want the noise of
# non-retrieved exceptions
future.exception()
for future in pending:
future.cancel() # we don't need these anymore
``` This is an example from d.py server
Yeah, using asyncio.wait
You can add an option to wait for the first event dispatched by the websockets.
!d asyncio.wait
coroutine asyncio.wait(aws, *, timeout=None, return_when=ALL_COMPLETED)```
Run [awaitable objects](https://docs.python.org/3/library/asyncio-task.html#asyncio-awaitables) in the *aws* iterable concurrently and block until the condition specified by *return\_when*.
The *aws* iterable must not be empty.
Returns two sets of Tasks/Futures: `(done, pending)`.
Usage:
```py
done, pending = await asyncio.wait(aws)
``` *timeout* (a float or int), if specified, can be used to control the maximum number of seconds to wait before returning...
import asyncio
import random
@bot.command()
async def gstart(ctx, time=None, *, prize=None):
if time == None:
return await ctx.reply("נא לרשום זמן!")
if prize == None:
return await ctx.reply("נא לרשום פרס!")
embed=discord.Embed(title="New Giveaway!", color=0x00e1ff)
embed.add_field(name="Prize:", value=f"{prize}", inline=False)
embed.add_field(name="Hosting By:", value=ctx.author.mention, inline=False)
time_numbers = {"s" : 1 seconds, "m" : 60, "h" : 3600, "d" : 86400}
give_time = int(time[0]) * time_numbers[time[-1]]
embed.add_field(name="Ened In:", value=f"{time}", inline=False)
embed.add_field(name="Winner(s):", value=f"Soon", inline=False)
give_msg = await ctx.send(embed=embed)
await give_msg.add_reaction(":tada:")
await asyncio.sleep(give_time)
new_msg = await ctx.channelfetch_message(give_msg.id)
users = await new_msg.reactions[0].users().flatten()
users.pop(users.index(bot.user))
winners = random.choice(users)
await ctx.send(f":tada: Congratulations, {winners.mention} You won **{prize}**!")
em=discord.Embed(title="Giveaway Ened!", color=0x00e1ff, timestamp=ctx.message.create_at)
em.add_field(name="Prize:", value=f"{prize}", inline=False)
em.add_field(name="Hosting By:", value=ctx.author.mention, inline=False)
em.add_field(name="Winner(s):", value=winners.mention, inline=False)
await give_msg.edit(embed=em)```
It adds reaction, but it does not announce a winner.
You were just told the issue
I know, this is what I did and there is still an error
Did you restart your bot?
yes
Send the code then
@bot.command()
async def gstart(ctx, time=None, *, prize=None):
if time == None:
return await ctx.reply("נא לרשום זמן!")
if prize == None:
return await ctx.reply("נא לרשום פרס!")
embed=discord.Embed(title="New Giveaway!", color=0x00e1ff)
embed.add_field(name="Prize:", value=f"{prize}", inline=False)
embed.add_field(name="Hosting By:", value=ctx.author.mention, inline=False)
time_numbers = {"s" : 1 seconds, "m" : 60, "h" : 3600, "d" : 86400}
give_time = int(time[0]) * time_numbers[time[-1]]
embed.add_field(name="Ened In:", value=f"{time}", inline=False)
embed.add_field(name="Winner(s):", value=f"Soon", inline=False)
give_msg = await ctx.send(embed=embed)
await give_msg.add_reaction(":tada:")
await asyncio.sleep(give_time)
new_msg = await ctx.channel.fetch_message(give_msg.id)
users = await new_msg.reactions[0].users().flatten()
users.pop(users.index(bot.user))
winners = random.choice(users)
await ctx.send(f":tada: Congratulations, {winners.mention} You won **{prize}**!")
em=discord.Embed(title="Giveaway Ened!", color=0x00e1ff, timestamp=ctx.message.create_at)
em.add_field(name="Prize:", value=f"{prize}", inline=False)
em.add_field(name="Hosting By:", value=ctx.author.mention, inline=False)
em.add_field(name="Winner(s):", value=winners.mention, inline=False)
await give_msg.edit(embed=em)```
it is from now
Thank you sir, I got along.
Close the replit tab and reopen it
The line should be fine
This will give the member count of the current guild.
Not the total members in all guilds your bot is in.
If you want to get the total members in all guilds, as your question kind of says, you'd need to use that
!d discord.ext.commands.Bot.get_all_members
for ... in get_all_members()```
Returns a generator with every [`Member`](https://discordpy.readthedocs.io/en/master/api.html#discord.Member "discord.Member") the client can see.
This is equivalent to:
```py
for guild in client.guilds:
for member in guild.members:
yield member
And you should use len(set()) on it
Or bot.users if you need only the number of users
"users"
How do I make the status of the bot show how many members there are on the server?
member.guild.member_count
no working in status
if u can get it to show a text replace text with wat they just said above ur question
@dense coral
@commands.Cog.listener()
async def on_member_join(self, member):
print("[INFO]:", member, "has joined" )``` why does this not output anything when someone joins?
still can't figure it out 😭
from discord import Intents
intents = Intents.default()
intents.members = True
bot = commands.Bot(command_prefix="!", intents = intents)
@bot.event
async def on_member_join(self, member):
print("[INFO]:", member, "has joined" )```
still doesn't work @dense coral
Did you enable the settings in discord api?
I was glad to help! 🙂
although I don't get why this doesn't print
@dense coral py @commands.Cog.listener() async def on_ready(self): print("[INFO]: Bot is now online")
cant you do that in the main file
Yeah
I did but still same thing
async def on_ready(self):
print("[INFO]: Bot is now online")```
This looks like home made logging module
We got logging at home:
!d logging
Source code: Lib/logging/__init__.py...
does discord.py support audio recording?
does anyone know how to make a channel with the bot. ctx.guild.create_text_channel(name=...) doesn't work
!d discord.Member.ban
await ban(*, delete_message_days=1, reason=None)```
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/master/api.html#discord.Guild.ban "discord.Guild.ban").
ah rewriting bot from discord.py to disnake wasnt that much pain in the ass
That's the right way of doing it. Mind sharing code and any errors you face?
it was an attributeError: 'Guild' object has no attribute 'create_text_channel'
What library and version are you using?
disnake and idk what version im using
prob latest
but u can check version with pip list, or import disnake print(disnake.__version__) i think
im using 2.2.1
Well, mind sharing the code because it's correct?
wait lemme run the code one more time
should get errors?
oh shit it actually worked i just forgot to test it 💀
last time i did disnake.Guild.create_text_channel(name=name)
trying slash command with disnake,
invite = await ctx.channel.create_invite(max_uses=0,unique=False)
would it be correct and work if i change ctx, to inner?
or inner.response?
oh yeah and how do you get the list/tuple of the ctx.author's perms
why dont you have a decleration has_permissions()
inner? You mean, inter/interaction?
@slate swan like there is no ctx, so i am wondering how i can create the invite in the slash command - or must i fetch by a channel id to greate channel object and etc etc?
reasons, anyways isn't that possible to get the list/tuple of the ctx.author's perms
Just replace ctx with whatever you use now :p
or does disnake store it somewehre else :P
Because as you can see, the ApplicationCommandInteraction class has most of the attributes of the Context class.
@slate swangot it thanks I just had to ask could have tested
You can also always type hint, so that you have IntelliSense suggesting things :)
@commands.command()
@commands.has_permissions(ban_members = True)
async def ban(self, ctx, member: discord.Member):
await member.ban()
this is example btw
lemme fix
there
yes it will work
Yes
Disnake seems to be one of the most popular dpy forks
^^^
Read the error
you need bot to have admin permissions
or ban members permission like it said
you need for bot to have the perms
in server
Probably, yeah...
Try writing the same command in some server where you are the admin or a mod
This error means the bot doesn't have permissions
This means u don't have permissions
Yes
yes
u can just get the role in some way and store it in a role variable then ctx.author.add_roles(role)
u can get the role by ctx.guild.get_role(role_id) or by discord.utils
(discord.utils is slow)
if u have the ID, u can do what I said before, ctx.guild.get_role
because add_roles needs a role object iirc
kay
you can try doing it without await
but idk if it will work
sad
if no error then it works
@slate swan can you do like
@commands.command()
async def giveadmin(self, ctx):
role = ctx.guild.get_role(856954172262842378)
await ctx.author.add_roles(role)
idk if it works btw
cause i don't really need role stuff in my bot
does it have manage_roles permission
Is the bot's role hierarchy higher than the user's role hierarchy?
Well, I'm going to ask you a question. Can a normal user, perhaps a server moderator, do any action to the server's owner?
The answer is no. Discord bots are no different.
@client.command()
@commands.has_permissions(manage_guild=True)
async def prefix(ctx,*,pf=""):
if pf!="":
#changes prefix here
else:
await ctx.send(f"My prefix is `{get_prefix(client,ctx)[0]}`")```
But a Discord bot can give the admin a role
@slate swan Did you make a role from the Discord settings yet?
Not to the server's owner.
That isn't even the error they get, they get a commands.MissingPermission error.
It can. I've done it
I have a prefix command here. It sends the current prefix if no argument is given. Right now to run the command you need manage_guild permission. I want to make it so that a person who does not have the manage_guild permission run !prefix, it gives the current prefix
I am confused as to how to do it
You can use ctx.bot.prefix instead.
too many not smart decisions
instead of what?
Calling get_prefix.
i mean its useless since they’ll use <prefix>command to find it

Unless, you have mentioning the bot a valid prefix.
or just ctx.prefix
yeah just use object when mentioned
i am so dumb
lmao get some rest and think about it
rest is definitely something that i need
I meant that I've given the server owner some role with a bot, but I've never done what you're doing here
Get some sleep
yes
what’s the problem
🚶♂️
Is the role you're trying to give above in the role hierarchy than the bot?
And what’s wrong 🚶♂️
Are you sure it has admin permissions? Are they admins as well?
? Display code
The people you are trying to ban
The lack of PEP8 scares me
Is neither of the commands working?
It's because of discord
Which one is not working?
ah~
The ban or the giveadmin? Or both?
I’m reckoning they are in a class?
they are
@brave vessel I know you’re there, show yourself
lol, hi
I was gonna say that the indentation is the reason why it wasn't working
but iirc that's just a quirk of copy and pasting code
Looking at the error they're getting... I'm thinking it's just a role hierarchy issue
But it's still not clear if the error is for ban or giveadmin
did you try to ban a higher role? Does the bot have the right permissions?
@slate swan If the problem is with giveadmin, you should check this...
The bot should be above the role you're trying to give
just curious, what was the problem?
ok
well
ok
show code
You don’t have permissions
Show code
Is that the current role ID?
what happens instead?
I think you need to await get role
hm, maybe it’s bot.get_role?
nice
Or idk 
MAN SAID DISCORD.BOT
Wtf do you want
get_role(role_id, /)```
Returns a role with the given ID.
Calm down

My knee hurts like hell
can i show you something
ok
!d discord.ext.commands.Bot || not discord.bot ;-;
class discord.ext.commands.Bot(command_prefix, help_command=<default-help-command>, description=None, **options)```
Represents a discord bot.
This class is a subclass of [`discord.Client`](https://discordpy.readthedocs.io/en/master/api.html#discord.Client "discord.Client") and as a result anything that you can do with a [`discord.Client`](https://discordpy.readthedocs.io/en/master/api.html#discord.Client "discord.Client") you can do with this bot.
This class also subclasses [`GroupMixin`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.GroupMixin "discord.ext.commands.GroupMixin") to provide the functionality to manage commands.
@novel apex
I love you Caeden
shit wrong mods 😳
i wish someone would hate me, everyone only loves me sigh
woooow not nice man
@slate swan are u sure u get an role object?
double check perms cus thats the error
for bot
the perms of bot in server
What are the permissions of the bot, and what is the role hierarchy.
And what is the role hierarchy?
bot needs to have higher perms than itself to give
The order in which the roles are displayed in your server settings.
a mod cant mod one
<@&831776746206265384>
or remove
Again, what is the role hierarchy...
wdym
aaah nfts n bitcoins altcoins get few dms from dis server but stopped cus reporting all
The bot role is lower than the admin role, you can't give yourself admin in any server.
!ban 927991919924105247 Looks like you joined just to advertise.
:incoming_envelope: :ok_hand: applied ban to @wise vapor permanently.
u can give or pass owner thats onlything u can pass that is higher role
If the role admin is above the bot role, then the bot can't give that role to anyone. Even with admin permissions.
u cant give same role as bot has
ye
thats only role u can give above bots own role
make bot owner n it can grant u admin
etc
Guys surprised
a admin cant admin others or remove it
but admin can give n remove moderation
exemple
!ot
Off-topic channel: #ot2-never-nester’s-nightmare
Please read our off-topic etiquette before participating in conversations.
Check if the bot role is below the admin role or not.
NTFs do not belong to this channel.
Then you ask someone who can access it.
Noted. Comment deletion pending....
@slate swan remove admin perm... n allow other roles basicly "admin" n bot will be able to give u it
Deleted
I like NFTs
i like turtles
Just ask to someone in the server to send a screenshot of the roles..
@slate swan wen u go to role perms uncheck admin. n allow everything else
If you're trying to give yourself admin permissions on a random server your bot is in, you will most likely fail because server owners are not that dumb.
then bot will be able to give it
n check heirarchy
but cant give u higher perms than it has or same
needs lower
solution is make bot owner
No.
As they said, they can't check it.
It's against Discord's developer policy. Can get your bot and your account terminated.
oh he try hack em
bummer
thanks for waste our time @slate swan
@slate swan reporthim to modmail bbl
No?
whatever
The only thing moderators can do is ask them to stop asking help about this and stating that it's against the developers policy. I doubt they will get any type of punishment as it's a small troll people often want to do to their friends.
?
what
Just remove it manually
just remove it manually 
If you have admin
why not
ok
Are you the server owner ?
i mean the server in which you are trying to remove your role
@commands.has_permissions(manage_guild=True)
async def removerole(ctx, member:discord.Member, role:discord.Role):
await member.remove_roles(role)```
try this maybe
Ah alright
no problem
Just started discord.py for few minutes, got a problem here
py```
import discord
from discord.ext import commands
intents = discord.Intents().all()
client = discord.Client()
client = commands.Bot(command_prefix = '_', intents = intents)
@client.event
async def on_ready():
print("The bot is on and ready!")
await client.change_presence(status = discord.Status.idle, activity = discord.Game('Version Alpha 0.0.1'))
@client.command()
async def hello(ctx):
await ctx.send("HELLO SUPERIDOL!!")
@client.event
async def on_message(message):
if message.author == client.user:
return
Remove the 5th line
Either define Client or Bot
So remove the line with Client
if I remove the 5th line the on_ready function will still work right?
Then name your variable bot and not client
And replace all client usage to bot, then you should be good.
including the old 6th line?
Just remove the line where you used discord.Client
did
And replace all client usages to bot.
import discord
from discord.ext import commands
intents = discord.Intents().all()
bot = commands.Bot(command_prefix = '_', intents = intents)
@bot.event
async def on_ready():
print("The bot is on and ready!")
await bot.change_presence(status = discord.Status.idle, activity = discord.Game('Version Alpha 0.0.1'))
@bot.command()
async def hello(ctx):
await ctx.send("HELLO SUPERIDOL!!")
@bot.event
async def on_message(message):
if message.author == bot.user:
return
yep
Then commands won't work because you've overwritten the on_message event
I will add on_message
So add
await bot.process_commands(message)
At the end of your on_message event
Or you could use a listener
You shouldn't change the status and activity in on_ready though, you should set it directly in the bot constructor.
Idk where is bot constructor that’s why I did it 😂
Instead of using the change_presence method, use the same parameters you used in that method and put them in your bot constructor, so commands.Bot(command_prefix="_", intents=intents, status=...).
Hello, I am trying to make my bot check if a message has been sent by someone in dms
after 60 seconds it cancels
how can i do this?
hi guys, anybody help me? can i how to write a async def with space? example
async def mobile phone(ctx):
async def mobile_phone(ctx):
and its work with mobile phone?
uh
wait
you would have to do !mobile then set args as phone
async def mobile(ctx, type):
if type == "mobile":
!mobile phone
in there
async def mobile(ctx, type):
if type == 'mobile':
print("mobile type")
else:
pass```
that would do !mobile mobile
i know how to do it w cogs but that isnt what ur doing
You could use wait_for
Yeah, something like that... I haven't really used it
pip install discord
^
do it in normal vsc
NORMAL CMD
not vsc 🧠 = 💀
mine always show as uninstalled in visual but dont in cmd
Show me ur code 🤔
ty
It’s easy to do
i delete this. but i have a new problem. the avatar is never good in the code.
@prime martenhttps://www.sqlitetutorial.net/sqlite-update/
Do u have discord.py 2?
Cuz in the discord.py version 2.0 the avatar_url changed to avatar.url
can i how to download this version?
the code btw
he should use aiosqlite as well
pip install -U git+https://github.com/Rapptz/discord.py@rewrite ig
"The windows didnt find it"
Ur codes are clean
not really
Atleast this code is fine but it gives him errors
Thats fine doe
Still works doe
yup
why a var for the member.avatar_url just send it no need for the var?
You can make your code shorter and cleaner this way:
member = member or ctx.author
await ctx.send(member.avatar_url)
@slate swan didnt think of that it was an sql Q :p
declr variables all times used to no oop
😄
pardon?
why make var
yeah
i myself used to overdo it
same not anymore tho
cus before oop
Try avatar.url.
oop is best that happend data
Check your dpy version using print(discord.__version__).
Wait he's using nextcord library
i love oop
Ah, then it's member.avatar.url.
how do you know that?
Forks of dpy are based on 2.0
ah lol
2.0.0
member.avatar.url
disnake feels like select "discord." replace "disnake."
nothing
or just import disnake as discord
i go sleep gn ty
Did you replace member.avatar_url with member.avatar.url?
@slate swan haha
Disnake is basically, 

lol
Discord + Snake. Python is a snake.
in a day i went from having no cogs and all my commands in a bot file to subclassing commands.Bot and having many cog files
you smort human
theres a point in that one
Doing all that thinking while in a biology online class.
you got class?
he ment a class
sad
class Biology():
...
I read " dis" and my mind went to "deez nuts" 💀
real
Get sleep.
i dont start until like jan 17 or sm
!ot I hate being this person.
Off-topic channel: #ot2-never-nester’s-nightmare
Please read our off-topic etiquette before participating in conversations.
lol
gn happy hakkin in dreams
cant make commands for a bot until i learn sql fully
U can make ping command without using database 😉
in my economy bot im trying to put a cap on the total amount you can have in your bank (500 000) but am having some trouble with it
here is some of the code
return await ctx.send("The maximum capacity for this bank account is :moneybag: 500 000")```
but it doesnt seem to work
who said i using a ping command?
But u said " commands"
ok and?
Nvm
ping command is just bot.latency lol
U said "cant make commands for a bot until i learn sql fully" like u cant create commands if ydk how to use db

ah well im trying to make a economy bot and im trying to make a atm machine with buttons lol
Oh i see i seee
yeah
This has no error, but doesnt update, why
AttributeError: 'NoneType' object has no attribute 'id'```
what lib are you using?
well discord.py doesnt have timeouts
forks of dpy do have the feature
make what?
the timeout feature of discord stops a user from interacting with the guild
dpy doesnt have timeouts
the timeout feature discord has added stops a user from interacting with the guild which dpy forks have
!d disnake.Member.timeout
await timeout(*, duration=..., until=..., reason=None)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Times out the member from the guild; until then, the member will not be able to interact with the guild.
Exactly one of `duration` or `until` must be provided. To remove a timeout, set one of the parameters to `None`.
You must have the [`Permissions.moderate_members`](https://docs.disnake.dev/en/latest/api.html#disnake.Permissions.moderate_members "disnake.Permissions.moderate_members") permission to do this.
New in version 2.3.
its a fork?
disnake is a api wrapper for the discord api?
its dpy but better
!pypi disnake
if you want to change to disnake all you have to do is change the word discord to disnake and your done
or you can import discord as disnake
or use find and replace in your ide
correct
yes
yw
well not really i havent checked for those types of apis
no problem
how do i make it welcome in multiple servers + channels
i think ive asked once before but never did it
pip install it
pip install disnake
replit being replit ig
i dont think it is
Why would you want to do that though?
is it possible?
so it can be in more than one server saying welcome?
im not sure it is
how would it know where to send a msg tho?
yeah that’s what I’m saying
yeah
I mean in my database
I have a guilds table where there is the guild id and a bunch of config info that includes the welcome channel ID
true.
Maybe with my bot I could say for it to send the set welcome message to the welcome channel associated with each guild
because yes you can get the guild id but when will it know where to send the msg
but I wouldn’t want to know if a new user joins in a totally other server
idk how to do databases tbh
Is it possible to use GraphQL with discord bots? That would be cool
well i mean i just want my bot to be in other servers and have it welcome members when members join
instead of just my server
so basically if a user joins in another server, you want every server that has the bot to know that?
it isn’t installed most likely
nah he wants a custom welcome msg for each guild on member join
If you are using VSCode, prolly just reload the window
its replit being replit lol
same
ig edit the code in vsc
No.
and run it in replit
so when someone joins the server it will welcome them
and if another one joins in the diff server it will welcome them in the server they join
not like where it sends it all into one server
yeah im not sure how it would know which guild the member joined in
using guild id
ahh I see
but how would you know where to send the msg to?
how it does normally with just one
because a member joins right but how would the bot know which guild the member joined in?
I was confused on the question, my dusky
fault*
Well in this case, I would probably implement a database
From personal experience, putting multiple ids in to those get_guild and get_channel functions doesn’t work
i mean you can use a db and send a msg depending on the guild id but how would the bot know which guild it joined ?
it’s simple
ye idk how to do a db
well how does the bot know when its just that one guild?
should be the same idk.
its obv possible mee6 does it etc other bots
well because you got the guild id
yeah
and you got the channel so it will only send a msg to that channel if its that guild
because you grab the welcomeChannel for the members context guild
but how theirs no context in a member join event the only params it takes is a member obj
@Cog.listener()
async def on_member_join(self, member):
result = db.record("SELECT welcomeChannel FROM guilds WHERE GuildID = ?", member.guild.id)
if result is None:
return
else:
result1 = db.record("SELECT welcomeMSG FROM guilds WHERE GuildID = ?", member.guild.id)
members = len(member.guild.members)
mention = member.mention
user = member.name
guild = member.guild
wEmbed = Embed(description=str(result1[0]).format(members=members, mention=mention, user=user, guild=guild), timestamp=nextcord.utils.utcnow(), color=0x1c3fa8)
wEmbed.set_author(icon_url=member.avatar.url, name=f"{member.name}#{member.discriminator}")
wEmbed.set_thumbnail(url=member.avatar.url)
wEmbed.set_footer(text=f"Guild: {member.guild}")
try:
channel = self.bot.get_channel(int(result[0]))
await channel.send(embed=wEmbed)
except TypeError:
pass
This is my listener for the member join
oh
isnt it @commands.Cog.listener()
jee
you grab the guild id of the member guild and send it to the welcome channel of the guild
no, I import just Cog
from nextcord.ext.commands import Cog
member.guild I think
that means I don’t have to put commands
i think so
It won’t work for you
why did you ctrl c and ctrl v
LMAO idk
oh
try str(user.status).title()
import discord
from keep_alive import *
from config import TOKEN
from discord.ext import commands
intents = discord.Intents().all()
bot = commands.Bot(command_prefix = '_', intents = intents)
@bot.event
async def on_ready():
print("The bot is on and ready!")
await bot.change_presence(status = discord.Status.idle, activity = discord.Game('Version Alpha 0.0.1'))
@bot.event
async def on_message(message):
if message.author == bot.user:
return
await bot.process_commands(message)
@bot.command()
async def hello(ctx):
await ctx.send("HELLO SUPERIDOL!!")
keep_alive()
bot.run(TOKEN)
repl
Hey @slate swan!
Uh-oh! It looks like your message got zapped by our spam filter. We currently don't allow .txt attachments, so here are some tips to help you travel safely:
• If you attempted to send a message longer than 2000 characters, try shortening your message to fit within the character limit or use a pasting service (see below)
• If you tried to show someone your code, you can use codeblocks
(run !code-blocks in #bot-commands for more information) or use a pasting service like:
dont change your bots presence on ready
you got presence intents?
and why on msg if your not sending anything
@slate swan
Wait
I have problem with keep alive
but how can I send it
from paste python discord
can you show us some code?
don't use repl
from flask import Flask
from threading import Thread
app = Flask('')
@app.route('/')
def main():
return "Your bot is alive!"
def run():
app.run(host="0.0.0.0", port=8080)
def keep_alive():
server = Thread(target=run)
server.start()
keep_alive.py
and that is not discord bots anymore
oh it says too many requests @slate swan
I recommend this
can you show code?
someone said change it in bot constructor but idk where is it
your bot var
!d discord.ext.commands.Bot
class discord.ext.commands.Bot(command_prefix, help_command=<default-help-command>, description=None, **options)```
Represents a discord bot.
This class is a subclass of [`discord.Client`](https://discordpy.readthedocs.io/en/master/api.html#discord.Client "discord.Client") and as a result anything that you can do with a [`discord.Client`](https://discordpy.readthedocs.io/en/master/api.html#discord.Client "discord.Client") you can do with this bot.
This class also subclasses [`GroupMixin`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.GroupMixin "discord.ext.commands.GroupMixin") to provide the functionality to manage commands.
kk
put activity and status here
@slate swan are you the one that doesnt use json
noone uses json
correct
what was the other thing other than json i forgot
cuz im using config.json to run the token
yeah
environment variables
property status: discord.enums.Status```
The member’s overall status. If the value is unknown, then it will be a [`str`](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.9)") instead.
yes
ah alr lol
seems sus to me
once a guy came here with the same issue
and it only returned offline because he was invisible
lmao
but BÖZ is smarter than that
BÖZ is online

seems good but i recommend to make the code shorter
if member is None:
member = ctx.author
from that to
member = member or ctx.author

and you can set all those fields in the obj lol
that embed is killing me
No you can't
why so?
well send member.status only
Because there is no field kwarg to the embed constructor
You must set it through add_field
didnt ment a kwarg smh
embed = discord.Embed().set_image()
i ment this
that looks better
yah

yo TypeError: __init__() missing 1 required positional argument: 'verification' anyone know why im getting this error? I think its cause of this ```py
class SomeCommands(commands.Cog):
def __init__(self, bot: commands.Bot, verification):
self.bot = bot
self.verification = verification
code...
bot.add_cog(SomeCommands(bot))```
discord/embeds.py lines 177 to 187
def __init__(
self,
*,
colour: Union[int, Colour, _EmptyEmbed] = EmptyEmbed,
color: Union[int, Colour, _EmptyEmbed] = EmptyEmbed,
title: MaybeEmpty[Any] = EmptyEmbed,
type: EmbedType = 'rich',
url: MaybeEmpty[Any] = EmptyEmbed,
description: MaybeEmpty[Any] = EmptyEmbed,
timestamp: datetime.datetime = None,
):```
show your intents BÖZ
they shouldn't matter

i think its cause of verification not being like cogged or something
huh
TypeError: init() missing 1 required positional argument: 'verification'
you are not BÖZ
@slate swan
now I'm harassing you until your error is fixed
mindset
fix? :"(
your missing them
= True
no need for the var tbh
you lied to me
bot = commands.Bot(command_prefix= get_prefix, help_command=None, case_insensitive=True, intents=discord.Intents.all())
true
and slap the checkbox in the dev portal aswell
didnt help much but yw
:thumbsup_tone1:
LMAO
thats like having shirts in a closet but not putting any on lol
lol
hey @slate swan, how's your discord bot doing?
currently slacking on it and watching yt
should be learning sql
I should learn asyncio
why?
"we use async def and await on async coroutine stuff cuz it's like that"
you mean you want to know about it deeply and not the syntax?
and idk what's yield
ah lol
i see
I got stuck
happens
yep
nice
:thumbsup_tone5:
you called it lol
Fr?
fr
it’s almost the same as return but the function continues. While return just exits the function completely.
!yield
Is that what you meant?
so you say
I honestly don’t have too good of an understanding on it. Haven’t found a use for it once.
But that’s what I got from reading peoples stuff.
anyone using replit here?
Y
i keep getting "Replit: Package Operation Failed" when supposedly it's supposed to "work", is replit weird sometimes?
replit is weird all the time, you should not be using replit to host your discord bot.
bots are kewl
ok?
I need a bit help with some code. So I'm creating a ticket bot basically and everything is working fine but I just need it to go into a specific category I have created. That's the part I need help with.
channel.edit(category=your_category_channel)
try this
not that sure tho
Didn't work
@bot.command()
async def ticket(ctx):
guild = ctx.guild
overwrites = {
guild.default_role: discord.PermissionOverwrite(read_messages=False),
guild.me: discord.PermissionOverwrite(read_messages=True)
}
await guild.create_text_channel(f'{ctx.author}', overwrites=overwrites)```
an example
@client.command()
async def create(s, arg: str):
guild = s.message.guild
cat = discord.utils.get(s.guild.categories, name="FORUM")
channel = await guild.create_text_channel(arg, category=cat)
hope this works for you
I put that code in. But when used it, it didn't respond and I didn't get any error message
can you show me the updated code?
I deleted that code and put back this code
this
Hey
How to i send messages which is only visible to a single person? Using discord.py or any other discord libraries
interactions
if you have dpy 2.0
like buttons, dropdown
pip install -U git+https://github.com/Rapptz/discord.py
@bronze axle
hai, uhm, i'm having an error here but idk how to fix this-
what's the error
Where is "here" and what "error "are you having?
Also it's most likely that if statement
not indented properly
many forks have the ability to send ephemeral msgs on interactions or even 2.0
will this work?
@client.command()
@commands.has_permissions(ban_members = True)
@commands.cooldown(1, 1234567890, commands.BucketType.user)
async def test(ctx: commands.Context):
if (not ctx. author.guild_permissions.ban_members):
await ctx.reply('You need to have a `moddie` role ro have an access in this command.')
return
else:
pc_hibis = (1000)
random_amount = random.randint(99, 100)
await economy.add_money(ctx.message.author.id, "wallet", pc_hibis)
await economy.add_money(ctx.message.author.id, "bank", random_amount)
embed = discord.Embed(title="Here's your weekly paycheck moddie!", colour=discord.Color.from_rgb(47, 49, 54))
embed.add_field(name=f"Hey Moddie!", value=f"""**A lil message for you!**\nThank you for being a great moddie here in Junhan Bot!\nWe appreciate your efforts! """)
embed.add_field(name=f"Weekly Paycheck!", value=f"""Items you got:\n`{pc_hibis}` `🌺` | `{random_amount}` `💎` """)
await ctx.reply(embed = embed)
``` it works now but the message `You need to have a moddie role ro have an access in this command` doesn't
i am making a bot but i want it to be online forever but it sometimes goes offline when i close my laptop i am using repl.it
replit doesnt keep process running after you close the tab or your computer
its a replit thing
o
it saves power
if its your only choice replit is a great option for trying new langs and all around programming
i reccommend running code locally tho it requires more setup
iirc its
class smt(discord.Client)
just use the bot framework tbh
How do i fix this arent modules just imported automatically by adding a line of code to cript?
2022-01-05T02:41:00.914334+00:00 app[worker.1]: from discord_components import Button, Select, SelectOption, ComponentsBot
2022-01-05T02:41:00.914383+00:00 app[worker.1]: ModuleNotFoundError: No module named 'discord_components'
from discord_components import Button, Select, SelectOption, ComponentsBot
you can do the 24/7 thing in replit
if you want to host the bot
and discord_components is a 2.7+ script i think
why even use third party libs when you have forks tbh
just saying you should follow pep8
!pep8
PEP 8 is the official style guide for Python. It includes comprehensive guidelines for code formatting, variable naming, and making your code easy to read. Professional Python developers are usually required to follow the guidelines, and will often use code-linters like flake8 to verify that the code they're writing complies with the style guide.
More information:
• PEP 8 document
• Our PEP 8 song! :notes:
should be 4 spaces per level or indentation
What do you mean
If I am hosting on Heroku do I also need to add to my requirements.txt file?
the heroku module doesnt host
So I cant't use components if hosted on Heroku?
you can use other libs just gotta list them in the script and install them
Any recomendation on what libs to use
for server in self.client.guilds:
BotCache.servers[server.id] = document```
everytime it inserts to the dict, it stays on the same guild_id
anyone know a fix?
https://cdn.discordapp.com/attachments/381965515721146390/928122996630106123/unknown.png
lmao you're asking me?"
idfk
Are you using pymongo or Motor?
add a commands.has_guild_permissions(ban_members = True) as a decorator for your command
I'm doing the roleplay category for my bot but when I did the if statement for the case when no one is mentioned but the bot didn't respond. Here's my code:
color = discord.Color.random())
embed.set_image(url = hug2)
print(embed)
await ctx.send(embed = embed)```
await ctx.channel.set_permissions(ctx.guild.default_role, <the perm> = T/F)
For example:
async def lockdown(ctx):
await ctx.channel.set_permissions(ctx.guild.default_role, send_messages=False)```
uhh how do i do it with other channels
!d discord.Member.activity
property activity: Optional[Union[discord.activity.Activity, discord.activity.Game, discord.activity.CustomActivity, discord.activity.Streaming, discord.activity.Spotify]]```
Returns the primary activity the user is currently doing. Could be `None` if no activity is being done.
Note
Due to a Discord API limitation, this may be `None` if the user is listening to a song on Spotify with a title longer than 128 characters. See [GH-1738](https://github.com/Rapptz/discord.py/issues/1738) for more information.
Note
A user may have multiple activities, these can be accessed under [`activities`](https://discordpy.readthedocs.io/en/master/api.html#discord.Member.activities "discord.Member.activities").
The name of the activity.
how do i get a discord image attachment into a numpy array?
does anyone know how to set channel perms and how to put the name of the channel to set perms to
disnake or discord.py2.0.0a
I'm using
with Image.open(io.BytesIO(await message.attachments[0].read())) as im:
data = np.array(im.convert("RGB"))``` but the memory is leaking
i think
i tried this but it just says none no matter what my status is
@commands.command(name="Status")
async def status(self,ctx, m: discord.Member):
acts = m.activities
act = [i for i in acts if isinstance(i, discord.CustomActivity)]
print(acts)
print(act)
if act:
act = act[0]
else:
return await ctx.send(f"No Custom Activity for {m.name}")
text = act.name
if text:
await ctx.send(f'Custom Status of {m.name}: **{text}**')
else:
return await ctx.send("No text in custom status")```
!d discord.Member.activities
The activities that the user is currently doing.
Note
Due to a Discord API limitation, a user’s Spotify activity may not appear if they are listening to a song with a title longer than 128 characters. See GH-1738 for more information.
oh sh*t that exists.
You don't need to do that , just member.activity.name will work
don't need to do what part
do you know how to set channel perms and how to set the channel to put perms to
Make an overwrite , or permission object
And use it in set_permissions
Or channel.edit
You need presence intents
Otherwise you aren't given presence/status data
aiosqlite if local , motor if noSQL , asyncpg if you want to make a db server ( my option)
AttributeError: 'NoneType' object has no attribute 'name'
@commands.command(name="Status")
async def status(self,ctx):
await ctx.send(ctx.author.activity.name)```
Enable presence intents
oh yeah and make sure the membre has an activity
discord.Intents.all() ?
what other obj can a @commands.has_any_role() take
yea , motor is mongodb but asynchronous
asyncpg is postregsql
because i wanna put a nonetype object in there ;plead
role name , role id
that's it
What else could you logically give it anyways other than those two??
i thought what about an ignorant nonetype object
At that point you'd omit the decorator
yea but you could change the object to something else with a cmd
and there's no decorator for adding a command that only 1-etc... guilds can use
i enabled it, still same error
like exclusive commands for a guild
does the member your checking have an activity, seems like a None to me x]
Implemented in the code as well ?, also does the context's author has a custom status
yes, me
i think the member activity doesn't mean their status?
Can you print out dict(bot.intents)
Where bot is your client
every member has the guild's default role
f**k
well they asked for the status ,their screenshot https://media.discordapp.net/attachments/343944376055103488/928133785751552032/ba52be549da901529913a6d5dd86cd12.png
yes ik they did i think
And it means the activity which appears on the profile , which includes both Activity and Custom status
No
You can remove that role lmao
For real lol?
Yes...
How do I do that?
Member.remove_roles(guild.default_role)?
If you await it yes
Lemme checkkkk
help me thanks
can you clarify?
Try it on the client
yeah
.jsk py ```py
await _ctx.author.remove_roles(_ctx.guild.default_role)
By on the client I mean manually
ya
i just tried adding it and it crashes my bot now
intents = discord.Intents().all()
bot = commands.Bot(command_prefix=get_prefix(), description=desc,case_insensitive=True, intents=intents)
bot.remove_command('help')
Alright
discord.Intents.all()
nvm i fixed it
and remove the () after get_prefix
ok
It's a classmethod, you can call it from an instance tho
Atleast I think you can? I'll check again lmao
uhmmm so we have a cooldown, but the problem is, it didnt show like that
like try again (minutes)
ss pls?
async def sendbikedata(ctx, date: str):
open(Log)
df = pd.read_excel(Log, index_col=None)
if (date == None or date == ""):```I am trying to print something when there is no date entered, but i keep getting a ``raise MissingRequiredArgument(param)`` error
Are you trying to make date an optional argument?
yes
You have to give date a default value, E.g None, ""
thank you
I mean the command
command for?


now I'm gonna go