#discord-bots
1 messages ยท Page 676 of 1
bs4 is used for web scraping
aiohttp is used for pulling API requests mainly
(Not saying you can't use it for other purposes)
pls i've been stuck here for about 2 hours i just wanna get this over with
aight
my laptop is about to die 
my cide

Integrate your service with Discord โ whether it's a bot or a game or whatever your wildest imagination can come up with.
Integrate your service with Discord โ whether it's a bot or a game or whatever your wildest imagination can come up with.
tysm
import youtube_dl
import discord
from discord.ext import commands
import random
import ffmpeg
client = commands.Bot(command_prefix="?", intents = discord.Intents().all())
client.remove_command('help')
@client.event
async def on_ready():
await client.change_presence(status=discord.Status.online, activity=discord.Game('with ice!'))
print('Bot is ready')
@client.event
async def on_member_join(member):
welcomeEmbed = discord.Embed(title = "New member!", description = f"{member.mention} has joined the server! Be sure to read the rules!")
welcomeEmbed.thumbnail(url = f"{member.avatar_url}")
welcomeEmbed.set_footer(text="Made by NotSameer#0484")
await client.get_channel(915904247646814239).send(f"{member.mention} has joined the server!")
@client.command()
async def kick(ctx, member : discord.Member, *, reason=None):
await member.kick(reason=reason)
@client.command()
async def ban(ctx, member : discord.Member, *, reason=None):
await member.ban(reason=reason)
@client.command()
async def a(ctx):
await ctx.send("sheesh sheesh sheesh sheesh sheesh sheesh sheesh sheesh")
@client.command()
async def embed(ctx):
embed=discord.Embed(
colour=discord.Colour.red(),
title="Am poor",
description="This is normal Embed"
)
embed.set_author(name=ctx.author.display_name, icon_url=ctx.author.avatar_url)
embed.set_image(url="https://cdn.discordapp.com/attachments/919473237774200842/919675123592757278/e4b6b80d-dc19-412f-b1ab-88b07ddde171.png")
embed.add_field(name="sheesh", value="Sheesh mouth", inline=False)
embed.set_footer(text="This is a laptop")
await ctx.send(embed=embed)
@client.command()
async def help(ctx):
embed=discord.Embed(
colour=discord.Colour.blue(),
title="Help Session",
description="View commands and their uses along other helping stuff"
)
embed.set_author(name="Albus", icon_url="https://cdn.discordapp.com/avatars/895369545735344128/b30ac058b8da96539e78f8273dc2e635.webp?size=100")
embed.add_field(name="Prefix", value="?")
embed.add_field(name="?Ban", value="Bans certain members", inline=True)
embed.set_footer(text="This is the help command!")
await ctx.send(embed=embed)
client.run("")
!code
Here's how to format Python code on Discord:
```py
print('Hello world!')
```
These are backticks, not quotes. Check this out if you can't find the backtick key.
!code
!ytdl
Per Python Discord's Rule 5, we are unable to assist with questions related to youtube-dl, pytube, or other YouTube video downloaders, as their usage violates YouTube's Terms of Service.
For reference, this usage is covered by the following clauses in YouTube's TOS, as of 2021-03-17:
The following restrictions apply to your use of the Service. You are not allowed to:
1. access, reproduce, download, distribute, transmit, broadcast, display, sell, license, alter, modify or otherwise use any part of the Service or any Content except: (a) as specifically permitted by the Service; (b) with prior written permission from YouTube and, if applicable, the respective rights holders; or (c) as permitted by applicable law;
3. access the Service using any automated means (such as robots, botnets or scrapers) except: (a) in the case of public search engines, in accordance with YouTubeโs robots.txt file; (b) with YouTubeโs prior written permission; or (c) as permitted by applicable law;
9. use the Service to view or listen to Content other than for personal, non-commercial use (for example, you may not publicly screen videos or stream music from the Service)
Use python blocks then
How TF does that even matter
i just dont wana
Bruno Mars - Talking To The Moon (Lyrics)
Stream/Download: https://smarturl.it/TalkingToTheMoonBM
Follow our Spotify Playlist: https://loku.lnk.to/Spotify
Bruno Mars
https://www.instagram.com/brunomars/
https://www.facebook.com/brunomars
https://twitter.com/BrunoMars
Wallpaper: https://unsplash.com/
Submit your Track, questions, art or fur...
!paste @hazy agate please instead of posting a large chayt wall paste the code here...
Pasting large amounts of code
If your code is too long to fit in a codeblock in discord, you can paste your code here:
https://paste.pythondiscord.com/
After pasting your code, save it by clicking the floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.
They are not even using ytdl lol
UR F"U"CKING NAME SAYS SO
Just paste your code properly dumbo
I don't use 3rd party libs
I saw their import
What's the issue in the code?
I just ran the code, it spammed โ Sussy
โ in my console
Did I ask you ๐ ?
damn this chat got invaded by 12 year olds
lol
your action here is considered as automating user account which is against TOS, so we cant help you here sorry
Oh, didn't know that
no worries
a 12 year old*
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\Users\rrfda\OneDrive\Desktop\sublime pg version\main.py", line 56, in <module>
bot.load_extension(f'commands.{filename[:-3]}')
File "C:\Python39\lib\site-packages\discord\ext\commands\bot.py", line 732, in load_extension
self._load_from_module_spec(spec, name)
File "C:\Python39\lib\site-packages\discord\ext\commands\bot.py", line 662, in _load_from_module_spec
del sys.modules[key]
KeyError: 'commands.mod_commands'
hm
circular import, maybe
i had to replace @bot.command() with
@bot.command()
@commands.guild_only()
yeah whats that
๐ thanks to vscode
not fault of vsc?
this was what I said before lol
I'm blind smh
how do you edit a message sent with discord.Interaction
!d discord.Interaction.edit_original_message
await edit_original_message(*, content=..., embeds=..., embed=..., file=..., files=..., 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/master/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.
wow I found docs of smth
how do i tell it which message i want to edit
message obj maybe
message will be
message variable?
!d discord.Interaction.original_message
await original_message()```
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 [`InteractionResponse.send_message()`](https://discordpy.readthedocs.io/en/master/api.html#discord.InteractionResponse.send_message "discord.InteractionResponse.send_message") then this would return the message that was sent using that response. Otherwise, this would return the message that triggered the interaction.
Repeated calls to this will return a cached value.
o
this
๐ฅzample? (example?)
zamped apple
wait is it just like
await interaction.original_message("๐")
await interaction.response.edit_original_message("๐คจ")
no
๐
oh
interaction.original_message() is just to get the original message, not sending it
o
i didn't know interaction.send_message existed too, i thought only interaction.response could do message related stuff
you need to do
await interaction.message.edit()
orelse it wont work
its in the traceback right?
interaction.reponse.edit_original_message it is
no, ive tried doing it multiple times, it didnt work
you need to get the message first
from the interaction
interaction.message returns the message the interaction belongs to, not the response
hi
wait so if do
interaction.response.send_message() will send something
interaction.original_message() fetches it
interaction.response.edit_original_message edits it
could anyone help me #help-corn
i am using dpy 2.0
yeah, if you wanna edit the interaction message, you need to retrieve it first
and then edit
ami right?
well since i need to fetch a channel to send something innit, i think that would work
hi can you help me/??
does reason == None work
oh, I thought they wanted to edit the response
where is the reason?
wait it's user == None
i thought the variable name is reason ๐
idfk what will work if user == None doesn't
@weary gale do not share it here
contact @novel apex if the user was from this server
no he wasnt
from the few seconds I saw it, ye it looked but do not open it if you think it's not safe
how i can check if message author has reply to someone ?
yea
it's called attribute, not value
ok i think you meant interaction.edit_original_message but it says it only requires 1 positional arg so do i define it like content=.... or how else would i tell to edit the message to what
you knew what i meant ---
yes you need to specify content
or embed
oh
^
How can i update my Discord.py Version?
to what
eh, 2.0 is just git clone https://github.com/Rapptz/discord.py
it works tho
pip install git+the_link
oh i didn't know you could do that with pip
now you do
it works, but like I said not the best way. It doesn't get installed to your venv, instead to your project
how can I make help embed paginator, I have tried a few solutions alrd but they have fked up.
with buttons or reactions?
buttons if possible
buttons are more complicated
dpy 1.7 or 2.0
I alrd took a look to pinned messages, and I'm using disnake
idk, they were easy for me, my whole bot uses buttons
0 reactions
I see
!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.
I have a paginator for embeds, but it needs a list of embeds smh
to 1.7.3?
and converting the output of !help to list, if possible, would be good
pip install -U discord.py
ah
why a deprecated version smh
pip install discord.py==1.7.1
Can you use buttons in 1.7.?
no
obviously not, it's 2.0
yeah....but not recommended
How can i install 2.0?
do pip install git+https://github.com/Rapptz/discord.py i actually tried it
ok thx i did that
np
but the version is not updated?
"tried" its obvious its gonna work
wdym
you can uninstall the current version
it is still 1.7.1
when you do the command, it uninstalls your current discord.py version and install discord.py 2.0
i cloned the file?
this
git clone works, only to your project
cloning using git is the same as forking
How i get this?
its literally written there
it is literally written there
You simply wasted your internet, device power, your energy and brain cells
that just happened in somebody's dreams
and i think we know who's dream it was
wait no i didn't just mention the cring youtuber
and i am still the worst discord.py programmer to ever exist
anyways, kayle will help, bye
lol
is it possible to convert this to list of embeds (for paginator)
@slate swan you use sql right?
just try printing numbers between the conditionals and see where is the fault, now bye
yea
probably use different embeds for different cogs
thanks for free command ideas
you welcome
I need to convert the output to have multiple embeds smh, but how?
what does defcon do btw
!src defcon
Check the DEFCON status or run a subcommand.
!defcon
anti raid*
Check the DEFCON status or run a subcommand.
oh and you totally didn't use a db to make the warn command right?
I did use db
which, mongo or sql
frig idk sql ๐ญ
it's quite easy
use asqlite for async envs
asqlite?
btw how do i track the amount of times a discord.Button has been clicked
what i would do is , override the default help ,add reactions / buttons
check the reaction/button user interacted with - > bot.get_cog('cog') according to the user's interaction -> construct an embed dynamically using Cog object's properties right there , and edit the message
no I use aiosqlite
asqlite / asqlite3 / aiosqlite / aiosqlite3 are all usable
one second im gonna learn how and statements work in 1 second
ah my bad
so you don't subclass it?
@shadow wraith :warning: Your eval job has completed with return code 0.
[No output]
override means subclass
oh that's what I have tried
@shadow wraith #bot-commands
class MyNewHelp(commands.MinimalHelpCommand):
print("Is this ran?")
async def send_pages(self):
print("Is the function called?")
destination = self.get_destination()
print(mapping)
embeds = []
print(embeds)
for page in self.paginator.pages:
print("Is the loop ran?")
emby = disnake.Embed(description=page)
print(emby)
print(embeds)
print("Is this even ran?")
embeds.append(emby)
print(embeds)
await destination.send(embed=emby)
a = EmbedPaginator(self.Context, embeds=emby, timeout=180)
await a.start()
``` I don't think so
still with paginator stuff, ye
so.. I would loop all the cogs, get the cogs and add reaction/buttons
yes
I wanted to make it look a bit like the !help from this server that it has pages you can move on by
!d discord.ext.commands.Cog.get_commands <= gets all the commands in a cog
get_commands()```
read the source code ig
!src help
An interactive instance for the bot help command.
what
? what is problem friends ? ๐
@tawdry perch then if you think its confusing
just iterate through bot.cogs and get the commands
your aliases are the same name as your command name
I think I can do that
and i suggest subclassing your help command instead of removing it
I do subclass it
not talking to you
Oh
to dynou
Imagine having to change your help command everytime you add a command to your bot. Thatโs actually terrible.
i mean dont most big bots do that?
they still dont hard code it
I meant that ^^^
automating it = ๐๏ธ ๐
not automating it = ๐ฅ๏ธ ๐ถ
i use minimalhelpcommand()
I honestly do whatever with mine
12 more days for Christmas still cant feel it๐ด๏ธ
!ot
@bot.command(pass_context=True)
@commands.has_permissions(kick_members = True)
async def addrole(ctx):
server = bot.get_guild(848937617982750760)
user = ctx.message.author
role = discord.utils.get(user.server.roles, name="ADMIN")
await bot.add_roles(member, role)
Hey , can anyone tell me if something is wrong with this code?
Off-topic channels
There are three off-topic channels:
โข #ot2-never-nesterโs-nightmare
โข #ot1-perplexing-regexing
โข #ot0-psvmโs-eternal-disapproval
Their names change randomly every 24 hours, but you can always find them under the OFF-TOPIC/GENERAL category in the channel list.
Please read our off-topic etiquette before participating in conversations.
server, bot.add_roles
ohh ok
in the console its showing 'Member' object has no attribute 'server'
This must be something you copied off the internet
This is really old dpy stuff
Pass_context, server instead of guild.
First you don't need pass_context, then its user.guild not user.server and then its
await member.add_roles(roles)
The code is old and wrong
I have trouble with making an "add role" command in discord.py. I don't know what is wrong; it just doesn't work.
@client.command()
@commands.has_role("Admin")
async def addrole...
yeah
ok thx guys i'll try changing this
give command ideas
Get some
not yet its wip
Hai Kayle and tylerr and a
yo
Hi
hi
async def lea(ctx):
channel = ctx.author.voice.channel
await channel.disconnect()```
why this not working
indentation
๐
what code are you copying wtf
!indent
Indentation
Indentation is leading whitespace (spaces and tabs) at the beginning of a line of code. In the case of Python, they are used to determine the grouping of statements.
Spaces should be preferred over tabs. To be clear, this is in reference to the character itself, not the keys on a keyboard. Your editor/IDE should be configured to insert spaces when the TAB key is pressed. The amount of spaces should be a multiple of 4, except optionally in the case of continuation lines.
Example
def foo():
bar = 'baz' # indented one level
if bar == 'baz':
print('ham') # indented two levels
return bar # indented one level
The first line is not indented. The next two lines are indented to be inside of the function definition. They will only run when the function is called. The fourth line is indented to be inside the if statement, and will only run if the if statement evaluates to True. The fifth and last line is like the 2nd and 3rd and will always run when the function is called. It effectively closes the if statement above as no more lines can be inside the if statement below that line.
Indentation is used after:
1. Compound statements (eg. if, while, for, try, with, def, class, and their counterparts)
2. Continuation lines
More Info
1. Indentation style guide
2. Tabs or Spaces?
3. Official docs on indentation
this is basic explaination of indentation
his indents are right though
and if you are making a music bot and using yt
wdym that's double indent for a single function?
yeah
that'll literally work
nah dawg idk indents sorry
but read this
bru
it'll still work though
!e
def foo():
print("test")
foo()
@shadow wraith :white_check_mark: Your eval job has completed with return code 0.
test
crap your right
it's not the python code convention but it works
did u even indent that twice lol
@shadow wraith :white_check_mark: Your eval job has completed with return code 0.
test
crap
lmao
ok so it wasn't indent
and imagine trying to maek a music bot with yt
!ytdl ๐
ye
chill out
what does the output look like?
Itโs novus specific
huh?
on_component_interaction is a event specific to novus
oh
Since thereโs no views.
componet
makes sense, I'll probably try rewriting from souce by now
Youโd have to remove the dropdown if you wanted to copy and paste
how do i track the amount of times a button has been clicked
use a variable
Make a variable and add to it whenever a button is clicked
!d discord.ext.commands.when_mentioned_or
discord.ext.commands.when_mentioned_or(*prefixes)```
A callable that implements when mentioned or other prefixes provided.
These are meant to be passed into the [`Bot.command_prefix`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.Bot.command_prefix "discord.ext.commands.Bot.command_prefix") attribute.
Example
```py
bot = commands.Bot(command_prefix=commands.when_mentioned_or('!'))
```...
oh this exists
ofc....
guys how do i make the help command exclusive to a role, this is my code:
class MyNewHelp(commands.MinimalHelpCommand):
def __init__(self):
super().__init__()
# make the minimalhelpcommand dmed
self.no_category = 'Commands'
self.dm_help = True
async def send_pages(self):
destination = self.get_destination()
for page in self.paginator.pages:
Helpemby = discord.Embed(description=f"{page}", color=0xCD08FF)
await destination.send(embed=Helpemby)
don't ask why the send_pages function exists
check
for a role
Wait how do u add a check in the help command ๐คจ
Ah nvm
class HelpCommand(commands.HelpCommand):
def __init__(self):
super().__init__()
self.command_attrs = {
...
'checks': [lambda ctx: ctx.channel.id == id_right_here]
}โ
!d discord.ext.commands.HelpCommand.command_attrs
A dictionary of options to pass in for the construction of the help command. This allows you to change the command behaviour without actually changing the implementation of the command. The attributes will be the same as the ones passed in the Command constructor.
I feel like writing a help command without sub classing but I don't yet know
I can't wrap my head around the paginator smh
just steal someones help command
@tawdry perch did you even try the method sarthak/i suggested earlier?
I tried to use the one in pinned messages but nothing happened
Yep I did try
It did not go well and I started doing it again
because you dont know how to copy code and use it
show what happened
I don't have it anymore, but it sent a empty embed
show ss
you just made that didnt you
Yes I did
show the code u used
it does not exists
can someone like give an idea for command
I alrd started over
dude just make it again then it takes like 10 lines
Make a command which gives ideas for new commands
very efficient...but srsly
It was a not working command, why do I have to rewrite it when I remember just a bit of that
ok so i added what hunter sent but i got this error ๐
Ignoring exception in command None:
discord.ext.commands.errors.CommandNotFound: Command "help" is not found
class MyNewHelp(commands.MinimalHelpCommand):
def __init__(self):
super().__init__()
# make the minimalhelpcommand dmed
self.no_category = 'Commands'
self.dm_help = True
roles_to_have = ['Admins']
self.command_attrs = {
'checks': [lambda ctx: ctx.author.roles in roles_to_have]
}
async def send_pages(self):
destination = self.get_destination()
for page in self.paginator.pages:
Helpemby = discord.Embed(description=f"{page}", color=0xCD08FF)
await destination.send(embed=Helpemby)
bot.help_command = MyNewHelp()
``` code
why do you need to use skull on everything, it isnt even dramatic
just say you lied, easy lol
I did not...
try making it a cog,
https://github.com/m-y-x-i/simple-disnake-discord-bot/blob/main/cogs/help.py
import dbl
import discord
from discord.ext import commands, tasks
import asyncio
import logging
class TopGG(commands.Cog):
"""Handles interactions with the top.gg API"""
def __init__(self, bot):
token = os.environ['TOKEN']
self.bot = bot
self.token = token # set this to your DBL token
self.dblpy = dbl.DBLClient(self.bot, self.token, webhook_path='/dblwebhook', webhook_auth='password', webhook_port=5000)
# The decorator below will work only on discord.py 1.1.0+
# In case your discord.py version is below that, you can use self.bot.loop.create_task(self.update_stats())
@tasks.loop(minutes=30.0)
async def update_stats(self):
"""This function runs every 30 minutes to automatically update your server count"""
logger.info('Attempting to post server count')
try:
await self.dblpy.post_guild_count()
logger.info('Posted server count ({})'.format(self.dblpy.guild_count()))
except Exception as e:
logger.exception('Failed to post server count\n{}: {}'.format(type(e).__name__, e))
```i google about the top.gg vote thing
is this correct?
idk, error?
make a logging module logger named logger?
i imported logging
thats not gonna make it work magically
alright i fixed it idk how but its fixed
lol
ok but what other ideas do you hav
make it a cog thats it. organized and simpler
maybe you inserted it in the wrong place
you gotta show more of your code
still the same "help" command is not found even tho i implemented it in a cog
looks like you're doing something dumb somewhere in yout code then
how to add " before and after a argument?
for filename in os.listdir('/Users/sadancooler/Documents/Code/Python/bots/mystery/cogs'):
if filename.endswith('.py'):
bot.load_extension(f'cogs.{filename[:-3]}')
``` wdym
i am not doin anythin wrong with my code
use \" or single quotes
!e print('"hello"')
@sullen shoal :white_check_mark: Your eval job has completed with return code 0.
"hello"
from discord.ext import commands
import discord.ext.commands
```are they the same?
umm i cant describe
it should work if you didnt, thete must be something dumb
bru
:D
this only happened after the implementation of self.command_attrs
๐
comment out the thing, make a new dummy help command to test
ofc without that attribute
i want to use like len(url), but i think i need to add " before and after my url
so i try counter and it cant tho
i have no idea what you're talking about
ye i removed, it works now ๐
!e var = "my text"; print(repr(var))
@sullen shoal :white_check_mark: Your eval job has completed with return code 0.
'my text'
ok if self.command_attrs won't work then how else am i gonna tell the help command to run only when the author/user of the command has a specific role
i wanna to make google.com into "google.com"
h
@commands.has_role or @commands.has_permissions
but i subclassed it
idk
class MyNewHelp(commands.MinimalHelpCommand):
def __init__(self):
super().__init__()
# make the minimalhelpcommand dmed
self.no_category = 'Commands'
self.dm_help = True
async def send_pages(self):
destination = self.get_destination()
for page in self.paginator.pages:
Helpemby = discord.Embed(description=f"{page}", color=0xCD08FF)
await destination.send(embed=Helpemby)
๐
!e
url = "google.com"
print(
f'"{url}"'
)```
@sullen shoal :white_check_mark: Your eval job has completed with return code 0.
"google.com"
wow you make your help become more complicated
easier
don't tell me you just remove the help command
i used async def urllength(self,ctx, url):
so if i use the command i need to write like this : ?urllength google.com
so it submit google.com without " before and after the google.com
yes
bru
yea but i think more complicated for me
how would i make the subclassed help command only available to a role
!d discord.ext.commands.HelpCommand.add_check
add_check(func)```
Adds a check to the help command.
New in version 1.4.
o
so something like
self.command_attrs = blahblahblahblah
self.add_check
``` wouldw ork?
what is the first line doing there
what does it currently do
it shouldn't include quotes
those are parsed by the argument parser
um sorry
unless you're calling repr on it for some reason
use the len built-in function
arl tried but cant
!e print(len("google.com"))
@sullen shoal :white_check_mark: Your eval job has completed with return code 0.
10
!d len
len(s)```
Return the length (the number of items) of an object. The argument may be a sequence (such as a string, bytes, tuple, list, or range) or a collection (such as a dictionary, set, or frozen set).
**CPython implementation detail:** `len` raises [`OverflowError`](https://docs.python.org/3/library/exceptions.html#OverflowError "OverflowError") on lengths larger than [`sys.maxsize`](https://docs.python.org/3/library/sys.html#sys.maxsize "sys.maxsize"), such as [`range(2 ** 100)`](https://docs.python.org/3/library/stdtypes.html#range "range").
!e print(len(google.com))
@brave flint :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 1, in <module>
003 | NameError: name 'google' is not defined
it has to be a string
yea so how i convert the url to string
it is already a string (basically)
you're very confused with what you're doing arent you
yea ofcourse
lol
in programming languages
string is like "this is a string" right?
yes
ok XD
the compiler knows it is a string because of the quotes
quotes is the url right?
the command handler without any type hints, returns a string
so it should be a string
okay
to convert url to string can't just do str(the_url_variable_here) or url = "place_the_url_here"?
ah nvm
the url has to be string theres just no other way to store the url (unless you're some weirdo that has some kind of converter of like binary to text or smth)
ah now its work, thanks for ur help @sullen shoal
Hey! Is there a good way to add something like a table in a discord embed without using table2ascii
quotes are used by most languages to identify a string, like how long it is.
like here,
print(hello lol)
the compiler cant just guess that you dont want the ending ) in your string so we use quotes.
print("hello lol)")
Hello = world
Print(โHello โ+Hello+ โ!โ)

ยฏ\_(ใ)_/ยฏ
<@&831776746206265384>
That was a joke
Please 
Ohhh u have certified moderator
That makes more sense
What did you do ๐
!mute 521325126722125874 Investigating
:incoming_envelope: :ok_hand: applied mute to @slate swan until <t:1639410151:f> (59 minutes and 59 seconds).
I'm curious what they did
spec.loader.exec_module(lib) # type: ignore
File "<frozen importlib._bootstrap_external>", line 790, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "c:\Users\rrfda\OneDrive\Desktop\sublime pg version\commands\mod_commands.py", line 9, in <module>
File "c:\Users\rrfda\OneDrive\Desktop\sublime pg version\buttons.py", line 28, in <module>
class Help_view(View):
File "c:\Users\rrfda\OneDrive\Desktop\sublime pg version\buttons.py", line 35, in Help_view
@discord.ui.view(label="modding", style=discord.ButtonStyle.primary,emoji=Emojis.mod_button)
TypeError: 'module' object is not callable
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "c:\Users\rrfda\OneDrive\Desktop\sublime pg version\main.py", line 56, in <module>
bot.load_extension(f'commands.{filename[:-3]}')
File "C:\Python39\lib\site-packages\discord\ext\commands\bot.py", line 732, in load_extension
self._load_from_module_spec(spec, name)
File "C:\Python39\lib\site-packages\discord\ext\commands\bot.py", line 663, in _load_from_module_spec
raise errors.ExtensionFailed(key, e) from e
discord.ext.commands.errors.ExtensionFailed: Extension 'commands.mod_commands' raised an error: TypeError: 'module' object is not callable```
confused tbh
That doesn't matter, move on please
I'm guessing it should be discord.ui.View or something
(your capitalisation is wrong somewhere)
i dont think thats gonna fix it
Good idea ๐
There we go

Docs save the day again 
docs and you 
well the question is , do you need to ?
class Help_view(View):
"""
A class for the help command view.
"""
def __init__(self,ctx : commands.Context , *, timeout: Optional[float] = 180) -> None:
super().__init__(timeout=timeout)
self.ctx = ctx
@discord.ui.button(label="modding", style=discord.ButtonStyle.primary,emoji=Emojis.mod_button)
async def callback(self,interaction) -> Coroutine:
"""
A function that edits the help message and shows the modding commands
"""
if self.ctx.author.id != interaction.user.id:
return await interaction.send_message(f"{random.choice(Replies.error_replies)} {random.choice(Emojis.pepe_sad_emojis)}",ephemeral=True)
embed = discord.Embed(title="Mod helping command",inline=False)
embed.add_field(name="Ban", value='-Ban')
await interaction.edit_original_message(embed=embed)```
Ignoring exception in view <Help_view timeout=180 children=1> for item <Button style=<ButtonStyle.primary: 1> url=None disabled=False label='modding' emoji=<PartialEmoji animated=False name='moderator' id=857241458889195571> row=None>:
Traceback (most recent call last):
File "C:\Python39\lib\site-packages\discord\ui\view.py", line 359, in _scheduled_task
await item.callback(interaction)
TypeError: callback() takes 2 positional arguments but 3 were given```
I wanna make a embed for my discord bot where it displays a video that you can watch inside discord. like if you were to link a youtube video in chat and it embed the whole video so you can watch it inside discord. i havent figured out how to do it, please help
damn
Sure, though I do know now, whatever
guys how do you make the command available to only a specific role, this is my code:
class MyNewHelp(commands.MinimalHelpCommand):
def __init__(self):
super().__init__()
# make the minimalhelpcommand dmed
self.no_category = 'Commands'
self.dm_help = True
async def send_pages(self):
destination = self.get_destination()
for page in self.paginator.pages:
Helpemby = discord.Embed(description=f"{page}", color=0xCD08FF)
await destination.send(embed=Helpemby)
apparently self.command_attrs just made the help command nonexistent and i kept getting help command not a thing unless i removed it
:D
Traceback (most recent call last):
File "C:\Python39\lib\site-packages\discord\ui\view.py", line 359, in _scheduled_task
await item.callback(interaction)
File "c:\Users\rrfda\OneDrive\Desktop\sublime pg version\buttons.py", line 45, in callback
await interaction.edit_original_message(embed=embed)
File "C:\Python39\lib\site-packages\discord\interactions.py", line 325, in edit_original_message
data = await adapter.edit_original_interaction_response(
File "C:\Python39\lib\site-packages\discord\webhook\async_.py", line 189, in request
raise NotFound(response, data)```

guys someone will hel
How to send message as file
that emoji was not found
there is a file kwarg in send
it accepts discord.File form
I made a spam bot for discord
!d discord.File
class discord.File(fp, filename=None, *, spoiler=False)```
A parameter object used for [`abc.Messageable.send()`](https://discordpy.readthedocs.io/en/master/api.html#discord.abc.Messageable.send "discord.abc.Messageable.send") for sending file objects.
Note
File objects are single use and are not meant to be reused in multiple [`abc.Messageable.send()`](https://discordpy.readthedocs.io/en/master/api.html#discord.abc.Messageable.send "discord.abc.Messageable.send")s.
ok
well its a not found
so mostly it must be emoji
unless the view was not found
still wrong , the emoji is there my method of edited the message was wrong
someone?
How to solve this
how is that related to discord bots
Code from a discord bot
anyone?
how can i get the physical memory consumption my bots using and send it as a value?
def check():
role = ctx.guild.get_role(roleid)
return role in ctx.author.roles
@commands.command()
commands.check(check)
no need to do that shit
just use @commands.has_role check
bru read it again
can't ๐ cus idk
actually this is the second time im linking this to them but fine,
try, discord.ext.commands.HelpCommand.add_check
How do I get all the permission overwrites of the category of a channel?
It sends it in a list right?
did you try that when i linked that shit
ok ik self.add_check() exists
but when i did self.add_check(lambda ctx: ctx.author.roles in thelistofrolestheyshouldhave) it didn't work :c
The context that invoked this help formatter. This is generally set after the help command assigned, command_callback(), has been called.
your using postgres ?
o
so lambda HelpCommand.context should work
the function accepts no arguments otherwise it would have been documented
dk ๐
make a lambda function with no argument and just do the shit
return False if you dont wanna invoke
!e print((lambda: "hello")())
@sullen shoal :white_check_mark: Your eval job has completed with return code 0.
hello
psutil
that's a hell lot of brackets
parenthesis*
parentheses*
lambda: thats basically how you make a lambda func without any parameters
or arguments whatever
Thatโs definitely not how you spell it.
Actually nevermind. Thereโs two different ones. Said the same way.
it is

alright i scored 100 in english now lets move on
I hate English so much now.

don't, it's confusing not hate-able
i did self.add_check(lambda: HelpCommand.context.author.roles in the_list_that_i_wanted_it_to_be) but didn't work :C
then the check isn't returning False
or maybe again you inserted it in the wrong places
idk
idk
wait how is the bot gonna know what role it needs
i mean the user needs
through a list, a string, ๐
uh
it's a pypi project i think
its a third party package
!pypi psutil
how would u make ur own api wrapper?
i mean what is api?
guys what command i should use if i want to type like "if user joined current voice channel"
huh
i mean yeah the discord api thing does kinda belong here
but you asked what is an api which isnt
well i mean
using psutil.virtual_memory() does that give the amount of memory the task is taking? im trying to retrieve the amount of ram that my bots taking
just read some articles on sending http requests
isnt that related to web?
it is?
bots arent related to web are they?
the entire damn thing is just receiving and sending http requests basically
oh
to send a message from your account, the client uses discord.com/api/messages endpoint or some shit
so i have to make an api request using aiohttp to their api?
Send http requests isnt quite web related
that and some websocket stuff
you can use the members attribute, like
vc = client.get_channel(id)
print(vc.members)
this will print out a list of all the mebers currently in the voice chat
these things are so complicated
which cam be done with aiohttp
Yeah since the api talks with websockets
where to start from?
Start what?
idk its just comes naturally at some point
making an api wrapper
like make advanced shit
When your ready ig
ofc i m not
Ask andy
but at some point, everyone was a beginner
Hes making a api wrapper for dpy
where did they start from?
zero
ayt i ll ask andy
and a python tutorial
theres not much articles about it in google too
Freecodecamp?


Can I not use ctx in functions?
Btw myxi nice pfp love the show
that arent bot commands?
Message for a event ig
idek the show, just some random picture i found on my memes folder
gotta look for it someday
The show is really good ngl
async def qtimer(ctx, timedplayer, gameid, qsizee):
await asyncio.sleep(15)
if gameid not in games:
try:
playerqueue.remove(timedplayer.mention)
lobby.remove(timedplayer.id)
if len(playerqueue) > 0:
embed = discord.Embed(
title=f"**{len(playerqueue)} of {qsizee} players are in the queue**",
description=str(timedplayer.mention) + " was kicked from the queue! (Timeout)",
color=0xE74C3C)
else:
embed = discord.Embed(
title="**There are no players remaining in the queue**",
description=str(timedplayer.mention) + " was kicked from the queue! (Timeout)",
color=0xE74C3C)
embed.set_footer(text=f"CBell 6 Mans | Created by Heptix",
icon_url="https://i.imgur.com/1utxX7d.png")
await ctx.channel.send(embed=embed)
except Exception:
print(traceback.format_exc())
else:
return```
How do I use ctx?
Wdym?
in a bot command I called the function with
await qtimer(timedplayer, game_id, qsize)
In a command context doesnt need to be called ctx its just a positional argument
how do i clone a role?
right now i have this
@bot.command()
async def clone(ctx, role : disnake.Role):
new_role = copy.copy(role)
await ctx.guild.create_role(new_role)
you're eating all the errors by printing nothing, dont do that
right but how can I use that context if Im linking it to another function
Im so confused lol
Ok ill explain lmao
Isnt copy.copy() used for list and not objects might be wrong but idk if it works like that
so you wanna use ctx.author and stuff like that inside another function which is not part of the qtimer command?
how do i make a bot send a normal text and embed in one message?
await ctx.send("works",embed=embed)
Should work
Never tried it before tho lol
Ok so lets say I have a bot command right
@bot.command(name="test", aliases=["t"], description="Test command")
async def test(ctx):
var1 = 5
var2 = 'hello'
await qtimer(var1, var2)
then the qtimer command:
async def qtimer(ctx, var1, var2):
await ctx.channel.send('Test')
So, my question is:
How can I use context in a function outside of the bot command?
await channel.edit(sync_permissions=True)
I added a print statement before and after, both print but the channel still remains unsynced
hi can someone help me, this doesn't work, and it doesnt show an error either@client.event async def on_member_join(member): channel = client.get_channel(919176763249156139) memcount = len([m for m in member.guild.members if not m.bot]) embed=discord.Embed(description=f"**Welcome to {member.guild.name}!**\n\nใป verify your__s__elf : {client.get_channel(919221774858723398)}\nใป get roles : {client.get_channel(919271662048935986)}\nใป start bonding in our community! : {client.get_channel(919286754752733224)}\n\n**incase of any problems, ping {member.guild.owner.name}") embed.set_thumbnail(url=member.avatar_url) embed.set_footer(text=f"{member.name} | {memcount}") await channel.send(embed=embed) await member.send("hi!")
do you have an eh?
well it worked but not in the way i wanted it to work lol
qtimer is the seperate function, called in a botcommand
Dont know what you want then
?
that make sense @slate swan ?
since my example there will just tell me im missing arg's
the normal text is a link to a youtube video, i want the link to be above the embedded message but the embedded preview video below the embedded message if that makes any sense
@slate swan
Just send the link
mine is an on_member tho
oh wait myb
and my commands work fine
wym like send it here?
No send the message with the link
Do you have intents enabled @valid barn ?
yep
how?
!intents
Using intents in discord.py
Intents are a feature of Discord that tells the gateway exactly which events to send your bot. By default, discord.py has all intents enabled, except for the Members and Presences intents, which are needed for events such as on_member and to get members' statuses.
To enable one of these intents, you need to first go to the Discord developer portal, then to the bot page of your bot's application. Scroll down to the Privileged Gateway Intents section, then enable the intents that you need.
Next, in your bot you need to set the intents you want to connect with in the bot's constructor using the intents keyword argument, like this:
from discord import Intents
from discord.ext import commands
intents = Intents.default()
intents.members = True
bot = commands.Bot(command_prefix="!", intents=intents)
For more info about using intents, see the discord.py docs on intents, and for general information about them, see the Discord developer documentation on intents.
^^
i think just passing in ctx here would work, for example await qtimer(ctx, 123,123,123). i think this is what you meant by your question
ty
alright cheers
Whats the line for all intents kinda forgot it
discord.Intents.all() I believe
guys could you tell me pls how to give a user permission that will give him opportunity to edit the channel
Aaa
!d discord.TextChannel.overwrites
property overwrites: Dict[Union[Role, Member], PermissionOverwrite]```
Returns all of the channelโs overwrites.
This is returned as a dictionary where the key contains the target which can be either a [`Role`](https://discordpy.readthedocs.io/en/master/api.html#discord.Role "discord.Role") or a [`Member`](https://discordpy.readthedocs.io/en/master/api.html#discord.Member "discord.Member") and the value is the overwrite as a [`PermissionOverwrite`](https://discordpy.readthedocs.io/en/master/api.html#discord.PermissionOverwrite "discord.PermissionOverwrite").
maybe this
what permission i should type here?
thank you!
it's a permission, not a document
string maybe?
how can i check
can i have a view check ?
like it checks x thing when a button is pressed 
call a function that does what ever needed?
is the bot in another server?
sure that could work , but it would be alot more clean if it had a view check
yes, they even have administator perm
I'm not exactly sure what you want to do, and I don't think I can help on this
get the guild where the member is in, from the guild get member, check if role in ctx.author.roles
Exception ignored in: <function _ProactorBasePipeTransport.__del__ at 0x000001D366560AF0>
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\lib\asyncio\proactor_events.py", line 116, in __del__
self.close()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\lib\asyncio\proactor_events.py", line 108, in close
self._loop.call_soon(self._call_connection_lost, None)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\lib\asyncio\base_events.py", line 746, in call_soon
self._check_closed()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\lib\asyncio\base_events.py", line 510, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
Exception ignored in: <function _ProactorBasePipeTransport.__del__ at 0x000001D366560AF0>
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\lib\asyncio\proactor_events.py", line 116, in __del__
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\lib\asyncio\proactor_events.py", line 108, in close
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\lib\asyncio\base_events.py", line 746, in call_soon
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\lib\asyncio\base_events.py", line 510, in _check_closed
RuntimeError: Event loop is closed
Task exception was never retrieved
future: <Task finished name='Task-43' coro=<Command.__call__() done, defined at C:\Users\~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\ext\commands\core.py:358> exception=TypeError('qtimer() takes 2 positional arguments but 4 were given')>
Traceback (most recent call last):
File "C:\Users\~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\ext\commands\core.py", line 374, in __call__
return await self.callback(*args, **kwargs)
TypeError: qtimer() takes 2 positional arguments but 4 were given
Process finished with exit code 0
My task doesnt seem to be doing its job
no idea why its saying it takes 2 arguments, when ive made it take four
show the code of function?
oo
async def qtimer(timedplayer, gameid, qsizee, channel):
await asyncio.sleep(15)
try:
if gameid not in games:
playerqueue.remove(timedplayer.mention)
lobby.remove(timedplayer.id)
if len(playerqueue) > 0:
embed = discord.Embed(
title=f"**{len(playerqueue)} of {qsizee} players are in the queue**",
description=str(timedplayer.mention) + " was kicked from the queue! (Timeout)",
color=0xE74C3C)
else:
embed = discord.Embed(
title="**There are no players remaining in the queue**",
description=str(timedplayer.mention) + " was kicked from the queue! (Timeout)",
color=0xE74C3C)
embed.set_footer(text=f"CBell 6 Mans | Created by Heptix",
icon_url="https://i.imgur.com/1utxX7d.png")
await channel.send(embed=embed)
except Exception:
print(traceback.format_exc())
heres making the task:
qtimer_tasks[game_id].append(asyncio.create_task(qtimer(timedplayer, game_id, qsize, channel)))
timedplayer, game_id, qsize, channel
I can't help on that
idk what is the prob
what does the console say?
...
it did not work
...
do you have tabs + spaces mixed?
how it did not work?
this is my code:
async def get_bot_flags(userss: typing.Union[discord.Member, discord.User], server) -> str:
bot_flags = []
if userss.id == 716134528409665586:
bot_flags.append(':maskbot:')
if server.get_role(TIER_1_STANDARD_ROLE) in server.userss.roles:
bot_flags.append(':tier1_standard:')
if server.get_role(TIER_2_STANDARD_ROLE) in server.userss.roles:
bot_flags.append(':tier2_standard:')
if server.get_role(TIER_3_STANDARD_ROLE) in server.userss.roles:
bot_flags.append(':tier3_standard:')
if server.get_role(TIER_4_STANDARD_ROLE) in server.userss.roles:
bot_flags.append(':tier4_standard:')
if server.get_role(TIER_5_STANDARD_ROLE) in server.userss.roles:
bot_flags.append(':tier5_standard:')
return " ".join(bot_flags)```
yep
@commands.command(aliases=["ui"])
async def userinfo(self, ctx, member: typing.Union[discord.Member, discord.User]=None):
if member is None:
member = ctx.author
embed = discord.Embed(
title=f"{member.name}#{member.discriminator}'s info",
description=discord.Embed.Empty,
colour=discord.Colour.green(),
)
server = self.bot.get_guild(914163721704726588)
emojis = await flags.get_bot_flags(member, server)
embed.add_field(name=f"{INFORMATION_EMOJI_UI} Basic Information:", value=
f"**ID**: {member.id} "
f"\n[Badges](na): {emojis}"
)
await ctx.send(embed=embed)```
use either tabs or spaces
anybody now what i did wrong? it must create a room when i join the channel id which i indicated in code
yep worked
good ๐
thnx
try member = server.get_member(member)
If that does not work I have no time to expalin another metthods, sorry
how to do autorole?

!d discord.on_member_join
discord.on_member_join(member)``````py
discord.on_member_remove(member)```
Called when a [`Member`](https://discordpy.readthedocs.io/en/master/api.html#discord.Member "discord.Member") leaves or joins a [`Guild`](https://discordpy.readthedocs.io/en/master/api.html#discord.Guild "discord.Guild").
This requires [`Intents.members`](https://discordpy.readthedocs.io/en/master/api.html#discord.Intents.members "discord.Intents.members") to be enabled.
!d discord.Member.add_roles
await add_roles(*roles, reason=None, atomic=True)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Gives the member a number of [`Role`](https://discordpy.readthedocs.io/en/master/api.html#discord.Role "discord.Role")s.
You must have the [`manage_roles`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.manage_roles "discord.Permissions.manage_roles") permission to use this, and the added [`Role`](https://discordpy.readthedocs.io/en/master/api.html#discord.Role "discord.Role")s must appear lower in the list of roles than the highest role of the member.
@client.event()
async def on_command_error(ctx, error):
if isinstance(error, commands.MissingPermissions):
await ctx.send("You cant use that.")```
TypeError: event() missing 1 required positional argument: 'coro'
it's @client.event remove the parentheses (aka these 2 characters ())
ohh
what's the event name for when a role is created
ru?
ะดะฐ
ะพ
!d discord.on_guild_role_create
discord.on_guild_role_create(role)``````py
discord.on_guild_role_delete(role)```
Called when a [`Guild`](https://discordpy.readthedocs.io/en/master/api.html#discord.Guild "discord.Guild") creates or deletes a new [`Role`](https://discordpy.readthedocs.io/en/master/api.html#discord.Role "discord.Role").
To get the guild it belongs to, use [`Role.guild`](https://discordpy.readthedocs.io/en/master/api.html#discord.Role.guild "discord.Role.guild").
This requires [`Intents.guilds`](https://discordpy.readthedocs.io/en/master/api.html#discord.Intents.guilds "discord.Intents.guilds") to be enabled.
@tacit horizon What are you trying to do?
trying to make a command only i can use
woao
;-;
Make a check
!d discord.ext.commands.is_owner
@discord.ext.commands.is_owner()```
A [`check()`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.check "discord.ext.commands.check") that checks if the person invoking this command is the owner of the bot.
This is powered by [`Bot.is_owner()`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.Bot.is_owner "discord.ext.commands.Bot.is_owner").
This check raises a special exception, [`NotOwner`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.NotOwner "discord.ext.commands.NotOwner") that is derived from [`CheckFailure`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.CheckFailure "discord.ext.commands.CheckFailure").
can i do with user id
Yes you can
ik that
To or the decorator
if ctx.author.id == your_id:
ya
you know basic python so i won't help you with if and else statements and stuff
Lol
idk
omg, teach me too please
conditionals
async def lol(ctx, member: discord.Member, count: int):
if ctx.author.id == your_id:
c = 0
while True:
nuke_r = random.choice(list_data.nuke_list)
await ctx.send(f"{member.mention} {nuke_r}")
c +=1
if c == int(count):
break
else:
continue```
so its gonna work ?
No you actually have to add the int
Of your id
its worked
Then why hide it?
nvm
499973767846428694 your id lol
637458038915203127 your id lol
ik lol
ahh if the other member use that commend why its not showing error
@lol.error
async def asfjasl;dfkj;asldkfjl;(ctx, error):
if isinstance(error, commands.MissingPermissions):
await ctx.send("You cant use that.")```
Cause they arent missing perms
if #check....
else:
await ctx.send("You arent the bot owner")
its worked 0_0
why i was using more IQ
Idk
Your running your bot twice
Thats basic python
Really?
Conditionals are basics ,-,
nop
Regen your token
๐
Never knew
;-;
I just make fun of myself everytime

Mother dearest told me not to share private info online
Smh
Eevee's about me works
We can literally right click-copy your discord ID

ikr ๐
Smh
!ot
Off-topic channels
There are three off-topic channels:
โข #ot2-never-nesterโs-nightmare
โข #ot1-perplexing-regexing
โข #ot0-psvmโs-eternal-disapproval
Their names change randomly every 24 hours, but you can always find them under the OFF-TOPIC/GENERAL category in the channel list.
Please read our off-topic etiquette before participating in conversations.
Send code
how to send like that
!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.
@client.command()
async def sapinuke(ctx, member: discord.Member, count: int):
if ctx.author.id == 499973767846428694:
c = 0
while True:
nuke_r = random.choice(list_data.nuke_list)
await ctx.send(f"get nuked {member.mention} {nuke_r}")
c +=1
if c == int(count):
break
else:
continue
else:
await ctx.send("You can't use that. smh")
Why the while loop?
its good smh
Whats in it
nop
Wha...
seems like its agaisnt tos
Whats in the list
!d discord.on_guild_update
discord.on_guild_update(before, after)```
Called when a [`Guild`](https://discordpy.readthedocs.io/en/master/api.html#discord.Guild "discord.Guild") updates, for example:
โข Changed name
โข Changed AFK channel
โข Changed AFK timeout
โข etc...
Huh?
huh
o
#bot-commands
Whats the command for?
thx i was just gonna use it for stuff
Alr
@tacit horizon am I just gonna get ignored?
spam user name ๐
sad
The given user?
ya
Use the member arg
Best of luck getting rate limited
Since its a member obj just mention it with the .mention attr
Lol
Use a while loop and set the amount
Reset your token
Just regen your token ,-,
Your probably running your bot 2 times
I said this 2 times before
Guess you got ignored 
;-;
As usual
but my api reply me once
Wdym?
@tacit horizon try using another command
ya i did
its working fine
only that command gives 2
Nvm im not going to say anything
smh
Best of luck finding out
i was gonna say he had 2 instances of the bot runnin
noo
but i had a feeling my point was invalid
self host other one
so you have your bot hosted twice?
noo
Lol
I'm guessing that's not it because his AI api replies once
How do I get the roles without using utils.get
!d discord.Guild.get_role
get_role(role_id, /)```
Returns a role with the given ID.
@quick gust would this work never tried it before?
await ctx.send(member.mention*amount)
Yes this would work
never tried either but in theory it should?
Yeah i figured
ye
Isnt using a for loop better tho ,-,
both bot has same problem
No hes not gonna iterate through a list?
thhis you right now?
Depends
- they want to mention a member a specific amount of times, why for loop for that?
^
nop i have api
why not hmm
!e
print("okimii"*5)
@slate swan :white_check_mark: Your eval job has completed with return code 0.
okimiiokimiiokimiiokimiiokimii

it's extremely unnecessary if u manage to pull it off
Lol
Just why
Just why not

Lol
just leave it

ya after 5 msg
Yeah
Still against tos
*tos
?
?
He means to unpack tos
Wdym unpack
