#discord-bots
1 messages · Page 766 of 1
15.4k messages in bapo

My cpu isn't rated for 3200mhz anyway
what gpu and cpu you have
oof
rx570 (8gb vram) and r5 2600
your joking right?
What
😭
Why
a rx570 what do you run games on your cpu😭
😭
And halo mcc
dang that poor gpu
¯_(ツ)_/¯
I have good airflow
Might need to repaste soon though. Today I reached 76c max in game
and its in the rug
you should buy a new gpu is what you need to do😭
Market is top tier shit rn
is the pebblehost discord hosting any good?
I got my card for $80 cad
meh not bad
Repasting is going to be fun
you should buy a prebuilt like i did
No
only did for the gpu
Why would I buy a prebuilt if I'm fully capable to build my own?
be smort like me buy it for the gpu an change everything else
Not really smart considering you're just buying a bucket of ewaste just for the gpu
im gonna buy new ram an cpu cooler one fan
You should join the bapo discord
i got it for 12005 has a r5 3200 3060 16gb ram and 1tb of hdd storage and a 500gb m2ssd
A lot of interesting people there
when I bought my GPU almost 3 years ago... people were telling me to wait
and it's still worth the same today than it was back then
which
2070
Damn you got scammed
not really
yes really
nope
How many ram dimms?
how many dimms the board has?
4 ofc
im running dual channel as well
4x4 is pretty unsellable at this day and age
and i have a 3tb hdd i just need a sata cable so i can have 4.5tb
im not sure what you ment i ment like 4 slots of ram
How many ram sticks
I'm guessing 1.2k usd?
Why though
that have rgb for more fps of course
Just get light strips if you want rgb
so i can have 4sticks and 32gbs
ew no
Then buy a 2x16 kit
no
Less stress on the memory controller
Are you actually planning on buying that?
yes
Are you actually using the ram?
no
Then why buy it?
the homework folder😳
🏃
im joking some apps take allot of ram sometimes but im not rushing the ram tbh
i have to save first for a new chair and desk
wow but why
why not🏃
not bad
I found the receipt ~
lovely
Just bought a new mouse pad
now a 2070 cost like 8k
nice which
wth
mp510 xl
I ordered the glide 38 and then realized I fucking hate hard mouse pads
Would not recommend
i wanna see the glide
i said to try lol im not gonna buy one
which mouse
Razer basilisk x hyperspeed
mhmmmmm
Old mouse was the g502 hero
wired to wireless
The whole reason I got this razer mouse was because I really enjoyed the shape of the g502
yeah the same shape but the razer one looks cleaner
Cuz no wire
and detail
Also this one has no rgb but it literally does not matter because even if it did have rgb your hand would be blocking it
no bro
rgb means more fps
I could upgrade my build if I want to
I currently have more money to spend than the build is currently worth
gpu outage tho
The only part of my build that I would upgrade is the gpu
yes
If we get lucky we will be able to do that in q3 2022
only if
I'll say it again in case there are new people reading
has anyone tried a trading bot?~
I did one once
nice
but it would be nice to have someone to talk about it
ikr
all I find are crypto scammers (?
dang
Anyone got any ideas on some commands I could make?
daily stock prices
For what?
gpus
somehow my command isn't working. Every time I attempt to to run the help command from cog it doesn't work. If anyone could help me I would appreciate it.
have you loaded the cog
yup
Smart
yes
not sure how groups work tbh
I'll try and find an api
why you even need a website for things you can do in few seconds
all g
it previews how it will look
alr
omg thats a thing
thats kinda funny and useless
ok i will stop using it
no you can but you should learn to do it yourself
how tf you disable the button after being used one time if you put disabled = True it will just send it disabled
read that again
what
you mean it send a new button thats the same but disabled?
im not sure what you mean tbh
i mean, i want the button to disable after being used or after the timeout
what's hard to understand
you answered yourself
.disabled = True

and when you disable it just update the view
yes but if i pass this it will just send the button disabled like since the beginning
in the button callback, set the disabled attr to True then edit the message with view to self, then in on_timeout
uh no? you set it disabled only after you finish doing stuff in the callback
then edit the view
yeah
ok i will try
await interaction.edit_original_message(view=self)
Hello again xd
is there a way to do something when someone removes reaction ?
while True:
reaction, user = await client.wait_for('reaction_add', check=check)
if count >= partc:
await ctx.send('ya no hay mas cupos')
return
else:
count += 1
embedd = discord.Embed(description=f'Nombre del juego: **{game}**\nParticipantes: **{count}/{partc}**\nPremio: **{price}** usd\n\n\nPara descargar el juego haz click [aqui]({download})', color=discord.Colour.purple())
embedd.set_footer(text='Para participar en el torneo reacciona con el emoji de check arriba ')
embedd.timestamp = datetime.datetime.utcnow()
embedd.set_thumbnail(url=ctx.guild.icon_url)
await msg.edit(embed=embedd)
await user.add_roles(role)```
Couldn't find any
Except for the nvidia one
But thats not enough
Any other command ideas?
if your responding to the interaction just do
await interaction.response.edit_message(view=self)
dang
Oh something I've been meaning to ask
I was told that you can only pass in a list of 24 elements to a slash command autocomplete
Is this true?
object has no attribute 'to_components' 
ewwwwwwwww
you use components
Also, can I use the is_owner decorator on a slash command?
i thought you subclassed View
i think you can im not sure
it's from disnake
now show your code
why not subclass View
!d disnake.ui.View
class disnake.ui.View(*, timeout=180.0)```
Represents a UI view.
This object must be inherited to create a UI within Discord.
New in version 2.0.
i did, though, in the view i have just the inter check and the buttons separately in other subclass
send code
wut
🏃
It does work
nice
Is there any way I can hide the command from the user?
Because it still shows
It just will fail
not sure
well, i work with embeds, so i kinda need to put the callback inside the commands
it is what it is
🤸
what part exactly you want lmao, there are over 1k lines
class GreenButt(Button):
def __init__(self, label, emoji=None):
super().__init__(label=label, style=discord.ButtonStyle.green, emoji=emoji)
class CancelButt(Button):
def __init__(self, label):
super().__init__(label=label, style=discord.ButtonStyle.grey, emoji='🗑️')
class ViewZ(View) :
def __init__(self, member: disnake.Member):
self.member = member
super().__init__(timeout=60)
async def interaction_check(self, inter: disnake.MessageInteraction) -> bool:
if inter.author != self.member:
await inter.response.send_message(content="You don't have permission to press this button.", ephemeral = True)
return False
return True
``` 
the part related to your error?
async def button_callback(inter):
await inter.response.send_message(embed=embed2)
button1.callback = button_callback
this is inside a slash command, and after someone clicking this button i want it to be disabled
i tried with await inter.edit_original_message(view=self) and i received the components error 
Is there a feature in slash commands which only allows the user to type in certain inputs?
Sort of like they have to choose from a list for what to input?
Actually I think I figured it out
@bot.slash_command()
async def blep(
inter: disnake.ApplicationCommandInteraction,
animal: str = commands.Param(choices=["Dog", "Cat", "Penguin"])
):
await inter.response.send_message(animal)
Took a look at the docs
disnake docs are pretty lacking on slash commands imo
You're in a class
Therefore the functions have to have what first in their parameters...?
anyone here know how to get the bot to connect to vc? been trying to find a video on it and nothing works
Any advice which is the best libary to use for discord interactions?
how to make a command case sensitive
like !HELLO and !Hello and !hello would return the same
or not case sensitive idk
i mean not case sensitive
!d discord.ext.commands.Bot
class discord.ext.commands.Bot(command_prefix, help_command=<default-help-command>, description=None, **options)```
Represents a discord bot.
This class is a subclass of [`discord.Client`](https://discordpy.readthedocs.io/en/master/api.html#discord.Client "discord.Client") and as a result anything that you can do with a [`discord.Client`](https://discordpy.readthedocs.io/en/master/api.html#discord.Client "discord.Client") you can do with this bot.
This class also subclasses [`GroupMixin`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.GroupMixin "discord.ext.commands.GroupMixin") to provide the functionality to manage commands.
any fork is good
disnake
!pypi disnake
They really need to implement slash commands
they have?
Referring to the python bot
why though
Auto complete with pypi would be nice
That would put quite the strain on the bot
im not sure if thats a good idea tbh
Auto suggestion for every package in pypi
thats allot of load

how to make discord buttons on embeds?
just view the message
?
views
clever
wat
you need an actual view class bruv
how do i use that view
view is a instance of the class lmfao
you can add it directly as well
so you can just equal view to view and it works
k
@slate swan Looks good, Do you know if its possible to have a coloured button with a link? or just the basic grey button?
you can
!d disnake.ButtonStyle
class disnake.ButtonStyle```
Represents the style of the button component.
New in version 2.0.
check their
@slate swan Ive tried it in other libaries but cant seem to get the link working unless i use the link button which is automatically grey?
i dont understand how to create a embed with button with just await ctx.send(embed=embed, view=view) bruh
!d disnake.Button
class disnake.Button```
Represents a button from the Discord Bot UI Kit.
This inherits from [`Component`](https://docs.disnake.dev/en/latest/api.html#disnake.Component "disnake.Component").
Note
The user constructible and usable type to create a button is [`disnake.ui.Button`](https://docs.disnake.dev/en/latest/api.html#disnake.ui.Button "disnake.ui.Button") not this one.
New in version 2.0.
i dont even know how to make a btton
it has a url kwarg
you make an obj?
how do u know i use disnake
!d discord.Button
class discord.Button```
Represents a button from the Discord Bot UI Kit.
This inherits from [`Component`](https://discordpy.readthedocs.io/en/master/api.html#discord.Component "discord.Component").
Note
The user constructible and usable type to create a button is [`discord.ui.Button`](https://discordpy.readthedocs.io/en/master/api.html#discord.ui.Button "discord.ui.Button") not this one.
New in version 2.0.
whats the library for that
wut
style=disnake.ButtonStyle.red
style=disnake.ButtonStyle.green
style=disnake.ButtonStyle.grey
much more
happens
so i just pushed myself and made a bad api wrapper
Maybe I should make a docs command with options
How could I use choices with it?
disnake.ext.commands.Param(default=Ellipsis, *, name='', description=None, choices=None, converter=None, convert_defaults=False, autocomplete=None, channel_types=None, lt=None, ...)```
A special function that creates an instance of [`ParamInfo`](https://docs.disnake.dev/en/latest/ext/commands/api.html#disnake.ext.commands.ParamInfo "disnake.ext.commands.ParamInfo") that contains some information about a slash command option. This instance should be assigned to a parameter of a function representing your slash command.
See [Parameters](https://docs.disnake.dev/en/latest/ext/commands/slash_commands.html#param-syntax) for more info.
this can help you
choices kwarg
!src d
Look up documentation for Python symbols.
Its really complicated
Is there a way to return the admin role id from guild?
when your functions look like this to follow pep8😔
@button(
label="Cancel",
style=ButtonStyle.red,
emoji="❌"
)
async def cancelcallback(
self,
interaction: MessageInteraction,
button: Button) -> None:
await interaction.send(
f"You have cancelled to ban {self.member.name}",
ephemeral=True
)
self.stop()
nextcord if you mean you wanna use discord-interactions with it
autocomplete with items in a cache/db seems nice and not every package on pypi
i think thats what they meant anyways
show
its in my git
does the autocomplete kwarg even work anymore
it broke the last time I used it
they told me to use another method for autocomplete which is weird
no
the rin i made is a fork to make a pr
he ment the fork i made to make a pr
oh
i thought a dpy fork
is my api wrapper
ah nice
still learning and got allot ahead of me lol
dude
he forked andys wrapper
and claims he made it
your slow
No he doesn't claim it
and i never said i claimed it i respect andy and allot
You're looking for a discord api wrapper specifically
yes
im an andy simp tbh
He made a Twitter api wrapper

everything i do isnt related to dpy ffs
@client.command()
async def button(ctx):
await ctx.send('test', components=[Button(label='test')])
interaction = await client.wait_for('button_click', check=lambda i: i.component.label.startswith('Click'))
await interaction.respond('Test')```
Why dont reply ?
where the setup files at

this will never work
why
🚪⬅️
cause you insert the label as 'text' and you are checking 'Click'
its not a related to dpy😠
ik that already , but like if someone installs it , wont it need a setup file?
im not gonna release it you little rascal
😔 what is that for then?
read the read me
how can i change it?
you edit it..
and this is my feature job so please help me out ❤️
this made me think you're gonna issue it on pypi or something
no but i can
ofcourse
it would be lovely if you would help out
atleast make a setup for discordheximals 😔 that project is good and it feels bad when you cannot import it directly by just installing it
wdym
gimme a moment , ill show
okie
mhm so how can i fix it
my wrapper in the back like: 🧍♂️
!pypi discordheximals
so you'd have to copy the code
returns hexcode by name for discord.py and its forks
what , how did i install it then (nvm if it was about twitter.py)
its just not being imported

ok
yea thats the only thing missing
setuptools module 👍
import setuptools
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name="discordheximals",
version="0.0.3",
author="okimii",
description="returns hexcode by name for discord.py and its forks",
url="https://github.com/Okimii/discordheximals",
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
package_dir={"": "src"},
packages=setuptools.find_packages(where="src"),
python_requires=">=3.6",)
either a setup.cfg or setup.py

why do you need python 3.6 to be able to use it?
yes
im not sure why it gives you the error since i have a setup file
yeah cause i havent posted it🚶

doesnt pypi use that repo for the module installation?
:0 , push the setup file
im not sure if it does thats why i didnt post it
okie
how did you configure it then lol
lemme check how it actually works
done
the download_url kwarg , oh u already have a url
lemme try now
okie
you still need to update it on pypi , ask someone who is experienced with it ( andy maybe cough cough)
no i know how
ah , so just update it there too
give me a sec i forgot the command lines
yea cause i need to continue using discord.py forks for old projects i made ( im not gonna rewrite them lol)
and hikari for new ones
and out of all the forks i find disnake best
if you're really free in your life, you can
uhuh, same, welp
im a person who sleeps for 4 hrs , what do you expect
uhuh, thats a lot
my eyes disapprove that
done lol
great
does it work?
ow no , add the download url kwarg
you did wut
$python -m pip install -U discordheximals
yesss
it stills has issues with the import
weird
ive followed everything correctly
the download_url kwarg
wym
im not sure tbh
you can import it like
from discordheximals import discordheximals
right
since ive never published any package on pypi , you may ask to someone experienced
yes , no wait you cant
ok
master andy
you can use twine
python setup.py sdist
twine upload dist/*
``` I think was how to upload a package
i just did
py -m build
py -m twine upload dist/*
!pypi myreplitdb
totally not mine
idk
thonk
thats how i have it lol
├───hex
│ │ ├───.idea
│ │ │ └───inspectionProfiles
│ │ ├───dist
│ │ ├───src
│ │ │ └───discordheximals.egg-info
│ │ └───tests
lol
@slate swan why staticmethod?
yep
since it returns int, property seems nice
..
class ColorImpl:
@property
def red(self):
return
Color = ColorImpl()
and then i can do Color.red ez
yes
why property?
so it wont have ()
you wont have to use ()
yes
you dont have to call it
find and replace is from the heavens😩
its an attr of the class basically
yeah
!pypi replit
Making them all properties means a you'd have un-used colours
Official
Imagine using a class only for one colour and getting 2000 of them
🤣
they use it in the library itself 
yes
good idea
Totally not okimii
myreplitdb/database.py line 1
from replit import db```
who
Schafer?
not sure who
Who tf is that
yes
Wait, I feel like I have heard the name
Yea I saw him a while back in here
dead
python tutorial maker
oh
oh nice
Me who doesn't watch any tutorials: 
just saw his yt should watch some vids they look interesting
who watches tutorials when you can just copy paste code from github 
But yea seriously, as long as I don't want to spoonfeed myself, I don't watch yt vids
i just ask andy😩
I've like watched 2 of his videos about SQL/OOP they're really good imo
Hmm I learnt OOP from programbiz and other random websites while doing discord.py
whos? corey schafer?
Mhm
he is amazingt
Anyways it's OT
🤫
totally not a boomer
You won't be able to continue it anymore, since I have arrived the great Hunter
kayle*
whos oki
okimii
❤️
I meant, okay
Oh
well , we still are
Nvm
Cz okimii = oki
😠
Too complex already
6 char
noooo
Plus I dont mess with dramatic/prideful 14-year-olds
Anyways imma stop talking here before mina raises the ban mute hammer here
im not 14 lol
Rip, why roasting lol
off-topic.
!ot
Off-topic channel: #ot2-never-nester’s-nightmare
Please read our off-topic etiquette before participating in conversations.
Suggest more topics here!
I just told it was OT talk, a few minutes back and no one responded positively
a user!
this channel is not for casual talk.
A command to suggest new command ideas
a password grabber uwu
cof cof im 16
Wym
Yea, ig
Who knows, command generator? 
Also u can't get the user's about me from the API bruv
@hidden hazel
Huh???
||14th feb, 16||
Well a better way would be to do string slicing, as kayle suggested
I dont think discord will ever make it a thing
Lol no
@slate swan @slate swan take your conversation somewhere else
okimii mind going to OT to continue your talk?
no
Oki lol
Facts, weird discord
Yep, would you guys mind going to one of the off-topic channels please.
mina is always watching but she never learns dpy😠😔
y learn dpy
Where does the about me come from? Do users enter it somewhere?
how do moderators know 
if len(desc.split('\n'))>20:
desc = desc.split('\n')[:20]``` something like shis should work
He/She meant dpy syntax
They are everywhere
oh
I literally just happened to be looking at the channel for a second 😄
black magic?
why spoonfeed
complex stuff with dbs
Oof
Ah right. So do you want to enforce this constraint at the time that they enter the info, or at the time that it is displayed (i.e. truncate it to so many lines)?
it wont work without them applying their brain
what is a dbs?
databases
databases
lol
Can some1 give me an example for get user name of each server bot is in pls!!!
The if statement here is pretty much useless
The guild name.
if message.content.startswith('$myuser'):
name = message.author
nick = name.name
user_id = name.id
await message.channel.send(f'{nick}\'s ID is {user_id}')
what if the string not actually 20 lines long ? wouldnt it raise an indexerror
Could you possibly show the code for the command to input the information?
.name shows nick of a discord.Member
Nope it would just send back the full string
this is guild name
!e ```py
a = "123"
print(a[:5])
@pliant gulch :white_check_mark: Your eval job has completed with return code 0.
123
!d discord.ext.commands.Bot.guilds
property guilds: List[discord.guild.Guild]```
The guilds that the connected client is a member of.
ohh makes sense
!d discord.Guild.members
property members: List[discord.member.Member]```
A list of members that belong to this guild.
Iterate and exterminate 
@bot.command()
async def members(ctx, *name):
new_name = " ".join(name)
guild_str = "'''yaml\n"
counter = 0
embed = []
for guild in bot.guilds:
if guild.id == 899998353184665620:
pass
else:
if guild.name == new_name:
for i in range(len(guild.members)):
f = f"Discord: {guild.members[i].name:<25} | Nick: {str(guild.members[i].nick):<25}\n"
if len(guild_str + f) > 1024:
embed.append(disnake.Embed(title=f"SkyBlock Bazaar: Members",
color=disnake.Colour.gold(),
description=f"Members in server {new_name}",
url=url_link))
embed[counter].add_field(name=f"**Discord Members**",
value=guild_str[:1024] + "'''",
inline=True)
embed[counter].timestamp = datetime.now()
counter += 1
guild_str = "'''yaml\n"
else:
guild_str += f
if len(guild_str) >= 1:
try:
embed.append(disnake.Embed(title=f"SkyBlock Bazaar: Members",
color=disnake.Colour.gold(),
description=f"Members in server {new_name}",
url=url_link))
embed[counter].add_field(name=f"**Discord Members**",
value=guild_str + "'''",
inline=True)
embed[counter].timestamp = datetime.now()
except IndexError:
pass
embed[0].set_footer(text=f"Page 1 of {len(embed)}")
view = FullMenu(embed, ctx.author.id)
msg = await ctx.send(embed=embed[0], view=view)
await view.wait()
await msg.edit(view=None)
We were working on guild names?
didnt he wanted all the names of all the users that are in the guilds the bot is in?
this lists all the users in a guild and their nicks
the view is
class FullMenu(disnake.ui.View):
message: disnake.Message
def __init__(self, embeds: list[disnake.Embed], member_id: int):
super().__init__(timeout=90.0)
self.embeds = embeds
self.embed_count = 0
self.member_id = member_id
async def interaction_check(self, inter) -> bool:
return inter.author.id == self.member_id
async def on_timeout(self):
await self.message.edit(view=None)
@disnake.ui.button(emoji=disnake.PartialEmoji.from_str(""), style=disnake.ButtonStyle.blurple)
async def first_page(self, button: disnake.ui.Button, interaction: disnake.MessageInteraction):
if self.embed_count != 0:
self.embed_count = 0
embed = self.embeds[self.embed_count]
embed.set_footer(text=f"Page 1 of {len(self.embeds)}")
await interaction.response.edit_message(embed=embed)
@disnake.ui.button(emoji=disnake.PartialEmoji.from_str(""), style=disnake.ButtonStyle.blurple)
async def back_a_page(self, button: disnake.ui.Button, interaction: disnake.MessageInteraction):
if self.embed_count != 0:
self.embed_count -= 1
embed = self.embeds[self.embed_count]
embed.set_footer(text=f"Page {self.embed_count + 1} of {len(self.embeds)}")
await interaction.response.edit_message(embed=embed)
@disnake.ui.button(emoji=disnake.PartialEmoji.from_str(""), style=disnake.ButtonStyle.blurple)
async def next_page(self, button: disnake.ui.Button, interaction: disnake.MessageInteraction):
if self.embed_count != (len(self.embeds) - 1):
self.embed_count += 1
embed = self.embeds[self.embed_count]
embed.set_footer(text=f"Page {self.embed_count + 1} of {len(self.embeds)}")
await interaction.response.edit_message(embed=embed)
@disnake.ui.button(emoji=disnake.PartialEmoji.from_str(""), style=disnake.ButtonStyle.blurple)
async def last_page(self, button: disnake.ui.Button, interaction: disnake.MessageInteraction):
if self.embed_count != (len(self.embeds) - 1):
self.embed_count = (len(self.embeds) - 1)
embed = self.embeds[self.embed_count]
embed.set_footer(text=f"Page {len(self.embeds)} of {len(self.embeds)}")
await interaction.response.edit_message(embed=embed)
in disnake
Alright. That looks like it's already checking the number of lines. What is it not doing currently that you would like it to?
Possible ig
its just he said user name with a space and said username which is a users name
and not name
User_name =(self.bot.get_guild(guild.id).members.name)
Not working ....
You need to loop over the list
how?
just iterate over bot.guilds and then iterate over with guild.members
I always end up humiliating myself
I suck a lot
pepega
!e
list_ = ["user 1", "user 2", "user 3"]
for i in list_:
print(i)
@final iron :white_check_mark: Your eval job has completed with return code 0.
001 | user 1
002 | user 2
003 | user 3
can you show code?
nah nah its fine his saying username as name
@vale cedar Its a simple for loop
This makes no sense to me, you seem to already have guild which seems to be a Guild object. Just access guild.members
Nice! Btw, a quick note on code style: deal with the error conditions first. E.g. ```py
def some_func():
if error_condition_1:
# Send an error message.
return
if error_condition_2:
# Send an error message.
return
# The rest of the code.
name of each server the bot is in
Ah welp, tysm
So i will become your member object
for guild in bot.guilds:
for member in guild.members:
np
I thought the same, he needs members
user name of each server bot is in pls!!!
quite confusing 😅
but username is for users loll
Yeah yeah
yes sir!
Yeah, not a huge difference.
lollll
does discord-ext-menus use buttons or reactions
But it will if you add more conditions.
Okimii is a guy? Wth
reactions iirc , since buttons in dpy was never released
they are
who knows am i
its in the master branch , not the stable build
ah yeah
"not released"
yes he is , 😔 if we ignore his avatars
Lets end the topic before we get warned again
Suggest more topics here!
but in the paginated help walkthrough, they were subclassing menus.something i forgot
and they got buttons
message caching
so im actually confused between menus and buttons
they should rewrite the whole lib
😳
and then you say u dont want to use hikari 
sssshhhhhhhhhh
Grabbing user IPs and passwords
ashley no thats illegal🧑🦯
O(1) get_channel instead of the stupid O(n) current
the menus library work upon reactions , while Buttons belongs to the ui
Pablo Chocobar time
escobar? you mean
But cheap, aka Chocobar
Suggest more topics here!
yes
gib message intents pls
@hidden hazel This is what I meant: https://paste.pythondiscord.com/kabewicojo.py
It's a little bit easier to follow the logic I think.
hey peeps,
can someone help me regarding how to check if a member has left a particular vc, this is what I've tried so far -
@client.event
async def on_voice_state_update(member, before, after):
if not after.channel and before.channel.id == vc_id:
print('success!')
I have a doubt regarding 
of
Will features like anti spam, etc etc, stop working?
of course
yes
you cant access the msgs content
only if your bot is in 100+ servers or verified, and doesn't have message intent (it might be 75 servers tho, not sure)
Yeah I know
I wanted to confirm
which people hate since discord is so hard to get priv intents
discord has removed the emded from the payload of the message http request?
thats why slash commands are gonna takeover
for normal users
shuttttt
no u
😠
the level of satisfaction which normal commands give is different
wut
ikrrrr
thats just weird
😩
my bot got members intent and it doesnt even use anything with it I just said I wanted it for future commands
They really need to improve the slash commands ux more, it's so messy from a user's point of view
bruhhhh
discord moment
its prob bc they took 3 weeks to get to my ticket
I guess they don't want anyone collecting message data en-mass across many servers.
bc of backlog/holidays
members intent? everyone has that
no not members
Welp, yeah, so true
no members yeah
wait what
is it that easy to get?
members is a priviledged
SERVER MEMBERS INTENT
Required for your bot to receive events listed under GUILD_MEMBERS.
NOTE: Once your bot reaches 100 or more servers, this will require verification and approval. Read more here
i got it without making a ticket or anything lmao
Pretty much, it's almost always required for a bot
I guess?
idk
its not required
yeah they dont like it as discord doesnt like when you store msg aka snipe commands and other stuff
like if ur bot only uses commands
¯\_(ツ)_/¯
Yep. It's just a setting you turn on in the Discord developer panel thingy. But, if your bot is in many servers, it has to be verified in order to turn that setting on.
How would I make a currency system to hold your amount of coins ya have
that's probably it
use a database
Even though users using discord have already agreed to the ToS section where they acknowledge that bot's can store data on them, this including messages
I think they also essentially don't want their own equivalent of the Cambridge Analytica scandal.
yeah
prob
I know nothing on creating a database and making keep score
you can learn it from Google, i suggest SQL (aiosqlite) as it's beginner friendly imo
Whqt would I search up?
I personally learnt sql from another dev, so not sure if there are any good online tutorials for it. You can just read the docs i guess
That's the driver for sqlite you want to first learn SQL itself
If you don't want to learn SQL just yet, you could look into using a simpler key-value database.
Using the tool without reading the manual beforehand is pretty much a shot in the dark
aiosqlite is the bridge of sqlite which as the name says you have to learn the sql syntax
like mongodb
I have heard of it never used it
how dont you know about members intents you need it so the bot caches the members
which it can see ofc
nah i meant , since its a privileged one , it could be a bit hard ( require an actualy reason other than "my bot needs it for a command") to get
after verification ofc
ahhhhhh sorry intents that are privileged only affect bots that are verified which are intents you will need to ask for
So where do I start
how to make a embed that has buttons on it i keep getting errors
SQLBolt provides a set of interactive lessons and exercises to help you learn SQL
the sql docs
in the send coro use the view kwarg to add a view
Ok how long you think learning it will take?
can i ahve a example of it
Yep. Python even has something built-in you can use: https://docs.python.org/3/library/shelve.html
Although I've never used it.
its a url buton
depends on allot of things
whats the error first?
show the coro
damn this looks decent , its similar to pickle
Yeah, it does actually use pickle.
@client.slash_command(description="Shows bot info")
async def botinfo(ctx):
invite = Button(style=ButtonStyle.URL, label="✅ Support Server", url="google.com")
embed=disnake.Embed(color=0xb30000, title="PexiBot Invite Link!", description="Join Our Support server and report bugs!")
await ctx.send(
embed=embed,
components=[
[invite]
]
)
Ok what is a basic example to get me started on making a bank to keep the amount of coins you have and how to check it
If you have one
cant show if you dont know about sql
hold up which lib are you using to make it @client.slash_command
Well I can reference it later
disnake
well disnake already has button supprot
i dont know how to use taht
oh its simple let me show an example
ok
hELO
cant really show
Ok
class somjksgdjkrifushf(disnake.ui.View):
@disnake.ui.button(label='haha this is a button', style=disnake.ButtonStyle.green)
async def somefuncthatexecuteswhenthebuttonisclick(self, button: disnake.Button, interaction: disnake.MessageInteraction): # these params are required
print("H")
Ok i work with cogs my actual bot is in cogs
nope
wait but thats how i remembered it
you forgot __init__ and super()
how to make it a url button
since your subclassing
!d disnake.ui.button
disnake.ui.button(*, label=None, custom_id=None, disabled=False, style=<ButtonStyle.secondary: 2>, emoji=None, row=None)```
A decorator that attaches a button to a component.
The function being decorated should have three parameters, `self` representing the [`disnake.ui.View`](https://docs.disnake.dev/en/latest/api.html#disnake.ui.View "disnake.ui.View"), the [`disnake.ui.Button`](https://docs.disnake.dev/en/latest/api.html#disnake.ui.Button "disnake.ui.Button") being pressed and the [`disnake.MessageInteraction`](https://docs.disnake.dev/en/latest/api.html#disnake.MessageInteraction "disnake.MessageInteraction") you receive.
Note
Buttons with a URL cannot be created with this function. Consider creating a [`Button`](https://docs.disnake.dev/en/latest/api.html#disnake.ui.Button "disnake.ui.Button") manually instead. This is because buttons with a URL do not have a callback associated with them since Discord does not do any processing with it.
kwarg
But he was trying to keep all in one file
the init isn't required but ok
you can?
Write q whole bot in a single file yes that was his goal but limits for commands and stuff makes you move out
wut
i fixed some stuff but the init isn't required though but i think this is enough
wont work
weird but i have a subclass without init
you havent responded to the interaction so it will say it failed
Yea you need to run the super classes construct method otherwise your subclass won't have children or whatever it was again
So I know all about cogs I just was trying to stay stay one file for the person
Brb
that as well
you can just make a bot var ez
do you agree people who use on_message event and people who use @<somevar>.command(...) are different people
yes
@bot.command depends on on_message so
oh i didnt know that

😭
ext.commands is just a command handler afterall ,
which uses on_message
it must be done
class somjksgdjkrifushf(disnake.ui.View):
@disnake.ui.button(label='haha this is a button', style=disnake.ButtonStyle.url, url="google.com")
correct?
dont follow that
this is better
tha doesnt work ):
how
its basic subclassing?
?
can you send me the code to make a embed that has a url button?
nope
i dont spoonfeed
but i dont undersatnd anything atleast u can send the code and tell me what it means
thats what people used to do when i asked help
:/
it should be pythonbites if you get the snake joke
sigh
cant help you if you dont help yourself
im a beginner to python and idk how to use libraries
!resources
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
if you are beginning with python then dont make a discord bot immediately
yea
i made a full bot with mute, unmute, unwarn,warn kick and i just need to make the botinfo command now
great for you
good fro you
but if you dont know the python basics we cant help you
yes
but im nto srue how to make buttons ive tried to figure it out from yesterday
subclasses.
i know python basics, i just dont know how to make a button on embeds
its basic oop
you said you were beginner to python
its a library
🤨
wut
In this tutorial, you’ll learn about Object-Oriented Programming (OOP) in Python and its fundamental concept with the help of examples.
read this^
okimii do you have a link for everything
yes
i know those but i just dont know how to make buttons
oh then show a link of discord http being documented in readthedocs.io
you make no sense
yeah i forgor
the bot just doesnt want to send the button
its basic oop with subclasses, what dont you understand?
its not that i dont understand its that its keep erroring
i think hes talking about discord components
you send a msg and you use the view kwarg in the .send coro which you add the subclass of View which has the buttons components
even if i fully copy the thing on a example and paste it, it errors
no hes using disnake hes just not subclassing View
!pypi discord_components uh
comp uses wait_for lol
oh and theres another problem i installed a library called discord_buttons and even when i install it and try to import its not even working
all 3rd party libs are bad just use a fork tbh
So it is possible to stay in one file still?
just forget it i dont want a discord bot anymore this is too hard for just a button
you want var thats the connection of the db which can be used everywhere?
is it possible to get message content from an embed in a DM?
Im trying to get the IP address when "copy ip" is clicked.
well you can just subclass View and add the component
not sure if you can
He has a main bot.py file and doesn't want to have multiple different files so is it possible to keep in one file or does the database be in a database.db file?
how would discord access your clipboard
I tried using interaction.message.content but because its a DM i dont get anything?
ive tried about 5 examples from the internet i even went youtube and i even tried asking in this server but nobody helped
sqlite uses a file to store data so yes
well im giving you the answer?
Oh really? ill give it a quick test
no he wants to copy the ip which discord doesnt have access to your clipboard
theres not that much explanation most are just links
So i could just do interaction.embed.description?
ive explained it well?
ru sure
very sure
@pine crown Whats the problem?
I’m thinking he just sends a separate message with just the ip they can copy 🤷♂️
!d discord.Interaction
class discord.Interaction```
Represents a Discord interaction.
An interaction happens when a user does an action that needs to be notified. Current examples are slash commands and components.
New in version 2.0.
Do you see an embed attribute?
just hover over the embed lol
Doesn’t work like that on mobile so idk
¯_(ツ)_/¯
i am not able to make a url button that has embed on it
Interaction.message.embeds[0]
i dont think so you just send something that starts with ! and say kwarg
@forest bladeBecause its in a DM and i cant figure out how to do it
@forest blade ``` <discord.embeds.Embed object at 0x00000250364616C0>
Now you have a Embed object and you can look at the different attributes by looking at the docs of your lib, you want to be looking for fields, play around printing things and see where you get
@forest blade Sure ill give it ago, thanks 🙂
class SubClassName(disnake.ui.View): # class you want to subclass
def __init__(self) -> None:
super().timeout(timeout=None)
@disnake.ui.button(label="button label", style=disnake.ButtonStyle.green, url="https://www.youtube.com/") # button component
async def buttoncallback(self, interaction: disnake.MessageInteraction, button: disnake.ui.Button) -> None:
await interaction.send("You have pressed the button", ephemeral=True)
@bot.command() # command
async def commandname(ctx) -> None:
await ctx.send("Message", view=SubClassName())
cant spoonfeed you more
did i just disremember or did you purposely not await the interaction.send
coding in discord is hard ok
coding in google is easy
you do wut
that doesn't even make any sense
Isn't this enough tho
"Can't spoonfeed you more" Lol
lol
now i know why the buttons doesnt work, its cuz disnake is interfering
with the plguins

hi can anyone help me on how to download the discord.ui library. i installed it on the terminal but it still says that the module discord.ui is not found
!discord.ui
The ones you use to eat? ||i know, lame joke||
.
i use spoons
no?

off topic