#discord-bots
1 messages · Page 26 of 1
Anyone has the mee6 bot comands
hi, wierder question but would anyone know how i would take this site URL https://avatars2.githubusercontent.com/u/{num}?s=360 that returns images to be convertable and accepted into bot.user.edit(avatar=...)?
The doc states that it needs a bytes-like object and when i try to pass it in it says invalid or sum along those lines
You’d need to actually make a request to the site using aiohttp, and get the returned image as bytes
This link redirects me to github.com
And you might also need PIL
assuming that your link is valid, that is 
So python has its own docs for like how everything works and which commands to use for a certain thing (I think so at least). Does Discord have one of those for python? I know it has one for java.
!d discord this?
In order to work with the library and the Discord API in general, we must first create a Discord Bot account.
Creating a Bot account is a pretty straightforward process.
or are you looking for the discord API docs?
this but for discord https://docs.python.org/3/library/string.html?highlight=string#module-string
there's the discord API https://discord.com/developers/docs/intro
there's a Python wrapper for the discord API https://discordpy.readthedocs.io/en/latest/api.html
not entirely sure what you're really looking for
are you looking for a manual on how to use discord and its features?
They probably want the wrapper docs
My guess

no. ive never coded a discord bot before and there is always an error with tutorials and such so i am looking for the command on how to create a discord command or something. the wrapper link is what im looking for (i think at least)
Yes you are
It’ s probably the best source, yt tutorials are not particularly good for this topic
you'll probably be wanting the docs https://discordpy.readthedocs.io/en/latest/api.html and fwiw some examples https://github.com/Rapptz/discord.py/tree/master/examples
thank you for the help. docs always remind me i need to learn more about python so ill go to that and come back to these links
How do I add a color to the embed?
theres a color kwarg in discord.Embed()
how can i use "color" in embed?
discord.Embed(.., color = ...)
it takes an int (0xFF0000) or instance of discord.Color, like discord.Color.red()
OK, thanks for the help.
I forgor to ask but how do u install the latest version of discord PY? (it's been a while and I dont rember)
pip install git+https://github.com/Rapptz/discord.py
How do I make mention command?
It's of type hex, but yeah you're right
!d discord.Member.mention
property mention```
Returns a string that allows you to mention the member.
Well, that's not what I meant, I want to know how to make a command so that when the person mentions the bot it returns an embed
In your on_message, you can check if message.content == bot.user.mention
@bot.event
async def on_message(message):
message.content == bot.user.mention
await bot.process_commands(message)
@bot.command()
async def on_message(ctx):
embed = discord.Embed(
description = '...',
color = 0xE53A93
)
await ctx.send(embed=embed)
So?
help
Wrong channel, but since your issue is small I'll answer it anyway. Functions can have only one output (return statement). Anything after the first return won't run
message.content == bot.user.mention just resolves to a bool and does nothing, just ignores it. You'll want to check it. (Hint, use an if statement)
What version are you on?
Okay, thanks a lot
That message was intended for @slate swan, sorry. The one above the message you replied to was meant for you. If that was a wrong reply, just ignore that lol
Oh okay 😅
How can I make the bot put the avatar of the person who used the command in the thumbnail?
I'm a bit out of it sorry, what was the original issue?
If anyone can help me I will be grateful
Could you print(getpuuid), and let me see the output?
Also as an unrelated word of advice, use aiohttp over requests
!paste Could you paste all thousands of lines in here?
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.
@bot.command()
async def work(ctx):
coin = os.getenv('coin')+100
await ctx.send(coin)
What's wrong?
is it really hex?
you tell me
My dms are closed, sorry. If it's that long, could you first find the data sub-dict inside of it, and just send that?
!e print(type(0xFFFFFF))
@sick birch :white_check_mark: Your 3.11 eval job has completed with return code 0.
<class 'int'>
Nevermind lol, thought it was
yeah
Due to the special syntax and the hex() and whatnot
ah fair
typeError: Can only concatenate str (not "int") to str```
read it-
it tells you exactly whats wrong
and if you cant solve that yourself, you shouldnt be using dpy
Sorry, I'm a beginner and I don't understand very well.
:/
!e print("5" + 5)
@sick birch :x: Your 3.11 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 1, in <module>
003 | TypeError: can only concatenate str (not "int") to str
discord.py isnt really for beginners
make sure you know python properly to make it easier for yourself and others helping you
Look familiar?
Sorry for bothering you, I'll try to do more commands myself and learn more about discord.py
by the way, thanks for the help
you need to learn more about python, not discord.py
os.getenv() returns a string, 100 is an int
you cant add these together
Great, can you find the metadata subdict inside of the data dict?
Well hello guys! My python is a little bit rusty but why does my bot just ignore this?
The ctx comes first, error, next
So in reality, your error is a context object, and your ctx is an error object. So a context object will never be of instance MissingPermissions
Thanks!
Therefore, if there's an error, you'll never know it. Also, you should probably find a way to print out the traceback, instead of just sending a generic one on Discord. raise error is a quick and easy way to do this, but it acts sort of as a return statement, so nothing after it is run. You can also use the traceback library
Then that's probably where the error is
what's the datatype of the data subdict? A list, or another dict?
E.g does it look like this:
"data": {
...
}
or
"data": [
...
]
?
Ah found it then
When it's a [], it's a list so you have to index it by a number. E.g data[0] to get the first item inside, data[1] to get the 2nd item, etc
you're so good at explaning
Is that.. meant to be sarcastic? I feel like I definitely did not explain that well 😅
😊 thank you, that made me feel better
You said there was no metadata subdict, so it should've errored on that line, no?
What's your api response
It was too long even for pastebin
then the link
Okay yeah data is 100% a list
each of those has the metadata inside it
it is
so getpuuid["data"][0]["metadata"]["map"] would print out "Icebox"
getpuuid["data"][1]["metadata"]["map"] prints out Pearl
getpuuid["data"][2]["metadata"]["map"] prints out Haven
getpuuid["data"][3]["metadata"]["map"] prints out Haven
getpuuid["data"][4]["metadata"]["map"] prints out Breeze
is that what you're looking for?
Robin too fast
how did you filter json like that
Having a nice way to view the response really helps, e.g Firefox
Firefox is an excellent developer tool in many regards
I usually put it in a json formatter :D
I had the right thing the whole time, just the wrongly placed [0]...
Thanks for taking your time to help me, I really appreciate it! @sick birch
!e
code
evaluate command.
!slashcommands
where can i fix this
huh nice u use VSCode too :D
where can i fix this i need help
!d discord.app_commands.AppCommand
class discord.app_commands.AppCommand```
Represents a application command.
In common parlance this is referred to as a “Slash Command” or a “Context Menu Command”.
New in version 2.0...
if u use dpy
I assume I put this in my code?
does anybody know what this means?
Your token is of some weird type, not str, you can assume that it is str putting bot.run(str(os.environ.get("DISCORD_BOT_SECRET")))
patience....
you will be answered at some point, no need to spam
nah people wont respond to messages higher up its rare if someone does that
Uhh i dont know how to describe this but this shouldnt happen 💀 any ideas how to fix it? Happens with ban too
well if you resend your problem only 1 time rn, then I'd understand, but you were like resending it every 30 secs
ok how can fix that do you know how?
I sent the solution
i put that in and it gave me some runtime error
That's a problem with pre-sending, you first send messages and then kick the member, so the bot does not recognise that you cannot be kicked and sends all those messages
show code
you changed nothing...
I did but after that it gave me a runtime error so i changed it back
but ill put it back and show you the error
i did save it
the str error dosent pop up just this now 
Your token, that you passed in .env file is invalid
like the bot token?
yes
i put my updated bot token and still get this\
thats also the error i get when i run it from a host
@silk fulcrum
Make sure you:
- put your token in quotes
"TOKEN" - you saved your .env file
that's a error with JSON, not related to the token
Dam
@silk fulcrum you able to call and help me at all for just a minute please
hm... wait a sec I'll tell you if I can
alright cause if you could that would help me alot
I guess I can
bett
yo can someone help me
Can someone tell me how to make the time it got created simpler?
.strftime
!d datetime.datetime.strftime
datetime.strftime(format)```
Return a string representing the date and time, controlled by an explicit format string. For a complete list of formatting directives, see [strftime() and strptime() Behavior](https://docs.python.org/3/library/datetime.html#strftime-strptime-behavior).
also this - https://docs.python.org/3/library/datetime.html#strftime-and-strptime-behavior, to know how to make format string @mossy jacinth
premium.set_footer(text="Please use !buy in [#998759012889809046](/guild/267624335836053506/channel/998759012889809046/)")
The channel isnt showing just the id idk why.
@silk fulcrum you know why?
Oh I know why
Why?
It doesnt work in footers
Just like emojis and stuffs can't work in the title
it works in title
it dosent work in author and footer
pog
I added typings to Permissions()
and everything that takes raw permission flags
hi okimii!! 👋
hi master✌️
wait nvm on that question, you said typings and not a creation of a new obj, thats my fault, arl sorry for the ghost ping!
How can i make something like this?
what's the problem?
Just type that
I mean like, if the User has lets say Admin role, it shows what he can do like Kick members, ban members but if u dont have any roles it just shows nothing its hard to describe
!d discord.Member.guild_permissions
property guild_permissions```
Returns the member’s guild permissions.
This only takes into consideration the guild permissions and not most of the implied permissions or any of the channel permission overwrites. For 100% accurate permission calculation, please use [`abc.GuildChannel.permissions_for()`](https://discordpy.readthedocs.io/en/latest/api.html#discord.abc.GuildChannel.permissions_for "discord.abc.GuildChannel.permissions_for").
This does take into consideration guild ownership, the administrator implication, and whether the member is timed out.
Changed in version 2.0: Member timeouts are taken into consideration.
Iterate over this
i almost got it like i wanted it
you can use join lol
!e
a = ["lol", "ok"]
print(", ".join(a))
@slate swan :white_check_mark: Your 3.11 eval job has completed with return code 0.
lol, ok
!e py perms = ['create_instant_invite', 'kick_members', 'administrator'] print(", ".join([perm.replace("_", " ").title() for perm in perms]))
@silk fulcrum :white_check_mark: Your 3.11 eval job has completed with return code 0.
Create Instant Invite, Kick Members, Administrator
👁️
epic
in pycord how can i pass context into my button class
idk if its bad practice or not but rn i just have my class inside of my command function
adding up to what okimii and master said, you can also .replace("guild", "server") because a normal user wont know what you're referring to by "guild"
you can subclass the button class and add a context param in the init dunder
or you can just ```py
button = Button()
button.ctx = ctx
doesn't button have view attr and view has ctx attr?
!d discord.ui.Button.view
property view```
The underlying view for this item.
nope no CTX attr
why would button have a view attr?
bruhp(
the view to which it belongs to ig
lmfao
Guys how can I change all button colours on button click?
in the callback, do button.style = new-style then re-send the view
It changes only one button style not all
you can get all the components of the view using view.children, then you can loop over it and change the style
like this ?
for btn in view.children:
btn.style = new
yea
Am getting tis error after updating python
Traceback (most recent call last):
File "main.py", line 4, in <module>
bot = commands.Bot(command_prefix="-")
TypeError: __init__() missing 1 required keyword-only argument: 'intents'
im in pycord and i can't seem to have my OptionChoice show up at all. im trying a test command but it still isn't showing up,
classes_list = [
OptionChoice(name = 'Tank', Value = 'Tank'),
OptionChoice(name = 'Assassin', Value = 'Assassin'),
OptionChoice(name = 'Fighter', Value = 'Fighter')
]
#
async def poopingtest(ctx, classes: Option(str, 'Class choice', choices = classes_list)):```
i think you mean updating discord.py, in dpy 2.0 intents is required, so you need to pass it in the Bot constructor
But my bot cant use intents
its not verified
so what would i do
I got this errir
you dont need to get verified to get intents, it's more of a vice versa
self.children
Oh
Buttons is my class name
ohhh
thx
Can you put inside a command a def?
why not?
if you mean py async def cmd(): def another_func(): ... ... then yes
I have this button and its working fine but why is it saying that the interaction failed when its working fine? I have no errors in the console but this is the button part of my script.
class Buttons(discord.ui.View):
def __init__(self, *, timeout=180):
super().__init__(timeout=timeout)
@discord.ui.button(label="Button",style=discord.ButtonStyle.gray)
async def Button(self,button:discord.ui.Button,interaction:discord.Interaction):
print("Clicked")
Log = bot.get_channel(1001412638368075828)
await Log.send("I got clicked!")
To avoid it you have to respond to it or defer it
!d discord.Interaction.response
Returns an object responsible for handling responding to the interaction.
A response can only be done once. If secondary messages need to be sent, consider using followup instead.
!d discord.InteractionResponse.send_message
await send_message(content=None, *, embed=..., embeds=..., file=..., files=..., view=..., tts=False, ephemeral=False, allowed_mentions=..., suppress_embeds=False)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Responds to this interaction by sending a message.
!d discord.InteractionResponse.defer
await defer(*, ephemeral=False, thinking=False)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Defers the interaction response.
This is typically used when the interaction is acknowledged and a secondary action will be done later.
This is only supported with the following interaction types...
button has a view property
but view doesn't have any context property
how can i make it so that each role has a specific cooldown for a command?
class Setup_1(commands.Bot):
async def load(self , extension):
await self.load_extension("extension")
async def unload(self , extension):
await self.unload_extension("extension")
async def reload(self , extension):
await self.reload_extension("extension")
for filename in os.listdir('./commands'):
if filename.endswith('.py'):
Extension.load(f'commands.{filename[:-3]}')
elif not filename.endswith('.py'):
filenametemp = filename
for filename in os.listdir(f'./commands/{filenametemp}'):
if filename.endswith('.py'):
Extension.load(f'commands.{filenametemp}.{filename[:-3]}')```
whats wrong ?
any erro... oh wait you have a class Extension which is a subclass of commands.Bot, wth bro? wha are we doing bro?
async def load(self , extension):
await self.load_extension("extension")

f nvm let me fix it , btw any other error ?
extension is in a str
also then it'd be logical to have a name attr
and like.. dir attr
and bot attr
and do self.bot.load_extension(self.dir + "." + self.name)
idk
can i do something like
@bot.command()
async def ping(ctx):
if <id> not in ctx.author.roles:
@commands.cooldown(1, 300, commands.BucketType.user)
nope
😢 then how can i set cooldown for each role
there is custom cooldown
class setup_1(commands.Bot):
async def load(self , extension):
await self.load_extension("extension")
async def unload(self , extension):
await self.unload_extension("extension")
async def reload(self , extension):
await self.reload_extension("extension")
for filename in os.listdir('./commands'):
if filename.endswith('.py'):
setup_1.load(f'commands.{filename[:-3]}')
elif not filename.endswith('.py'):
filenametemp = filename
for filename in os.listdir(f'./commands/{filenametemp}'):
if filename.endswith('.py'):
setup_1.load(f'commands.{filenametemp}.{filename[:-3]}')```
now ?
i dont remember, is it CooldownMapping or smth else
ok ill try
nah
def bypass_for_owner(message):
# Bypasses cooldown, no cooldown for this specific user
if message.author.id == owner_id:
return None
# Otherwise cooldown of 1 per 1 second
return commands.Cooldown(1,1)
@commands.dynamic_cooldown(bypass_for_owner)
@bot.command()
async def cmd(ctx):
await ctx.send("test")
uh i dont think that has cooldown for each role
You can use this
And modify it
oh shit ok
Actually it was changed to take context instead of message
can i make more than just 1 bypass for role
bypass_for_roles():
if any(role in author.roles for role in bypass_roles)
and can i add it to the command basically by just
@commands.dynamic_cooldown
@commands.dynamic_cooldown
@bot.command()
yo ok
bruh no dont that
Look how they do it
dont understrand
?
here extension is in quotes, which means that it is just a word, just a string
class setup_1(commands.Bot):
async def load(self , extension):
await self.load_extension(extension)
async def unload(self , extension):
await self.unload_extension(extension)
async def reload(self , extension):
await self.reload_extension(extension)
for filename in os.listdir('./commands'):
if filename.endswith('.py'):
setup_1.load(f'commands.{filename[:-3]}')
elif not filename.endswith('.py'):
filenametemp = filename
for filename in os.listdir(f'./commands/{filenametemp}'):
if filename.endswith('.py'):
setup_1.load(f'commands.{filenametemp}.{filename[:-3]}')```
now ?
this one some self error !!!
load is not a classmethod
can u edit my file a little bit so i can get an idea
plssssssss
1 line
not spoonfeeding
you either make load a classmethod or create an instance of setup_1, like setpup = setup1() and then do setpup.load(...)
whats classmethod ?
🤔
!classmethod
Although most methods are tied to an object instance, it can sometimes be useful to create a method that does something with the class itself. To achieve this in Python, you can use the @classmethod decorator. This is often used to provide alternative constructors for a class.
For example, you may be writing a class that takes some magic token (like an API key) as a constructor argument, but you sometimes read this token from a configuration file. You could make use of a @classmethod to create an alternate constructor for when you want to read from the configuration file.
class Bot:
def __init__(self, token: str):
self._token = token
@classmethod
def from_config(cls, config: dict) -> Bot:
token = config['token']
return cls(token)
# now we can create the bot instance like this
alternative_bot = Bot.from_config(default_config)
# but this still works, too
regular_bot = Bot("tokenstring")
This is just one of the many use cases of @classmethod. A more in-depth explanation can be found here.
any other method to load cog ?
at start !
???????????????????????????????????????????????????????????????????????
idk and idc, I have this py for extension in initial_extensions: try: await self.load_extension(extension) except Exception as e: print(f'Failed to load extension {extension}.', file=sys.stderr) traceback.print_exc() in setup_hook method in my Bot subclass and i have initial_extensions variable, which contains ('cogs.mod', 'cogs.meta', 'cogs.owner')
async def load1():
for filename in os.listdir('./commands'):
if filename.endswith('.py'):
await client.load_extension( f'commands.{filename[:-3]}')
elif not filename.endswith('.py'):
filenametemp = filename
for filename in os.listdir(f'./commands/{filenametemp}'):
if filename.endswith('.py'):
await client.load_extension(f'commands.{filenametemp}.{filename[:-3]}') ```
what about this
looks bad
because as I see you already have a Bot instance (client), so why would you need this class at ll
async def load1():
for filename in os.listdir('./commands'):
if filename.endswith('.py'):
await client.load_extension( f'commands.{filename[:-3]}')
elif not filename.endswith('.py'):
filenametemp = filename
for filename in os.listdir(f'./commands/{filenametemp}'):
if filename.endswith('.py'):
await client.load_extension(f'commands.{filenametemp}.{filename[:-3]}')
setup = load1()
```
this ?
load1() must be awaited
got it
your load1 function is async, that means that to run you need to do await load1()
or asyncio.run(load1)
Guys how we can use bot.start in discord.py?
will
!d discord.ext.commands.Bot.start
await start(token, *, reconnect=True)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
A shorthand coroutine for [`login()`](https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#discord.ext.commands.Bot.login "discord.ext.commands.Bot.login") + [`connect()`](https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#discord.ext.commands.Bot.connect "discord.ext.commands.Bot.connect").
@limber bison what's your code, cus this indent looks sus
this is full code nothing else
client = commands.Bot(command_prefix=commands.when_mentioned_or(config["prefix"]) , intents=intents )
this is clent
client
@commands.command()
async def wanted(self,ctx, member: discord.Member = None):
if member == None:
member = ctx.author
wanted = Image.open("wanted.png")
asset = ctx.author.avatar.url_as(size=128)
data = BytesIO(await asset.read())
pfp = Image.open(data)
pfp = pfp.resize((177,177))
wanted.paste(pfp, (120,212))
wanted.save("profile.jpg")
await ctx.send(file = discord.File("profile.jpg"))
``` no command response
idk, I'd just make a Bot subclass and do that all in setup_hook method
any error?
Nope
also this py if member == None: member = ctx.author can be replaced with this py member = member or ctx.author
asyncio.run(load1()) <- this works hmmm
() = corutine
Wb the command response?*
() = run the function
what is ctx.author.avatar.url_as?

read the error
you need to use the current event loop
!d asyncio.get_event_loop
!d asyncio.get_running_loop
asyncio.get_running_loop()```
Return the running event loop in the current OS thread.
If there is no running event loop a [`RuntimeError`](https://docs.python.org/3/library/exceptions.html#RuntimeError "RuntimeError") is raised. This function can only be called from a coroutine or a callback.
New in version 3.7.
oh me oh my
but where in file ?
are you on dpy 2.0
and you need to call the function not just specify the name
Do other commands work?
oh
How can the bot get this badge?
@bot.command()
async def bal(ctx):
with open("data.txt") as json_file:
points = json.load(json_file)
for user in points["points"]:
if user["id"] == ctx.author.id:
point_num = user["points"]
await ctx.send(f"You have {point_num} points")
with open("data.txt", "w") as outfile:
json.dump(points, outfile)
Im very very new to json can someone help?
add slash commands to your bot
I added slash command to my bot and i had await bot.tree.sync(guild=...) and i removed the guild and i got the badge but i have the same slash command two times
anyone make bots?
from discord.ext import commands
RoleChecker = commands.Bot(command_prefix="+")
@RoleChecker.event
async def on_ready ():
print ("Reaaaady")
@RoleChecker.command()
async def mbr(ctx ,role : discord.Role):
TheRole = ctx.guild.get_role (role.id)
await ctx.send ("**Members list for role : "+role.mention+"**")
for member in ctx.guild.members :
if TheRole in member.roles :
await ctx.send (member.name)
RoleChecker.run ("token")```
is there an error?
just try it
everyone here make bots
a basic bot for free
whene i run the command, it doesn't show the members who have the role
oh you mean make bot for you?
I dont think anybody can or will
This code literally does not make sence
what
not for me necessarily
it works, but not totally like what i want
it's... uhm... mahehmuh.... tras..hh.....
Hey @pearl shoal! I noticed you posted a seemingly valid Discord API token in your message and have removed your message. This means that your token has been compromised. Please change your token immediately at: https://discordapp.com/developers/applications/me
Feel free to re-post it with the token removed. If you believe this was a mistake, please let us know!
Problems
- Those spaces everywhere you can
- Why would you need to get the role from it's id:
TheRole = ctx.guild.get_role(role.id)if you already have this role as an argument - f-strings exist, this
"**Members list for role : "+role.mention+"**"is bad - sending each member in seperate message is bad
- You can get list of role members by
role.members
from discord.ext import commands
TOKEN = 'lolNSG8CFZT0z1Oq1vpf9T1S2A'
client = commands.Bot(command_prefix='@')
@client.event
async def on_ready():
print('{client.user} is on')
@commands.has_permissions(kick_members=True)
@client.command()
async def kick(ctx, member: discord.Member, *, reason=None):
if reason==None:
reason="no reason provided"
await member.kick()
kick_messages = [f"Pichu used charm to kick ", "Pikachu used thunder shock to kick ", "Raichu used walt switch to kick ", "Squirtle used water gun to kick ", "Wartorle used rapid spin to kick {member.mention}", "Blastoise used skull bash to kick {member.mention}", "Bulbasaur used leaf blow to kick {member.mention}",
"Venusaur used solar beam to kick ", "Charmander used Flame thrower to kick ", "Charmeleon used metal claw to kick ", "Charizard used inferno to kick "]
await ctx.send(f'{random.choice(kick_messages) + " " + (member.mention)}')
@client.command(aliases= ['user', 'info'])
@commands.has_permissions(kick_members=True)
async def whois(ctx, member : discord.Member):
embed = discord.Embed(title = member.name , description = member.mention , color = discord.Color.green())
embed.add_field(name = "ID", value = str(member.id) , inline = True)
embed.set_thumbnail(url = member.avatar_url)
embed.set_footer(icon_url = ctx.author.avatar_url, text = f"Requested by{ctx.author.name}")
await ctx.send(embed=embed)
@client.command(aliases= ['user', 'info'])
@commands.has_permissions(kick_members=True)
async def help(ctx, member : discord.Member):
embed = discord.Embed(title = "Commands for Pokebot", description = "There are a lot of commands in PokeMod like @kick, @ban, @whois and some secret chatbot commands that you need to find out for yourself", color = discord.Color.blue)
client.run(TOKEN)
error - Traceback (most recent call last):
File "c:\Users\Dell\Desktop\LEARN BO\afasasa.py", line 37, in <module>
async def help(ctx, member : discord.Member):
File "C:\Users\Dell\AppData\Roaming\Python\Python310\site-packages\discord\ext\commands\core.py", line 1263, in decorator
self.add_command(result)
File "C:\Users\Dell\AppData\Roaming\Python\Python310\site-packages\discord\ext\commands\core.py", line 1149, in add_command
raise CommandRegistrationError(command.name)
discord.ext.commands.errors.CommandRegistrationError: The command help is already an existing command or alias.
i try role.members
client = commands.Bot(command_prefix='@', help_command=None)
but the list has no members
import discord
from discord.ext import commands
bot = commands.Bot(command_prefix="+")
@bot.event
async def on_ready():
print ("Reaaaady")
@bot.command()
async def mbr(ctx: commands.Context ,role: discord.Role) -> None:
members = [i.name for i in ctx.guild.members if role in i.roles]
await ctx.send(f"**Members list for role : {role.mention}\n{', '.join(members)}**")
bot.run("token")
thanks i'll try
thanks
that means that there is no members those have this role or you have intents disabled
what are u going to try thats the same code
f string
where can i enable them
portal
no list comps😔
there is some changements hh
same rror
in code they are enabled by default I guess, so in dev portal
!intents
Using intents in discord.py
Intents are a feature of Discord that tells the gateway exactly which events to send your bot. By default discord.py has all intents enabled except for Members, Message Content, and Presences. These are needed for features such as on_member events, to get access to message content, and to get members' statuses.
To enable one of these intents, you need to first go to the Discord developer portal, then to the bot page of your bot's application. Scroll down to the Privileged Gateway Intents section, then enable the intents that you need.
Next, in your bot you need to set the intents you want to connect with in the bot's constructor using the intents keyword argument, like this:
from discord import Intents
from discord.ext import commands
intents = Intents.default()
intents.members = True
bot = commands.Bot(command_prefix="!", intents=intents)
For more info about using intents, see the discord.py docs on intents, and for general information about them, see the Discord developer documentation on intents.
Hey @slate swan! You want free nitro?
pass it to someone else, im good👍
who?
done
you are my fren 🫂
import random
from discord.ext import commands
TOKEN = 'owo'
client = commands.Bot(command_prefix='@', help_command=None)
@client.event
async def on_ready():
print('{client.user} is on')
@commands.has_permissions(kick_members=True)
@client.command()
async def kick(ctx, member: discord.Member, *, reason=None):
if reason==None:
reason="no reason provided"
await member.kick()
kick_messages = [f"Pichu used charm to kick ", "Pikachu used thunder shock to kick ", "Raichu used walt switch to kick ", "Squirtle used water gun to kick ", "Wartorle used rapid spin to kick {member.mention}", "Blastoise used skull bash to kick {member.mention}", "Bulbasaur used leaf blow to kick {member.mention}",
"Venusaur used solar beam to kick ", "Charmander used Flame thrower to kick ", "Charmeleon used metal claw to kick ", "Charizard used inferno to kick "]
await ctx.send(f'{random.choice(kick_messages) + " " + (member.mention)}')
@client.command(aliases= ['user', 'info'])
@commands.has_permissions(kick_members=True)
async def whois(ctx, member : discord.Member):
embed = discord.Embed(title = member.name , description = member.mention , color = discord.Color.green())
embed.add_field(name = "ID", value = str(member.id) , inline = True)
embed.set_thumbnail(url = member.avatar_url)
embed.set_footer(icon_url = ctx.author.avatar_url, text = f"Requested by{ctx.author.name}")
await ctx.send(embed=embed)
@client.command(aliases= ['user', 'info'])
@commands.has_permissions(kick_members=True)
async def help(ctx, member : discord.Member):
embed = discord.Embed(title = "Commands for Pokebot", description = "There are a lot of commands in PokeMod like @kick, @ban, @whois and some secret chatbot commands that you need to find out for yourself", color = discord.Color.blue)
await ctx.send(embed=embed)
client.run(TOKEN)
anyone, i dont really need it lol, just dont paste it in servers, self bots would get it lol
i know
[<Member id=1006192867225645096 name='Roles Checker' discriminator='0940' bot=True nick=None guild=<Guild id=997474724911259718 name='Summer Scripts </>' shard_id=None chunked=False member_count=16>>]
CV
why i got a result like this
oh and morning my utc -4 beans
error - Traceback (most recent call last):
File "c:\Users\Dell\Desktop\LEARN BO\afasasa.py", line 37, in <module>
async def help(ctx, member : discord.Member):
File "C:\Users\Dell\AppData\Roaming\Python\Python310\site-packages\discord\ext\commands\core.py", line 1263, in decorator
self.add_command(result)
File "C:\Users\Dell\AppData\Roaming\Python\Python310\site-packages\discord\ext\commands\core.py", line 1149, in add_command
raise CommandRegistrationError(command.name)
discord.ext.commands.errors.CommandRegistrationError: The command help is already an existing command or alias.
@slate swan
yeah, 10 AM moment
ok
why a list comp if you can pass the genexpr in join?😔
same thing
its odd you see me here, i always wake up at like 1pm or 2 lmao
help pls
so early 🗿
it's ok but it doesn't shows every members
woo, it'd be already 9 PM for me already
sed
me🗿
😭
lol 7:35pm for me sed
why
he himself dosent have
okimii is my fren and you not
cuz we are friends (uwu)
Hey @stuck kiln!
It looks like you tried to attach a Python file - please use a code-pasting service such as https://paste.pythondiscord.com
(uwu)
activly believes

i must wait to try the code ?
p!shhh
no
so what
ignore it
actively
delete the help command from discord. like there is already an help command from discord but if you want an own help command then you have to delete that from discord
vocabulary
so cant make?
raise error VocabularyNotFound
1 sec
hm
in commands.Bot(help_command=None)
why is everyone assuming they cant code something when an exception is raised😭
i alr did tht but didnt work
on_error
if isinstance(error, VocabularyNotFound)
raise Lies('Gotcha')
bot.remove_command('help')
that is u have to subclass the help command
@pearl shoal
its too early for this, im going to maky myself some waffles 
if u wanna make ur own "help" command then do as Elias said
yes
thanks Elias'
np 🐝
No, subclass HelpCommand, or else I'll raise VocabularyNotFound
whats invoke_without_command?

i like your pfp okimii
Thanks!
that's 2nd reason why i wanted to give him nitro
but he rejected
he???
any idea how to do rpc with discord guys i wanna integrate it to my app
@slate swan arent you he?
ease
Woo, friend request from Asher, progress
i beg theres too many channels, some one help me
lmfao 💀
i never subclassed the HelpCommand i just made one myself😭
i was too lazy to learn the help commands args, its a pain either way soooo....
own API wrapper lmoa?
lmoa💀
i have made one for discords api lmao
ok banana
you sound like a minion now, you fell for the trap
my keyboard (or me) is halfdrunk
damn😔
you little trap)
🍞
🤨
🥛
wait I sound like maniac, did I fall for the trap?
or do I?
im stupid i dont what did i sound like
idk if i am not drunk enough but i am not getting oki and 32's jokes
👴
🤓
you guys want some waffles
yes
what's the topping?
yes , banana🗿
literally butter 🗿
eh I'll pass
I have ice cream in my fridge, but I dont have waffles, that's just what I need
atleast get some honey or maple syrup 🗿
im quite skilled at making waffles
sounds scary
i grab them from the refrigerator and yeet them in the microwave
Frozen waffles ?💀
oh it is, if you were a waffle
😳 😳 😳
the life of a programmer in a nutshell
😔
no u
yeah u would blackened and soggy

this is ot3
nope i can cook 👀
ot4
you are no programmer😔

💔
😔
i learnt watching Gordon Ramsay 👀
make me some dinner qt, what are you waiting for?
come over then 👀
😉
i love mortal kombat
im pretty good playing it, but i have no money to buy it😔
anyways lets change topics i hate talking about how broke i am
.topic
i don't even get pocket money🗿
i only got 6 dollars in my wallet, take it or leave it
what happened here? I just helped my friend to install WSL... I have no idea why he wanted it
i only have wsl enabled for docker lol
lol
me on linux: sad nogame noises
what is distro
linux distribution
nice, i like debian ans ubuntu mostly
yea, well they're pretty similar
yup
my dad uses debian tho, but he has windows and debian at once, and i have on ubuntu
my dad is probably using windows vista
my dad barely knows how to use his phone😭
💀
you have a whole db of memes 😭
ok thats just shit posting at this point
!ot
Off-topic channel: #ot2-never-nester’s-nightmare
Please read our off-topic etiquette before participating in conversations.
ok sry
Any help for this?
async def balance(ctx,user = None):
if user == None :
await ctx.send (ctx.author.name+" has...")
elif user == discord.Member :
await ctx.send (user.name+" has...")```
any help
What is the error / what are you trying to do
your second elif will never be true lol
an instance isnt the same as a class object you would need to use isinstance
hhhh i know but i didn't find another method
!d isinstance
isinstance(object, classinfo)```
Return `True` if the *object* argument is an instance of the *classinfo* argument, or of a (direct, indirect, or [virtual](https://docs.python.org/3/glossary.html#term-abstract-base-class)) subclass thereof. If *object* is not an object of the given type, the function always returns `False`. If *classinfo* is a tuple of type objects (or recursively, other such tuples) or a [Union Type](https://docs.python.org/3/library/stdtypes.html#types-union) of multiple types, return `True` if *object* is an instance of any of the types. If *classinfo* is not a type or tuple of types and such tuples, a [`TypeError`](https://docs.python.org/3/library/exceptions.html#TypeError "TypeError") exception is raised.
Changed in version 3.10: *classinfo* can be a [Union Type](https://docs.python.org/3/library/stdtypes.html#types-union).
can you give me the true code ?
the true code?
Oh btw is there any extension for pretty text colours in vsc ?
i mean you can solve my problem ?
you mean themes?
Yes
well i have given you the resources to solve your problem
yeah theres many
but i didn't understand 🙂
name one which looks good
its the one i use which was recommended by @slate swan
Slide a screenshot
can someone solve this
Imagine if vsc had light theme
it does lol
Wonder who uses it 
Any pinkish theme?
theres images inside of the ext page
Oh ye
probably search for pink themes in the ext search in vsc
Im very very new to json how would i start?
isinstance takes 2 arguments, the first one is the type you want to check, the second one is the type you want it to match with, it would return boolean value of the condition if its True or not
well json is mostly to show data in a file like manner so im not quite sure on what you mean "how would i start?", if you would like to learn about parsing json with python, you can use the stdlib json
looks soo good
nice
I need to learn for a currency system
idk how to start
nice
just learn to use a database and know how to use python
ash can see the future😳

can you edit the code for me please ?
oh and you should take her advice, ashs has experience in js herself so i wouldnt argue with her she scares me
this is better
Yeah lol
I was asking my dad since hes helping code a website for those who are withdrawing from drug addictions.
mhm nice, well it depends what you would do with json, really
ikr 😔
no the scares me part 👀
How would i show bots latency?
depends what you mean by latency
!d discord.ext.commands.Bot.latency
property latency```
Measures latency between a HEARTBEAT and a HEARTBEAT\_ACK in seconds.
This could be referred to as the Discord WebSocket protocol latency.
Like showing the bots response time
it still depends which latency youre searching for lol
that emoji looks dirty 
10 to go
please man
oki likes making op running around in circles
well then, thats the bots hb and ack hb latency
Alr
Whats the code??
anyway can we stop spamming nsfw emojis?
Yeah mb
get urself co pilot

AHHH, okimii, i lo...
Where the not safe for work emoji’s at? 
thats surprising coming from u👀
lost you
async def balance(ctx,user = None):
if user == None :
await ctx.send (ctx.author.name+" has...")
elif user == discord.Member :
await ctx.send (user.name+" has...")```
why is everyone making me look bad, im a great child
._.
sure.
@cold tideyou can solve it ?
i love pitbulls

And a black van?
Winter.command ??
Or car maybe
it's my bot name
Youd wanna use json tbh
with open("data.txt") as json_file:
points = json.load(json_file)
points["points"].append({
"id": member.id,
"points": 0,
})
with open("data.txt", "w") as outfile:
json.dump(points, outfile)
Make a file called data.txt and add this points: []}
But whats the error showing?
no i don't need this, my problem is when i type -balance
Yes...
Like show ctx.authors balance??
arabic courses doesn't submit this
so i couldn't learn them
what
🙂 nothing
@bot.command()
aysnc def balance(ctx,user=None):
if user==None:
await ctx.send(f"{ctx.author} has...")
elif user=discord.Member.id():
await ctx.sendf"{ctx.author} has...")
there
should work @slate swan
u guys know any good windows themes?👀
would never work
i think no
rip indentation
user would be a str
Woops
because the user is always as None
and whats aysnc new keyword?😭
async with okimii:
ignored...
it's the solve for my problem 😂
because no one knows good windows themes
ayy sync me already
@bot.command()
aysnc def balance(ctx,user=None):
if user==None:
await ctx.send(f"{ctx.author} has...")
elif user==discord.Member.id():
await ctx.sendf"{ctx.author} has...")
💀
that might work idek
wouldnt work
the samething
aysnc keyword💀 😭
bro your issue is differentiating types
i dont mean to offend anyone its just kinda funny to me
discord.Member.id() 💀
@bot.command()
async def balance(ctx, user: discord.Member = none):
if user == none:
user = ctx.author
await ctx.send(f”{user.mention} is having 69.”)
I’m wrong, maybe*
you can't solve it ?
what do you want your command to do? @slate swan
when we say something like discord.Member,we usually mean you use an instance of that
@bot.command()
aysnc def balance(ctx,user=None):
if user==None:
await ctx.send(f"{ctx.author} has...")
elif user=ctx.author:
await ctx.sendf"{ctx.author} has...")
== none 💀
None
its None
💀
There
his question has already been answered guys lmao
that works @slate swan
== None 💀
i will add a database , so when someone type "-balance" it will shows him his own balance, but when he types "-balance +mention" it will shows him the mentionned one's balance
yeah
You said it to me
assigning a var with the normal assignment operator in a condition?
Oh like pls bal @cold tide
dankmemer 💀
you didnt get me, I meant that you should consider using is None instead of == 💀
uhm ask someone else bro
Oh
i already answered his question you can chill lol
aysnc me pls
Bro will just value everyone with 0 for now
as cursed as the new type keyword
import discord
from discord.ext import commands
import random
bot = commands.Bot(command_prefix="!", intents = discord.Intents.all())
@bot.event
async def on_ready():
activity = discord.watching(name = "Discord Servers")
await bot.change_presence(status=discord.Status.idle, activity=activity)
print("The bot is online")
@bot.command(aliases=['Ping', 'PING'])
async def ping(ctx):
await ctx.send(f":ping_pong: The bots latency is {round(bot.latency * 1000)}ms")
@bot.command(aliases=['8ball', '8Ball', '8-ball'])
async def eightball(ctx, *, question):
responses = [":8ball: *As I see it, yes*", ":8ball: *Im tired, ask again later*", ":8ball: *A simple NO*", ":8ball: *Maybe?*", ":8ball: *Most Likely*", ":8ball: *A straight YES*", ":8ball: *Without A Doubt*", ":8ball: *I dont think so*", ":8ball: *Yesnt?*"]
await ctx.send(f"{random.choice(responses)}")
@bot.event
async def on_member_join(member):
channel = member.guild.system_channel
await channel.send(f"{member.mention} Welcome To The Server!")
@bot.event
async def on_member_remove(member):
channel = member.guild.system_channel
await channel.send(f"Bye-Bye{member.mention}")
bot.run("Token")
the error is
Ignoring exception in on_ready
Traceback (most recent call last):
File "/home/runner/Astro/venv/lib/python3.8/site-packages/discord/client.py", line 343, in _run_event
await coro(*args, **kwargs)
File "main.py", line 10, in on_ready
activity = discord.watching(name = "Discord Servers")
AttributeError: module 'discord' has no attribute 'watching'
could someone pls help!
in 3.11 btw lmao
iirc it was 3.11 not sure
they should add a new keyword, reason, im bored
i've a json database
i have*
const 😩
i've != i have ?
maybe not that one
discord.ActivityType.watching
Well why dont you show the whole code
why not😔
Why did you send the whole code
i will make 2 commands
thanks
Bruh
shouldnt i?
your gonna need something like this
The error is in on_ready
@bot.command()
async def bal(ctx):
with open("data.txt") as json_file:
points = json.load(json_file)
for user in points["points"]:
if user["id"] == ctx.author.id:
point_num = user["points"]
await ctx.send(f"You have {point_num} points")
with open("data.txt", "w") as outfile:
json.dump(points, outfile)
If you’ve read the error
bruh, I just went to docs and typed watching in search, and found that
I like my python dynamic mutable 😳
Without that your commands are usless
oh yea the docs
blockingio in a commad😔
i like you but statically 😏
async def mybalance(ctx,user):
user = ctx.author
await ctx.send (user.name+" has...")
@Winter.command()
async def balance(ctx,user):
user = discord.Member
await ctx.send (user.name+" has...")```
Give me command suggestion
uff this is better
protected)
💀
Wont work...
why ?
@bot.command()
aysnc def balance(ctx,user=None):
if user==None:
await ctx.send(f"{ctx.author} has...")
elif user=discord.Member.id():
await ctx.sendf"{ctx.author} has...")
aysnc🤐
it's always an author ?
First off all wth is user=discord.Member
ayo, sync me rn
anytime😳
async def mybalance(ctx):
await ctx.send (ctx.author.name+" has...")
@Winter.command()
async def balance(ctx,user):
user = discord.Member
await ctx.send (user.name+" has...")```
and now ?
hm?
If you want your executer to see there balance use ```py
await ctx.send(f"{ctx.author} has...")
any?
im not a gold digger, im a cat digger, i search for cute cats, aka your cat
i know
make a wallpaper searcher with an img api
::
Ohhh okay
Just a simple command
))) now i know how to get okimii's attentions)
But interactive
😩 ✌️
@slate swan WAIT, WHERE is my cat???!?!?! i cant find him!!!
py```
if ctx.author.id==
😳 ✌️ peace out
cat digger sounds like your bury cats
==?
Yeah mb
bury 'em deep instead
im not a murderer, i love cats
ik
Ignoring exception in on_ready
Traceback (most recent call last):
File "/home/runner/Astro/venv/lib/python3.8/site-packages/discord/client.py", line 343, in _run_event
await coro(*args, **kwargs)
File "main.py", line 10, in on_ready
await bot.change_presence(status=discord.Status.idle, activity=discord.watching('Discord Servers'))
AttributeError: module 'discord' has no attribute 'watching'
@bot.event
async def on_ready():
await bot.change_presence(status=discord.Status.idle, activity=discord.watching('Discord Servers'))
print("The bot is online")
could someone pls help
im dumb and i know it
async def mybalance(ctx):
await ctx.send ("You have...")
@Winter.command()
async def balance(ctx,user : discord.Member):
await ctx.send (user.name+" has...")```
finally this worked
you guys have both been given an answer already?
you have been given your answer by @slate swan
it did not work
i suggest using python docs...
Okimi
^
discord.ActivityType.watching...
ik i tried it
Ignoring exception in on_ready
Traceback (most recent call last):
File "/home/runner/Astro/venv/lib/python3.8/site-packages/discord/client.py", line 343, in _run_event
await coro(*args, **kwargs)
File "main.py", line 10, in on_ready
await bot.change_presence(status=discord.Status.idle, activity=discord.ActivityType.watching('Discord Servers'))
TypeError: '_EnumValue_ActivityType' object is not callable
!d discord.ActivityType.watching
A “Watching” activity type.
💀
as i said
it did not work
i solved it
ty anyway
who knows tinydb ?
discord.Activity(type=discord.ActivityType.watching, name='Discord Servers')
it worked thank you
When Im using slash commands in disnake why do I get this error?
[WARNING] Failed to overwrite global commands due to 400 Bad Request (error code: 50035): Invalid Form Body
In 0.options.0.description: This field is required
wait, you're trying to overwrite global commands?
yh idk what that means
this is a snippet of the code for slash command
@commands.slash_command(description="poggers") #The aliases in this decorator is made so people can also use "bal" as the command name. eg. .bal
async def balance(self, ctx, user:disnake.Member = None): #user is defaulted as None if the user just want's to check their own balance.
#The user can therefore check their own balance or someone elses. This is a polymorphic function.
if user == None: #If the user input's no other user's id or their @.
author = ctx.message.author #Variable contains the message sender user's instance object.
pfp = author.display_avatar #The user's profile picture URL link
um ig that means that you have command that is called something like /ban or /tableflip
they're default by discord
but balance isnt one of them
damn more comments than code
i have never seen so much comment in my life is cs project or English project 👀
code should be understandable just from reading
Yeah but what they wanted to see is how you understand the code and commenting was part of the overall marks so I had to write so much unecessary stuff
but it was worthit i did decent in the end
and then the indents ==None CTX.message.author💀
ngl over commenting is something beginner's do, i only comment to e.g specify a task needs to be done or implemented so contributors know
Ah indents are fucked because of discord ngl it doesnt look like that
Like I said, I only did this for a school project id never do something so goddam tedious
leave school
@commands.slash_command()
async def balance(self, inter: disnake.Interaction, user: disnake.Member = None) -> None:
member = inter.user or user
pfp = member.display_avatar.url
slash command dosent use ctx
discord + disnake compilation, new song of year
rip ma bad
user or inter.user*
is it possible to have your bot check for ongoing giveaways and resume them when it starts up? or is there no way to do that and you just have to keep the bot alive the whole time during a giveaway?
https://github.com/python/cpython/blob/main/Lib/random.py#L459
dont ask why this came in mind
aighty coolio
Lib/random.py line 459
n += 0.0 # convert to float for a small speed improvement```
save them into db and check when loading the bot
why the hell did that ever came to your mind💀
<link> 💀
no, @unkempt canyon removes the embed and displays the codeblock
Lib/random.py line 462
cum_weights = list(_accumulate(weights))```
woo interesting
stdlib btw
classic
does anyone know how to create an embed where the embed gets changed/edited depending on the user reacting? like Mudae bot
why the hell does a stdlib have such bad var naming💀
WTF 😳
better than typing cumulative ig
smh
pagination?
idek if i spelt it right lol
Cringe

I use type XD
Anyways, for some reason I'm unable to import "app_commands"
https://cdn.discordapp.com/attachments/343944376055103488/1006070987516805130/unknown.png
2.0?
Quick question in which i don't mean any offence, how can you be non binary but say your biologically male?
@slate swan
be my cat
basically It means I was born as a male but nonbinary
Ah okay cool
I'm probs on 1.7.3 (Anyway how do u upgrade to 2.0)?
So who do you identify as? Like nothing?
pip install git+https://github.com/Rapptz/discord.py
she/his
db.update({"balance":NewAuthorAmount, Mem.name==ctx.author.name})
^
SyntaxError: invalid syntax```
where is the problem
yeah
Okay
== should be :
Yeah
forgot how dicts work? check our free python courses
can you define Men.name as ctx.author.name ?
this is a discord-bots channel can we not talk about peoples identity and sexualities? i have nothing against it but it really shouldnt be a problem, its their life afterall?
no it's right
Im just asking a question as i intent no offence im just curious :) but yes i agree totally the wrong channel.
but then you just put a value true, without giving a key
so it should be something: Mem.name==ctx.author.name
not just Mem.name==ctx.author.name
well your questions can lead to arguments and can be taken as offensive this server is open to everyone and either way the topic is not suitable for this channel, you shouldve asked in maybe ot channels which suits better.
im not saying you did something wrong just be careful
no it's an edit
db.update({"balance":NewReceiverAmount, Mem.name==receiver.name})
this is right
no this is not
but this is wrong
db.update({"balance":NewAuthorAmount, Mem.name==ctx.author.name})
i didn't find the syntax different
can you please send the full code??
you separate "balance" and other key with comma
we dont need it
async def transfer(ctx,receiver:discord.Member,amount: int):
AuthorListSearch = db.search(Mem.name==ctx.author.name)
AuthorDictionarySearch = AuthorListSearch[0]
ReceiverListSearch = db.search(Mem.name==ctx.author.name)
ReceiverDictionarySearch = AuthorListSearch[0]
if int(AuthorDictionarySearch.get("balance")) >= int(amount) :
NewAuthorAmount = int(AuthorDictionarySearch.get("balance")) - int(amount)
NewReceiverAmount = int(ReceiverDictionarySearch.get("balance")) + int (amount)
db.update({"balance":NewAuthorAmount, Mem.name==ctx.author.name})
db.update({"balance":NewReceiverAmount, Mem.name==receiver.name})
await ctx.send(ctx.author.name+" transferred" + amount + " to "+ receiver.mention)```
that's it
whatever..
my brain will explose ._.
damn no need to be rude, Master32
hes just annoyed lol
anyway- I have a question about adding slash commands?
Sure
see:
Comma is a separator for dict, so when you do py d = { "yes": "no", "haha": "hoho" }, there are two elements, and when you do py d = { "yes": "no", "hoho" } you get the invalid syntax error, since python waits you to do "hoho" and put : some_value, but you don't do it.
Same thing in your code, but in one line: py d = { "balance": NewAuthorAmount, Mem.name==ctx.author.name }
lmao about what
about my cat scaring me that okimii stole it
see, i can say by personal experience hes a quite nice person
bro, why you exposing me😳 ✌️
what is it
Master32: absolutely loses his mind
well- mainly how do you add them?
you register them with a decorator, depends on which library tho
in dpy?
mhm
banana moment
are you using some Discord api wrapper? lile discord. py or something
*like
hikari😳
i can paste my code if that helps?
bro , my database's library works like i'm writing in the code
im making my own now
nanana
I'm very new to this so I don't really understand much lmao
You can say which lib do you use
wrapper?
wdym?
check the channel pins, the 2nd pin has all about making slash commands with dpy
discord.py? disnake? pycord? okimii?
ive made my own discord api wrapper its pain having a good structure
yay



