#discord-bots
1 messages Β· Page 59 of 1
yes.
.
class settings_document_admin_buttons(settings_document_admin_view):
def __init__(self, ctx, settings_data, *, timeout=20):
super().__init__(timeout=timeout)
self.ctx = ctx
self.settings_data = settings_data
@nextcord.ui.button(
label="Delete the Role",
style=nextcord.ButtonStyle.danger)
async def del_admin_role(self, button, interaction):
embed=nextcord.Embed(description=f"{config.DiscordTic} The role has been successfully removed!", colour=config.grΓΌn)
button = self.children[0]
button.disabled = True
button.style = nextcord.ButtonStyle.grey
await interaction.response.edit_message(embed=embed, view=self)
await self.unset_admin_role(interaction)```
You mean this class?
Yes
When u call the superclass init
Pass the arguments for ctx_or_interaction and the other one
Entrance next week
Ooh good luck
I am not ready at all nor I want to study.
What i am doing wrong
Nova will explain
timeout=timeout
Nice naming convention
make it timeout, ...
or make them all posargs
I don't want to give any freaking exam bro π«
whoβs that
It ain't even out yet bro
And am studying every freaking day, these mental ability exams are aids as fuck
Idk but today nova was in VC playing chainsaw man OST on loop
Some weird addiction/obsession
The music was great
Oh shit are those the ones where they say if WATERMELON = 72 what is PINEAPPLE =
Yeah lmao π«
"how to use pillow to get pregnant"
bro who even searches that stuff up

Ashley clearly
so true
?
i hate pillow & anything that has to do with image manipulation π
Why is that in ur recent searches hmm
it's on recommendations smh
Because of coordinates or?
in general
@grim oar
class settings_document_admin_buttons(settings_document_admin_view):
def __init__(self, ctx, settings_data, ctx_or_interaction, settings_data_admin):
super().__init__(ctx_or_interaction, settings_data_admin, timeout=20)
self.ctx = ctx
self.settings_data = settings_data````
Now okay?
what are you trying to do
Seems so
Classes naming convention screaming in agony
π€’
Yeah follow pep-8
Also why'd you need to set ctx as attribute, you can access it in callback
The literature every person here does addiction of
is there a way to get if a user has nitro in dpy v2.0
Traceback (most recent call last):
File "C:\Users\domin\AppData\Local\Programs\Python\Python310\lib\site-packages\nextcord\client.py", line 499, in _run_event
await coro(*args, **kwargs)
File "c:\Discord\Maja Projekt\MajaSystem\bot.py", line 280, in on_application_command_error
raise error
File "C:\Users\domin\AppData\Local\Programs\Python\Python310\lib\site-packages\nextcord\application_command.py", line 848, in invoke_callback_with_hooks
await self(interaction, *args, **kwargs)
File "c:\Discord\Maja Projekt\MajaSystem\modules\setup\cog.py", line 221, in _setup_administrator_role
await interaction.response.send_message(embed=error, view=settings_document_admin_buttons(interaction, settings_data_admin), ephemeral=True)
TypeError: settings_document_admin_buttons.__init__() missing 2 required positional arguments: 'ctx_or_interaction' and 'settings_data_admin'```
Still the error
I have addiction to base64 as you can see from my name
And to nanoseconds
base64 my beloved
It's not the super class erroring bruh
I think you can only check if the user is booster of the guild
!d discord.Member.premium_since
An aware datetime object that specifies the date and time in UTC when the member used their βNitro boostβ on the guild, if available. This could be None.
yea i do that to return badges with emojis but i was wondering if there's another method
fix the terrible naming, the settings_document_admin_buttons() ain't getting the required args
!d discord.User
class discord.User```
Represents a Discord user.
x == y Checks if two users are equal.
x != y Checks if two users are not equal.
hash(x) Return the userβs hash.
str(x) Returns the userβs name with discriminator.
not likely
waiting for danny to add another method π₯π₯
But i gives the args
class settings_document_admin_buttons(settings_document_admin_view):
def __init__(self, ctx, settings_data, ctx_or_interaction, settings_data_admin):
super().__init__(ctx_or_interaction, settings_data_admin, timeout=20)
self.ctx = ctx
self.settings_data = settings_data
@nextcord.ui.button(
label="Delete the Role",
style=nextcord.ButtonStyle.danger)
async def del_admin_role(self, button, interaction):
embed=nextcord.Embed(description=f"{config.DiscordTic} The role has been successfully removed!", colour=config.grΓΌn)
button = self.children[0]
button.disabled = True
button.style = nextcord.ButtonStyle.grey
await interaction.response.edit_message(embed=embed, view=self)
await self.unset_admin_role(interaction)```
Discord API provides nitro info only with oauth2 identify scope
Pretty sure you can't get it with bot
but at least it does
fair enough

Where is settings_document_admin_buttons called
pillow
pip install pillow
use pillow, iirc Zeffo said that PIL is dead
Good
but in code u use PIL
view=settings_document_admin_buttons(interaction, settings_data_admin)
NOOOOOOOOOOOOO
pillow is maintained fork of PIL
Hurb
Lol see.. You ain't passing the next 2 args
That means?
Nova i think you should explain what functions are
x_buttons takes 4 args, you just giving 2
And what parameters and arguments are
What python is

It's a snake ofc
from PIL import Image, ImageFont, ImageDraw, ImageOps
@commands.Cog.listener()
async def on_member_join(self, member):
channel = get_channel(bot.get_all_channels(), 'Welcome')
img = Images.open("./data/bg.jpg")
font = ImageFont.truetype("./data/Kelly Stones.otf", 225)
font2 = ImageFont.truetype("./data/Kelly Stones.otf", 200)
draw = ImageDraw.Draw(img)
welcome = f"Welcome to {member.guild.name}"
name = member.name
draw.text((950, 750), welcome, (255, 255, 255), anchor = "ms", font = font)
draw.text((950, 950), name, fill = "white", anchor = "ms", font = font2)
img.save("boing.png")
await member.send(f"**Hello** {member.mention}! **Welcome to {member.guild.name}**. **Pls check out** #πΆπππππ π **for guidance. Get some fancy roles from** #ππππ-π
ππππ . **Introduce yourself in** #πΌππ‘ππππ’ππ‘ππππ **and have fun.**")
await channel.send(file=discord.File("boing.png"))
``` this is the code and it aint working, *PIL module is not found*
According to my calculations, a parameter is something called a parameter.
Issues with environment
How u running ur script
are u skidding some shit off youtube
Um actually, it is an argument π€
Oh I'm sorry about that, Professor Henry William The 7th.
so its skidded but u changed some stuff
Um actually, the 6th π€
it works now
Gato
no-
I apologize, professor.
i didnt skidded bruh
π
Ok bud
Later alli r
i watched few tutorials on that stuff and i made it ;-;
is ur bot in multiple servers
nope
By the way fun fact: I skid all my code I don't write it by myself, all because python is a snake
and it works now so its fine
is it a private bot for just 1 server
El gato wa mou cyka blyat h sexo
s
All my 26 repositories on github are pure skid
Elgato is some streaming thing iirc
And all my gists
i skidded a c# ransomware 3-4 years ago its ok bud
h
i have a doubt for my school python question π
can anyone help me?
I skid 2 whole games in c#
r1 is None
Looks like ur query returned None
what db are u using
MySQL i think
All the text sent by me was skidded too
def check(reaction, user):
return user == ctx.message.author and str(reaction.emoji) == 'β
'
await bot.wait_for('reaction_add', check=check)
embed = Embed(color=discord.Color.dark_green(), title="Challenged", description=f"Game has been accepted by {user.mention}")
embed.add_field(name="?", value="?", inline=True)
embed.add_field(name="?", value="?", inline=True)
confirmationMessage = await ctx.message.channel.send(embed=embed)
await confirmationMessage.edit(embed=embed)
await confirmationMessage.clear_reactions()```
Possible to mention only the user who reacted inside the embed description?
It won't mention
legend
Ur query is returning None so the data you're requesting is not available in the db
now get them on steam and pay for ur college tuition off them!
And I keep skidding one
Either add the data to the db or handle the case where it returns None
^
Or change your query to make sure it's actually requesting what you want to request
really? so there is no way to mention only the user who reacted? it can mention everything else....π
You can't mention in embeds
Redundant data !!
you can?
technically u can but it wont actually ping the user
You can
it just shows the mention but doesnt actually ping
That's what I am saying
Everything is same except one column, that's not good schema
I am helping here since when you all were in your daddy's balls
π
amiright zeffhoe.
Yes that is true
What if someone's Dad has went to get milk?
how many dumb questions do u answer daily on average
voice channel is so funny, i didnt know
sometimes i learn something as we talk about dimensions and sometimes we explain to someone how and and or work
Where might I find documentation on mentioning users who reacted
That would be unfortunate.
!d discord.on_reaction_add
discord.on_reaction_add(reaction, user)```
Called when a message has a reaction added to it. Similar to [`on_message_edit()`](https://discordpy.readthedocs.io/en/latest/api.html#discord.on_message_edit "discord.on_message_edit"), if the message is not found in the internal message cache, then this event will not be called. Consider using [`on_raw_reaction_add()`](https://discordpy.readthedocs.io/en/latest/api.html#discord.on_raw_reaction_add "discord.on_raw_reaction_add") instead.
Note
To get the [`Message`](https://discordpy.readthedocs.io/en/latest/api.html#discord.Message "discord.Message") being reacted, access it via [`Reaction.message`](https://discordpy.readthedocs.io/en/latest/api.html#discord.Reaction.message "discord.Reaction.message").
This requires [`Intents.reactions`](https://discordpy.readthedocs.io/en/latest/api.html#discord.Intents.reactions "discord.Intents.reactions") to be enabled.
Note
This doesnβt require [`Intents.members`](https://discordpy.readthedocs.io/en/latest/api.html#discord.Intents.members "discord.Intents.members") within a guild context, but due to Discord not providing updated user information in a direct message itβs required for direct messages to receive this event. Consider using [`on_raw_reaction_add()`](https://discordpy.readthedocs.io/en/latest/api.html#discord.on_raw_reaction_add "discord.on_raw_reaction_add") if you need this and do not otherwise want to enable the members intent.
!d discord.User.mention
property mention```
Returns a string that allows you to mention the given user.
You just made them sadder. Congo!
on_raw_reaction_add π₯΅
meh
meh
is there any bot with lastfm integration here
Me who is hearing the name first time:
The world's largest online music service. Listen online, find out more about your favourite artists, and get music recommendations, only at Last.fm
are you dumb
finding songs and artists is doable tho
Thereβs no need to be rude to other members
genuine question
r1 is None
!d discord.Interaction.send_message
No documentation found for the requested symbol.
!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.
or you mean to send it into DMs of ctx.author? @slate swan
@silk fulcrum I have a report command. When reporting on a participant in the chat, this reaction appears. And when the moderator clicks on the reaction. It is necessary that the nickname of the moderator who clicked on the reaction should be written in the bos to the author of the report
@silk fulcrumcan I write to you in Russian ?
uhm... sure... but in DMs i think
its says the name 'member' is not defined wot do i do
show code
or full traceback
better both
can i copy and paste the line?
!d discord.Interaction.edit_original_response @junior verge
await edit_original_response(*, content=..., embeds=..., embed=..., attachments=..., view=..., allowed_mentions=None)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Edits the original interaction response message.
This is a lower level interface to [`InteractionMessage.edit()`](https://discordpy.readthedocs.io/en/latest/interactions/api.html#discord.InteractionMessage.edit "discord.InteractionMessage.edit") in case you do not want to fetch the message and save an HTTP request.
This method is also the only way to edit the original message if the message sent was ephemeral.
ah thanks
so no need for interaction ?
member is not defined
wdym?
he should write in private messages to the author of the command that called this button
IDs are integers, not strings
await interaction.edit_original_message
IDs are stored as integers
response*
And just interaction.response.edit_message is fine
no
Yes
no
I am literally doing it π€£
The userβs unique ID.
you are probably using the outdaded github version
No.
it was changed in PyPI release
uhh
Idk why it doesnβt say type: int but whatever
it does not exist
!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.edit_message
await edit_message(*, content=..., embed=..., embeds=..., attachments=..., view=..., allowed_mentions=...)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Responds to this interaction by editing the original message of a component or modal interaction.
I donβt think you can respond to an interaction multiple times
Look the types :)))
I am trying to just do it once
you've already responded to that interaction, edit_original_response is editing the orginal message AS a response, and to just do it you need to get original message
await interaction.followup.send("Pong!")
await interaction.edit_original_response(content = f"Pong! **{round(self.client.latency * 1000)}**ms")
``` just that
!d discord.Interaction.original_response
await original_response()```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Fetches the original interaction response message associated with the interaction.
If the interaction response was a newly created message (i.e. through [`InteractionResponse.send_message()`](https://discordpy.readthedocs.io/en/latest/interactions/api.html#discord.InteractionResponse.send_message "discord.InteractionResponse.send_message") or [`InteractionResponse.defer()`](https://discordpy.readthedocs.io/en/latest/interactions/api.html#discord.InteractionResponse.defer "discord.InteractionResponse.defer"), where `thinking` is `True`) then this returns the message that was sent using that response. Otherwise, this returns the message that triggered the interaction (i.e. through a component).
Repeated calls to this will return a cached value.
@discord.ui.button(style= discord.ButtonStyle.grey, emoji = 'π')
async def reports(self, button, interaction):
await self.ctx.author(
embed = discord.Embed(description= f'ΠΠ°ΡΠ΅ΠΉ ΠΆΠ°Π»ΠΎΠ±ΠΎΠΉ Π·Π°Π½ΡΠ»ΡΡ {interaction.user}', colour=0xF1C40F),
)```
how to make it so that when you click on this button, the author of the command that called this button receives a message ??
you will need to do original = await interaction.original_message() and await original.edit(...) @junior verge
i think you want await self.ctx.author.send(...)
https://paste.nextcord.dev/?id=1661524967646940 someone can help with that
await interaction.original("Pong!")
await interaction.original.edit(content = f"Pong! **{round(self.client.latency * 1000)}**ms")
``` this?
thank you very much
Life is good when a problem only needs one response
no
i literally sent you what you need
you sent this
sorry typo in first line
no problem
and you don't put anything in it
which you don't put there
and you didn't do original = await interaction.original_message()
you just did the calling of this function
and so with that being said you should use await original.edit(...)
original = await interaction.original_message("Ping!")
await original.edit(content = f"Pong! **{round(self.client.latency * 1000)}**ms")
``` ?
don't put anything inside original_message()....
oh
and then it will be gud
do I just need a await interaction.followup.send() for the first message what will be edited
this doesn't work?
wait I don't think you get it do you
so what is wrong wiht your current code?
It never sends the Pong ?
I have no idea how dbs work but your not parsing anything into fetchone
Obviously itβs not finding anything and is returning None
I think this is a database related question so ask in #databases or go to #βο½how-to-get-help
no
wrong redirect
Ok
@silk fulcrum
I mean they would be more experienced in the whole db thing
What?!? π€―
nothing
He kinda said that in his problem
oh bruh i only read errors if i see screenshots
show the query you are trying to fetch
like "SELECT * FROM table"
this string, what is it
Damn he fr left
lmao
I forget that there are other channels
@silk fulcrum
do you get an error?
.
show the code
of the command
how do you send the pong
oh wait
@junior verge you can't edit responses
or can you?
you 100% cannot edit ephemeral responses
thats the whole point
but im not sure about the responses
send the code of the command
I just want when I do /ping it sends Pong and then edits the latency in
well its just what you said lol
@app_commands.command(name="ping", description="Returns the latency of the bot")
async def ping(self, interaction: discord.Interaction):
await interaction.response.defer()
original = await interaction.original_message()
await original.edit(content = f"Pong! **{round(self.client.latency * 1000)}**ms")
``` This won't do anything
!d discord.InteractionResponse.edit_message # Yeah you definitely can't edit a response
await edit_message(*, content=..., embed=..., embeds=..., attachments=..., view=..., allowed_mentions=...)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Responds to this interaction by editing the original message of a component or modal interaction.
What on earth is that
thats the whole point relax
editing the Pong without sending it
send the message
first of all send a message
This guy is STRUGGLING
interaction.send?
Await it
yes ofc lol
And why would you need to edit the message to send the bot.latency
idk I just like that
i guess
and just testing out 2.0
Yeah and that's my point
no?
There is no need to edit the message to get it or to make it relevant
You can simply directly send it
Some other bots usually calculate the difference between the message sent and the message actually being edited, there it makes sense to edit the message
whats the problem with that
Otherwise you can just send
Yeah I know that
There is none, it's just that you have an apparent hard time in editing a message while it's just a method to call
some also calculate db latency 
I make command processing time (time between the execution of command and sending an embed wiht ping)
And then you face stubborn misleading people, no wonder it won't work..
yeah lol
Idk what game to play
minecraft
Well maybe in an off topic channel someone has an idea
No
that's the only game for me possible (except shitty online games) to play so yes
Im correcting your statements as theyre incorrect, you should also listen to me so you can learn something and spread correct info
@silk fulcrum i am confused are you able to help?
I have like 79 games installed and I own a bunch more ππ
help with what?
Why does scorn have to come out late October
Hes currently having a boring crisis
i have no idea why that error appears
Me too
Me? π
uhm, so that is the query you are trying to fetchone right?
You made an instance and never passed any arguments into the intiater of the instance
Yes you
I am not boring 
Yeah youre harvs, kek
you have smth like this in your code
That means?
Hitman trilogy was so good
class settings_document_admin_buttons(settings_document_admin_view):
def __init__(self, ctx, settings_data_admin, *, timeout=3):
super().__init__(timeout=timeout)
you are missing params in the super().__init__() call
wait why the hell are you subclassing your custom view
Okay so waht should i add to this?
and why are you putting %s in ()
the arguments you would pass in settings_document_admin_view
why yes?
youre currently creating an instance of your super class so you would need to pass the arguments it needs to its initater
deep explanation on what ryuga ment lol
and so your query SELECT role_id FROM ... returns nothing, that means there is no row with these WHERE conditions
i would open a GUI for my database and see what SELECT * FROM that_table returns
and see if there is a row with these conditions
if not then the problem is ovbious
βοΈ
there is no row like that
wrong way?
uh
what do you want
discord.app_commands
just for a slash command only x user with that id can do it
SELECT * FROM table returns every row?
or the bots owner doesnt really matter
and what? I want to see what is in table
and check manually if there is that row
im pretty sure he has not a lot of rows
public bots usually are not that poorly coded
youre interesting 
ok
@cerulean shale we can go to #764232549840846858, I can show what im doing, if you want
So?
class settings_document_admin_buttons(settings_document_admin_view):
def __init__(self, ctx, settings_data_admin, *, timeout=3):
super().__init__(settings_data_admin, timeout=timeout)```
why are you subclassing your own view?
sure
also why u need that * π
What?
, *, timeout
pretty long name
how do I remove all reactions from a discord message, regardless of sender or reaction?
just for a slash command only x user with that id can do it or bots owner
and no class namespace kek
the casing tho π©
discord.on_member_join(member)```
Called when a [`Member`](https://discordpy.readthedocs.io/en/latest/api.html#discord.Member "discord.Member") joins a [`Guild`](https://discordpy.readthedocs.io/en/latest/api.html#discord.Guild "discord.Guild").
This requires [`Intents.members`](https://discordpy.readthedocs.io/en/latest/api.html#discord.Intents.members "discord.Intents.members") to be enabled.
@shrewd apex
the * is only for the parameters of a function definition
you cant pass it into a method youre calling
Hello
I am trying to create discord server currency system
I tried to do something but
something gone wrong
may you help me about this issue if you have enough interest and knowledge about it
You can check the time right before the bot starts then compare it
bot is working
Whats the issue then
Show ur intents
How do I remove all reactions from a message?
Whether guild related events are enabled.
This corresponds to the following events...
Enable in code
Oh
Hmm you should enable logging with debug level to check if u are receiving the event
thanks
@slate swan Is it possible that an error is being caught by some error handler and silently discarded?
You could maybe just wrap the entire command in a try except and see if anything comes out of it
Itβs possible the first text channel in the guild isnβt sendable by the bot, like it gets a channel which it has no perms in and that causes an error
But the timing of the verification is probably indicative
How recently was it verified? Possibly it hasnβt gone through 100% yet and so the intent isnβt firing as it should
To check that youβd need to enable debug logging
Ohβ¦
I did not see this π
You need to apply now youβre verified :P
Oh right yeah this is guild join not member join mb
set is not a json serializable type
import discord
import logging
logger = logging.getLogger('discord')
logger.setLevel(logging.DEBUG)
handler = logging.StreamHandler()
handler.setFormatter(logging.Formatter('%(asctime)s:%(levelname)s:%(name)s: %(message)s'))
logger.addHandler(handler)
you will get a lot of stuff but when u join a server look for something like dispatching event on_guild_join
it will output in the console
what does it mean?
set is not a json serializable type
that is what it means
!e
import json
json.dumps({1, 2, 3})
@torn sail :x: Your 3.11 eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 3, in <module>
003 | File "/usr/local/lib/python3.11/json/__init__.py", line 231, in dumps
004 | return _default_encoder.encode(obj)
005 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
006 | File "/usr/local/lib/python3.11/json/encoder.py", line 200, in encode
007 | chunks = self.iterencode(o, _one_shot=True)
008 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
009 | File "/usr/local/lib/python3.11/json/encoder.py", line 258, in iterencode
010 | return _iterencode(o, 0)
011 | ^^^^^^^^^^^^^^^^^
... (truncated - too many lines)
Full output: https://paste.pythondiscord.com/xayuvagase.txt?noredirect
TypeError: Object of type set is not JSON serializable
basically json only wants lists and dicts
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.
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.
π
lmao
do you guys think this is a good get_or_fetch/getch method?
async def get_or_fetch(sync_method: Callable[[int], T], snowflake: int) -> T:
async_method_name: str = sync_method.__name__.replace('get', 'fetch')
async_method: Callable[[int], Coroutine[Any, Any, T]] = getattr(
sync_method.__self__, async_method_name # type: ignore
)
return sync_method(snowflake) or await async_method(snowflake)
π what, getch??? your gonna be in my nightmares
instead of hardcoding for every get_user, get_channel etc you can just pass the sync method in
so if the get_ method returns None it will try fetching
no clue
How do I delete a user's message again?
I'm currently making a say/embedsay cmd but Idk how I can remove 'only' the cmd that's before the embedded/argument message
!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/latest/api.html#discord.Permissions.manage_messages "discord.Permissions.manage_messages") permission.
Changed in version 1.1: Added the new `delay` keyword-only parameter.
how can I make sure that data from one command is transferred to another ? That is , from command B the data is passed to the command A ??
what?
are you looking for variables...
in the callable annotation wouldnt it be
sync_method: Callable[[int], T | None]
?
@slate swan Example. There is for example command prof. And there is, for example, a section where using command name you can specify some text
since T would be the original object the method should return if its in cache
yes
arguments???
nah discord.py already uses Optional
like !command 1 2 three??
that is?
so doing this would be like discord.User | None | None for get_user
ask your question again
except dont say it like your a foreign person in england π
yeah but since T's value can be None wouldnt you specify it? Ig the generic covers it
Well, text data is passed from command B to command A, that is, a sentence
lmao
yeah T already covers Optional
yeah
If I say OK, you won't understand. So how will I say in Russian
wait also techinally my return annotation is wrong because i make them pass the sync method which can return None but in my case, if the sync method returns None then i use the async method which cant return None so it will never return None
@bot.command()
async def abc(ctx, arg1):
global abcarg1
abcarg1 = arg1
@bot.command()
async def deef(ctx):
await ctx.send(abcarg1)
```???
you do have a point their
i can just make then pass the async method and im good
learning python instead of english π
import discord
from discord.ext import commands
bot = commands.Bot("!")
``` i think this is what you are looking for
enable member intents
!d discord.Client.event
@event```
A decorator that registers an event to listen to.
You can find more info about the events on the [documentation below](https://discordpy.readthedocs.io/en/latest/api.html#discord-api-events).
The events must be a [coroutine](https://docs.python.org/3/library/asyncio-task.html#coroutine "(in Python v3.10)"), if not, [`TypeError`](https://docs.python.org/3/library/exceptions.html#TypeError "(in Python v3.10)") is raised.
Example
```py
@client.event
async def on_ready():
print('Ready!')
```...
intents.members = True
if not using message commands
they have debug_guilds which probably means they are using slash cmds
Because what
no its not related to ur problem
π why Client if not using message commands?
well i guess if ur making a one file bot with only app commands and only one function for every event
Ignoring exception in on_application_command_error
Traceback (most recent call last):
File "C:\Users\domin\AppData\Local\Programs\Python\Python310\lib\site-packages\nextcord\client.py", line 499, in _run_event
await coro(*args, **kwargs)
File "c:\Discord\Maja Projekt\MajaSystem\bot.py", line 280, in on_application_command_error
raise error
File "C:\Users\domin\AppData\Local\Programs\Python\Python310\lib\site-packages\nextcord\application_command.py", line 848, in invoke_callback_with_hooks
await self(interaction, *args, **kwargs)
File "c:\Discord\Maja Projekt\MajaSystem\modules\setup\cog.py", line 221, in _setup_administrator_role
await interaction.response.send_message(embed=error, view=settings_document_admin_buttons(interaction, settings_data_admin), ephemeral=True)
File "c:\Discord\Maja Projekt\MajaSystem\modules\setup\buttons.py", line 9, in __init__
super().__init__(settings_data_admin, timeout=timeout)
TypeError: settings_document_admin_view.__init__() missing 1 required positional argument: 'settings_data_admin'```
π
!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.
do you mean commands.Command when you say message commands?
yes
Which file?
the file thats causing the error
so buttons.py
a ok, discord refers to message command as the application commands based on messages
Integrate your service with Discord β whether it's a bot or a game or whatever your wildest imagination can come up with.
class settings_document_admin_buttons(settings_document_admin_view):
def __init__(self, ctx, settings_data_admin, *, timeout=3):
super().__init__(settings_data_admin, timeout=timeout)
self.ctx = ctx
self.settings_data_admin = settings_data_admin
@nextcord.ui.button(label="Delete the Role", style=nextcord.ButtonStyle.danger)
async def del_admin_role(self, button, interaction):
embed=nextcord.Embed(description=f"{config.DiscordTic} The role has been successfully removed!", colour=config.grΓΌn)
button = self.children[0]
button.disabled = True
button.style = nextcord.ButtonStyle.grey
await interaction.response.edit_message(embed=embed, view=self)
await self.unset_admin_role(interaction)```
oh yeah, i guess i should maybe say "message based commands"
idk if thats better tho
your missing settings_data_admin when initializing the class
But this is there
thanks
global ;-; and even worse editing the var using global
@slate swanglobal can pass a variable such as a participant link ?
π
IDFK MAN
???that's already in there
don't use global pass it as parameter
And then what to use ?
@bot.command()
async def abc(ctx, global arg1):
pass
``` πΏ ?
what are u attempting in first place
Still have a Problem
So that the text is passed from command And to command A
class settings_document_admin_buttons(settings_document_admin_view):
def __init__(self, ctx, settings_data_admin, timeout=3):
super().__init__(timeout=timeout)
self.ctx = ctx
self.settings_data_admin = settings_data_admin
@nextcord.ui.button(label="Delete the Role", style=nextcord.ButtonStyle.danger)
async def del_admin_role(self, button, interaction):
embed=nextcord.Embed(description=f"{config.DiscordTic} The role has been successfully removed!", colour=config.grΓΌn)
button = self.children[0]
button.disabled = True
button.style = nextcord.ButtonStyle.grey
await interaction.response.edit_message(embed=embed, view=self)
await self.unset_admin_role(interaction)
what's settings_document_admin_view
so command a triggers command b?
class settings_document_admin_view(nextcord.ui.View):
def __init__(self, ctx_or_interaction, settings_data_admin, timeout):
super().__init__(timeout)
self.settings_data_admin = settings_data_admin
self.ctx_or_interaction = ctx_or_interaction
if isinstance(ctx_or_interaction, Context):
self.user = ctx_or_interaction.author
if isinstance(ctx_or_interaction, Interaction):
self.user = ctx_or_interaction.user
async def interaction_check(self, interaction):
filter_dict = {"_id": interaction.guild.id}
checka = await interaction.client.settings.find_by_custom(filter_dict)
if checka is None:
if self.user == interaction.user:
return True
else:
embed = nextcord.Embed(description=f"{config.gf_error_emoji} You are not authorized to press this button", colour=config.rot)
await interaction.response.send_message(embed=embed, ephemeral=True)
return False
if checka is not None:
role_id = checka["admin_id"]
if interaction.user.get_role(role_id):
return True
if self.user == interaction.user:
return True
else:
embed = nextcord.Embed(description=f"{config.gf_error_emoji} You are not authorized to press this button", colour=config.rot)
await interaction.response.send_message(embed=embed, ephemeral=True)
return False
else:
pass
async def unset_admin_role(self, interaction: nextcord.Interaction):
await interaction.client.settings.unset(self.settings_data_admin)```
im making a vouch command and im confused why this isnt working
@client.command()
@commands.check(another_guild_role)
async def vouch(ctx, user: discord.Member, rating: int, *, reason):
valid = {"1","2","3","4","5"}
vouchem = discord.Embed(
title = 'Vouch Given!',
colour = discord.Colour.dark_red()
)
vouchem.add_field(name='Vouch By:', value=f"<@{ctx.message.author.id}>", inline=False)
vouchem.add_field(name='To:', value=f"<@{user.id}>", inline=False)
vouchem.add_field(name='Rating:', value=f"`{rating}`", inline=False)
vouchem.add_field(name='Vouch Reason', value=f'{reason}', inline=False)
if rating in valid:
await ctx.send(embed=vouchem)
else:
await ctx.send('`Please rate 1-5`')
u are subclassing a subclassed view why? just make a new view πΏ
it always responds with please rate 1-5
cause your checking if an int is in a set of strings
lmao
what should i change?
because he doesn't want to redefine the check prolly
if rating in range(1,6):
Huh? How should look
!e
code
calm down 
!e
print(range(1,6))
@slate swan :white_check_mark: Your 3.11 eval job has completed with return code 0.
range(1, 6)
am i dumb
harvs moment
lmfao
no. Just the B command passes some variable to the A command. For example, the text or link of the participant. But at the same time command A can safely work without command B
ty
range() does not show you a list of all numbers within it
you'll have to convert
how π
!e
print(list(range(1,6)))
!e [print(i) for i in range(1,6)]
@regal pulsar :white_check_mark: Your 3.11 eval job has completed with return code 0.
001 | 1
002 | 2
003 | 3
004 | 4
005 | 5
!e
print(list(range(1,6)))
@slate swan :white_check_mark: Your 3.11 eval job has completed with return code 0.
[1, 2, 3, 4, 5]
!e print(*range(1,6))
@umbral palm :white_check_mark: Your 3.11 eval job has completed with return code 0.
[1, 2, 3, 4, 5]
@vocal snow :white_check_mark: Your 3.11 eval job has completed with return code 0.
1 2 3 4 5
YAY
there
ok so u can actually just make a attr to bot called bot.x = "something" and access that in command b
if this command is in a cog u can use the class and make a class var and store there
What you mean with new view
print([*range(6)])

Of course, thank you. But somehow I don't understand this method at all.
u don't even need the []
yeah, but its the same result as lunas lol
... this is not even oop it's just declaring a var ;-;
π
because its a range obj and its repr doesnt return a list lmao
this is proof that noones learn python before coding a dpy bot
"ok so u can actually just make a attr to bot called bot.x = "something" and access that in command b"
I'm talking about this part
why doesnt it
!e print("just testing")
@bitter walrus :white_check_mark: Your 3.11 eval job has completed with return code 0.
just testing
thats dumb
ask him
who π
its not?
π π i did
why does it have 1 but not 6
yep, that'll do
I just throw it in list() though 
u just literally need to do bot.x = "something" and in command b if u do print(bot.x) it will print "something"
woah!!!
ranges are exclusive
just like me 
they are 0 to n - 1
you remind me of @slate swan except not obnoxious
only cause danny and dani tbh π
no u are loved!!
where b is your end
β€οΈ
Well, if in the documentation discord.py it would be written more clearly. That would be easier for everyone.
everyone loves Dani
https://python.org β€οΈ
π«
what do you want in the documentation to be explained clearly?
β€οΈ
variable declaring i think π
list casting is faster
i think you just need an id or smth
no
what are you saying
literal scam bots are being verified
oh lol
that you need an ID
you need to provide some sort of ID
like a driving license or smth
oh that
lol
that ID
get that fake ID for verified discord bot π―
you have to show a part of your code so they see what your bot does
I was thinking of a discord id xd
not even everything
I got a ID so I'm fine
I don't see that here
- These are at least minimal examples. Not just two items, but each
@bot.command()
async def hecker_man(ctx, discord_staff_member: discord.User):
await heck(discord_staff_member)
await dox(discord_staff_member)
await teabag(discord_staff_member)```
well if few PPL did python basics before making discord bot it would be much easier as well
this would probably still get accepted
how is a staff member a discord.User type ;-;
I don't quite agree
could you elaborate? You want an example for every method?
For those of us who help out here frequently, it would be a massive burden off our shoulders
@sick birch Got any tips for bots verification xd
@shrewd apex I just have one good example of this discord.js . The documentation there is much better done. And the bot can be written purely on it without even knowing js itself
disocrd.js π
No, Iβve never been big on bot development. I only made a few for the learning experience and ditched them after
The d.py docs are some of the best docs iβve seen
Huh? But you are so good at dpy
you keep saying the documentation is better and whatnot but you are yet to point out what exactly is missing in the dpy documentation
Theyβre intuitive
I wouldn't say a bot thats in more than 75+ server is big
Though I agree with your point on discord.py having terrible documentation
I think theyβre great
I wrote about the documentation. And not about the server. Or are you filling out the documentation ?
what
sir are you english
the documentation is made automatically by source code
there is already one for everyone
Iβm just saying a little bit of python knowledge would expedite the helping process for both parties
are. you. english
? does it matter
well yeah cause im not really understanding a single thing hes saying
look here buddy no matter what u say simple oop will never be on the documentation and if u wanna learn oop u need to learn it urself u can argue they don't have command examples in docs but u can't argue that they have poor docs coz u are not understanding oop
it's no longer about python knowledge. And in the knowledge of English
Ignoring exception in on_application_command_error
Traceback (most recent call last):
File "C:\Users\domin\AppData\Local\Programs\Python\Python310\lib\site-packages\nextcord\client.py", line 499, in _run_event
await coro(*args, **kwargs)
File "c:\Discord\Maja Projekt\MajaSystem\bot.py", line 280, in on_application_command_error
raise error
File "C:\Users\domin\AppData\Local\Programs\Python\Python310\lib\site-packages\nextcord\application_command.py", line 848, in invoke_callback_with_hooks
await self(interaction, *args, **kwargs)
File "c:\Discord\Maja Projekt\MajaSystem\modules\setup\cog.py", line 221, in _setup_administrator_role
await interaction.response.send_message(embed=error, view=settings_document_admin_buttons(interaction, settings_data_admin), ephemeral=True)
File "c:\Discord\Maja Projekt\MajaSystem\modules\setup\buttons.py", line 9, in __init__
super().__init__(settings_data_admin, timeout=timeout)
TypeError: settings_document_admin_view.__init__() missing 1 required positional argument: 'settings_data_admin'```
Well said ^^
@slate swandon't link me!
uh, I store message_content for just my ranking system, if someone sends a message it will get x xp but I don't store the messages though right?
what???
Donβt ping him
You donβt need message content for that
You will still get the messages dispatched to you
he pings me 
I think blaming documentation for you not having a certain skill is a problem you posses not the documentation
So I just need to do No? for do you store message content
BRO
lmaooo
Yes, you donβt store message content
is that a threat π
Okay thanks
fucked up. It's good to mention me, this is what it translates 2
So what do I store with my on_message for the level/rank system?
he brought out the fuckin russian π
Thatβs an implementation detail
he shit talking in another language so he dont get in trouble
As I don't delete it?
Well itβs querying whether or not you store the actual message itself
this channel is so fucking hilarious
If you donβt save the message content somewhere itβs N/A
well, damn, he's tired of mentioning me already
Iβm not understanding
i am scared of this dude
Ignoring exception in on_application_command_error
Traceback (most recent call last):
File "C:\Users\domin\AppData\Local\Programs\Python\Python310\lib\site-packages\nextcord\client.py", line 499, in _run_event
await coro(*args, **kwargs)
File "c:\Discord\Maja Projekt\MajaSystem\bot.py", line 280, in on_application_command_error
raise error
File "C:\Users\domin\AppData\Local\Programs\Python\Python310\lib\site-packages\nextcord\application_command.py", line 848, in invoke_callback_with_hooks
await self(interaction, *args, **kwargs)
File "c:\Discord\Maja Projekt\MajaSystem\modules\setup\cog.py", line 221, in _setup_administrator_role
await interaction.response.send_message(embed=error, view=settings_document_admin_buttons(interaction, settings_data_admin), ephemeral=True)
File "c:\Discord\Maja Projekt\MajaSystem\modules\setup\buttons.py", line 9, in __init__
super().__init__(settings_data_admin, timeout=timeout)
TypeError: settings_document_admin_view.__init__() missing 1 required positional argument: 'settings_data_admin'```
Can someone help
it's ot discord bots π³
"WHAT IS THE PROCESS FOR USERS TO REQUEST DELETION OF THEIR DATA?" and "FOR HOW LONG DO YOU STORE IT?" I don't store the data, right?
You must implement some sort of system where users can tell you they want their data deleted
If you donβt store it you can say that in the 3rd box
βI donβt store anyβ
Well technically you are
@slate swan the first word is unlikely to be translated into English
my guy how are you still stuck on this
u forgot to pass ctx
Youβre storing the amount of messages a user has sent
What is the first word
Yeah
it's parent class is taking a interaction or CTX param as well at second position
Is it some Russian slur thatβs extremely offensive
User data should be taken very seriously with the utmost importance
Ctx?
Thereβs always 2 different convos and everyone just ignores the other one
I find this chat amusing 
I'm talking about the word "Π·Π°Π΅Π±Π°Π»"
π
Yeah
I get that yes, but what would that be in my case?
yeah u forgot to pass that in super()
!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.
u passed only 2 params while u need 3
Do I do "yes" or "no" on do you store message content
@slate swan I don't think that the Russian mat is normally translated into English.
@primal fox please type your message π
Itβs something like βOh iβm sick of youβ
Off buttons.py?
it's unlike u are gonna get message content intent
then the 2nd I assume?
oh ok
anything that is primary keyed by a user ID, like how many messages they've sent, etc
unlikely*
Yeah okay
yes, but this means "very tired of us"
Yeah
In buttons.py or views.py?
I mostly just wanted to ask people to stop spamming lol
the parent class of which u are subclassing ur names are so big i don't remeber them ;-; sorry
@sick birch
aha that's kinda impossible in this channel π
Time to sit on the toilet and watch this channel
isn't that in error?
this channel is 2nd most active after python general i think
"FOR HOW LONG DO YOU STORE IT?" forever then right?
unless you have some system to rotate out old data, yes
Is that bad?
@shrewd apex should i send you the classes again?
for a huge production-grade bot, probably @junior verge
But it's not like it won't get verified
just send the second class u were sending before
thats because of you ashley okimii nova master32 hunter
that's up to Discord I guess, I'm just speaking generally about any application really. User data shouldn't sit there forever, especially if you don't use it
;-; i am very disciplined i always only look to help others i totally don't mislead the chat
class settings_document_admin_view(nextcord.ui.View):
def __init__(self, ctx_or_interaction, settings_data_admin, timeout):
super().__init__(timeout)
self.settings_data_admin = settings_data_admin
self.ctx_or_interaction = ctx_or_interaction
if isinstance(ctx_or_interaction, Context):
self.user = ctx_or_interaction.author
if isinstance(ctx_or_interaction, Interaction):
self.user = ctx_or_interaction.user
async def interaction_check(self, interaction):
filter_dict = {"_id": interaction.guild.id}
checka = await interaction.client.settings.find_by_custom(filter_dict)
if checka is None:
if self.user == interaction.user:
return True
else:
embed = nextcord.Embed(description=f"{config.gf_error_emoji} You are not authorized to press this button", colour=config.rot)
await interaction.response.send_message(embed=embed, ephemeral=True)
return False
if checka is not None:
role_id = checka["admin_id"]
if interaction.user.get_role(role_id):
return True
if self.user == interaction.user:
return True
else:
embed = nextcord.Embed(description=f"{config.gf_error_emoji} You are not authorized to press this button", colour=config.rot)
await interaction.response.send_message(embed=embed, ephemeral=True)
return False
else:
pass
async def unset_admin_role(self, interaction: nextcord.Interaction):
await interaction.client.settings.unset(self.settings_data_admin)```
the other one
Yeah but how would that work with a rank system?
a rank itself isn't really that sensitive I guess, so you can keep it indefinitely
Yeah, it just stores how many messages x user has sent
class settings_document_admin_buttons(settings_document_admin_view):
def __init__(self, ctx, settings_data_admin, *, timeout=3):
super().__init__(settings_data_admin, timeout=timeout)
self.ctx = ctx
self.settings_data_admin = settings_data_admin
@nextcord.ui.button(label="Delete the Role", style=nextcord.ButtonStyle.danger)
async def del_admin_role(self, button, interaction):
embed=nextcord.Embed(description=f"{config.DiscordTic} The role has been successfully removed!", colour=config.grΓΌn)
button = self.children[0]
button.disabled = True
button.style = nextcord.ButtonStyle.grey
await interaction.response.edit_message(embed=embed, view=self)
await self.unset_admin_role(interaction)```
super().__init__(CTX, setting_data_admin, timeout)
"WHAT IS THE PROCESS FOR USERS TO REQUEST DELETION OF THEIR DATA?" What about that then
whats with the caps π
None I guess with a rank system?
if I don't want you to store my message count anymore, I guess Discord wants you to make that option available to me
bro for everything just say u will never infringe privacy that way u atleast have 1% chance discord gonna grant u message content
Would that actually work lol
think like Facebook, which takes in tons of user data... they provide an option to view all that data for transparency, and also a way to delete it all
altho i still think 99.99 u won't get it discord will prolly only give it to like 3-4 big bots at max
Traceback (most recent call last):
File "C:\Users\domin\AppData\Local\Programs\Python\Python310\lib\site-packages\nextcord\client.py", line 499, in _run_event
await coro(*args, **kwargs)
File "c:\Discord\Maja Projekt\MajaSystem\bot.py", line 280, in on_application_command_error
raise error
File "C:\Users\domin\AppData\Local\Programs\Python\Python310\lib\site-packages\nextcord\application_command.py", line 848, in invoke_callback_with_hooks
await self(interaction, *args, **kwargs)
File "c:\Discord\Maja Projekt\MajaSystem\modules\setup\cog.py", line 221, in _setup_administrator_role
await interaction.response.send_message(embed=error, view=settings_document_admin_buttons(interaction, settings_data_admin), ephemeral=True)
File "c:\Discord\Maja Projekt\MajaSystem\modules\setup\buttons.py", line 9, in __init__
super().__init__(ctx ,settings_data_admin, timeout=timeout)
File "c:\Discord\Maja Projekt\MajaSystem\modules\setup\views.py", line 11, in __init__
super().__init__(timeout)
TypeError: View.__init__() takes 1 positional argument but 2 were given```
Mhh
I just want it verified that's all
You would make a command or some other way for a user to send a request, which would then delete any data related to them from your database
yeah a command makes the most sense IMO
@shrewd apex isnt it confusing?
no in the second class in the settings_documeny_admin_buttons class
u added it in that view class
i swear i never read such long names even in my history class π₯²
how is it confusing? it only takes one position argument being your instance while timeout is a kwarg?
Look at *ata's code base
I do
class settings_document_admin_buttons(settings_document_admin_view):
def __init__(self, ctx, settings_data_admin, *, timeout=3):
super().__init__(ctx, settings_data_admin, timeout=timeout)
self.ctx = ctx
self.settings_data_admin = settings_data_admin
keep in mind most people who ask for help in here have no idea how to read python tracebacks
ok now send the view class init function
Hard skill to learn 
class settings_document_admin_view(nextcord.ui.View):
def __init__(self, ctx_or_interaction, settings_data_admin, timeout):
super().__init__(timeout)
self.settings_data_admin = settings_data_admin
self.ctx_or_interaction = ctx_or_interaction
if isinstance(ctx_or_interaction, Context):
self.user = ctx_or_interaction.author
if isinstance(ctx_or_interaction, Interaction):
self.user = ctx_or_interaction.user```
discord bots are often the gateway to coding for a lot of people, so I can't blame them completely
Its not really something you blame them but you should redirect them over learning syntax only which can be detrimental for there python journey
in super().__init__(timeout=timeout) for view class
it's a keyword only argument
for sure, I never spoonfeed the answers in this channel, and I caution anyone who does
most of the time people don't want to actually learn python though, just make a bot
some of the server staff consider that redirection as gatekeeping though
Well it does depend
They are bunch of hypocrites anyways
If you redirect them and give constructive criticism i wouldnt classify it as gatekeeping
if someone comes in with no understanding of basic python, you aren't gatekeeping them by telling them to look that stuff up
more like study uppon the topic over jumping to it
more often than not it's someone who copied code from a discord bot tutorial and doesn't understand why their idea doesn't work
that sentiment is most unfortunately not shared by a few
i would say hypocrites is a strong word/statement
I was once muted for saying for f*cks sake
how can i create a temporary server invite code with my bot for a specific server
!d discord.TextChannel.create_invite
await create_invite(*, reason=None, max_age=0, max_uses=0, temporary=False, unique=True, target_type=None, target_user=None, target_application_id=None)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Creates an instant invite from a text or voice channel.
You must have the [`create_instant_invite`](https://discordpy.readthedocs.io/en/latest/api.html#discord.Permissions.create_instant_invite "discord.Permissions.create_instant_invite") permission to do this.
get the Guild you want with bot.get_guild, pick a channel and use that
Woodpile
it always does depend on context and can always be misunderstood if you feel like it was taken in the wrong context you can always report what you feel and why the mute was unnecessary
Lmao π
pip install -U discord.py, discord.py version 2 has the new discord features
Don't have that kind of time, nor care
i do agree with you tho, some mutes are quite unfair but you really shouldnt assume the whole system
does .get_guild take an integer (server id)
yes
okay
So what would I do about this
do you store message content in a DB or something?
If you dont care about it, why did you bring it up? To speak about your personal experiences, yes but its your experience so assuming the staff in pydis are hypocrites is a strong subjective statement dont you think?
yes
Yeah in a database, the server id, user id and amount of messages they've sent which is equivalent towards an xp level
Sqlite
right, but message content, the actual stuff they say
oh no
then you don't need to worry about it
Hm Robin said I had to do yes
nova has been violated i think its justified
Ok
you aren't storing message content, so that entire message in red doesn't apply to you
π
Let's move on, I can already feel someone's presence
"Can somebody tell me whats wrong with my code?"
import discord
@client.event
async def on_ready():
print(f"{client.user} logged in now!")
@client.event
async def on_message(message):
if message.content.startswith("$greet"):
await message.channel.send(f"Hello! How are you {message.author}")
elif "$thought" in message.content:
response = phrases[random.randint(0, len(phrases) - 1)]
await message.channel.send(response)
my_secret = os.environ['TOKEN']
client.run(my_secret)
!ot
Off-topic channel: #ot2-never-nesterβs-nightmare
Please read our off-topic etiquette before participating in conversations.
!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.
Sure, but then I'll do "No" for do you use message_content intent as otherwise you can't submit it
usually you tell us that and then we tell you how to fix it
im not sure whats scarier the presence of the person or the feeling that you feel someones presence
And the problem is that you are not defining client
Is server member intent also on_server_add ?
Yeah
Alright
I don't completely follow. does your bot actually need to see the message content?
no
the whole idea is discord doesn't want you to use that stuff if you don't need it. it's sensitive info
yeah i don't have that
@primal fox
I'm not sure
What's the server member intent exactly
!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.
I believe that's being able to see members in a guild @junior verge
@shrewd apex thank you very much
Even if you don't store sensitive data U.S privacy laws still require you to allow users to request data deletion
Guild Members (Server Members Intent) is used for:
Doing something when someone joins a server (Guild Member Add event)
Doing something when a member/user's data is updated (Guild Member Update event)
Doing something when someone leaves a server (Guild Member Remove event)
Getting the entire list of members in a server (Request/List Guild Members)
So I guess I don't use it then
How do you define client?
..
Do you use get_member at all or?
If you do then you need the intent for caching to work
think of it this way, would your bot still work without that intent? if so, you don't need it
Yeah I get that yes,
stupid question probably but getting their avatar?
Learn discord.py firs
I'm pretty sure that requires the intent, yes
Always helpful before doing a discord bot in python
Alright I'll try to learn
well just the simple ctx.user.avatar.url thingy
It's an attribute of User so I don't think so
Ok have fun and good luck
Thanks man
No problem
If you're new to python, check out !resources. There are lots of good and free tutorials
makes sense. I would just turn the intents off in your Discord bot settings and see if it works locally. that will answer most of your questions @junior verge
I think Zeffo is right
Okay
!resources
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
Before I'll submit do you know anything that is important that I like can't miss
I told a guy to βrun b!helpβ and h just typed βrun b!helpβ in chat πΏ
Privacy policy needs to be public for users to see
below import discord add client = discord.Client(intents=discord.Intents.all())
how?
You must also include your privacy policy when verifying iirc
Yeah ik
Post it somewhere like in a github gist
Or if you have a github for your bot, make a md
Bring okmi back bro stuff so boring in here
no one to flirt with Nova 
Where tf they go π
I am a dude
Or what?
And? π
thats why
Idc
Your point being
That's crazy

that emoji looks so gay
K thanks
I know
yeah that wont happen...
You sound very much like him
For any more questions you should join https://discord.gg/discord-developers and ask in #bot-verification
Sure
They would be able to provide way better help regarding verifications
If it's denied for some reason do they help there too?
i knew him personally but that doesnt make me related to him
Yea just ask
are u his alter ego
Seems so
Idk if I should code or play r6
why because im not flurting with everyone?

i actually have self control
alr ty bro
okimii we know its u
pray it gets verified
okimii come on ur main
Why do you want it verified so bad ππ
?
so it can be in more servers
noid does it by himself while oki got others to do it for him
Why do you wanna give discord your personal ID so bad
Ok
Alright, now another error: NameError: name 'os' is not defined
im so confused right now
import os
import os
!resources
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
noid, stop the act bro.
u cant hide forever okimi
ok
All anime pfps are the same people.
hey guys :) hows it goin here, im in the best mood i could've have rn
bro so many errors π
Why so?
idk
noid's okmi
bro im not okimii nor do i want to be him
what??
