#discord-bots
1 messages ยท Page 1141 of 1
Well, I have beers
I do prefer that but leaves is good too :3
๐ค
oh I can get that
,
,
do you think that I pictured myself in my propic with a beer for nothing? 
Setting me up to fail again.
๐
lol
,
uh.. uhm...
I shouldn't have deleted it mods are going to track it
Mods in the deleted messages 
!ot
Off-topic channel: #ot2-never-nesterโs-nightmare
Please read our off-topic etiquette before participating in conversations.
start in the init
E
โ๏ธ
also start with await self.bot.wait_until_ready()
you see mods I'm helping, don't ban me
My record is clean ***
don't worry ๐ if u get a chance to see my logs you'll be shocked
No errors though
def init(... ):
...
task.start()
Well the curious thing is that panda said that thing and then ash disappeared for real
Do you have anything to tell us?
How do you got ctx there tho?
๐ฑ
Panda eaten?
ngl i preferred the bottom.

๐ฑ
it works the other way around
Eat meh panda

Deadass lost asf rn ngl
oof
How do you get the ctx???? You pass ctx but what sorcery are you using to get it there??
No idea bro, been about 16 months since I've used anything d.py
docs say otherwise
Well since it is in a class you can.
ah yeah just checked
who uses on_ready
djs is lovely staph
Can agree.
y'all goofy af
please don't use ableist language like that
It's cool
NO
if js is lovely then py-script would not be needed
it's not
Discord.js ew

it's 5pm
siesta
wh
Man we live in the same tz
I dont even sleep at night, I'm nocturnal
the pokemon or the LoL champ?
๐ฆ
NONE
you would've been a cool pokemon
i don't even sleep, too much time wasted ewwww
Nah, I'm just a clever fox
Utc is the best time zone
if u don't sleep u will go in depres....
you mean to tell me I'm going to be happy if I waste more time
Sleeping is not wasting time ๐ก
it's time waste
Actually it is 
U know how important is sleep
do some push ups
i sleep smth like from 3 to 4 h lmao
Can confirm i sleep around 16/18 hours a day can recommend
U will be lazy all day
pandab w eer
i'm lazy cuz i'm a lazy person, otherwise i would not be a developer 
oh u don't like coding
With whom, who plays outside lol
True and fod
I bet u all have specs
Don't forget the occasional *****
why? I have my jogging game
||i'm joking||
๐ณ
do you have member intents enabled?
is that the reason why I am
Maybe
Take good sleep
I cant even fall asleep, how do i sleep
You pretend to sleep first.
!d discord.Intents
class discord.Intents(value=0, **kwargs)```
Wraps up a Discord gateway intent flag.
Similar to [`Permissions`](https://discordpy.readthedocs.io/en/latest/api.html#discord.Permissions "discord.Permissions"), the properties provided are two way. You can set and retrieve individual bits using the properties as if they were regular bools.
To construct an object you can pass keyword arguments denoting the flags to enable or disable.
This is used to disable certain gateway features that are unnecessary to run your bot. To make use of this, it is passed to the `intents` keyword argument of [`Client`](https://discordpy.readthedocs.io/en/latest/api.html#discord.Client "discord.Client").
New in version 1.5.
Close ur eyes ,relax ur body ,don't think of anything in ur mind
done that a lot, next step
Do this u will sleep in 3 minute
impossible for me
food, youtube, ||hony||, alcohol
Np you can ask anything here.
sh"" life
am I the only one who isnt able to consume alcohol ๐ rip
Good
How so?
i cant handle it
3th option matters the most anyways 
You can't drink on an empty stomach :3
bothways for me
Like 1 glass enough?
๐
Sorry ryuga ๐
You really hit him with this one ๐
Mina is my dj today
i havent slept for a day now im going crazy
you can ping a single moderator instead of pinging the complete role just to tell them that there's an OT conversation going on btw.
Itโs discord.py
thats not how you make application commands in discord.py, where did that code come from? because the docs don't refer to anything like Bot.slash_command
libraries like Disnake and Nextcord have that deco/method
I asked my friend and he just sent me that
if you are on discord.py 2.0, its called application_command
well then they sent you wrong code. I'll suggest to look into the docs yourself
I never know who to choose then lol
Oh alright, Iโll read the docs
Brad always
or luna
there's a pin with a guide on app commands in this channel
๐งข
cheeki
did you mean mina?
Luna is an underrated mod
Luna likes capybaras so i love her, Brad is a pretty cool mod and mina is the best admin besides capybara chrisjl๐ณ
okimii likes capybaras but they don't like him
mina is currently providing me music ๐
anyways, bye before someone pings mod role for mo reason again
they love me, like i love you๐
vc?๐
๐
spootify
oh yeah spotify has group stuff iirc
yep lol
is there a benefit for making an asyncio.sleep task, rather than just having asyncio.sleep built into a command?
depends on how long you are going to run it for really.
Hello I created a cog but it is not working when I added it to the main.py
AdminCog = bot.get_cog(admin(bot))
AdminCommands = AdminCog.get_commands()
print([c.name for c in commands])
so like have rather than have a mute command have asyncio.sleep, have the mute command create_task which runs a function that has asyncio.sleep in it
if that makes sense
how would that be different than asyncio.sleep in the main function itself
Mute command with sleep ๐ถ
well I could cancel the tasks specifically
it will be indeed useless because create_task won't wait for the function to fully execute before executing the next line.
ik, sounds outdated, but long story
guys
s1 = await client.wait_for('message')
content = s1.content
num = int(content)
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: ValueError: invalid literal for int() with base 10: ''
if i type number in message also this mistake
It's not outdated it's more that if you restart the bot the person will never get unmuted.
no the task that is created, has sleep in it.
thats not how tasks work.
well yes because on startup the delta calc'd from the database for the mutes are checked to see if people need to be unmuted
@commands.command()
async def hello(self, ctx, *, member: discord.Member = None):
await ctx.send(f'Hello {member}!')
He means asyncio.get_event_loop(), loop.create_task(coro)
I believe he's saying he's going to create_task a different coro which handles all the logic (including the sleep)
This command wont work
correct
Hmm.
can someone help me out this code wont work whenever I type .hello
@commands.command()
async def hello(self, ctx, *, member: discord.Member = None):
await ctx.send(f'Hello {member}!')
Im using a COG
Whenever I type .hello instead of saying "Hello SuperbadAK47"
it says "Hello None"
You need to ping a member
asyncio.create_task(timerfunction(arg)) sorta thing
Well since you didn't specify a user, what would you like it to do if you don't pass one?
if you need to cancel them for some functionality then this makes sense, otherwise I can't see a reason to do so
This one.
So...? What would you like it to do if you don't specify a user?
Well a small issue.
say I wanted to end the mute early, then id have to go about it like that right
what Im trying to make it do is say if I type .hello then it says Hello SuperbadAK47
cancelling the task won't unmute the user though
create_task will just execute the coro without waiting for a result....
Use the or operator to determine what variable to use.
If you donโt want them to specify a user then you can remove the member arg
!e ```py
import time, asyncio
async def foo():
time.sleep(5)
print("why no wait")
async def main():
asyncio.create_task(foo())
print("didn't wait")
asyncio.run(main())
@slate swan :white_check_mark: Your eval job has completed with return code 0.
001 | didn't wait
002 | why no wait
@commands.command()
async def hello(self, ctx,):
await ctx.send(f'Hello {ctx.author.mention}!')
the line after create task got executed before the print in foo()
I don't see a point of using it then.
Yes but you can remove that comma
unless that's what you want
yeah but I rly on foo to do the resk of the task after the sleep
not main, so thats not an issue
if you' don't have anything else to do in main then whats the point of creating another task...
Im just thinking if I cancel the sleep if I want to remove the certain role of a user early until waiting for the task to end, I could cancel the task, and then remove the role straight away?
so I can cancel them specifically
makes sense, well yeah thats what you want then
alright cheers
Anyone wanna help? and not just send me a link do docs lol
Im trying to pull description and image from a embed and post them as a tweet via tweepy....
this is what im thinking ive tried a few things
@client.event
async def on_message(message):
if message.author != client.user and str(message.channel.id) ==discord_channel_id1 :
img = message.embeds[0].image.url
embeds = message.embeds
api.update_status(img, status=embeds)
print('Tweet posted from channel 1')
I can get message content to post but i need embed description and image pulled...
heres what i have working for message content
if message.author != client.user and str(message.channel.id) ==discord_channel_id2 :
api.update_status(status=message.content)
print('Tweet posted from channel 2')
How do I use @commands.has_permissions inside a cog
img = message.embeds[0].image.url
desc = message.embeds[0].description
thank you
Also make sure you have message intents enabled or message.embeds will be empty
i havent used tweepy much, so trying to pull from a embed is different form making a embed...
i assume then
img = message.embeds[0].image.url
desc = message.embeds[0].description
api.update_status(img, status=desc)
or does tweepy need something like this (status=img, image=img)?
intents are on as well.. thanks
I believe you need a local file to upload an image using tweepy
api.update_status(download(img), status=desc)
``` I would suggest making a function that downloads the image from the url which returns the image directory
so each image would have to be downloaded?
im lost here lol im not super expirnced but i have mutiple bots under my belt .... just never used tweepy like that so learning the docs
import requests
def download(img):
img_data = requests.get(img).content
with open('download.png', 'wb') as handler:
handler.write(img_data)
return 'download.png'
70 percent sure
not too experienced in tweepy tho
can anyone help me with this?
thank you this helps... im still lost a bit tho lol
i have a question
@bot.command()
async def mute(ctx, user: nextcord.Member, time : int):
role1 = ctx.guild.get_role(985475444981764106)
role2 = ctx.guild.get_role(985205310740389918)
if ctx.author.guild_permissions.administrator == True:
await user.remove_roles(role2)
await user.add_roles(role1)
await asyncio.sleep(time*3600)
await ctx.send(f'{ctx.member.mention}is now muted')
await user.remove_role(role1)
await user.add_roles(role2)
else:
await ctx.send("you are not administrator noob.")``` why wont it add again the role? like the asyncio.sleep thing doesnt work correctly.
do you guys have an idea?
and nothing other is in the console
Firstly, i would recommend puting the ctx.send before the asyncio.sleep otherwise it will wait until the time is over to send the message
Secondly, asyncio.sleep uses a second interval
what does that mean
1 second * 3600 is 60 minutes
so you are waiting an hour
https://cdn.discordapp.com/attachments/343944376055103488/995000065326334113/unknown.png
I've got an error but im not sure how to to fix it
yes
i want that the mute command unmutes the user again. like !mute @swift pumice 1
that it mutes me for 1 hour
and are you waiting the hour?
wdym
Well you are sleeping for an hour
when you are running !mute @Elias(ping when reply pls) 1
so you would have to wait an hour
for it to unmute them
seems a bit excessive waiting an hour
lmao
user.remove_role(role1) that is your problem
wait why?
user.remove_roles(role1) should be this
omg
like the rest of your code
does anyone know if the discord.commands module actually exists
i hate my self for that
dw took me a while to figure that out myself lmao ๐ญ
always the simplest thing when it takes hours
No but discord.ext.commands does
discord.ext.commands
whats best discord py slash commands module
dpy 2.0
discord.py 2.0
ok clear winner
Option is not a dpy class object
so it dosent exist
It does in another library don't know which one rn.
some guy was using that and now hes not responding to dms
lmao
only in pycord.
which i won't recommend using, just stick to discord.py
๐คข
Hi suggest me a plugin for discord modals (inputbox)
class discord.ui.Modal(*, title=..., timeout=None, custom_id=...)```
Represents a UI modal.
This object must be inherited to create a modal popup window within discord.
New in version 2.0.
Examples...
Whatโs a modal 
it's a dir innit
discord.py has all of them. you dont need any external plugins
just install the dev version from github
how do install pycord
not even without the typo
why do you want to use pycord instead of discord.py, any reasons?
its app_commands anyways
the bot this guy wrote uses pycord

I don't remember it as that
how do i install it
rapptz ?
Pip install pycord probs
Yes
pip install py-cord=version
!d discord.app_commands.command
@discord.app_commands.command(*, name=..., description=..., nsfw=False, extras=...)```
Creates an application command from a regular function.
pip install git+raptzzgithublink
ok and where I find the documentation for example
!d discord
In order to work with the library and the Discord API in general, we must first create a Discord Bot account.
Creating a Bot account is a pretty straightforward process.
docs link^, you can find example in the github repo
okay thanks
from discord.ext import commands, tasks
ImportError: cannot import name 'commands' from 'discord.ext' (unknown location)
!d ImportError
exception ImportError```
Raised when the [`import`](https://docs.python.org/3/reference/simple_stmts.html#import) statement has troubles trying to load a module. Also raised when the โfrom listโ in `from ... import` has a name that cannot be found.
The `name` and `path` attributes can be set using keyword-only arguments to the constructor. When set they represent the name of the module that was attempted to be imported and the path to any file which triggered the exception, respectively.
Changed in version 3.3: Added the `name` and `path` attributes.
Are you using py-cord?
Yes i think
Yeah they don't have the structure like that.
i was testing something and i don't need it so im not sure how to remove it
any chance you could help me?
im trying to create a custom .help command but whenever I type it then it brings the built in help command. How do I overwrite it?
bot.remove_command('help')
that's also a way to do it yeah
or while defining bot you can do bot = commands.Bot(<ur stuff>, help_command=None)
if you have a command for your help command, you can pass it directly there as well
@commands.command()
async def my_help(...):
...
bot = commands.Bot(..., help_command=my_help)
or you can overwrite the namespace

I was reading this guide: https://guide.pycord.dev/interactions/ui-components/dropdowns/
Code:
import discord
bot = discord.Bot()
class MyView(discord.ui.View):
@discord.ui.select( # the decorator that lets you specify the properties of the select menu
placeholder = "Choose a Flavor!", # the placeholder text that will be displayed if nothing is selected
min_values = 1, # the minimum number of values that must be selected by the users
max_values = 1, # the maxmimum number of values that can be selected by the users
options = [ # the list of options from which users can choose, a required field
discord.SelectOption(
label="Vanilla",
description="Pick this if you like vanilla!"
),
discord.SelectOption(
label="Chocolate",
description="Pick this if you like chocolate!"
),
discord.SelectOption(
label="Strawberry",
description="Pick this if you like strawberry!"
)
]
)
async def select_callback(self, select, interaction): # the function called when the user is done selecting options
await interaction.response.send_message(f"Awesome! I like {select.values[0]} too!")
@bot.command()
async def flavor(ctx):
await ctx.send("Choose a flavor!", view=MyView())
bot.run("TOKEN")```
But i have a error, AttributeError: module 'discord' has no attribute 'ui'
whats wrong?
Learn all about implementing Select Menus or Dropdowns in your Discord Bot with Pycord.
install the new-er version
i will try
pip install py-cord=2. something
cause the default one points to 1.7.3, weird stuff as always.
or use discord.py 2.0 
i don't get the point of the changes that pycord makes.
they are all useless!
stupid computer๐
idk actually
it doesnt work
i will look documentation๐
how would i go about making this:
prints a random number, makes a user input the number, gives a role to the user if the numbers correct?
if that makes sense๐
!d random.randint
random.randint(a, b)```
Return a random integer *N* such that `a <= N <= b`. Alias for `randrange(a, b+1)`.
What have you got so far?
๐
I have to make a progress bar sort of in an embed, any ideas on how to implement it?
embed.add_field(name="Utilisateurs :", value=f"{self.bot.guild.member_count:,}", inline=True)
Error : AttributeError: 'Bot' object has no attribute 'guild'
Hello, i have this error when i try to make the bot show how many user the bot have. If you want the whole code : https://paste.pythondiscord.com/uyomeqisok
Thanks !
ctx.guild.member_count
just do len(self.bot.guilds)
!d discord.ext.commands.Bot.guilds
property guilds```
The guilds that the connected client is a member of.
i want to have the count of users cumulative (server 1 = 8 users, server 2 = 7 user) and i want the bot to show me 15 users
members = 0
for guild in self.bot.guilds:
members += guild.member_count
print(f'{guild.name} = {guild.member_count} users')
ew

!d discord.ext.commands.Bot.users returns the user objects of all the users bot can see
property users```
Returns a list of all the users the bot can see.
sum(x.member_count for x in self.bot.guilds)
Does this also account to how many members in each specific guild?
Ashley โ Today at 20:51


is there a way to get old messages from a user longer than 2 weeks ago?
for guild in self.bot.guilds:
print(f'{guild.name} = {guild.member_count} users')
print(len(self.bot.users))
are you happy now ๐ญ
_ = [print(f"{guild.name} - {guild.member_count} users") for guild in bot.guilds]
one liners โค๏ธ

(_:=[print(f"{guild.name} - {guild.member_count} users") for guild in bot.guilds])
hear me out
You don't need to assign it to a variable if you just want it to print
regarding previous question, made adjustement so it now gives out a random number -
@bot.command()
async def verify(ctx):
message = await ctx.send('React to verify!')
await message.add_reaction('โ
')
def check(reaction, user):
return reaction.emoji == 'โ
' and reaction.message == message
reaction, user = await bot.wait_for('reaction_add', timeout=30.0, check=check)
await ctx.send(f"Please type the number {random.randint (10000,99999)}")
Now how do i go about taking the user input and determining whether its the right number or not?
It'll be a list of None anyways
i think everyone already knows that print doesnt return anything๐ฟ
and bro its a joke๐
!d discord.ext.commands.Bot.wait_for
wait_for(event, /, *, check=None, timeout=None)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Waits for a WebSocket event to be dispatched.
This could be used to wait for a user to reply to a message, or to react to a message, or to edit a message in a self-contained way.
The `timeout` parameter is passed onto [`asyncio.wait_for()`](https://docs.python.org/3/library/asyncio-task.html#asyncio.wait_for "(in Python v3.10)"). By default, it does not timeout. Note that this does propagate the [`asyncio.TimeoutError`](https://docs.python.org/3/library/asyncio-exceptions.html#asyncio.TimeoutError "(in Python v3.10)") for you in case of timeout and is provided for ease of use.
In case the event returns multiple arguments, a [`tuple`](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.10)") containing those arguments is returned instead. Please check the [documentation](https://discordpy.readthedocs.io/en/latest/api.html#discord-api-events) for a list of events and their parameters.
This function returns the **first event that meets the requirements**...
sorry, still learning so please may you explain what this would be for? User input?
msg = await client.wait_for('message', check=lambda message: message.author == ctx.author)
imagine being such a bitch ๐
seems like something you would do
zeffo be like๐
so this takes the input from the user and checks the number or just takes the input
this waits for a message from the command author
i see
and then sets the message as a variable
msg = await client.wait_for('message', check=lambda message: message.author == ctx.author && message.content == str(randomint))
``` in your case this would be useful
This waits for a message that is by the command author and is the random int you generated
i see, thanks for being patient with me and I appreciate the help๐
isn't it and, not &&?
&& doesn't exist in python
&& is c
It returns None, which isn't "nothing"
oh come on
that's why I like js
yeah lol ive made that mistake too
too skilled๐
ok and
imagine
Nothing else, just that
alright thank you for the info
no thanks
what if, i give my bot's token but in random pieces
what are the chances
im pretty sure theres some pieces that you shouldnt show or something like that
any how you shouldnt show any piece of your token anyways
๐
You don't need to worry about the first two parts of your token, that'll be your discord ID, and your discord epoch
I okimii give you a kiss every time
The last part is the actual authentication piece of the token that discord checks
no-
yeah no thank you
Suscord
so from what char? iirc tokens are 52 chars long so from which char is used to authenticate your token? so from which char position
i guess the special character differentiate them
As I read from wikipedia last part of token is a sort of hashsum
why does ... turn to .?
after the second .
let me leak my token๐
Fun fact is my id ends with 666 ๐ณ
daam i guessed it right lmao
Imagine calling ... as ... ๐
127 moment๐
Type is ellipsis
struggling with an indentation error on that last line, would appreciate help again๐
bot.command()
async def verify(ctx):
message = await ctx.send('React to verify!')
await message.add_reaction('โ
')
def check(reaction, user):
return reaction.emoji == 'โ
' and reaction.message == message
reaction, user = await bot.wait_for('reaction_add', timeout=30.0, check=check)
await ctx.send(f"Please type the number '{random.randint (10000,99999)}'")
msg = await client.wait_for('message', check=lambda message: message.author == ctx.author and message.content == str(randomint))
Oh ignore that I read your message wrong
.? in C# is basically not null check but this isn't C# ๐ค
can you typehint a list like that?
you can, pyright is acting weird
only tuples afaik
im pretty sure that was only for tuples
yeah you cant do that for lists
The heck is that anyway
Ellipsis for me is 0
ewww
in tuples if you have a certain amount you would need to typehint it with that amount, if it will be mutated or unknown just use ellipsis
imagine typehinting 100items
imagine not doing that
bro
for list u need to use Union for multiple items Union or Optional iirc
yep
Optional*
Tuples are immutable though
@commands.slash_command(name='ban', description='Ban users')
async def ban(self, ctx: disnake.ApplicationCommandInteraction , user: disnake.Member, *, reason):
if ctx.permissions.ban_members :
await ctx.guild.ban(user, reason=reason)
await ctx.send(f"{user} has been successfully banned.")
else :
embederror = disnake.Embed(title="Error", description=f"{ctx.author} You are not admin on this server")
await ctx.send(embed=embederror)
Error - forbidden: 403 Forbidden (error code: 50013): Missing Permissions
i forgor
It'll just be for arbitrary amounts
or you can use | for typehints
the error explains pretty much what the problem is
bruh my bot has perms
role position
make sure that the bots highest role is above the user that you are trying to bans highest role
hmmmmmm ok
optional or union looks more elegant
also, this wont work on guild owners
pipes over Union
imagine trying that
role higher archy
ew no
bot overthrows the owner
imagine importing a library just to t.Union
imagine having a 3.10 interpreter
you see me here running python 2๐ณ
sarths poetry ;-; it has 3.9.7
try python 1
i didnt change since
be a real programmer, use assembly
- <3.9 < 3.11
Just, future.annotations?
thats because poetry is very strict when it comes to dependency versions, unlike raw pip
it has been added in 3.8 so
who tf uses 3.7 in 2022
even replit uses 3.8.2
lmaooo
ok
rust asm, les go
py_print_impl hmmmmm
๐ณ
after looking at js, that doesn't seem weird to me at all
That is acceptable math notation
when do you encounter strings in math?
so for julia we do string *= to add?
if were going by math wouldnt that just multiply the length of the string?
struggling with an indentation error on that last line๐ Any ideas?
bot.command()
async def verify(ctx):
message = await ctx.send('React to verify!')
await message.add_reaction('โ
')
def check(reaction, user):
return reaction.emoji == 'โ
' and reaction.message == message
reaction, user = await bot.wait_for('reaction_add', timeout=30.0, check=check)
await ctx.send(f"Please type the number '{random.randint (10000,99999)}'")
msg = await client.wait_for('message', check=lambda message: message.author == ctx.author and message.content == str(randomint))
multiplication of strings?
there's add too
its not this, idk how to explain but i want that the code returns me all the users the bot is in touch : example, 3 users in server 1 + 5 users in server 2 = the code return me 8 users
js is lovely
js === love
len(self.bot.users)
zeffo is so smart its crazy, he probably knows calculus๐คฏ
len(bot.users)
calculus isn't hard, geometry is ๐
๐ All i ever enjoy is sleeping, javascript, eating, crying and you
or i just dont like it and dont study
Iโve played my fair share of geometry dash though
mutual feelings
how is geometry hard bro its just some shapes๐
woah 
- @slate swan thanks you have a good evening
geometry is ezz๐ผ
You too
dork, no
he he smart ryuga
sleeping?
im talking about stuff like vectors
nova down bad bro
yeah things done rarely are enjoyable
wait for 3d geometry
which includes vectors and calculus as well.
dont make me not take math again
you have a job right 
Fr stay away from his twitter
i havent token math in 3 years and now im going to 10th grade๐
๐ am i that rare
he should right a book
rip my discord
@grim oar write a book bro
right ๐
at least you dont hate me unlike everybody else ๐
right
i need sleep, i havent slept in like 25 hours๐๏ธ๐๏ธ
@slate swan why aren't u green
woah..
racially motivated ash
uncalled for
absolutely me, I dwell from the race of ghouls
or maybe
lemme escape before sparky pings mods
must be late there
๐ ๐จ
farting...?
When in the name of fuck did I write that
Lmaoo
nova denying his love to zeffo now
I am being defamed
bro we all know you would do something like that
You don't know what and when you do things for love -Some random ass
I have standards
oh i bet๐
zeffo happens to meet em
down bad nova, down bad
I always knew this server's bots had a screw loose
nah i think its you bro
No
no need to be shy be bold ๐
!rule 7
7. Keep discussions relevant to the channel topic. Each channel's description tells you the topic.
Thanks brat
๐คฃ
ash mad she doesnt get any poems
Ahahah
lmao
weird flex but ok
mutual feelings
die on okimii?
aww
that gave me a stroke, dont listen to me im more sleep drunk than any one here๐ญ
except me
That shows dw
guys stop simping over me. i dont wanna die later ;))
gotta fly some colors perhaps
homiephobic comment
why do I see black spots in my eyes from the past hour or is it normal
thats your pupil bro
present in the eye.
cataract my bad
isnt cornea the clear top on top of the pupil
smh anything
the breeze would be so good ngl
cornea is the outer covering yeah?
protects the eye
That's like free ticket to vet my guy
nvm
and bends the light rays
nova you should go to the vet
and not as an employee
Ok i will go as a customer
lmao
pets dont pay for their visits
their owners do, so zeffo would pay
๐ฅ
crorniea does that tii iirc
waiting for comeback
Free service perhaps?
couple
Couple
ok
thats the role of the lens primarily cornea should only bend slightly coz light travels to a diff media from air to eyes
why my bot no works
ejrowkejf okay
nova like Albert Einstein said, time is irrelevant, but your all of my time๐
ps: cornea is a rarer medium and it bends light yes
bro did the comedy
it seems everyone has anime girl pfp now๐
cornea is denser bro
guys this is a discord bots channel not a Optometrists center
Yeah I am an e-girl uwu
so it will bend towards normal
Get back to discord bots 
Mine's bended towards not normal since birth
If you know what I mean
nova stop making an excuse to cover up that you cant read
alr cool
noone wants to help
why dont u
I will take that into consideration
ok, have a nice day
It's midnight
idc
So rude
youre the rude one saying night is mid
gn
gnnnnn
gasnight
๐

h*ta ong
i tried it, it raised an error discord has no attribute Bot
delete kali
thats your issue
the docs are cursed ๐
what do you use
?
i dont use any os
It wants your attention, just like okimii
code in ram?
The entire server is cursed, half the population is elitist pedophiles
oki got it
woah
tehe
never been there, i just tried it for 2 minutes and got fed up of the lib
can't expect much from houtou fanbase ong
ok
?๐
dwayne johnsons?
yup
add a tab, so that its just under that await...
sus
i love dwayne the rock johnson
> Enters #discord-bots
> Literally talking about anything other than discord bots
> 
ok
you like to do stuff that you are good at, dont you?
check your indentation
am good at sleeping
with me
but cant
sorted, thanks
idk why but half the water came out of my mouth reading that, brb
this guy gets it
you basically choked on water
๐
i got something to choke on
pathetic
bread
me
bread is better

#discord-bots btw
bread > anything
bro thats illegal
๐คจ


ok
that came oit wrong nvm
lmaooo
fuck spotify
i hate it
sad, why?
too many fucking ads
use adblocker ๐
i just played a song and it played a completely song
you missed out, yesterday there was a ot channel named too-poor-for-spofity
when you start vibing to ads, they dont bother you
use brave mehhh
we dont talk anymore
use ublock bro
spotify's ui for me is horrible its confusing and horrible, reason why i use youtube
what ads you getting ๐
it also appears that today, we have a new ot channel named discord-bots
get good
i have the poor dude laying their doing nothing
i use soundcloud
Use extensions on chrome my dude
maybe get a better ui
discord.ui ๐
stop
bro brave is chrome and chrome is uh
pip install git+https://github.com/Rapptz/discord.py
What os is that
my exts crash when i watch yt lmao
youtube ewwwwwwwww, youtube music >>>
kali with xfce
Collecting git+https://github.com/Rapptz/discord.py
Cloning https://github.com/Rapptz/discord.py to c:\users\music\appdata\local\temp\pip-req-build-kira7cqx
ERROR: Error [WinError 2] The system cannot find the file specified while executing command git version
ERROR: Cannot find command 'git' - do you have 'git' installed and in your PATH?
WARNING: You are using pip version 22.0.4; however, version 22.1.2 is available.
You should consider upgrading via the 'C:\Users\music\AppData\Local\Programs\Python\Python39\python.exe -m pip install --upgrade pip' command.```
uncalled for mid statement
what the fuck is wrong with you
install git
what
sorry to be dumb is it pip install git
Hacker boi
if nova was a distro i would format my drive
its a clean installation with just basics so meh
ty
We bring the awesome Git VCS to Windows
Did you copy that quote from Instagram by any chance
same question
includes gedit, thunar, and few xfce applications
Do you have half a brain or smth
nope was just on the top of my head
youtube music???
youtube is understandable
what one sdk or other
clearly
I mean it's gud I said that cuz cool hecker bois use that mostly!!
yes youtube music but spotify ftw soooio
Seek Jesus then
idfk, havnt gone through the trouble of installing git in a while
so would this be right?
reaction, user = await bot.wait_for('reaction_add', timeout=30.0, check=check)
await ctx.send(f"Please type the number '{random.randint (10000,99999)}'")
message = await bot.wait_for('message', check=lambda message: message.author == ctx.author and message.content == str(random.randint))
await ctx.send(f'Verified {user.mention}')
ok
didnt ask for the opinion thanks
๐ฟ i use that only because i was too bored of windows and it matched my aesthetics

ash dont bully ppl pls
Use window managers bro.
probably
as in if the user enters the right code will it print that?
only thing i hate about windows is not deleting every dir related to a package
Not like I have phd in them but they are good imo.
me after using wsl, "im ready for arch"
Like I care soooooo, just opposing
kali makes me wet
le windows server executable consuming 1.5gb ram
bro what
linux is not as hard as it seems tbh.
windows malware executor takes 1.2gb at the max iirc if you dont configure the settings for it
fr
do it ๐ซ
Window managers bro, not the windows operating system
do it with me
you first
like leave the server bro
snipping tool just fucking murdered my pc
what are you running 16mbs of ram?
ya im gonna dual boot soon
You are using xfce which is a desktop environment!!
gb*
my sentence is correct
chrome, pycharm and discord running
oh wait, nvm
Thats why, you use chrome
my bad yeah i had it configured but removed it cause my laptop comes with just โจ 3.8 โจ gbs of ram
which im somehow able to use with a 3gb swap space
took me like fucking 5 minutes to take this screenshot and its irrelevant now

WMs are far far more efficient than DEs, you would get a performance boost with those
discord go brrrrrr
ew
Let me show mine's usage
4gbs with windows is painful, i had to use fedora and i knew 0 things about os so i didnt have the best of times
hi
no
I love discord bots
hi ๐
help with my import problem when
i have up down left right buttons
is he gone yet
yes
Love discord api
i added the reaction dw
WHY IS SPOTIFY ADDING TO MY PLAYLIST
FUCK YOUUUUU
chill harvs
why are you guys scared of mods
? they are nice and kind people

run this code
def a():
try: a()
except: a()
a()
it will fix your issues
you cant lol
are you using spotify mobile or something?
only brad is
called them fat and got banned for a month
cause lets stay at the topic
yes
!ot
Off-topic channel: #ot2-never-nesterโs-nightmare
Please read our off-topic etiquette before participating in conversations.
hey all, let's bring it back to discord bots
Yes
who run their lovely !mute and !warn โค๏ธ
.topic
Suggest more topics here!
if i had one, i wouldve probably made it by now ๐
if you are doing evals for that, you basically have your command mostly done no?
are you literally not allowed to put what song you wanna listen too on spotify mobile
Why would you even use that thats an utter trash idea bro
ya, just copy paste and make it look pretty
Yes
not really
it's just a bot with an eval command ๐ i use that for testing stuff
you can lock the whole guild so your whole guild doesnt get ratelimited on a raid and so you can actually remove the raiders
Any ideas on what discord bot to code 
I am talking about the bald eval
ok
try making a 2048 bot
Render the game board using ansi
Predicts if you die in 2048 or no
2048 AI in discord bot
run cyber punk on a discord bot
Probably would run on it considering how shit it is
oh, broadcast twitch stream
Would cloud gaming run on a discord embed?
1 fps embed edit moment
Like audio playing through vc and embed with constantly changing screenshots
do it
Gaming
Is that the limit
no
edit message ratelimits is 5/1s iirc
just sync them
What does that mean
5 edits per second
yes sync audio
5 request can be done in a 1 sec time frame
and its a dynamic ratelimit
Whatโs the limit of messages per sec or is it the same
iirc its the same idk
5 fps per second, still faster than okimii's brain
Itโs the same as POST which is 5/5s
my brain is faster by one frame
ok
Spotify is telling me to join the navy
do it
Iโm listening to tally hall, does it really think I could hold a gun
Hold my

an ad popped up right now, right?
Yes
i knew it
!rule 7
7. Keep discussions relevant to the channel topic. Each channel's description tells you the topic.
aight adios, imma make micro-optimizations ๐
When I'm adding buttons when sub classing discord.ui.View can I do this? py class PersistentView(View): def __init__(self): super().__init__(timeout=None) # Add the base dropdown to the view self.add_item(AlphaDropdown()) for link in links.links: self.add_item(Button(link.label, link.url)) or do I need to do this? ```py
class PersistentView(discord.ui.View):
def init(self):
super().init(timeout=None)
@discord.ui.button(label='Green', style=discord.ButtonStyle.green, custom_id='persistent_view:green')
async def green(self, interaction: discord.Interaction, button: discord.ui.Button):
await interaction.response.send_message('This is green.', ephemeral=True)```
you can do a classic for loop
okay thank you ๐ (sidenote I've got so used to using MS Teams I keep doing ( not : to bring my the quick emoji menu
)
most works, but when i enter the code i am not given an output. Any idea?
@bot.command()
async def verify(ctx):
message = await ctx.send('React to recieve your code!')
await message.add_reaction('โ
')
def check(reaction, user):
return reaction.emoji == 'โ
' and reaction.message == message
reaction, user = await bot.wait_for('reaction_add', timeout=30.0, check=check)
await ctx.send(f"Please enter your code below. Your code: '{random.randint (10000,99999)}'")
message = await bot.wait_for('message', check=lambda message: message.author == ctx.author and message.content == str(random.randint))
await ctx.send(f'Verified {user.mention}')
async def mute(ctx, user: nextcord.Member, time : int):
role1 = ctx.guild.get_role(985475444981764106)
role2 = ctx.guild.get_role(985205310740389918)
#print(ctx.guild.me.top_role > ctx.author.top_role)
print(ctx.guild.me.top_role > user.top_role)
if ctx.author.guild_permissions.administrator == True:
await user.remove_roles(role2)
await user.add_roles(role1)
await ctx.send(f'{ctx.member.mention}is now muted')
await asyncio.sleep(time*60)
await user.remove_roles(role1)
await user.add_roles(role2)
else:
await ctx.send("you are not administrator noob.")``` hi guys do you guys know why this isnt working? what i mean by that that it stops working after the 2nd await, like it doesnt send the message nor removes the role
gift me the subscription next time, I'll make sure to use colons ๐
get_member(user_id, /)```
Returns a member with the given ID.
Changed in version 2.0: `user_id` parameter is now positional-only.
!d discord.Member.roles
property roles```
A [`list`](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.10)") of [`Role`](https://discordpy.readthedocs.io/en/latest/api.html#discord.Role "discord.Role") that the member belongs to. Note that the first element of this list is always the default [โ@everyone](mailto:'%40everyone)โ role.
These roles are sorted by their position in the role hierarchy.
if thats what you want by checking a users role in a specific guild
i use bot in server Python official and i want to check user's role in other server
options=[create_option(name="humour", description="ur name", required=True, option_type=3)])``` how do i do multiple of these
how to do it?
u cant
i dont think
well
options=[create_option(name="humour", description="ur name", required=True, option_type=3)])``` how do i do multiple of these
still struggling with role adding, so would this work?
#test
@bot.command()
async def test(ctx):
guild.get_role(993231458846122014)
bot.add_roles(993231458846122014)
(and if not would appreciate if you pointed out what im doing wrong)
๐ฟ selfbot?
discord.errors.HTTPException: 405 Method Not Allowed (error code: 0): 405: Method Not Allowed
the endpoint you're using is not allowed by discord for your token
No, it is a discord bot.
I've just created it, maybe I forgot to add something in the developer portal?
did you invite the bot with application commands scope?
I've managed to fix it, but now I have this error:
Ignoring exception in on_connect Traceback (most recent call last): File "C:\Users\renzo\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\client.py", line 352, in _run_event await coro(*args, **kwargs) File "C:\Users\renzo\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\bot.py", line 793, in on_connect await self.register_commands() File "C:\Users\renzo\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\bot.py", line 338, in register_commands to_update = update_guild_commands[guild_id] KeyError: 995046874396512297
It is pycord.
yeah, when did you update it for the last time?
any ideas if this is right? still struggling with a role command๐ฉ
#test
@bot.command()
async def test(message):
user = message.author
role1 = guild.get_role(993231458846122014)
user.add_roles(role1)
No idea, what is the newest version?
idk i never use pycord
await user.add_roles
Slash commands feel easier with pycord
well, i agree that it seems easier,
but as you can see the library tens to act weird often
is that all the code you have rn>
Attribute error: 'int' object has no attributes 'get_role'
๐ง
if yes, i'd suggest using disnake which has an easy syntax
guild variable is a number, which should be a Guild object
sorry, i don't understand exactly. what do you mean?
guild there is an integer 1234455343. which should be this object:


