#discord-bots
1 messages · Page 499 of 1
@fallow mauve
bot.cooldown(1, 1, commands.BucketType)
where in the code do i put that
Under the command decorator
decorator, pretend i dont know what that means
sry if im a pain to deal w, i just started using python
has there been any news about discord.py since the author said he's stepping down?
Nope
if message.content.startswith('<ping'):
await message.channel.send('pong')
if message.author == client.user:
return
No the full code
aaaaa
?
I'm guessing you're following a tutorial?
I would really suggest against what you're doing
but the basis of the code is what i learned from a tutorial
against what?
Literally everything
ok...
You should start from scratch and find a good tutorial
-_-
i was following this one, uploaded in 2020:
https://youtu.be/SPTfmiYiuok
Learn how to code a Discord bot using Python and host it for free in the cloud using Repl.it.
🚨Note: At 16:43, Replit now has a new method for environment variables. Check the docs: https://docs.replit.com/programming-ide/storing-sensitive-information-environment-variables
Along the way, you will learn to use Repl.it's built-in database and cr...
In this video, we go over how to setup a discord bot in python using discord.py v1.0.1 (rewrite).
If you have any suggestions for future videos, leave it in the comments below.
GITHUB: https://github.com/Rapptz/discord.py
DOCUMENTATION: https://discordpy.readthedocs.io/en/latest/
OFFICIAL DISCORD.PY SERVER: https://discord.gg/r3sSKJJ
JOIN MY ...
Follow this series
ok
I wouldn't suggest following this for long though
You want to be able to code yourself
true, i cant by copy/pasting tutorials the whole time
Those need to be two seperate lines
I’m on my phone right now, so cant really type anything out thats really good, but take a look at the code in the tutorial you said you were following
indentation
?
!indent
Indentation
Indentation is leading whitespace (spaces and tabs) at the beginning of a line of code. In the case of Python, they are used to determine the grouping of statements.
Spaces should be preferred over tabs. To be clear, this is in reference to the character itself, not the keys on a keyboard. Your editor/IDE should be configured to insert spaces when the TAB key is pressed. The amount of spaces should be a multiple of 4, except optionally in the case of continuation lines.
Example
def foo():
bar = 'baz' # indented one level
if bar == 'baz':
print('ham') # indented two levels
return bar # indented one level
The first line is not indented. The next two lines are indented to be inside of the function definition. They will only run when the function is called. The fourth line is indented to be inside the if statement, and will only run if the if statement evaluates to True. The fifth and last line is like the 2nd and 3rd and will always run when the function is called. It effectively closes the if statement above as no more lines can be inside the if statement below that line.
Indentation is used after:
1. Compound statements (eg. if, while, for, try, with, def, class, and their counterparts)
2. Continuation lines
More Info
1. Indentation style guide
2. Tabs or Spaces?
3. Official docs on indentation
how do i fix it
unindent line 2
how?
did you read the embed?
This seems like a really silly thing to be stuck on but i've been puzzling over this error for a few weeks now (i forgot about it till i tried the command today)py await ctx.reply(f"I am in {str(guilds)} servers! Their names are: ".join(self.bot.guilds)) TypeError: sequence item 0: expected str instance, Guild foundwhich is caused by these commands, i'm trying to get it to show a list of the names of each guild the bot is in```py
@commands.command(description = "See how many servers I'm in.", usage = "servers")
async def servers(self, ctx):
guilds = sum(await self.bot.comm.handler("guild_count", self.bot.cluster_count))
await ctx.reply(f"I am in {str(guilds)} servers! Their names are: ".join(self.bot.guilds))
@cog_ext.cog_slash(name = "servers", guild_ids = [448405740797952010])
async def _servers(self, ctx: SlashContext):
guilds = sum(await self.bot.comm.handler("guild_count", self.bot.cluster_count))
await ctx.reply(f"I am in {str(guilds)} servers! Their names are: ".join(self.bot.guilds))```
this goes on then off (no errors) how do i fix
!codeblock
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.
await ctx.reply(f"I am in {str(guilds)} servers! Their names are: {",".join([guild.name for guild in self.bot.guilds])}"
Try this
you have a return outside of a function on line 23
You should be getting errors
Check your indentation. You have some if statements that I don't think you mean to have outside of functions
how do i fix?
not have a return outside of a function
there is still a ton of errors in your code
!indents
Indentation
Indentation is leading whitespace (spaces and tabs) at the beginning of a line of code. In the case of Python, they are used to determine the grouping of statements.
Spaces should be preferred over tabs. To be clear, this is in reference to the character itself, not the keys on a keyboard. Your editor/IDE should be configured to insert spaces when the TAB key is pressed. The amount of spaces should be a multiple of 4, except optionally in the case of continuation lines.
Example
def foo():
bar = 'baz' # indented one level
if bar == 'baz':
print('ham') # indented two levels
return bar # indented one level
The first line is not indented. The next two lines are indented to be inside of the function definition. They will only run when the function is called. The fourth line is indented to be inside the if statement, and will only run if the if statement evaluates to True. The fifth and last line is like the 2nd and 3rd and will always run when the function is called. It effectively closes the if statement above as no more lines can be inside the if statement below that line.
Indentation is used after:
1. Compound statements (eg. if, while, for, try, with, def, class, and their counterparts)
2. Continuation lines
More Info
1. Indentation style guide
2. Tabs or Spaces?
3. Official docs on indentation
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.
what errors?
for one your on_message doesnt have an event decorator, it also doesnt have proper indentation for the code under it and wont work, you're also using the parameter self but its not a cog so it doesnt need it and wont even work
import yaml
from munch import Munch
config_file_path = os.path.join(
os.path.dirname(__file__), os.path.pardir, 'config.yml')
config = None
def load_config():
with open(config_file_path) as config_file:
_config = yaml.safe_load(config_file)
globals()['config'] = Munch.fromDict(_config)
load_config()```
Is there a better way of doing this
yes, a class
Thank you
please help
@slash.slash(name='clear', description="the bot will remove the set amount of messages (max 100)", guild_ids=[SERVERS])
async def clear(ctx:SlashContext, amounttoclear):
if amounttoclear == 0:
await ctx.channel.purge(limit= 100)
await ctx.send("removed 100 messages")
else:
await ctx.channel.purge(limit= amounttoclear)
await ctx.send(f"removed {amount} messages")
this code returns this error :
```An exception has occurred while executing command clear:
Traceback (most recent call last):
File "C:\Users\Robin310\AppData\Local\Programs\Python\Python39\lib\site-packages\discord_slash\client.py", line 1352, in invoke_command
await func.invoke(ctx, **args)
File "C:\Users\Robin310\AppData\Local\Programs\Python\Python39\lib\site-packages\discord_slash\model.py", line 210, in invoke
return await self.func(*args, **kwargs)
File "C:\Users\Robin310\Desktop\Shoutout Network\SOHelper\bot.py", line 708, in clear
await ctx.channel.purge(limit= amounttoclear)
File "C:\Users\Robin310\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\channel.py", line 377, in purge
msg = await iterator.next()
File "C:\Users\Robin310\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\iterators.py", line 285, in next
await self.fill_messages()
File "C:\Users\Robin310\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\iterators.py", line 327, in fill_messages
if self._get_retrieve():
File "C:\Users\Robin310\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\iterators.py", line 294, in _get_retrieve
if l is None or l > 100:
TypeError: '>' not supported between instances of 'str' and 'int'
how do i fix this ?
code blocks--
oh sorry
thats not a code block
better
limit takes an int and you’re passing in a string
or wait forget what i told
cast it to an int
int(amount) like that ?
yes
yeah
yeah it does
so its not correct it seems
because you’re not doing it correctly
if your lib allows it
mm
ill check
or do int(amouttoclear) when passing it to limit kwarg
yep my library allows it Xd
surprising
hmmmmmmmmmmm
you shouldn't start with discord.py without python knowledge
i knew that it was wrong
oh you knew
mhm
sure
i just didnt see it
if you guy could help with 1 more issue
async def updateLoop():
print(f"\n", end='')
print(f"\nStarting update loop...", end='')
await bot.wait_until_ready()
channel = bot.get_channel(STREAMER_CHANNEL)
while(True):
today = datetime.datetime.today()
weekday = today.weekday()
now = datetime.datetime.now()
value = MATRIX[TIMES.index(f"{now.hour}:00")+1][weekday+1]
if (value != "" and value != None):
await channel.purge()
sleep(1)
await channel.send(f"{value} is now live!\nhttps://www.twitch.tv/{value}")
MATRIX[TIMES.index(f"{now.hour}:00")+1][weekday+1] = ""
writeToFile()
await updateImage()
updatestreamerweb()
else:
print("randomfeature")
future = datetime.datetime(today.year, today.month, today.day, today.hour, 0)
await asyncio.sleep( (future-today).total_seconds() )
this will spam randomfeature
when value is empty
but instead of it spamming randomfeature i want it to execute it only once if the function is called
the redlines show the error
how do i make an exp system?
.
i didnt see the problem at first so i sent it and asked for help and then realized my super obvious mistake
i have this error
An exception has occurred while executing command `slot`:
Traceback (most recent call last):
File "C:\Users\Robin310\AppData\Local\Programs\Python\Python39\lib\site-packages\discord_slash\client.py", line 1352, in invoke_command
await func.invoke(ctx, **args)
File "C:\Users\Robin310\AppData\Local\Programs\Python\Python39\lib\site-packages\discord_slash\model.py", line 210, in invoke
return await self.func(*args, **kwargs)
File "C:\Users\Robin310\Desktop\Shoutout Network\SOHelper\bot.py", line 276, in slot
if (MATRIX[TIMES.index(time)+1][DAYS.index(day)+1]) == "":
ValueError: 'u' is not in list
how do i fix this ?
@slash.slash(name='slot', description="lets users create their own stream slots", guild_ids=[SERVERS])
async def slot(ctx:SlashContext, args):
global schedule
if schedule:
if (len(args) == 0) or (len(args) == 1):
await ctx.send("Please specify the time and day!")
else:
time = args[1]
day = args[0].lower()
if (time == "GMT" or day == "GMT"):
await ctx.send("Do not include \'GMT\'!")
return
if (MATRIX[TIMES.index(time)+1][DAYS.index(day)+1]) == "":
MATRIX[TIMES.index(time)+1][DAYS.index(day)+1] = userName(ctx.message.author)
writeToFile()
await updateImage()
await ctx.send(f"Successfully confirmed slot at {time} on {day}.")
sleep(5)
await ctx.channel.purge(limit=2)
else:
await ctx.send("That slot is already taken!")
else:
await ctx.send("schedule is disabled enable it first")
this is the code
the command i do is /slot sunday 18:00
You would need to know how to make a database
how i can do help command with editing message after add reaction ?
!d discord.Message.edit
await edit(content=..., embed=..., embeds=..., attachments=..., suppress=..., delete_after=None, allowed_mentions=..., view=...)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Edits the message.
The content must be able to be transformed into a string via `str(content)`.
Changed in version 1.3: The `suppress` keyword-only parameter was added.
use that when they click on a reaction on the message
You could try and copy mee6's
how i can check this?
mee6's code is public?
when user click reaction
Nope
!d discord.Client.wait_for
wait_for(event, *, check=None, timeout=None)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Waits for a WebSocket event to be dispatched.
This could be used to wait for a user to reply to a message, or to react to a message, or to edit a message in a self-contained way.
The `timeout` parameter is passed onto [`asyncio.wait_for()`](https://docs.python.org/3/library/asyncio-task.html#asyncio.wait_for "(in Python v3.9)"). By default, it does not timeout. Note that this does propagate the [`asyncio.TimeoutError`](https://docs.python.org/3/library/asyncio-exceptions.html#asyncio.TimeoutError "(in Python v3.9)") for you in case of timeout and is provided for ease of use.
In case the event returns multiple arguments, a [`tuple`](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.9)") containing those arguments is returned instead. Please check the [documentation](https://discordpy.readthedocs.io/en/master/api.html#discord-api-events) for a list of events and their parameters.
This function returns the **first event that meets the requirements**...
You would have to reverse engineer it
i just need a level algorithm
hey, i watched the tutorial you sent me, does this look better?
client should be bot, since discord.Client() is a thing, its better practice.
okay but what if user click reaction message bot edit it user click another reaction bot edit it and user click first emoji again
ok, i just followed the tutorial i was sent
you should also not make commands with an on_message event, commands.Bot has command decorators
i dont understand how that works yet :/
fixed it
ok
There really is no difference between calling your bot object bot and client
incorrect.
If you're starting out you should name it bot
a variable name is this case wont change a thing in how your code is ran, but, like said, since discord.Client() is a thing we should use bot for the bot object, its better when it comes to the aspect of practice.
Yeah ik
But in what situation would you use discord.Client()
Imo if you're starting out call it bot but if you have a lot of existing code don't bother
Guys I have a really weird problem.
My on_reaction_add event only works after I initate a command. When i start the code for the bot.
@client.listen("on_reaction_add")
async def open_ticket(reaction, user):
await reaction.message.channel.send("Reaction Function")
message = reaction.message```
It gives me no errors whatsoever when this happens
yeah, its not worth changing if you've named in client in the past, its just better practice-wise, and im very "picky" when it comes to things like that.
I literally made a "startup" command so that this reaction event works
i have 0 clue how to fix this
anyone got any tips or anyway to help me out here with this weird problem?
If through a command you would put something for the current name of the channel and the new name in the args
So you can get the name of the voice channel you want to edit
Then you would get the voice channel and change it
is there a way ot make it so the bot repeats whatever you say, like if i wanted to add a command like <say _____, and it would say whatever was in the blank, how would i do that?
In the args you would put something like *, user_message
Then like ctx.send(user_message)
Again don't copy and paste
Take what I say as an example
And learn for yourself
You need to get the instance of the voice channel, could be via get_channel then use the edit method of it and pass in the new name there
!d discord.Client.get_channel
get_channel(id, /)```
Returns a channel or thread with the given ID.
!d discord.VoiceChannel.edit
await edit(*, reason=None, **options)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Edits the channel.
You must have the [`manage_channels`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.manage_channels "discord.Permissions.manage_channels") permission to use this.
Changed in version 1.3: The `overwrites` keyword-only parameter was added.
Changed in version 2.0: Edits are no longer in-place, the newly edited channel is returned instead.
Is it possible to check if the invite to a server is the ctx.guild
rephrase that please?
how i get the role id from one of these?
await guild.create_role(name=name)
No error but would not work
how do i get the bot to react with an emoji to the command?
!d discord.Message.add_reaction
await add_reaction(emoji)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Add a reaction to the message.
The emoji may be a unicode emoji or a custom guild [`Emoji`](https://discordpy.readthedocs.io/en/master/api.html#discord.Emoji "discord.Emoji").
You must have the [`read_message_history`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.read_message_history "discord.Permissions.read_message_history") permission to use this. If nobody else has reacted to the message using this emoji, the [`add_reactions`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.add_reactions "discord.Permissions.add_reactions") permission is required.
Use that
thx
Anyone knows how to make a bot grab a channel using its ID and then grabbing a message in that channel using the ID of the message?
To describe what I mean i made an example code that is not valid but can be understanded what the endgoal is below..
channel = await client.fetch_channel(channelID)
message = await channel.fetch_message(messageID)
or something?
is discord.py actually discontiunued ?
Can anyone help?
what do i replace the (emoji) with?
the emoji u want it to react with
how do i put a emoji in the code?
np
not working
the red dot is close to the thingy
to what thingy?
await message.add_reaction ( '🟥')

It’s add_reaction
Not add.reaction
works now
!d discord.Message.add_reaction
await add_reaction(emoji)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Add a reaction to the message.
The emoji may be a unicode emoji or a custom guild [`Emoji`](https://discordpy.readthedocs.io/en/master/api.html#discord.Emoji "discord.Emoji").
You must have the [`read_message_history`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.read_message_history "discord.Permissions.read_message_history") permission to use this. If nobody else has reacted to the message using this emoji, the [`add_reactions`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.add_reactions "discord.Permissions.add_reactions") permission is required.
thx
how do i get role id? with
await guild.create_role(name=role)
role_obj = await guild.create_role(name=role)
Guild.create_role() method returns the newly created role object
Then you can access the role id
gtg for today bye
await create_role(*, name=..., permissions=..., color=..., colour=..., hoist=..., mentionable=..., reason=None)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Creates a [`Role`](https://discordpy.readthedocs.io/en/master/api.html#discord.Role "discord.Role") for the guild.
All fields are optional.
You must have the [`manage_roles`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.manage_roles "discord.Permissions.manage_roles") permission to do this.
Changed in version 1.6: Can now pass `int` to `colour` keyword-only parameter.
how would I go about setting multiple values to one field? or is that even possible?
Are you talking about embeds?
yea
want something like this but i want multiple values on every day...
Yes you can
how?
this is what i got rn
@client.command()
async def Coaching(ctx):
embed=discord.Embed(
title='Available Dates',
description='',
color=discord.Color.blue())
embed.add_field(name='Monday', value=m1, inline=False)
embed.add_field(name='Tuesday', value=m2, inline=False)
embed.add_field(name='Wednesday', value=m3, inline=False)
embed.add_field(name='Thursday', value=m4, inline=False)
embed.add_field(name='Friday', value=m5, inline=False)
embed.set_footer(text='Discord: Joshua1N#1103 | Email: Joshua.Nelson2005@gmail.com')
await ctx.send(embed=embed)
You can have multiple lines
In one field
And also check this
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
anyone know this?
TypeError: expected str, bytes or os.PathLike object, not dict
code is
!code
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.
ok ive got my format correct, just not sure how to add a second value
Anyone knows how to make a bot grab a channel using its ID and then grabbing a message in that channel using the ID of the message?
To describe what I mean i made an example code that is not valid but can be understanded what the endgoal is below..
channel = await client.fetch_channel(channelID)
message = await channel.fetch_message(messageID)
or something?
You can just use '\n' inside a string
but that would still be 1 value
You can't have multiple value keywords in 1 field
ok
2nd line should be client.fetch_message
Let me check
wait i dont even have to fetch the channel?

rip
anyone know TypeError: expected str, bytes or os.PathLike object, not dict
this Error?
Oh you need that actually
I'm wrong
ohh its channel.fetch_meesage
interesting
wait so i actually did the code right?
without even realizing? 🤣
discord.Client.fetch_channel
!d discord.Client.fetch_channel
await fetch_channel(channel_id, /)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Retrieves a [`abc.GuildChannel`](https://discordpy.readthedocs.io/en/master/api.html#discord.abc.GuildChannel "discord.abc.GuildChannel"), [`abc.PrivateChannel`](https://discordpy.readthedocs.io/en/master/api.html#discord.abc.PrivateChannel "discord.abc.PrivateChannel"), or [`Thread`](https://discordpy.readthedocs.io/en/master/api.html#discord.Thread "discord.Thread") with the specified ID.
Note
This method is an API call. For general usage, consider [`get_channel()`](https://discordpy.readthedocs.io/en/master/api.html#discord.Client.get_channel "discord.Client.get_channel") instead.
New in version 1.2.
LMAOOOOOO wow
!d await ctx.message.author.voice.channel.connect()
!rule 5
5. Do not provide or request help on projects that may break laws, breach terms of services, or are malicious or inappropriate.
ahh sorry
how i make a server owner only command?
@commands.check(is_server_owner)
does not work
you need to define the check manually
how do i edit a value in embed msg?
ive got the certain field set to a variable but i dont see any type of edit keyword
its py @command.is_owner()
thats for bot owner
You can't, but you can edit the message with new embed
oh hes talking about guild owner?
So you can technically edit the embed
mbmb
yep
but how tho
like how i set it up
oh
U put it in an if statement
ohh u talking about @client.check?
u could just answer my question but whatever
Docs answer more precisely
its not telling me how i get guild owner only command
its not a command..
@reef shell yeah but the thing is check() is a global thing
🤷🏾♂️ ?
So it would check for the guild owner on every command used
is it
@command.is_guild_owner()
we said checks mate
well corrrection, sherlock did
I dont do it that way cuz i like everything to be specific
But whatever works i guess.
def owner_or_permissions(**perms):
original = commands.has_permissions(**perms).predicate
async def extended_check(ctx):
if ctx.guild is None:
return False
return ctx.guild.owner_id == ctx.author.id or await original(ctx)
return commands.check(extended_check)
Then add this deco. on top of your cmd func.
@commands.check(owner_or_permissions)
@lyric moat U would add
@client.check above what he said if u didnt realize yet
Idk if it is in the lib
or whatever ur bot decorator is
wait huh, what's commands.check?
shouldnt it be the bot decorator or am i smoking?
@commands.check_is_guild_owner()
Did you read the docs?
me?
Yes
Traceback (most recent call last):
File "main.py", line 102, in <module>
@commands.check_is_guild_owner()
AttributeError: module 'discord.ext.commands' has no attribute 'check_is_guild_owner'
There is an example
Oh lol
see i knew it B)
what is B)
emoticon
Bitch?
Nothing, just using char. instead of emojis
bruh...
LMAAOOO
dis man
@lyric moat yk u can curse in this server right?
u dont have to try and bypass
oh
lmao
im gonna say the hard r to prove it
jkjk
Anyways, @lyric moat follow the exmaple above
which was in the doc if u didnt read it already
lol
Oh guys i have a problem myself
@client.listen("on_reaction_add")
async def open_ticket(reaction, user):```
My on_reaction_add event only activates to messages reacted to AFTER the bot has started. So meaning messages if messages befoire is online are reacted to this function is renderred useless.
How do i fix that?
This is espiaclly aannoying for what im trying to make here
like if my bot restarts the whole function doesnt work so i gotta recreate the support ticket embed for the reactions to work again
im pretty sure its @client.event
im using what's called a client.listener
its similar to client.event
it allows to still use commands and other stuff
only difference is the event name goes in the decorator not the async def
otherwise same thing
i dont remember this in the docs
So, I'm trying to teach my friend how to make a discord bot and he's getting this error I've never seen
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: 'int' object is not subscriptable```
the code
@bot.command()
async def level(ctx):
id = random.randint(128,73000000)
level = requests.get(f'https://gdbrowser.com/api/level/{id}')
result = level.json()
if level.json == -1:
return
embed = discord.Embed(title=f"{result['id']}", color=0x00ffff)
embed.add_field(name=result['name'], value=result["author"], inline=False)
embed.add_field(name="Field2", value="hi2", inline=False)
await ctx.send(embed=embed)
await ctx.send(f"{result['id']}")
I'm trying to convert an int to a string(I've tried str() btw I'm not dumb) and It just shows this
What type of variable is result?
actually nvm
oh i think i figured it out
await ctx.send(f"{result['id']}")
ur trying to grab a value of of something that does not
You dont even need the ['id'] part since its only 1 value in the variable
to turn it into a string you can use str() str(result), but the whole variable is already a string so that's useless
But i dont know what your level = requests.get() returns to you, so I could be wrong. I'd need more information there
You can check this doing print(results) if you want to
@fallow horizon does this help?
but result has many values and we tried to do it normally too
at what line?
what?
the error ofcourse
can you show what json does it return?
yeah sure
ummmm the values are from a rest api so we won't get the exact data
but it will be close
send whatever you get by doing it
yep
{
"name": "inpozivle papuh",
"id": "27351286",
"description": "(No description provided)",
"author": "axelciclol10",
"playerID": "19974889",
"accountID": "5818640",
"difficulty": "Insane",
"downloads": 150,
"likes": 22,
"disliked": false,
"length": "Tiny",
"stars": 0,
"orbs": 0,
"diamonds": 0,
"featured": false,
"epic": false,
"gameVersion": "2.0",
"editorTime": 0,
"totalEditorTime": 0,
"version": 1,
"copiedID": "0",
"twoPlayer": false,
"officialSong": 0,
"customSong": 593661,
"coins": 3,
"verifiedCoins": false,
"starsRequested": 10,
"ldm": false,
"objects": 0,
"large": false,
"cp": 0,
"difficultyFace": "insane",
"songName": "Xtrullor - Supernova",
"songAuthor": "Xtrullor",
"songSize": "11.89MB",
"songID": 593661,
"songLink": "http://audio.ngfiles.com/593000/593661_Xtrullor---Supernova.mp3"
}
here you go
m8?
is there a way to capture the string of what someone says and split it?
didnt mean to reply
says when invoking a command?
is it allowed for someone to come to my server to test my bot?
advertising is not allowed
ik i wouldnt send chat in here, i would dm
idk if that is allowed
it takes less than 2mins
what game?
elif str(rctn) == '❌':
await admin_embed.delete
Will this delete the embed if I react?
there is a scam like this
no
you can delete a message
or edit and set embed = None as parameter/keyword arg
I want it to delete the message automatically if I react to it
!d discord.Message.delete
await delete(*, delay=None)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Deletes the message.
Your own messages could be deleted without any proper permissions. However to delete other people’s messages, you need the [`manage_messages`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.manage_messages "discord.Permissions.manage_messages") permission.
Changed in version 1.1: Added the new `delay` keyword-only parameter.
any mistake i have done in this line?
i'm getting this error
count_documents
ok
await message.delete() to delete a message, here message is an instance of discord.Message
can't we make 2 on_message events?
await admin_embed.delete()
so like this?
they conflict but if they have different purposes ig sure
again, what is the admin_embed var.?
embed2 = discord.Embed(
title="New Report",
color=0x6632a8
)
embed2.add_field(name='User ID:', value=frt_reply.content, inline=False)
embed2.add_field(name='Reason:', value=snd_reply.content, inline=False)
embed2.add_field(name='Additional Info:', value=more_info.content, inline=False)
embed2.add_field(name='User ID of Reporter', value=ctx.author.id, inline=False)
embed2.set_image(url=image.url)
embed2.set_thumbnail(url=ctx.author.avatar_url_as(static_format="png"))
embed2.set_footer(text='Emoji Key: (✅) = Accept, (❌) = Reject, (⛔) = Block reporter from submitting further reports, (🔄) = Add reporter to Diablo (Use only in extreme cases)')
admin_embed = await self.client.get_channel(780476049943166996).send(embed=embed2)
then yes.
!paste
Pasting large amounts of code
If your code is too long to fit in a codeblock in discord, you can paste your code here:
https://paste.pythondiscord.com/
After pasting your code, save it by clicking the 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.
for y in ["❗", "🔨"]:
await start_embed.add_reaction(str(y))
def reaction_check(rctn, usr):
return usr.id == ctx.author.id and (str(rctn) == '❗' or str(rctn) == '🔨')
try:
rctn, usr = await self.client.wait_for("reaction_add", check=reaction_check, timeout=60)
except asyncio.TimeoutError:
embed = discord.Embed(
title="You have timed out.",
description="Please restart if you wish to run a new scan.",
color=0xFF0000
)
await ctx.send(embed=embed)
return
else:
server_members = [member.id for member in ctx.guild.members]
offense = collection.find({"userid": {"$in": server_members}})
for person in offense:
member_object = (discord.utils.get(ctx.guild.members, id=person["userid"]) for person in offense)
if bans_channel is None:
overwrites = {
ctx.guild.default_role: discord.PermissionOverwrite(send_messages=False)
}
bans_channel = await ctx.guild.create_text_channel(
name="diablobans",
topic="Lists the offenders that join the server. :warning: MIGHT BE NSFW, DISABLE AT OWN RISK.",
overwrites=overwrites,
nsfw=True
)
if str(rctn) == "🔨":
if offense is not None:
When I react it doesn't respond idky
why is this happening ?
like only this cmd is not found rest cmds in the file are working fine
and when i remove all the cmd except the setup cmd it works
I am getting this error. Pls tell me why this is happening
share code man 😬
!code
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.
!code discord.py
read this @slate swan
..
tf?
mongo_url = 'keep dreaming'
cluster = MongoClient(mongo_url)
db = cluster['databasel']
collection = db['level']
author_id = message.author.id
guild_id = message.guild.id
user_id = {"_id": author_id}
if message.author == client.user:
return
if message.author.bot:
return
if(collection.count_documents({}) == 0):
user_info = {"id": author_id, "guildID": guild_id, "level": 1, "XP": 0}
collection.insert_one(user_info)
await message.channel.send('User has logged in!')
this is done under a on_message event
and error ?
idk mongo man sorry
ok np
Check out #databases
ok
Anything to do with a database I recommend going there
guys can anyone here tell me how to get the user id with the help of quart and discord oauth
someone plz help me
which user id
while driver.find_elements_by_Text('You are being rate limited.'):
error came
C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py:662: UserWarning: find_elements_by_* commands are deprecated. Please use find_elements() instead warnings.warn("find_elements_by_* commands are deprecated. Please use find_elements() instead") C:\Users\HP\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py:723: UserWarning: find_element_by_* commands are deprecated. Please use find_element() instead warnings.warn("find_element_by_* commands are deprecated. Please use find_element() instead") Traceback (most recent call last): File "c:\Users\HP\Desktop\L.T.T 8TH\astaroth\DISCORD ACCOUT MAKER_AUTO\main.py", line 96, in <module> while driver.find_elements_by_Text('You are being rate limited.'): AttributeError: 'Chrome' object has no attribute 'find_elements_by_Text'
the user who authenticated him with disc oauth
what are you trying to make?
that doesn't make much sense
on chrome??
fix this
Hello, you should be using the Discord API.
Here's a tutorial on using discord.py: https://vcokltfre.dev/
A tutorial on how to use discord.py to create your own Discord bot in Python, written to fix the flaws of many other popular tutorials.
what kinda bot is it?
i know this is not the best hosting service for discord bots, but for starters, use a cloud hosting service like heroku
!d discord.Member.avatar_url
No documentation found for the requested symbol.
!d discord.Member.display_avatar
property display_avatar: discord.asset.Asset```
Returns the member’s display avatar.
For regular members this is just their avatar, but if they have a guild specific avatar then that is returned instead.
New in version 2.0.
U need master version for this to work
How do I installl
oh
idk where to send this but
how do i add embeds with this i tried
data = {
'content': "Welcome",
'username': username,
'avatar_url': ""
}
how do i make a simple subcommand command that invokes without a subcommand
Add in the parent (main command) decorator invoke_without_command=True
!d help
I got that part
in this whole command I'm trying to access the database
would i have to add my query to each of the subcommands?
Yes
alright
e = discord.Embed(title=data["content"], description=data["username"]).set_footer(icon_url=data["avatar_url"])
``` Like this
Or you can do this:
embed = discord.Embed(title=data['content'])
embed.add_field(name="Your username", value=data['username'])
embed.set_footer(icon_url=data['avatar_url'])
mymsg = await ctx.send("This message will self destruct in 5 seconds.",embed=embed)
mymsg.delete(delay=5)
can u add an image to that
Yes
Or you can do this:
import asyncio
embed = discord.Embed(title=data['content'])
embed.add_field(name="Your username", value=data['username'])
embed.set_footer(icon_url=data['avatar_url'])
mymsg = await ctx.send("This message will self destruct in 5 seconds.",embed=embed)
await asycnio.sleep(1)
await mymsg.edit("This message will self destruct in 4 seconds.", embed=embed)
await asycnio.sleep(1)
await mymsg.edit("This message will self destruct in 3 seconds.", embed=embed)
await asycnio.sleep(1)
await mymsg.edit("This message will self destruct in 2 seconds.", embed=embed)
await asycnio.sleep(1)
await mymsg.edit("This message will self destruct in 1 second", embed=embed)
await asycnio.sleep(1)
mymsg.delete()
no i jus need a description and title with an image
is danny there in the server?
Or you can do this:
import asyncio
embed = discord.Embed(title=data['content'])
embed.add_field(name="Your username", value=data['username'])
embed.set_footer(icon_url=data['avatar_url'])
mymsg = await ctx.send("This message will self destruct in 5 seconds.",embed=embed)
await asycnio.sleep(1)
await mymsg.edit("Hahaha just kidding. I dont want you to have it.")
await asycnio.sleep(1)
await mymsg.edit("I'm just joshing with ya. Here it is.", embed=embed)
await asycnio.sleep(1)
await mymsg.edit("Oo! There it goes again! hahaha such a sucker.")
await asycnio.sleep(1)
await mymsg.edit("Na but for real tho. here.", embed=embed)
i jus need a description and title with an image
Like a big ass image? or an image in the corner?
or an image in the footer or title?
big ass
wdym
Are you uploading the image from the bots directory? or do you want to use a specific users image?
uploaded
Alright
You're gonna want to use something like file = discord.File("File location here", filename="whatever you want it to be called . ending"
py
#this was in a cog
The below code bans player.
@commands.command()
@commands.has_permissions(ban_members=True)
async def ban(self, ctx, member: discord.Member, *, reason=None):
await member.ban(reason=reason)
await ctx.send(f'User {member} has been
py
The error and the code
for example. file = discord.File("C:/MyPictures/CuteCatePicture32.png", filename="Cate32.png")
cant i jus use a link
Yes you can use a link
https://cdn.discordapp.com/attachments/343944376055103488/891932847429021726/Screenshot_20210927_114900.jpg liekt his
how
Help mee
So assuming you have the link, use embed.set_image(url="link")
Hold the front door sir. 1 person at a time.
Ok
@meager whale you indented your function.
@commands.command()
@commands.has_permissions(ban_members=True)
async def ban(self, ctx, member: discord.Member, *, reason=None):
await member.ban(reason=reason)
await ctx.send(f'User {member} has been banned.')
``` Your function needs to inline with the @commands part
Ok
Coding on a mobile makes it difficult
I wish you had a PC as well 😦
Yeah
Can I use this code?
Like will it work
I assume so. i just copied and pasted yours and fixed the indent
Good luck. I need to BRB 2 mins
dude u coding in mobile?
LOL
@meager whale its supposed to be {}
Doesnt really matter
man is alpha @slate nymph
Oh this wrong
How
Send me the updated code
Man you gotta really magnify to see the difference between brackets and paranthesis
@meager whale bro
Yeah
y u crossposting
i am getting this error. please help me
on other servers
Where
then u send no code 🤡
him
Install the package?
Probably should be in #databases
Rather than here
And
!indents
Indentation
Indentation is leading whitespace (spaces and tabs) at the beginning of a line of code. In the case of Python, they are used to determine the grouping of statements.
Spaces should be preferred over tabs. To be clear, this is in reference to the character itself, not the keys on a keyboard. Your editor/IDE should be configured to insert spaces when the TAB key is pressed. The amount of spaces should be a multiple of 4, except optionally in the case of continuation lines.
Example
def foo():
bar = 'baz' # indented one level
if bar == 'baz':
print('ham') # indented two levels
return bar # indented one level
The first line is not indented. The next two lines are indented to be inside of the function definition. They will only run when the function is called. The fourth line is indented to be inside the if statement, and will only run if the if statement evaluates to True. The fifth and last line is like the 2nd and 3rd and will always run when the function is called. It effectively closes the if statement above as no more lines can be inside the if statement below that line.
Indentation is used after:
1. Compound statements (eg. if, while, for, try, with, def, class, and their counterparts)
2. Continuation lines
More Info
1. Indentation style guide
2. Tabs or Spaces?
3. Official docs on indentation
Cause thats pymongo
simple python mistake
Delete some spaces
Where
@commands.command()
@commands.has_permissions(ban_members=True)
async def ban(self, ctx, member: discord.Member, *, reason=None):
await member.ban(reason=reason)
await ctx.send(f'User {member} has been banned.')
Your function needs to inline with the @commands part
That's the new code
no one comes there
i already asked like 5 times
coding on mobile isnt awesome
no one replied
it is called "phone dev"
Shut uo
shut up
No one said it was awesome
did you do pip install pymongo[srv]?
is that an other package?
The only reason we do it because we literally dont have a pc or a laptop
it is a required packages…at least try and read the error
from a 'reply message' like this one?
.reference
!d discord.Message.reference
The message that this message references. This is only applicable to messages of type MessageType.pins_add, crossposted messages created by a followed channel integration, or message replies.
New in version 1.5.
Guys, this line is from one function:
rand_num = random_number(20, 300)
i want to use the same numbers in another function, how do i do that?
i tried using the reference attribute but this is what it returns:
<MessageReference message_id=891477598398455818 channel_id=796229736103673901 guild_id=796229736103673896>
i can't figure how to know if it was a replied mesage
- pass numbers into other func through args/kwargs
- global it
- stick it in a class
ohhh, thanku
@commands.command() @commands.has_permissions(ban_members=True) async def ban(self, ctx, member: discord.Member, *, reason=None): await member.ban(reason=reason) await ctx.send(f'User {member} has been banned.') Your function needs to inline with the @commands part
it dosen't install
i really like ppl who code apps/games in phone
just do if message.reference - if there is no reference it returns nothing
OK but it doesn't matters
I want help
ahh, i see, thanks a ton for the help 
try pip install dnspython
are you using rooted phone?
Nope
it kinda does, it is recomended to buy a separate keyboard and mouse
thumb hurts
No it doesn't
i'll try now
U have an invisible character in your code
Ok
screenshot it, Ive had that before
what device are you on and what os
does it just pause as if its thinking
or does it just ignore the command
i am using replit in pc
lemme refreash page and try first
yes it got fixed after refreshing
now your error should be gone
try and read the error in the future, it literally tells you the command to run to install it
guys i need help
now what is this? i can't understand after reading
which error?
error with mongoDB connection
retry_emoji = disnake.PartialEmoji.from_str(":readthedocs:")
Doing this, but is still showing Unknown Emoji when I try to pass it in add_reaction(). Any help?
asyncio.TimeoutError?
yea
oh but how to fix?
hey can anyone pls help
wait lemme import asyncio too
idk, i never used mongo
amyone does?
ig i shd ask in database if someone comes there
can anyone tell me what is wrong here ?
that means that for whatever reason your bot isnt getting an even that matches the check, which could mean your check logic is wrong
capital c small c
mine?
ok wait lemme check
nvm
Frost's
c
Yea I thought so
client.run is out out of the functions always
u put client .run under the hello command
i have to all small
my tutorial is getting a ui upgrade soon™️ 
until u say hi, the bot is not gonna run and unless the bot runs, it can't check if u sent hi 😂
gimme a good tutorial, I suck with dpy
docs
A good tutorial you say :)
https://vcokltfre.dev
A tutorial on how to use discord.py to create your own Discord bot in Python, written to fix the flaws of many other popular tutorials.
like this
retry_emoji = disnake.PartialEmoji.from_str(":readthedocs:")
Doing this, but is still showing Unknown Emoji when I try to pass it in add_reaction(). Any help?
(The emoji is in the standard form, that is, <:name:id>. It is just discord being weird)
afaik this is the most accurate/best practices tutorial out there for dpy
u put client.run under the function
until u say hello, the bot is not gonna run and unless the bot runs, it can't check if u sent hello 😂
Hey Alec, mind helping me?
oh, another thing that completely slipped my mind lol
uhh, how do you know what message the reference message was replying to?
sure, what with?
^^^
@vocal plover i fixed it 🙂
async def youtube(ctx, *, search):
search = search
html = urllib.request.urlopen('http://www.youtube.com/results?search_query='+ search)
# print(html_content.read().decode())
search_results = re.findall(r"watch\?v=(S.{11})", html.read().decode())
# I will put just the first result, you can loop the response to show more results
await ctx.send('https://www.youtube.com/watch?v=' + search_results[0])```
!paste can you put the code in here so discord doesnt screw with the emoji formatting
Pasting large amounts of code
If your code is too long to fit in a codeblock in discord, you can paste your code here:
https://paste.pythondiscord.com/
After pasting your code, save it by clicking the 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.
what is wrong with this?
The first thing is that youtube doesn't allow scraping its site, because it has an api
can you show me how
u mean it is not possible>
Ignore the indent, it is just my copying is wrong
link is not opening
it is
odd, it works for me
(This is the first time I have opened your site)
Hmm, idrk bro
cloudflare what are you doing to my precious site lmao
would u help me?
with my potato super computer 😄
are you sure your bot has access to the emoji? from what I can tell the code is fine, meaning the only reason it wouldnt work is if the bot doesnt share the emoji's server
Lol it doesn't share the server 🤣
wait, so no other way
I thought bots are able to use those emojis with PartialEmoji
for a bot to use an emoji it needs to be a default emoji or share the server
Didn't we all know this 🤔
Not me, I am a beginner
partial emoji just means that the emoji is manually populated with data, rather than using data from the api
help?
partials in general in dpy means that you give it a few details so you can perform api operations without actually fetching the object
every time when i restart my bot i get this error?
When i fix this error by installing pip install discord.py[voice] ,next time i get again this error?
Ooh
env?
I don't use an env file
@vocal plover
I need help again
OR any1 else
https://paste.pythondiscord.com/netukikesi.py
So it sends the embed
I mean, I cant read your mind. What do you need help with
Are you using venv?
Count me in too, with u
But its not sending the victory embed, even when i guessed correct
Yeah, I'm happy to help generally but it's nice to know what I'm helping with before I agree to help :P
Is it possible to check if a invite to a server is the ctx.guild so if a member sends a discord server invite how can I check that the invite is for the same server and not another one
It shouldn't do that tho
hi
strange
how can i make a yt search command?
are you using VSC?
anyone?
Can you print in your check, what the emoji guessed is
wait i think ik how to fix
I wanted to ping you because I thought you wouldn't read the chat anymore :D
............
I can try again
show ss when u installed

wait lemme tell u what im tryna do
I upgrade that pip and reinstalled the discord.py[voice]
is this replit?
yes
Ok then
- Repl.it uses an ephemeral file system.
- This means any file you saved via your bot will be overwritten when you next launch.
That's heroku
That explains why u need to keep installing pynacl ^
Same goes for replit
No
why else do you think its not saving?
https://paste.pythondiscord.com/axifunajef.py
this is my code,
it basically randomly generates an imposter out of 4 emojis and we have to guess who by reacting
How can i fix that problem than?
dude he talking abt packages ig
Not that type of data
I mean data using the console or the shell
async def on_ready():
await client.change_presence(activity=discord.Activity(f"Watching over {len(client.users)}" ))
print('we have logged in as akashgreninja'.format(client))
``` error-TypeError: __init__() takes 1 positional argument but 2 were given
yelp
Is there any possibility that it can be fixed?
is this where the error is?
yea
line 41 to be precise that is from await
@boreal ravine ?
you could preinstall it using a .replit file
not sure how tho
You could also just import os and at the top of your main.py file you can add os.system('pip install PyNaCl')
that too
help
?
i sent it in #databases , now pls come there and help me
guys any idea?
what is the problem with this now
what
?
pls come in #databases
client.run('bot token')
await ctx.send (" ")
do not use print
yep
yes i did write that toke of bot it do not work
- import os
- client.run('token')
- install dotenv
try agin and send error
Try ```py
watching = discord.Activity(type=discord.ActivityType.watching, name=f'over {len(client.users)}')
await client.change_presence(activity=watching)
async def youtube(ctx, *, search):
search = search
html = urllib.request.urlopen('http://www.youtube.com/results?search_query='+ search)
# print(html_content.read().decode())
search_results = re.findall(r"watch\?v=(S.{11})", html.read().decode())
# I will put just the first result, you can loop the response to show more results
await ctx.send('https://www.youtube.com/watch?v=' + search_results[0])```
what is the prob?
Ill open a help channel
error?
think it worked will try it
none
cmd dont works
also , requests is blocking
use aiohttp instead
do you have a error handler?
hmm
!pypi python-dotenv
oh
install it
it is probably not allowing to raise the error
It's a string
reset your token , and py pip install python-dotenv
how to fix that?
Download os?
how to make a working yt search command?
!os
how to make a working yt search command?
your's is working
you just didnt provide a valid search argument
in youtube it works
why not in my command?
it has been 50 mins and no one came in #databases and helped me
i told ya
no one comes there to help
How do I get the user on which ContextMenu is used?
I tried: ctx.target_member.id nothing happened
use
that will work
and how to get another user on which the right button is pressed ?
How to get the author I know
u can make a author check
by making a list of authors u know
then
eh
get the user on which the button was clicked
@fringe breach if it's run in a command using ctx, use ctx.author
no!
😦
Well author is whoever triggered the command
And I need to get another user who was clicked on
¯_(ツ)_/¯
To get a user to respond to messages
ContextMenuType.MESSAGE ctx.target_message.content
this is a click on the message
And I click on the user this :
ContextMenuType.USER it would be more logical to use ctx.target_user.mention
but it doesn't work
hey i need help with discord.py
Import "discord_buttons" could not be resolved
🤔
How can i set a channel to a welcome channel when doing a cmd?
database
insert the channel id
no
The channel ID.
guild.category_exists isnt a thing
await delete(*, reason=None)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Deletes the channel.
You must have [`manage_channels`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.manage_channels "discord.Permissions.manage_channels") permission to use this.
I want to ban someone if there's bad word by the user using my discord python bot I wonder How
and also delete the message
like if i do >greet at a channel it'll be set as the welcome channel
Why does the embeds not allow server emoji's??
What's this error?```py
Traceback (most recent call last):
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 618, in _load_from_module_spec
setup(self)
File "/home/runner/CaliberBot-Beta/cogs/help.py", line 85, in setup
bot.add_cog(Help(bot))
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 505, in add_cog
raise TypeError('cogs must derive from Cog')
TypeError: cogs must derive from Cog
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "main.py", line 50, in <module>
client.load_extension("cogs.help")
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 678, in load_extension
self._load_from_module_spec(spec, name)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 623, in _load_from_module_spec
raise errors.ExtensionFailed(key, e) from e
discord.ext.commands.errors.ExtensionFailed: Extension 'cogs.help' raised an error: TypeError: cogs must derive from Cog
U should do
class Help(commands.Cog):
. . . .
thats what i did```py
class Help(commands.Cog):
def init(self, bot):
self.bot = bot
@commands.group(invoke_without_command=True)
async def help(self, ctx):
subclass commands.HelpCommand to make a help command
the code works just fine on another bot tho
it'll still work, but subclassing commands.HelpCommand is better
any examples? i dont understand
!customhelp
Custom help commands in discord.py
To learn more about how to create custom help commands in discord.py by subclassing the help command, please see this tutorial by Stella#2000
check the pins
that is ok but suclassing commands.HelpCommand will make stuff easier
i was planning to make a fully customized embed for the help command
where i could add stuff apart from just commands as well
https://hastebin.com/cetemigibe.py
This is my code
THis is what is happening even tho im reacting on time
someone tell me what is wrong in it ```py
@app.route('/handle_data', methods=['POST'])
async def handle_data():
projectpath = await request.form['prefix']
print (projectpath)
return redirect(url_for("test"))
i want it to say this guy was the imposter
i am getting a error
the problem is in the check
def check(reaction, user):
return reaction.message.id==msg.id and user == ctx.author and str(reaction.emoji) in emojis
emojis is a dict, if you do in emojis it only checks the keys, not the values, to check the values you'd do emojis.values()
what's your current code?
tag is !

