#discord-bots
1 messages · Page 503 of 1
^
how are you getting the id
you cant get the id from right clicking it btw
full code pls
of that emoji
i deleted that code
that will copy the message id
cuz it was sending None
but?
then?
?
\:emoji:
this also if u will send in other server this will become just a name
what?
yea
im talking about right clicking it
right clicking on emoji
then how are you testing that?
just used await bot.get_emoji(id)
you need an async function, send attr to send this
also used await ctx.send("<:name:>747387427895")
you can't just use that
oh
i mean
async def event_or_command():
get_emoji
send(emoji)
then can u send that?
emoji = bot.get_emoji(id)
full code of command
If you want the emoji's ID just do \:emoji: and copy the number. Or, you can copy the whole result and use it in the string.
Try and instead of or.
i defined
where?
now i wrote that
i deleted that line
to show u i wrote that
but it didn't worked that time
uh, afraid of showing ids ok
so i deleted that line
i just wrote id there for now :/
rewrite emoji = bot.get_emoji(id) to emoji = bot.get_emoji(replace_this_with_your_emoji_id)
and show output
like screenshot of what bot sends
without making a variable?
with ofc
ok
i told it send None instead of emoji
yes other variant is <[a]:emo_name:emo_id>
it send name of emoji
like <:name:>
is your bot on the server where is this emoji?
no
are you passing in the id as a string?
but my bot is in 58 servers
i cannot tell everyone to add
like mee6 also use some emojis
of him
Your bot should be on the server with that emoji to use it
you can't change it
what
i just mean that
OMFG
?
.
this emoji is not on your server
@slate swan @slate swan it shows cogs is not define. You see idk how to setup a cog so i want you guys to help please. All youtube videos directly jump main stream knowledge so i can't understand. btw i want to connect it to music.py file
but it is on server where mee6 is
What is?
i also tried my emoji where my bot is
Why do you want to get the emoji with its ID? Just do \:emoji:.
 = 
Try doing \:lemon_cop:.
but wht if i will use this in the server whre this emoji is not uploaded
you just didn't define cogs
It doesn't matter.
it will work?
YESSS
Yes.
by bot?
@steep estuary
Try {message.author.mention}
i wanna know how
oh
No, by magic.
in cogs?
learn python if you don't know how to define variables
To mention the member
import asyncio
from discord.ext import commands
class cog_name(commands.Cog):
def __init__(self, bot):
self.bot = bot
def setup(bot):
bot.add_cog(cog_name(bot))``` if you use client instead of bot just change everything that says bit to client
hmm. thats true idk python fully
this will work??
ok
message*
your bot is on this server?
no
then it won't
@tough wagon is it on youtube like full python school is slow in 11th grade
I use bot instead of client, it works every time.
If the bot is in the server where the emoji is, yes. Discord bots have nitro.
same
youtube tutorials are bad
Yes 😠
where to learn like quality thing yk
Practice
(but they can't use animated avatar)
Limited nitro, yes.
!resources and practice, make a project
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
this one?
File "C:\Users\New\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "c:\smpbot\main.py", line 184, in play
if not voice.is_playing():
AttributeError: 'NoneType' object has no attribute 'is_playing'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\New\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\ext\commands\bot.py", line 939, in invoke
await ctx.command.invoke(ctx)
File "C:\Users\New\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\ext\commands\core.py", line 863, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "C:\Users\New\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\ext\commands\core.py", line 94, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'NoneType' object has no attribute 'is_playing' ```
I made a play command and getting this error
error means voice is None
can't say anything else
:hello: is this correct this is my server's emoji
oops
understood
what can I do now?
you haven't got nitro lol
This is my play command ```py
@bot.command()
async def play(ctx, url):
YDL_OPTIONS = {'format': 'bestaudio', 'noplaylist': 'True'}
FFMPEG_OPTIONS = {
'before_options': '-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5', 'options': '-vn'}
voice = get(bot.voice_clients, guild=ctx.guild)
if not voice.is_playing():
with YoutubeDL(YDL_OPTIONS) as ydl:
info = ydl.extract_info(url, download=False)
URL = info['url']
voice.play(FFmpegPCMAudio(URL, **FFMPEG_OPTIONS))
voice.is_playing()
await ctx.send('Bot is playing')
I don't know, your voice variable is just returning None, you didn't show code so I don't know why
yes if i am using that here it is changing in :hello: but when i am using his sentence in my server it is showing u don't have nitro
is there any reason why i should make my bot open source
@tough wagon that will help right?
yeah ig
make this check like if voice is not None and not voice.is_playing():
ok
i just used the emoji which is in the server where the bot is
how much time to learn fully a year?
hmm
this is my code ```py
@bot.command()
async def join(ctx):
channel = ctx.message.author.voice.channel
voice = get(bot.voice_clients, guild=ctx.guild)
if voice and voice.is_connected():
await voice.move_to(channel)
else:
voice = await channel.connect()
players = {}
@bot.command()
async def play(ctx, url):
YDL_OPTIONS = {'format': 'bestaudio', 'noplaylist': 'True'}
FFMPEG_OPTIONS = {
'before_options': '-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5', 'options': '-vn'}
voice = get(bot.voice_clients, guild=ctx.guild)
if not voice.is_playing():
with YoutubeDL(YDL_OPTIONS) as ydl:
info = ydl.extract_info(url, download=False)
URL = info['url']
voice.play(FFmpegPCMAudio(URL, **FFMPEG_OPTIONS))
voice.is_playing()
await ctx.send('Bot is playing')
else:
await ctx.send("Bot is already playing")
return
!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)
Do \:lemon_cop:.
Type this here.
I don't know, on my experience it was like:
1st year: youtube tutorials
2nd year: google, stackoverflow and docs
3rd year (not finished): this server
?
ok i will be back in may by that time i will only ask things and learn pytthon
Type \:lemon_cop:.
thanks byee
??
With a \ before it.
use \
the name is changing
And without the
and emoji name
voice = get(bot.voice_clients, guild=ctx.guild), ctx.voice_client exists
here also ?
We won't help with projects that include ytdl
ooh
What does the parameter Pass_Context do in a command?
No, not in the code.
wht
nothing
Just in Discord so you can copy it.
no
i tried
bruh
but this is not working
really? i always didn't use it and didn't know for what is it xD
hey
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: __aenter__
hello
Who are you watching?
can someone tell me what's this?
same
nice error
the thing doesnt support an async context manager
when I use play directly it shows "Bot is already playing"
and after using join command this error occurs:
[youtube] Downloading just video JKNz9RGft_0 because of --no-playlist
Ignoring exception in command play:
Traceback (most recent call last):
File "C:\Users\New\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "c:\smpbot\main.py", line 187, in play
voice.play(FFmpegPCMAudio(URL, **FFMPEG_OPTIONS))
File "C:\Users\New\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\player.py", line 225, in __init__
super().__init__(source, executable=executable, args=args, **subprocess_kwargs)
File "C:\Users\New\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\player.py", line 138, in __init__
self._process = self._spawn_process(args, **kwargs)
File "C:\Users\New\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\player.py", line 147, in _spawn_process
raise ClientException(executable + ' was not found.') from None
discord.errors.ClientException: ffmpeg was not found.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\New\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\ext\commands\bot.py", line 939, in invoke
await ctx.command.invoke(ctx)
File "C:\Users\New\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\ext\commands\core.py", line 863, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "C:\Users\New\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\ext\commands\core.py", line 94, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: ClientException: ffmpeg was not found```
WDYM
we dont have enough info so we dont know what exactly caused the error
even google have no answer how to use any emoji anywhere in discord.py
async with cur.execute("SELECT exp FROM guildData WHERE guild_id = ? AND user_id = ?", (ctx.guild.id, member.id)) as cursor:
i am searching from 1 week
unless you send the full traceback, we can do nothing
this is the line causing error
check this one
ok it means you cant do async with ...
ahem?
any replacement for it?
!d discord.ext.commands.Context.voice_client
property voice_client: Optional[VoiceProtocol]```
A shortcut to [`Guild.voice_client`](https://discordpy.readthedocs.io/en/master/api.html#discord.Guild.voice_client "discord.Guild.voice_client"), if applicable.
aa i don't want this
are you using aiosqlite?
sqlite3
sorry, I'm not good at ytdl, but as I see you have error that ffmpeg is not defined
remove async
!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)
who knows!?
can i take a emoji from a server and by storing it in a dict can i use it anywhere?
i know that it's not allowed, but I didn't help about it
that I imported from discord import FFmpegPCMAudio
you dont have ffmpeg installed
it is installed
(dont download it through pip)
I thought you were asking for help, my bad.
wut
you need the exe
aaa today this error irritated me very much
i gave up
but the error didn't solved
what?
(me an ubuntu user: hehe)
I remove async then?
^
i mean, i told you to do so
^
remove async
I don't know. What do you think?
remove async
done but I have the same error
I did
AttributeError: __aenter__ only gets raised when something doesnt support async with
updated? restarted?
yea
you arent getting the same error if you changed it
except KeyError:
auction[str(itemname)] = {}
I just changed to aiosqlite
from sqlite3
and it's solved now
how do i get all the other stuff?
define them in except?
Any idea?
client.embed_color = discord.Color.from_rgb(
config['Embed Settings']['Color']['r'],
config['Embed Settings']['Color']['g'],
config['Embed Settings']['Color']['b']
)
client.footer = config['Embed Settings']['Footer']['Text']
client.footer_image = config['Embed Settings']['Footer']['Text']['Icon URL']
client.playing_status = config['Playing Status']
client.prefix = config['Prefix']
"{prefix}help".format(prefix = client.prefix)
how to use basic discord emotes using their alias
try it again?
with like bots
is there a way to have a cooldown on a cooldown? i dont want people to be spamming commands and my bot getting ratelimited for sending this command is on cooldown
Yeah
is that a yeah to me?
is there a way to take the member variable that I get from here and use it in another part of my code?
@bot.event
async def on_message(message):
member = message.author
@buttons.click
async def button(ctx):
#I need the member from the on_message to be here as well
ctx.member?
i mean through the on_message i get a completely different member than if i used ctx.member
i need that same member from the on_message to be in the other spot
so i was wondering if its possible to like import the member variable from the on_message into the other spot or something
Footer does not exist
in embed settings
in embed settings
hey
put Footer in embed settings
any help here
Don't get it sorry
Copyright (C) Microsoft Corporation. All rights reserved.
Try the new cross-platform PowerShell https://aka.ms/pscore6
PS C:\Users\Mohamed_Zeton\Desktop\JOB 1> & C:/Users/Mohamed_Zeton/AppData/Local/Microsoft/WindowsApps/python3.9.exe "c:/Users/Mohamed_Zeton/Desktop/JOB 1/job.py"
CursedMC is ready.
Ignoring exception in on_raw_reaction_add
Traceback (most recent call last):
File "C:\Users\Mohamed_Zeton\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\client.py", line 343, in _run_event
await coro(*args, **kwargs)
File "c:\Users\Mohamed_Zeton\Desktop\JOB 1\job.py", line 186, in on_raw_reaction_add
await member.add_roles(role)
File "C:\Users\Mohamed_Zeton\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\member.py", line 777, in add_roles
await req(guild_id, user_id, role.id, reason=reason)
File "C:\Users\Mohamed_Zeton\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\http.py", line 248, in request
raise Forbidden(r, data)
discord.errors.Forbidden: 403 Forbidden (error code: 50013): Missing Permissions```
this error in this part of code
@bot.listen()
async def on_raw_reaction_add(payload):
message_id = payload.message_id
if message_id == 892480300762947634: ## add id msg of the msg you want ppl to react to to get role
guild_id = payload.guild_id
guild = discord.utils.find(lambda g: g.id ==guild_id, bot.guilds)
if payload.emoji.name == 'verified':
role = discord.utils.get(guild.roles, name='verified')
elif payload.emoji.name == 'fola':
role = discord.utils.get(guild.roles, name='fola')
else:
role = discord.utils.get(guild.roles, name=payload.emoji.name)
if role is not None:
member = payload.member
if member is not None:
await member.add_roles(role)
print("done")
else:
print("memeber not found")
else:
print("role not found ")```
you dont have perms to add roles
how the bot have admin perms
the bots highest role has to be higher then the role you are trying to give
Not sure if this is the best way but you can do bot.member = message.author although, the bot.member var will keep on changing to however types, also make sure to have it as bot.member = None outside the on_message
it doesn’t have perms to add a role higher than it or possibly to a person above them
magic lmao first time knowing about this thanks
worked even if bot have admin role the bots role should be top of the role you want to give
have you tried manualy setting the role id?
How?
client.embed_color = discord.Color.from_rgb(
config['Embed Settings']['Color']['r'],
config['Embed Settings']['Color']['g'],
config['Embed Settings']['Color']['b']
)
client.footer = config['Embed Settings']['Footer']['Text']
client.footer_image = config['Embed Settings']['Footer']['Text']['Icon URL']
client.playing_status = config['Playing Status']
client.prefix = config['Prefix']
"{prefix}help".format(prefix = client.prefix)
log_channel_id = config['Log Channel ID']
nope
do you know what a dict is? yml is like dict put Footer in Embed Settings
role = discord.utils.get(guild.roles, name='verified')
replace with
role = guild.get_role(id)
alright thanks ill try that out
bruh the second one is easier but the bot i want that the emoji name same as role that the owner of it can edit the role and that shit
How do I make an ascii command that does this?
thanks anyway
english?
@slate swan Sorry but I still don't get it
?
do you know how dict works
turkish ?
No
learn python dict pls and then it will click
the
await member.remove_roles()
command is slow when the member has no roles, is there anyway to fix this?
if not member.roles == []:
Just if not member.roles: would do
if its slow when the user has no roles then check if the user does not have any roles
Yes
this worked i guess
yes
it seems like the bot is stuttering when it comes to removing my roles in specifically
you know you can do await member.remove_roles(*roles) instead of loop r
i have to check if the member has the role before hand
it does that automaticly
hey i have question out here
yes?
@bot commands
@commands.has_permissions(manage_messages=true)```
then where is the lag coming from
what does this do ?
api? ratelimit?
if make only ppl who have mange messages perm that can use this command ?
idk i saw it in yt video
It should be a capital T True
Yes
oh how do i change it like staff role ?
like if ppl have staff role can use this command
Anyone knows how to remove a user reaction of a partialemoji class?
@commands.has_role(role)
Im using raw_reaction_add to make a reaction role command
Or @commands.has_roles(roles)
and i add var role in the line before it the role id right ?
ohhohohohoh \
Does it work?
Yes
You can treat PartialEmoji just like Emoji when it comes to removing reaction if that's your question
await msg.remove_reaction(emoji, member)
thx
👍
File "c:\Users\Mohamed_Zeton\Desktop\JOB 1\job.py", line 181, in <module>
@commands.has_roles(891031599708266633)
AttributeError: module 'discord.ext.commands' has no attribute 'has_roles'
PS C:\Users\Mohamed_Zeton\Desktop\JOB 1> ```
@bot.command()
async def emoijfy(ctx,*,text):
emoijs = []
for beans in text:
if beans.isdecimal():
num2word ={'0':'zero','1':'one','2':'two','3':'three','4':'four','5':'five','6':'six','7':'seven','8':'eight','9':'nine'}
emoijs.append(f':{numword.get(beans)}:')
elif beans.isalpha():
emoijs.append(f':regionalindicator{beans}:')
else:
emoijs.append(beans)
await ctx.send(''.join(emoijs))
i get this error
@bot.command()
@commands.has_roles(891031599708266633)
async def unmute(ctx ,member : discord.Member,):
guild =ctx.guild
mutedRole = discord.utils.get(guild.roles, name="Muted")
await member.remove_roles(mutedRole)
await ctx.send(f"Unmuted {member.mention}")
Give me eroor
in this code
Gimme a sec
ok
Oh mbbb
It's has_any_role
For your case since you only have 1 role you should use has_role instead
oh ok
dont copy code and come here because theres an error
Nope I do a tutorial
Still, I've seen the code a thousand times
Thats the same..
Oh sorry
how can i do this lol?
Well I mean, it's fine to copy code if you can understand what it does
bot.dct = {}
bot.dct[ctx.guild.id] = True
thx
np
Or atleast try to do so
Any idea?
client.embed_color = discord.Color.from_rgb(
config['Embed Settings']['Color']['r'],
config['Embed Settings']['Color']['g'],
config['Embed Settings']['Color']['b']
)
client.footer = config['Embed Settings']['Footer']['Text']
client.footer_image = config['Embed Settings']['Footer']['Text']['Icon URL']
client.playing_status = config['Playing Status']
client.prefix = config['Prefix'].format(prefix = client.prefix)
"{prefix}help".format(prefix = client.prefix)
Maybe lowercase f?
where?
Gimme a sec
KeyError
If you get a KeyError, it means what you are looking for isn’t in the dict/json. There are many solutions for this:`
- Make a try-except to make a default value
- Add the key manually
- If its a discord bot and you are making a custom prefix thingy, simply kick the bot and invite it again (you need the on_guild_join part for this)`
We have no way of helping you since we don't know what config is and stuff so here is what a KeyError is and how to solve it
The best way is to use .get
.get ?
get(key[, default])```
Return the value for *key* if *key* is in the dictionary, else *default*. If *default* is not given, it defaults to `None`, so that this method never raises a [`KeyError`](https://docs.python.org/3.10/library/exceptions.html#KeyError "KeyError").
This is also what you'll usually encounter in production
len(bot.commands) I believe
oh uhh
hmmmmmmmmmmmmmmm
TextChannel
oh ty
!d discord.TextChannel.overwrites_for
overwrites_for(obj)```
Returns the channel-specific overwrites for a member or a role.
ik
i was looking for the permissions attributes
thats why i looked for overwrites
mmhmm
i was able to find em, thx B)
👍
await crowbot_channel.send(embed = embed)
AttributeError: 'NoneType' object has no attribute 'send'

crowbot_channel is None, show us how you defined it
but it says it has no attribute send which makes no sense 😛
crowbot_channel = self.bot.get_channel(config["Channels"]["Crowbot"])
await crowbot_channel.send(embed = embed)
@rustic onyx it does, because crowbot_channel is None
Does make sense
!e crowbot_channel.send('makes sense')
@cloud dawn :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 'crowbot_channel' is not defined
print(config["Channels"]["Crowbot"])`
1 sec
is config["Channels"]["Crowbot"] an int?
ohoh wait
fucking me lmao
it was none, yeah
you were right, I got my error
thanks for answering guys
supportEm = embed.Discord(title=namet)```
bruh lmaooo, im so sleepy i put "embed.Discord" instead of "discord.Embed"
im so dum rofl
ok now I did the print thing and its returning an int
but still have the same error
await self.coro(*args, **kwargs)
File "D:\Discord Bots\CrowBot\Cogs\openinterest.py", line 43, in binance_btc_oi
await crowbot_channel.send(embed = embed)
AttributeError: 'NoneType' object has no attribute 'send'
crowbot_channel = self.bot.get_channel(config["Channels"]["Crowbot"])
await crowbot_channel.send(embed = embed)
printing config["Channels"]["Crowbot"] returns
892169591172792320
no difference
its just how you define it
nah
In which context
There is a big difference between discord.Bot() and discord.Client()
one is for commands other is not.
I would suggest bot because it's better practice but it doesn't make a difference
One is badly named other one is not.
it makes
It doesn't
discord.Bot() inherits discord.Client()
How to implement the option to watch youtube video in loop or n-amount of times in this discord music bot?
@commands.command()
async def play(self, ctx, url):
ctx.voice_client.stop()
FFMPEG_OPTIONS = {'before_options': '-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5', 'options': '-vn'}
YDL_OPTIONS = {'format':"bestaudio"}
vc = ctx.voice_client #we need to declare our voice chat
with youtube_dl.YoutubeDL(YDL_OPTIONS) as ydl:
info = ydl.extract_info(url, download=False)
url2 = info['formats'][0]['url']
source = await discord.FFmpegOpusAudio.from_probe(url2, **FFMPEG_OPTIONS)
vc.play(source) #play the audio
I was trying to put something in the play command so if I put the command ? play url [2] then let the music repeat twice.
Or when input the command ? play url [6] then let the music repeat six times the url music.
I mean, with some [] you can indicate how many times to repeat, or if you simply omit the [], putting only ? play url then repeat it only once
Not talking about that
!rule 5
5. Do not provide or request help on projects that may break laws, breach terms of services, or are malicious or inappropriate.
We won't help with projects that include ytdl
so you're talking about naming convention?
!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)
It's like the 10th time that someone does that in the last few minutes lmao (asking about ytdl)
Yes
!ytdl
channel cooldown of 30s
ohh thank you so much anyway
Do you know someone or a place where they can help me with this bot?
i don't know any place like that
the reason why it is a command is because people don't bother to read the pinned messages.
that helps breaking ToS
Idk whats wrong with this cuz it just happened and I didn’t change even didn’t touch it but my modmail system is giving me this error https://hastebin.com/zicupaxuno.properties
If i did know i'd report the server.
I imported datetime and everything too
it's not utcnow() it's just now()
await crowbot_channel.send(embed = embed)
AttributeError: 'NoneType' object has no attribute 'send'
still not defined?
wonder what crowbot_channel's type is
crowbot_channel = self.bot.get_channel(config["Channels"]["Crowbot"])
await crowbot_channel.send(embed = embed)
!e ```py
crowbot_channel = None
crowbot_channel.send('yep')
@cloud dawn :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 2, in <module>
003 | AttributeError: 'NoneType' object has no attribute 'send'
self.bot.get_channel(config["Channels"]["Crowbot"]) = None
can you print(config["Channels"]["Crowbot"])?
:/
it prints a channel id
use time.time() instead
this one specifically
Does the channel with that ID exist?
yup
convert the id to int
It’s still giving error
int(config["Channels"]["Crowbot"])
@outer violet
datetime.datetime.now()
It worked thank you
not working
then ig the id's wrong
How do I make that message only send once? https://hastebin.com/zicupaxuno.properties
its not.
Bot could be running twice
check cmd
It’s not .-.
Idk what you mean by that but there’s only one embed for it .-.
then it has no solution I guess 😛
Please don't use that word in this server
!d discord.Event @slate swan
No documentation found for the requested symbol.
There's nothing such as discord.Event.
It's discord.on_message_delete.
!d discord.on_message_delete
discord.on_message_delete(message)```
Called when a message is deleted. If the message is not found in the internal message cache, then this event will not be called. Messages might not be in cache if the message is too old or the client is participating in high traffic guilds.
If this occurs increase the [`max_messages`](https://discordpy.readthedocs.io/en/master/api.html#discord.Client "discord.Client") parameter or use the [`on_raw_message_delete()`](https://discordpy.readthedocs.io/en/master/api.html#discord.on_raw_message_delete "discord.on_raw_message_delete") event instead.
This requires [`Intents.messages`](https://discordpy.readthedocs.io/en/master/api.html#discord.Intents.messages "discord.Intents.messages") to be enabled.
!d discord.ext.commands.Bot.event
@event```
A decorator that registers an event to listen to.
You can find more info about the events on the [documentation below](https://discordpy.readthedocs.io/en/master/api.html#discord-api-events).
The events must be a [coroutine](https://docs.python.org/3/library/asyncio-task.html#coroutine "(in Python v3.9)"), if not, [`TypeError`](https://docs.python.org/3/library/exceptions.html#TypeError "(in Python v3.9)") is raised.
Example
```py
@client.event
async def on_ready():
print('Ready!')
He was doing !d discord.Event.on_message_delete.
i dont want this command to work is there a way to turn it off?
!d discord.ext.commands.Command.enabled
A boolean that indicates if the command is currently enabled. If the command is invoked while it is disabled, then DisabledCommand is raised to the on_command_error() event. Defaults to True.
why would you not want the help command?
Does PythonCharm need a specific version to be running?
pythoncharm?
I think they want to turn off the default one
im coding the command separately, <commands, <about, etc, not just one command
that's bad
Then you can use bot.remove_command
Not unless you want to make a custom one :}
Why would it be bad?
ok
For discord.py. I tried to run that but it doesn't work.
Because you need to hardcode a lotta stuffs
no?
?
!d discord.ext.commands.MinimalHelpCommand
class discord.ext.commands.MinimalHelpCommand(*args, **kwargs)```
An implementation of a help command with minimal output.
This inherits from [`HelpCommand`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.HelpCommand "discord.ext.commands.HelpCommand").
Did you read what i said
Yeah
I said "you need to hardcode a lotta stuffs when you remove the default help command and make a custom one"
And there also is a kwarg in commands.Bot() to disable the default help command, but if you wanna modify it subclassing is the fastest option.
You don't need to hard code anything if you make a custom one.
You could and that is bad, doesn't mean you need to do it.
subclassing makes it easy
Yes
Okay let me reformulate my question.
Is it possible to use PyCharm with discord.py?
If so, is there a required version of Python for this?
discord.py requires python 3.8+
It did recognize import discord, but not from discord import commands.
?
It's from discord.ext import commands
I’ll see if I set discord.ext or discord only, I’ll let you know later
Ok
I’ll give more details later, because I can’t have access to my pc right now xD
Well you could name it discord
I don’t think it works if you put discord only, I tried it.
Oh you meant like that hm.
Would be confusing for other coders
Does it make an impact on the code structure or?
Worst
So I have this command which I'm using to copy a embed msg from a specific channel and repost it if a msg link or ID is provided. I then also want it to accept a str which will contain a search phrase, if it finds the phrase in the title of a embed in the suggestions channel then I want it to make a string of all of the embeds which contain that string. I am getting this error py ERROR:cogs.error_handler:TypeError: object TextChannel can't be used in 'await' expression (In test_sug) Traceback: File "/home/snowyjaguar/.local/lib/python3.8/site-packages/discord/ext/commands/core.py", line 85, in wrapped ret = await coro(*args, **kwargs) File "/home/modmail/cogs/some_commands.py", line 14, in test_sug suggestions = await self.bot.get_channel(id = self.suggestions) and this is my code so farpy @commands.command(description = "Lets users locate a specfic suggestion via it's message ID or link.", usage = "sug <[messsage link|ID] | [phrase]>", aliases = ["find", "find-sug", "search", "search-sug"]) async def test_sug(self, ctx, search: str): suggestions = await self.bot.get_channel(id = self.suggestions) if search == discord.Message: message = self.bot if search.channel == suggestions: await ctx.reply(embed = search.embeds[0].copy(),) else: with ctx.typing(): matches = 0 output = " " messages = await suggestions.history(limit = None, before = None, after = None, around = None, oldest_first = None).flatten() for message in messages: if search in message.content: matches += 1 output = (f"[{message.embeds[0].title()}]({message.jump_url})" + output) embed = Embed(title = "I found `{len(matches)}` suggestions matching `{serach}`.", description = output) await ctx.reply(embed = embed)
Idk if it was on purpose.
Just don't import something else as discord
Oki
get_channel isn't a coro
You do not await it
ah okay, i'm more familiar with fetch_message
copy()```
Returns a shallow copy of the embed.
how do i run a bot
!d discord.ext.commands.Bot.run
run(*args, **kwargs)```
A blocking call that abstracts away the event loop initialisation from you.
If you want more control over the event loop then this function should not be used. Use [`start()`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.Bot.start "discord.ext.commands.Bot.start") coroutine or [`connect()`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.Bot.connect "discord.ext.commands.Bot.connect") + [`login()`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.Bot.login "discord.ext.commands.Bot.login").
Roughly Equivalent to...
Basically anything that is named fetch is a coro that has to be awaited, every get_ is a cached item that is not awaited.
interesting
it cant login with a tokeN?
like a bot token
yes, you need to pass the token as arg
ok
It can’t cause it doesn’t know which BOT is supposed to run.
how do i do that im new to Python
same too ^
well I'm assuming that he knows how to make an instance of Bot
someone sent me a code
no
Then learn python first
!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.
Before jumping into making discord bots
I really enjoy python, but I heard that discord.py doesn’t support anymore, do you use any alternatives or the current discord.py? @reef shell
We can help but we are not going to hold your hand.
There are many forks
discord.py supports it right now, if you want to use something else i recommend using a compiled programming language.
thx
You can keep using discord.py untill discord makes breaking changes to their api which may conflict with dpy
I think except only works if there’s try: right?
Does discord.py have slash commands included?
no
Could also be that there is an unclosed parenthesis.
Oof
man slash commands are just so eh
I made an HTTP server to test out for slash commands, so limiting
Not even worth it imo to do it over HTTP server like everyone was recommending
I'd agree the syntax right now is just 
Lol
its how limiting it is, esp with the returns
I like the idea but it's pretty badly executed.
thats what everyone says its overdone
People mostly use java for this kind of task
slash commands could be an option but making message intent privileged is........
https://gist.github.com/an-dyy/3b97079b5ad813ff4184c871e3433476 here was how I did them
what I was talking about is the return which discord takes and does something with
its way to limiting, cannot do regular use stuff
other then send messages and deferring an interaction
yeah that's sad altohugh i've heard they may be allowing it for moderation bots so that's nice
first result about discord slash commands is discord-interactions
How would that work? Then everyone would just check the box for moderation bot.
That's a 3rd party extension for dpy afaik
discord.py is also 3rd party
So that makes a 3rd party of a 3rd party
hahaha funny funny. Jokes asides, I might just use it.
There is no checkbox for moderation iirc
Oh yeah, one more thing.
Is it possible to play an mp3 file from a bot in vc, but that mp3 file is stored locally?
Why not
In java, I heard it was possible through google drive, but I'm not sure if Python can
java can also do it locally
ye
👍
I'm not sure how am I supposed to search for on google. Because most of the results are affiliating with youtube_dl, but we can't do that.
google drive?
what?
your about-me is amazing, blanket.
thanks
h
i put alot of effort into it
a piece of art
i can tell.
Yeah so. I'm not sure if it's possible to make a bot play from mp3 file, but I'll continue my deep research on it.
i've seen this before pretty neat, i'd do it too if i wasn't so lazy.
Wait really?
!d discord.FFmpegOpusAudio
class discord.FFmpegOpusAudio(source, *, bitrate=128, codec=None, executable='ffmpeg', pipe=False, stderr=None, before_options=None, options=None)```
An audio source from FFmpeg (or AVConv).
This launches a sub-process to a specific input file given. However, rather than producing PCM packets like [`FFmpegPCMAudio`](https://discordpy.readthedocs.io/en/master/api.html#discord.FFmpegPCMAudio "discord.FFmpegPCMAudio") does that need to be encoded to Opus, this class produces Opus packets, skipping the encoding step done by the library.
source param?
Yeah
People are implementing this with youtube_dl, but it doesn't have any dependencies with it right?
why would you need ytdl for local files
You need FFmpeg
thx that works
Cause most of the results with mp3 are affiliated with youtube_dl which is not something I want.
okokok
what? didn’t you say you have a local file
i dont see why ytdl is even mentioned here
Yeah it's local, this is my goal. I just meant that when I research that, it's just about tutorials of bots using youtube_dl for youtube videos.
Not really, I don't really know where to start. I need to understand this first.
You need to create an Instance of this I believe then pass that to Voiceclient.play
ok one of my commands was 700 lines
lol
As a @commands.command?
what command was it?
oof
Does it affect the time of booting up a bot?
think it was an eval with no external imports
no
Most commands are around 2000 lines considering everything is an object in python.
lines don’t affect anything
I see
the lib im using doesnt even have a command handler
Make your own
Method does affect something like speed but tbh if you want a fast bot don't use python.
its all in the messageCreate function
why cant you use decorators
what is a good way for implementing music commands without youtube_dl
If you can't use decorators just manually register them or some other way
Where would you get the music?
because its not using python xp
There is no reason you need to copy discord.py exactly lol
@commands.command(description = "Lets users locate a specfic suggestion via it's message ID or link.", usage = "sug <[messsage link|ID] | [phrase]>", aliases = ["find", "find-sug", "search", "search-sug"])
async def test_sug(self, ctx, search: Union[discord.Message, str]):
suggestions = self.bot.get_channel(id = self.suggestions)
if search == discord.Message:
await ctx.reply(embed = search.embeds[0].copy(),) # components = """Needs a button linking to the message"""
else:
with ctx.typing():
matches = 0
output = " "
messages = await suggestions.history(limit = None, before = None, after = None, around = None, oldest_first = None).flatten()
for message in messages:
if search in message.content:
matches += 1
output = (f"[{message.embeds[0].title()}]({message.jump_url})" + output)
embed = Embed(title = f"I found `{matches}` suggestions matching `{search}`.", description = output)
await ctx.reply(embed = embed)```So I have this command which I'm using to copy a embed msg from a specific channel and repost it if a msg link or ID is provided. I then also want it to accept a str which will contain a search phrase, if it finds the phrase in the title of a embed in the suggestions channel then I want it to make a string of all of the embeds which contain that string. I am getting this error ```py
ERROR:cogs.error_handler:TypeError: 'in <string>' requires string as left operand, not Message (In test_sug)
Traceback:
File "/home/snowyjaguar/.local/lib/python3.8/site-packages/discord/ext/commands/core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "/home/modmail/cogs/some_commands.py", line 24, in test_sug
if search in message.content:```
Should be easy anyhow, command handlers are really just a glorified string parser
tbh anything other than yt because of their tos
What streaming platform then?
i would rather take it to dms ¯_(ツ)_/¯
every other platform disallows it too
really damn nm then
nocopyrightsounds allows it
they got a site
they cant just be like "here, break the law"
ty for that
im giving my bot a feature where you can use the command <mobprofile [mob name] and it will show you the stats of a minecraft mob, not even halfway done with the profiles lmao
that should be easy with some kind of api

im new to python so im gonna do it my way for now.
heres an example of how it turns out:
not bad
and im sure, considering how popular mc is there would be some apis that do that
im still not gonna try that yet
so you’re writing the data manually?
data?
for the mobs
yeah

that sounds like pain
yep.
its actually pretty fun imo
You'd miss a lot of things though
although finding the transparent pngs for the mob emojis is a pain
The api also has things like weakness and drop change etc.
i dont want it that complicxated yet. my friend wanted me to add things like where it shows the mobs health while wearing armor and im not adding that yet
yeah thats complicated
mhm
i could help
well if u need help hmu
aren’t there like 3 mobs who can wear armor??
lmao

this is a minecraft SMP im making it for, commands are against the rules
o.o
i see an ender dragon flexing in leather armor rn
silverfish wearing a pumpkin as a helmet 👀
silverfish in prot 4 netherite armor
creeper with elytra
!ot
Off-topic channels
There are three off-topic channels:
• #ot0-psvm’s-eternal-disapproval
• #ot1-perplexing-regexing
• #ot2-never-nester’s-nightmare
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.
Well if no ones got an issue i don't see why the chat has to be quite imo
ya
!rule 7
7. Keep discussions relevant to the channel topic. Each channel's description tells you the topic.
It's just that ot conversations can bury questions sometimes and that is annoying.
mhm
so i have a question
hm?
this started out as a bot-related conversation and moved away from that, do you expect us to switch channels every time the topic of conversation changes even though its the same conversation?
they want that, yes
I'd agree with changing channels if there would be any ongoing questions.
mhm
changing or stopping an ot conversation is completely up to the people talking, whether they get warned for breaking a rule is in their hands. this isnt the channel for a conversation about MC.
ok
ok
We are still going to be polite to one another, snow is just informing us.
mhm
indeed. i didnt mean to be rude if i was.
u werent
i was just making sure that i understood what was expected of me and u were helping 😉
Actually i think i'm just going to ask staff what their though would be on the matter. This has gotten me curious.
ok
yeah, i mean maybe an OT conversation wouldnt be all that bad given that there are no on-going questions in the channel as of now, but rules are rules.
very true, i dont wanna get banned like i have in other servers
MDK's to be specific
you wouldnt get banned, ive gotten verbally warned a few times about having an OT conversation here, it isnt a very strict rule that is always watched for. but respectfully, i follow it
That's what i was trying to say if it was not clear, i also got annoyed by some people that would have ot convo's here while people were asking questions. Even though i got a vertical monitor it is still annoying to search the question.
ok
right.
it just depends on the situation i guess.
any ideas for features i should add to my bot? lets move to a bot-related topic now shall we?
lemme show screenshot of help menu
okay :)
update the help menu incomming
^^^
Update the help command
?
update it
what do u mean
😂
u guys weird
embeds
make an advanced paginated help command
idk how
mine uses buttons
Using subclassing
ive only subclassed a help command a couple times :p
pretend im new to python and just started learning about it 5 days ago and dont know what that is at all
subclassing is like making a second child 
-_-
andy!
and heres my awful help command
wow quality!
thanks imgur for being as bad as i remember
More like making a child
You wouldn't want to be inheriting genes from a first child 😅
i thought i heard never gonna give you up playing in the other room for a sec... phew
its a good song
wrong
not wrong
no no no i do the more you subclass it the worse the outcome most of the time will be.
its only good if you turn the volume down all the way
nah
I think the opposite, subclassing more is fine
my help commands code is ugly too
anyway, what commands should i add?
userinfo?
is that complicated?
no
ok... pls explain it to me then
music bot using aiohttp and nocopyrightsounds.
no
name is kinda sad ngl
lmao
me?
may i ask why it is so spaced out?
i love that
👀
u mean me?
-_-
slash commands will eliminate help commands anyways
im not using slash commands, they suck imo
https://github.com/an-dyy/0x42/blob/master/src/exts/help.py
the lib i use hasnt got anywhere close to that
what if i wanted to make a diceroll command, how do i randomize responses?
random.choice
the command
class Help(commands.Cog, name="Snow is weird"):
def __init__(self, bot):
self.bot = bot
self.cmds_per_page = 6
def get_command_signature(self, command: commands.Command, ctx: commands.Context):
aliases = "|".join(command.aliases)
cmd_invoke = f"[{command.name}|{aliases}]" if command.aliases else command.name
full_invoke = command.qualified_name.replace(command.name, "")
signature = f"{ctx.prefix}{full_invoke}{cmd_invoke} {command.signature}"
return signature
async def return_filtered_commands(self, walkable, ctx):
filtered = []
for c in walkable.walk_commands():
try:
if c.hidden:
continue
elif c.parent:
continue
await c.can_run(ctx)
filtered.append(c)
except commands.CommandError:
continue
return self.return_sorted_commands(filtered)
def return_sorted_commands(self, commandList):
return sorted(commandList, key=lambda x: x.name)
async def setup_help_pag(self, ctx, entity=None, title=None):
entity = entity or self.bot
title = title or self.bot.description
pages = []
if isinstance(entity, commands.Command):
filtered_commands = (
list(set(entity.all_commands.values()))
if hasattr(entity, "all_commands")
else []
)
filtered_commands.insert(0, entity)
else:
filtered_commands = await self.return_filtered_commands(entity, ctx)
for i in range(0, len(filtered_commands), self.cmds_per_page):
next_commands = filtered_commands[i : i + self.cmds_per_page]
commands_entry = ""
for cmd in next_commands:
desc = cmd.short_doc or cmd.description
signature = self.get_command_signature(cmd, ctx)
subcommand = "Has subcommands" if hasattr(cmd, "all_commands") else ""
commands_entry += (
f"• **__{cmd.name}__**\n``\n{signature}\n``\n{desc}\n"
if isinstance(entity, commands.Command)
else f"• **__{cmd.name}__**\n{desc}\n {subcommand}\n"
)
pages.append(commands_entry)
await Paginator(title=title, color=0xCE2029, entries=pages, length=1).start(ctx)
@commands.Cog.listener()
async def on_ready(self):
print(f"{self.__class__.__name__} cog has been loaded\n-----")
@commands.command(
name="help", aliases=["h", "commands"], description="Need help?"
)
async def help(self, ctx, *, entity = None):
if not entity:
await self.setup_help_pag(ctx)
else:
cog = self.bot.get_cog(entity)
if cog:
await self.setup_help_pag(ctx, cog, f"{cog.qualified_name}'s commands")
else:
command = self.bot.get_command(entity)
if command:
await self.setup_help_pag(ctx, command, command.name)
else:
await ctx.send("Entity not found.")``` lol
xD
yeah thats the code to my help command, but tbh i like andys more
local commandList = {
e = "Evaluate code you send",
lcmd = "Gets last used command",
respond = "Respond with a message",
ping = "Pong",
help = "Gets help..?"
}
local commandPerms = {
--[[
1; Everyone,
2; Mod,
3; Admin,
4; Owner
]]--
e = "4",
lcmd = "4",
respond = "1",
ping = "1",
help = "1"
}
if cmd == PREFIX..'help' then
helpstring = ""
for i, v in next, commandList do
helpstring = helpstring.."- Command: "..i.." [ "..v.." ]\nRequired Level: "..commandPerms[i].."\n"
end
message.channel:send("\`\`\`\nPermission List\n"..permList.."\n\`\`\`\n\`\`\`diff\nCommands\n"..helpstring.."\n\`\`\`")
commandUsed('help', message.author.name, message.channel.id)
end
return message.channel.send(random.randint(1, 6))
``` *realizing he made all his commands in on_command*
i have to
oh no..
mine doesnt have a proper command handler 😂
Why not?
Yeah -> #discord-bots message
i have to go, ill figure this out later
because it doesnt idk
I do recognize this code if i'm not mistaken... hmmmmm
you do.
local cmd, arg = string.match(message.content, '(%S+) (.*)'); cmd = cmd or message.content
``` is how i get the command name and the arguments (if any)
menudocs i see now
is that lua or something
😂
uh
no pls no lua
possibly
all of them?
all args?
wow no converters? shit lib
Wait what? my head is so confused of what you want to do?
Using something as low level like lua might as well use a discord wrapper in C
it only gets the first, if i want more ill have to match it with regex and split it
yeah, i got that code a while back when i wasnt familiar with making things paginated, and honestly ive only re-written it once or twice for another bot of mine, i really like it.
lua is nifty
with sockets!!!
eh i like it
lol roblox
It's good no complaints, though now that i know how to do it i do prefer making my own stuff.
ive used roblox lua too
Tried dpp already but not any C wrapper I'm sure it won't be hard
i learned lua about 4 months ago lol, i havent known lua for long. i learned it to make a cheating script for roblox.
is there a way to put a cooldown on a cooldown? instead of people just being able to spam a command and it saying this command is on cooldown over and overagain
this should be in ot
nor CPP
cuz bad
bad at lower level langauges
low level is fun
cooldown on a cooldown?
yes
C sockets are a pain
well, cooldown on a command ^
I made a mobile application in lua the program i made it in was called "corona" before the outbreak and i made a mario ripoff that could jump infinitely when hitting his head against the underside of the hit box
windows and unix have different impls
Yikes imagine C impl for voice
but then again, lua doesnt even have string.split
If you want to use lua just use like
crystal or something, the syntax is super close
funny i have
what is the way?
hosts bot on linux
Right now the only usage for lua is to rip off people playing roblox
who doesnt
😳
they’ll start hosting on windows because it’s superior obviously
dont you say those words ever again in your life
Why would you host on windows
i really only localhost on windows.
I'd rather not host on windows and have like couple of undiscovered vulnerbilities turn my vps into a bot
yuppp
it makes me cringe to think people use replit to host discord-bots 😢
i know :(
if repl.it would ever stop existing this chat's activity would be reduced to 10% of it currents activity.
exactly
just buy it and shut it down
you're right, and i hate that you're right
lmao, this..
ill try
how do i put a cooldown on cooldownerror
No i'd still run it and even advertise it more, then be on here and tell them to by the "hacker" plan so i'd earn more.
smart
sad sad
nice, id be so down!
?
LOL, well, maybe i am a bit evil
subclass asyncio.Lock to sleep before releasing and use that
you could have a dict of them
once you offered the profit, i was interested
evil
heyyy can anyone give me a quick hand with something>
what is it
depends on the task and where the hand will be
uh
interesting statement.
To put it simply im building a embed command that sets color of banner by key word !BTO. But I want to allow the user to customize the description by typing in discord and not code
Hand will obviously be in a dark hole
uhhhh
!d discord.Client.wait_for use this
wait_for(event, *, check=None, timeout=None)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Waits for a WebSocket event to be dispatched.
This could be used to wait for a user to reply to a message, or to react to a message, or to edit a message in a self-contained way.
The `timeout` parameter is passed onto [`asyncio.wait_for()`](https://docs.python.org/3/library/asyncio-task.html#asyncio.wait_for "(in Python v3.9)"). By default, it does not timeout. Note that this does propagate the [`asyncio.TimeoutError`](https://docs.python.org/3/library/asyncio-exceptions.html#asyncio.TimeoutError "(in Python v3.9)") for you in case of timeout and is provided for ease of use.
In case the event returns multiple arguments, a [`tuple`](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.9)") containing those arguments is returned instead. Please check the [documentation](https://discordpy.readthedocs.io/en/master/api.html#discord-api-events) for a list of events and their parameters.
This function returns the **first event that meets the requirements**...
im in
Also check for no input!
