#discord-bots
1 messages · Page 649 of 1
await delete(*, delay=None)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Deletes the message.
Your own messages could be deleted without any proper permissions. However to delete other people’s messages, you need the [`manage_messages`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.manage_messages "discord.Permissions.manage_messages") permission.
Changed in version 1.1: Added the new `delay` keyword-only parameter.
delete the message
in this i wanted to delete themessage 'testing'
alright
i tried it but it gave an error
'NoneType' object has no attribute 'delete'
i will try it again
how can I check if the user response has any special characters?
😭
Webhook.send returns None
it doesn't return the message you sent, therefore you cannot delete it either
np
What is the keyword for sending images, because i want to take away perms that let users send embeds or images
Keywords and attributes are different, btw refer to the docs
hello 🙂
Bye
haha i love abusing my new-found power
wow … life changing
Kraots
?
did you release documentation of your dating bot
I'm just curious
not going to steal your code or anything
now that I said that, he'll think I will
Ok
wait
how would you find something like "h" if you did something like !mute @Bob 12h?
or anything after the number given?
regex ;-; ok
I was thinking of breaking the argument down into a list, iterate through the list until you find something like m or h or s and then you use an if statement to check if it is h or m or s or d and then you mute them for like hours or minutes or days and then also check if the values are numbers, and then make it an int, and upon detecting any non-numbers stop the check and check if it is h or...yeah, you get the idea
indeed
Yeah you could achieve it by doing that ig
You don't necessarily have to use regex
it's hella complicated (well, I guess not)
I may be bored, but I'm not *that* bored
Nah not really
Just have the command take a single time argument
if you have the logic ig you have the answer
yeah this is the right method
Then index the latest character in the string
fuck regex
what's that?
oh
I was just reading the documentation ;-;
Then have a slice from the beginning to the near-end and turn it into an int
same i should be doing algebra but i cannot give any less of a shit
Then with the unit, multiply the time they gave accordingly
Very easy, but with regex it's a lot better imo
me too
They're talking about bedmas, pfttt, learned that in grade 4
same that's why i never raise my hand
because i don't wanna get on their bad side
no one likes braggers
at least they have extra sessions where they take me and other people to a room and then task us with harder questions from Olympiads and stuff
That's fun
really?
they don't do that here
speaking of that, I haven't even done that homework. Oh well, I still have a week...
I think I just threw my homework in the bin
I need to find it
Same except i have 1-2 months
lmao
luckyy
they gave 2 months and it took me a week lmao
I'm doing easy maths rn
twice the number is equal to 6 more of a number
some small questions
the answer is obviously 6
its for a project, apparently it should be difficult, that's why they only expect us to do 2 this year
6*2 = 12, 6+6 = 12
took me a second after reading it
they shouldn't have put 6 tbh
im finishing my 3rd while they are expecting us to brainstorm the 2nd
7 maybe
but the answer is 7
I'm on question 13, and they're like "if yoU're on QueStIon 7, WELL DoNe"
lmao
bruh, I'm 9 parallel universes ahead of you
!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.
oh
Guys keep it on topic
see ya in the lounge
fine

How do I make my bot play an audio file in a vc? I've got a command to make it join and one to make it leave but that's it.
use ffmpeg, the second answer is probably what you want
do you have ffmpeg installed? Sounds like a stupid question because I have never used ffmpeg
ffmpeg python package url [https://github.com/jiashaokun/ffmpeg]
ah ok so i do need to import it
breh
what os
ah, someone joins who never makes a mistake
that looks like replit
why are you coding on replit, just wondering
how do i disable a users vc perms? Like, muting/unmuting or deafing/undeafing?
`Ignoring exception in command scream:
Traceback (most recent call last):
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "main.py", line 32, in scream
player = channel.create_ffmpeg_player('vuvuzela.mp3')
AttributeError: 'VoiceChannel' object has no attribute 'create_ffmpeg_player'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 939, in invoke
await ctx.command.invoke(ctx)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 863, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "/opt/virtualenvs/python3/lib/python3.8/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: 'VoiceChannel' object has no attribute 'create_ffmpeg_player'`
its not an issue of ffmpeg not being installed i dont thjnk
I realized that
Windows 10 but it dont matter, it's a brower shell
how do i disable a users vc perms? Like, muting/unmuting or deafening/undeafening?
whatever code you’ve copied is wrong
what attribute would i have to include in overwrite?
"*In the rewrite version, version 1.0, VoiceState.voice_channel was changed to VoiceState.channel.
If you are using the rewrite version, the below should be sufficient to play a file:
from discord import FFmpegPCMAudio
from discord.utils import get
@bot.command()
async def bb(ctx):
channel = ctx.message.author.voice.channel
if not channel:
await ctx.send("You are not connected to a voice channel")
return
voice = get(bot.voice_clients, guild=ctx.guild)
if voice and voice.is_connected():
await voice.move_to(channel)
else:
voice = await channel.connect()
source = FFmpegPCMAudio('1.m4a')
player = voice.play(source)```*"
Lmao
;-; i didn't copy
hello i have a small problem, im trying to make a command to give a christmas role if they dont have it and if they have it it just says you already have it, but im not getting any error or response and cant seem to figure out the issue
@client.command()
async def christmas(ctx, user: discord.Member):
role = discord.utils.find(ctx.message.guild.roles, name="🎅• Christmas 2021")
if role in user.roles:
ctx.reply("You already have the Christmas 2021 role!")
else:
ctx.reply("Here's the role...in a moment.")
await user.add_roles(role)```
maybe that's the answer? your error doesn't seem to be popular
bruh
do you have the right role name?
yep
maybe adding it by the ID is simpler
okay
If you didn't you would know that you would need to import ffmpeg
what does it send?
f I sent him a stack overflow question
no, what attribute would i set to false to change deafening/muting in my bot? py overwrite.attr = False overwrite.attr2 = False?
or something
I think he just copied it straight off there?
idk try both ;-;
Trial and error the best way to test anything
No, am i supposed to do py overwrite.VoiceChannel = false or overwrite.voice = false or overwrite.Voice = false because i can't find it on the docs
*False
just being annoying
Just try each till it works
dam
I personally have no idea
kk
@client.command()
async def christmas(ctx, user: discord.Member):
role_id = 914221637132496926
role = discord.utils.find(ctx.message.guild.roles, id=role_id)
if role in user.roles:
ctx.reply("You already have the Christmas 2021 role!")
else:
ctx.reply("Here's the role...in a moment.")
await user.add_roles(role)``` this doesnt seem to work either not sure where i went wrong
what does it send?
literally nothing
Any errors
nop
and it's supposed to be ctx.guild.roles
which is why im so confused
I think
oh fr
maybe
i'll try it
alright
ok that doesnt work either
oh
im totally confused
both ctx.message.guild and ctx.guild are synonymous
Honestly
I hate when people just post code and says it doesn’t work. That doesn’t help anyone. You should tell us what your intentions are, if there’s any errors post it with the code you're using whatnot.
there was no error
There were no errors
are you mad at me ;-;
i filled it with prints to test
and honestly you have a role id
ok the prints didnt work
You don’t need utils.find
I told him to do that
Are you using client
;-; am I wrong
just use Guild.get_role
whats client
🤦♂️
As commands.Bot
im gonna be honest im pretty sure the whole command just isnt being called
oh ye sorry im using client
use bot
well its the ctx.message , make it ctx only
Bad advice
I told him to do that
already changed it
ctx.guild
and is there any errors ?
nope
no
How is that bad advice. It’s just a shortcut.
@client.command()
async def christmas(ctx, user: discord.Member):
print("getting christmas role")
role_id = 914221637132496926
role = discord.utils.find(ctx.guild.roles, id=role_id)
print("got christmas role")
if role in user.roles:
print("already has role")
ctx.reply("You already have the Christmas 2021 role!")
else:
print("giving role")
ctx.reply("Here's the role...in a moment.")
await user.add_roles(role)``` i have this rn
doesnt matter what they name it tbh
Better to let him use what he chooses
He/she sorry
they can name it hello and it will still work
even that first print is printing though so im confused
maybe I should use robot
he/him ye
okay
His entire command isn't working
Is that a thing didn't see it in the docs
!d discord.Guild.get_role
get_role(role_id, /)```
Returns a role with the given ID.
Really you only need to use utils.get or utils.find if you don’t have an ID
If you have a name that’s a different story.
well there should be an error
i think something is surprising it
do you have an on_command_error anywhere in your code ?
ye somewhere
we went through line by line
well show me what it looks like
thought it might be the thing i was using
oh how
it's really complicated I'm kinda rusty
so just add a breakpoint to your code
at the start of your command
and then do run and debug? I think?
ok apparently
user is a required argument that is missing.
ok sweet
im making progress
guys how do i get all of the members in my guild?
!d discord.Guild.members
property members: List[discord.member.Member]```
A list of members that belong to this guild.
thnks
ctx.reply is an awaitable
thanks
also, instead of discord.utils.find you can simply use ctx.guild.get_role(role_id)
basic OOP
idk oop stil learning
if it's in a command then it's ctx.guild
whoops he he
which returns an instance of discord.Guild
ok sick
("Account Made", target.created_at.strftime("%m/%d/%Y %H:%M:%S"), True),``` How would I change this datetime object into a timestamp?
datetime.timestamp()```
Return POSIX timestamp corresponding to the [`datetime`](https://docs.python.org/3/library/datetime.html#datetime.datetime "datetime.datetime") instance. The return value is a [`float`](https://docs.python.org/3/library/functions.html#float "float") similar to that returned by [`time.time()`](https://docs.python.org/3/library/time.html#time.time "time.time").
Naive [`datetime`](https://docs.python.org/3/library/datetime.html#datetime.datetime "datetime.datetime") instances are assumed to represent local time and this method relies on the platform C `mktime()` function to perform the conversion. Since [`datetime`](https://docs.python.org/3/library/datetime.html#datetime.datetime "datetime.datetime") supports wider range of values than `mktime()` on many platforms, this method may raise [`OverflowError`](https://docs.python.org/3/library/exceptions.html#OverflowError "OverflowError") for times far in the past or far in the future.
For aware [`datetime`](https://docs.python.org/3/library/datetime.html#datetime.datetime "datetime.datetime") instances, the return value is computed as:
```py
(dt - datetime(1970, 1, 1, tzinfo=timezone.utc)).total_seconds()
``` New in version 3.3.
Changed in version 3.6: The [`timestamp()`](https://docs.python.org/3/library/datetime.html#datetime.datetime.timestamp "datetime.datetime.timestamp") method uses the [`fold`](https://docs.python.org/3/library/datetime.html#datetime.datetime.fold "datetime.datetime.fold") attribute to disambiguate the times during a repeated interval.
HOLY GOD @slate swan I LOVE YOU
no homo but lyt ❤️
how do i mute entire channels?
for everyone except admins?
like set perms for a channel
use .overwrites_for on a TextChannel object, which returns a PermissionOverwrite object, and then do .send_messages = False, then on your TextChannel object do .edit(overwrites=...)
!d discord.TextChannel.overwrites_for
overwrites_for(obj)```
Returns the channel-specific overwrites for a member or a role.
!d discord.PermissionOverwrite
class discord.PermissionOverwrite(**kwargs)```
A type that is used to represent a channel specific permission.
Unlike a regular [`Permissions`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions "discord.Permissions"), the default value of a permission is equivalent to `None` and not `False`. Setting a value to `False` is **explicitly** denying that permission, while setting a value to `True` is **explicitly** allowing that permission.
The values supported by this are the same as [`Permissions`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions "discord.Permissions") with the added possibility of it being set to `None`.
x == y Checks if two overwrites are equal.
x != y Checks if two overwrites are not equal.
iter(x) Returns an iterator of `(perm, value)` pairs. This allows it to be, for example, constructed as a dict or a list of pairs. Note that aliases are not shown.
!d discord.TextChannel.edit
await edit(*, reason=None, **options)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Edits the channel.
You must have the [`manage_channels`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.manage_channels "discord.Permissions.manage_channels") permission to use this.
Changed in version 1.3: The `overwrites` keyword-only parameter was added.
Changed in version 1.4: The `type` keyword-only parameter was added.
Changed in version 2.0: Edits are no longer in-place, the newly edited channel is returned instead.
those are the docs for everything i specified ^^
Just bookmarking this lmfao
Hi, how to delete slash commands from one / all servers?
I switched from 1 file to cogs now I got every command twice

pretty sure that's a client thing
the client caches the slash commands
and you moving them from a file to the other deleted the old one and added a new one which is actually the same one
Yes
So that means...
I gotta kick it from all and reinvite?
Or like at least try ... lol?
Kraots hi
humbug
Ohh
hi
It will?
probably
Maybe if I delete the old main.py? I see
no that'll do even worse
Oh .. ;-;
Too late hah just kidding
How would that do it worse?
Like uh I cant just ignore it lol
whats going on here?
OH GOD
I JUST TURNED ON LIGHT MODE
AHHHHHHHHH HELP
oh thank god
blame discord
¯_(ツ)_/¯
how do i install discord.py?
pip install discord.py
Someone else on discord-interactions just told me how to remove them lol
But thanks anyway
oh that's possible?!
tell me the trick 🙇♂️
pipwin install discord.py
tf is pipwin
git clone https://github.com/Rapptz/discord.py
pip install git+https://github.com/Rapptz/discord.py
what does pipwin even do
f
stop it ;-;
install stuff
basically pip
!pypi pipwin
yes
unless you're installing pyaudio
but it still doesn't work
so git clone
works
does anyone know how to mute channels?
and unmute them?
(only admins can text then)
Or does anyone know how to find all of the members in the guild, because i tried to do discord.Guild.members but it just returns a property value message
len(list(filter(lambda m: not m.bot, guild.members)))
Or if you don't care that bots get counted just do guild.members
This involves channel perms editing etc, i can point you in the right direction but it will still be a bit of a challenge, besides the bot changing perms you also need to setup guild.
Hello. How Can I display number instead of nan ?
inb4 just
[m for m in Guild.members if not m.bot]
filter is faster in terms of performance
Me and some other people had this discussion months back lol
thats not true tho
If you work with many many data, list comp will always be faster
40% according to this arrival
idk then. Literally if you look it up online almost every article says it’s faster
Not by much though but it would make sense that filter is faster otherwise the whole function would be pretty pointless. unless you got a large condition
Idk then. I’ve just read a lot more into it. I’ve read like 6 different websites/blogs and they all say list comprehension is faster than filter by atleast 50-100%. Apparently according to one of the admins here, it says on the python docs that when offered the opportunity you should use list comp over functions like map, filter, reduce, etc.
Well it depends on the use, but that's almost always the case. If you want performance you shouldn't code in Python anyways 
how to edit permission of everyone role?
I mean python isn’t that slow. If you want fast performance just use assembly or something.
!d discord.Role.edit
await edit(*, name=..., permissions=..., colour=..., color=..., hoist=..., mentionable=..., position=..., reason=...)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Edits the role.
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.
All fields are optional.
Changed in version 1.4: Can now pass `int` to `colour` keyword-only parameter.
Changed in version 2.0: Edits are no longer in-place, the newly edited role is returned instead.
where role is default_role
\👍
hello
is there anyway that this could work? @bot.event async def on_reaction_remove(reaction, user): if reaction.emoji == "💸": roleid = 915961885738819604 roleobj = user.guild.get_role(roleid) await user.remove_roles(roleobj) for i in range(0,len(Json_Items)): #It doesn't exist for x in Json_Items[i]: if int(x) == int(user.id): Json_Items[i][x]['Payment Method'].remove("Paypal") json.dump(Json_Items, open("./all_user_rep.json", "w"), indent=1) await reaction.channel.message_delete()
AttributeError: 'Reaction' object has no attribute 'channel'
- outputs the following error
put help_command = None in your bot's constructor
write py remove_command('help') under commands.bot()
reaction.message is enough tho
Do ```py
await reaction.message.delete()
then that deletes the reaction
not the the message it says after it
it deletes the message
I need to delete the message it says after this event @bot.event async def on_reaction_add(reaction, user): if reaction.emoji == "💸": if user == bot.user: return roleID = 915961885738819604 roleObj = user.guild.get_role(roleID) await user.add_roles(roleObj) for i in range(0,len(Json_Items)): #It doesn't exist for x in Json_Items[i]: if int(x) == int(user.id): Json_Items[i][x]['Payment Method'].append("Paypal") json.dump(Json_Items, open("./all_user_rep.json", "w"), indent=1) await reaction.message.channel.send(temp_list_4[0]) if they remove the reaction
xbox
ok
also u have to use morse code
ok
and a json database
from the arcades store
thanks
you're welcome
try await reaction.message.delete? maybe?
()
{}
await reaction.message.delete()
how to breathe
@slate swan
wow windows 11 shakes whenever I send it when there's slowmode
hard thing to do
teach me the way
sorry, I meant windows 10.3 re-occuring
!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.
Thats discord not windows
Windows shouldn't be shaking
this works
but it deletes the wrong message
how could i detect if a user sends a embed ?
a user can't send an embed
maybe a url that gets embedded by discord
ok

sorry
😭
How to make the buttons work until the bot is restarted?
I use dislash
in cogs
this one await reaction.message.channel.send(temp_list_4[0])
which is sent when the user reacts
no embeds
hmmm
well
I gtg sleep
selfbot
can i get role using its ID?
because discord.utils.get(ctx.guild.roles, id=role_id) not working, gives none
!d discord.Guild.get_role || but if you're passing a valid role_id, then it wont work for get_role either
get_role(role_id, /)```
Returns a role with the given ID.
role_id is valid, i tried it in chat
wdym
!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.
already tried this as well, result = none
new to programming, and im trying to code a bot for discord. I am trying to send local files to a sever based on some associated key words. I want these files (.png) to send repeatedly everytime the key words trigger the logic . Although - I came across some warning that tells me that the file method is a one time call, and cannot repeatedly send the .png everytime the logic is triggered.
is there anyway to bypass his?
I can send code, or join a vc or anything
pls ping me if youre willing to help, i may not see it, thank ya!<3
this didn't solve my issue
Did you enable them in the dev portal?
hi i have a question i have this script that gives a role to new members and dosent work(no error in logs) ```py
import discord
from discord.ext import commands, tasks
import random
import config
import asyncio
import aiofiles
import os
from typing import Optional, Set
intents = discord.Intents.default()
intents.members = True
from discord.utils import get
client = commands.Bot(command_prefix='.')
@client.event
async def on_member_join(member):
role = discord.utils.get(member.server.roles, id="<768876826092240929>")
await client.add_roles(member, role)```
I dont understand the events too..
you want a ss?
Code:
@command.commands()
async def resume(self,ctx,url):
wait.ctx.voice_client.pause()
await ctx.send("Music resumed▶️")
Error:
async def resume(self,ctx,url):
IndentationError: unexpected unindent
can some 1 help pls?
!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)
@command.commands() shouldnt be indented
there is no yt dl
id=768876826092240929, its int not str
There is, but his question wasn't related to ytdl, the rule says to not help with ytdl-related stuff, he has a problem with the on_member_join event
I answered his question, I was just making him aware.
K
wait i dont understand what i have to do?
i am kinda dumb at this hours
Hey I have Cogs in my bot, but I want to make a custom help command can someone help me do this?
im someone can, what are you stuck on?
Making cogs like I have this
But I don't know how to add the stuff.
on it.
you need to indent the commands.Cog.listener and the async def into the class
(and all the code in the function)
Done!
Now what?
do you have your def setup?
!d discord.ext.commands.Bot.cogs
property cogs: Mapping[str, discord.ext.commands.cog.Cog]```
A read-only mapping of cog name to cog.
No..
He replied to the wrong person. @reef walrus is the person he meant.
https://discordpy.readthedocs.io/en/master/ext/commands/cogs.html#ext-commands-cogs || this a good explanation
I already read it why do you think I came here.
no, read his imports.
yea and
there is accualy no ytdl
There is...
oh idle edited the youtube_dl out of the imports
my error rn: ModuleNotFoundError: No module named 'youtube_dl'
I can't find any ToS breaking import inside the script of -> https://discordapp.com/channels/267624335836053506/343944376055103488/916472821092339843
Ah
@manic wing I see what you mean...
Yeah I'm lost @manic wing
Were not going to help you with this.
That's wrong but don't help him, we've made it clear it breaks ToS
Yes.
BRUV
Yes that module breaks ToS so using it means you do to.
!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)
Lol.
Still breaks those ToS.
Don't try to find loopholes.
!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)
yeah, as pandabwear says, we can provide help about other stuff, but not things that break the TOS of other sites.
Then take down bots like rythm.. It uses Spotify.
Where is rythm now 😂
Rythm and groovy got a C & D letter couple of months back.
There are of course bots that break other site's ToS, but that's irrelevant to our policies.
Just because they are breaking ToS doesn't mean you should.
we won't allow discussing or helping with such things here.
F**&&
And octave?
I don't know what that bot is.
Music bot.
I don't know but rythm and groovy were the 2 biggest ones.
Hydra prolly next.
Can you help me with cogs?
Sure what is it?
I want to make a custom help command but Idk how...
Heres what have as moderation cog.,.
custom help commands are tough
Can you at least help????
stella made a walkthrough might be worth it to get started.
How to do the correct check? The fact is that I have indicated that if at least one guild does not have a channel specified, then - return, and I need to make sure that the message is sent to the guild that indicated the channel, and the one that did not indicate it is not sent
Is anyone familiar with Discord-components?
embed.set_footer(text="NOTICE: Please be patient, our staff will assist as soon as they are available.")
embed.set_thumbnail(url=logo_url)
msg = await ctx.send(embed=embed,components=[Button(label="Open Ticket", custom_id="ticket", style=ButtonStyle.green)])
sorry for the newb question. im just looking into buttons for the first time. Ive created a button but how do i then detect when its been clicked?
@bot.command()
async def button(ctx):
await ctx.send("Buttons!", components=[Button(label="Button", custom_id="button1")])
@bot.event
async def on_button_click(interaction):
await interaction.respond(content="Button Clicked")```
Ive just tried using the example on Git but it doesnt work for me
is it possible to use VS code to program a discord bot or will I have to use another program?
You can use any IDE you want
@civic merlinVS Code works 👍
Yes.
How much experience you have making bots?
i have never made a bot and I've just recently learned some basics of python so i thought a discord bot would be a good place to start
Okay, if you need help ping me. I have experience right now I’m working with cogs.
What’s up?
ok thanks
What am I looking at I don’t see anything wrong…
I have a bot and it uses a particular website (the cookie from it) with selenium. I want to have a part of my script to just visit random pages using selenium so it won't get logged out (keep the cookie active). How would be the best way to do that?
How to do the correct check? The fact is that I have indicated that if at least one guild does not have a channel specified, then - return, and I need to make sure that the message is sent to the guild that indicated the channel, and the one that did not indicate it is not sent
You can’t test your bot in the terminal it works better in discord it’s self. And type pyhello.
Yes.
Anybody help out with this? 🙂
I don’t do execution bots my bots run strictly by themselves.
there is no on_button_click event, you subclass discord.ui.Button, and override the callback() coroutine
your client.run() is indentented incorrectly
Right now your bot will only start if someone sends a message, and your bot has to be online in the first place for it to detect that. So it's kind of an infinite loop and it will never start
just unindent that last line and you'll be good to go
any ideas for this?
Selenium is blocking, it won't work with your bot.
wdym?
You can either have selenium run, and not have your bot work, or have your bot work and not have selenium. You cannot have both.
It works but only for about 20-30 minutes right now
I don't see why it would work as selenium would block the event loop from running
Unless you're threading or multiprocessing?
I was thinking of doing something like the keep_alive script that people use for replit that your python script just calls that in addition to your main bot? So that wouldn't be possible?
It connects through selenium, but the cookie expires if it isn't used for 20 minutes, that is why I wanted to build a script that would keep the cookie alive.
The problem is that selenium itself blocks the event loop
If you do open a selenium instance then your bot will stop functioning
Try it, open a selenium instance while your bot is running and try to run, say, the help command. It won't respond.
I don't understand. I am using selenium now for the bot to connect to the website and pull the information?
Selenium is not asynchronous, it stop the event loop from running which is absolutely crucial for your bot to function
The issue is not with selenium opening or working, it's with the bot not working at the same time as your selenium
Selenium will open and do what you tell it to just fine, except the fact that your bot would completely stop working, not do a heatbeat to the Discord gateway, and bring itself offline
Oh so you mean that the part of pinging the different pages wouldn't work?
No everything within your selenium would work just fine
not that the command to grab it wouldn't? Could you have a script that activated selenium say every 15 minutes to do that and then have it turn off (so the bot wouldn't respond during that time but would right after)?
The command to grab wouldn't work, yes
What you say in theory is possible, but there's the issue with heartbeating the gateway servers
Even if you miss one by a few seconds, give or take a few, it's going to completely bring your bot offline
What does heartbeating the gateway servers mean?
Keeps the websocket connection alive to the gateway server knows your bot is still alive and listening
It sends a ping to the servers every 40-45 seconds, letting it know that it's still there
discord.py handles all of this behind the scenes so you don't have to worry about it, but in this case you do
like I could lock the channel while it is pinging so I don't have to worry about people sending requests while it is working.
Please tell me what's wrong?
Typo
In your bot.add_cog you typed Button but your class name is Buttons
Ohhhh, thanks
Yw
Sorry, can you tell me how to import files in the same directory correctly?
from .buttons import
thanks you so much
Yw
how do I setup a thread that handles discord interactions in someone's dms when they click a static message with a "signup" button
I'm trying to have the bot handle multiple at once
I have a script I want to have run at the same time my main bot runs. (similar to the keep_alive scripts I've seen). However, when I try to add it in the same way, it just runs my secondary script and never does my bot?
Show me how you run the "script"
I did pinger.ping()
And pinger is?
So like interactions inside a thread and then when a user clicks the interaction the bot will send more interactions inside the user or?
When you call the "script" do you put it above bot.run()?
Yes I was, should it be below it?
Not really, it should be above it lol
Do you even run your bot file?
No I don't think it is. I think it is just running my other script and never doing my bot
I mean try running your bot file using the terminal/shell
How would I add pages to this (A page per every show.)
import discord
from bs4 import BeautifulSoup as bs
from discord.ext import commands
from discord.ext.commands.core import command
import requests as r
class watchlist(commands.Cog):
def __init__(self,client):
self.client = client
@commands.command()
async def watchlist(self, ctx):
url = r.get("https://sites.google.com/view/cartoon-raws-series/home")
soup = bs(url.content, "html.parser")
for x in soup.find_all('a', class_="XqQF9c", href = True):
Href = x['href']
for t in x.findChildren('em'):
lists = t.text
embed=discord.Embed(title=f"Here Are The Shows!", color=0x00ff80)
embed.add_field(name="Link: ", value=lists, inline = True)
await ctx.send(embed=embed)
def setup(client):
client.add_cog(watchlist(client))```
I run it yes, if I don't have that pinger.ping() but if I have that in there, it just does that script and never does my bot.
show me what your bot file looks like
- Don't use requests, use aiohttp since it's blocking.
- By pages, what do you mean by that?
Like an embed, with arrow reactions that work as buttons so go to the next page
ill go find an example rq
Reactions or buttons..?
like this
and say you react to the ◀️ , it takes you to the page you were on previously, and if you react to the ▶️ , it takes you to the next page
You gotta use the wait_for function for that, and that you gotta index the list of sort
Or DiscordUtils library too
No, it's kinda trash, making your own paginator is easier
Works the same
Idk, I use buttons smh
Obviously 🤦♂️
Maybe your own is better
What does that change?
It just looks better ig
yes it opens a kind of panel where they click multiple buttons to signup but it seems like the thread won't exit when it completes
causing a memory leak and the bot inevitably crashes
So like, imagine you have a list ([1, 2, 3]) and theres reactions on your embed. You can check for a reaction using wait_for function and if the reaction gets clicked, you can index the list by one each time it gets clicked
Eh, agreed but even the owner of discorduitls doesn't like his own module
😂
how do i read the statuses of all members in a guild
e.g. if someone has "this" in their status, the bot will add a role to them, else it'll remove it
Iterate through the guilds members and check for their status (discord.Member.activity returns the member's custom status if they have one)
^^
oh
so im trying to make a dynamic cooldowns command using dpy 2.0 and when the user specified runs the command twice there is no cooldown (this part works fine)... although when another user that is not mentioned in the if statement runs the command twice there also is no cooldown (there should be a cooldown)
Code: https://mystb.in/ViennaGroupsObviously.python
Error: None, code just doesnt work
Can u try adding print statements and see what is getting executed?
its a decorator that sets the cooldown... im not sure if your able to add a print statement to that
how can u make a command take *args as input
async def bazaar(inter, item: str):
like I have that rn, but it only takes first letter of input
slash command*
have you tried adding * before it
yes
that didnt work?
No, I meant to add the print statement in the function
ill try again but I think there was an error
what should i be printing though... i cant print the cooldown
Anything random. We just want to see which line is being invoked
ah
i believe there's commands.Greedy which allows you to pass in multiple values
disnake.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: input_filter() takes 2 positional arguments but 8 were given
thinks each character is an argument
thats in disnake?
anything discord.py based
i added this
def ownerBypass(message):
if message.author.id == 786789607147962388:
return None
print("this works...") < new line
return commands.cooldown(1, 30, commands.cooldowns.BucketType.user)
and nothing is being printed
embeds can be ephemeral right?
Print before returning
Yea
alr thx
still nothing
Show code
def ownerBypass(message):
print("this works...")
if message.author.id == 786789607147962388:
return None
return commands.cooldown(1, 30, commands.cooldowns.BucketType.user)
So it doesn't even print that thing?
nope
Did u restart the bot and then ran the command?
Weirddddd
!d discord.ext.commands.Greedy
class discord.ext.commands.Greedy```
A special converter that greedily consumes arguments until it can’t. As a consequence of this behaviour, most input errors are silently discarded, since it is used as an indicator of when to stop parsing.
When a parser error is met the greedy converter stops converting, undoes the internal string parsing routine, and continues parsing regularly.
For example, in the following code:
```py
@commands.command()
async def test(ctx, numbers: Greedy[int], reason: str):
await ctx.send("numbers: {}, reason: {}".format(numbers, reason))
``` An invocation of `[p]test 1 2 3 4 5 6 hello` would pass `numbers` with `[1, 2, 3, 4, 5, 6]` and `reason` with `hello`...
Do u have an error handler
not on this bot
I doubt greedy would work with a slash command either way, the argument system is different
its only for testing
Oh ok
well it is from the commands extension
Weird tbh
I get Unresolved reference 'Greedy'
It should have printed at least
Commands extension is more powerful than slash commands, slash commands need specific types passed to register arguments
import requests
import logging
import disnake
from fuzzywuzzy import fuzz
from datetime import datetime
from disnake.ext import commands
these are my imports
yes
a little suggestion, dont use requests with discord.py forks as they are async whilst requests isnt
might cause some errors later on
Im using requests before any async stuff
idk how else to pull json data
You could use aiohttp or httpx
!d aiohttp also exists
I think I gotta figure out how to make greedy work before!
lol
idk
Are you even sure if Greedy works with slash commands
yeah thats what idk
Afaik last time I checked there was no argument type for slash commands taking X amount of args,
@bot.slash_command(description='Pulls a list of up to 30 or more current orders in bazaar!')
async def bazaar(inter, item: Greedy[str]):
except greedy string doesnt work
Oh slash commands? Yeah that wont work
You'd need to just manually split it because slash commands arent advanced enough to support that
wdym manually split
You could make item a string argument type, then use .split(...)
^
!e ```py
a = "1, 2, 3"
print(a.split(","))
@pliant gulch :white_check_mark: Your eval job has completed with return code 0.
['1', ' 2', ' 3']
The item argument only takes the first character?
Do you mean like the first word of a sentence
but its only sending the first character of the input to my input_filter function
Tbh, I'm pretty sure that's just a slash command limitation
Maybe try async def bazaar(inter, *, item: str):
Although I doubt that would work
Yea, then it's a slash command limitation ig
perfect jade <- THIS IS INPUT ITEM
ok so it does take full input
it just only sends the first character
First character or the first word
perf j <- THIS IS INPUT ITEM
perf j <- THIS IS INPUT ARG
['p', 'e', 'r', 'f', ' ', 'j'] <- THIS IS ARG LIST
for stg in range(len(input_arg)):
new_val = input_arg[stg].strip('0123456789!@#$%^&*()_+=`~|][;:"\'/?.-,<>')
arg_list.append(new_val.lower())
Yea, your iterating input_arg which is a string, thus new_val would be a single char
hmm
Since arg_list is a list of the cleaned characters you can just use .join
!e ```py
print(["h","i"].join())
@pliant gulch :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 1, in <module>
003 | AttributeError: 'list' object has no attribute 'join'
Brain fart
lol
!e ```py
print("".join(["h","i"]))
@pliant gulch :white_check_mark: Your eval job has completed with return code 0.
hi
!e
print("".join(['p', 'e', 'r', 'f', ' ', 'j']))
@verbal cairn :white_check_mark: Your eval job has completed with return code 0.
perf j
ty
why isnt wait_for working?
Are you able to edit a embed's title and description after post?
yep
it stops on client.wait_for
What method is called for this?
Message.edit
means?
!d discord.Message.edit
await edit(content=..., embed=..., embeds=..., attachments=..., suppress=..., delete_after=None, allowed_mentions=..., view=...)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Edits the message.
The content must be able to be transformed into a string via `str(content)`.
Changed in version 1.3: The `suppress` keyword-only parameter was added.
full code ,-,
The issue with this is, this is how you add a new embed to begin with.
I know how to extract the embed object, I can change certain fields using set_field_at yet I cant find an equivalent for the Title and Description values of an embed
Are you even clicking the button?
of course
You have to recreate the whole embed
I figured, but I hoped not 😢
You shouldn't have to reconstruct an embed to edit an embed inside of a message. Just get the embed from message.embeds or any other way, E.g Embed.copy() and change the fields, etc. Then just call Message.edit with a embed kwarg set to the embed you editted
is creating an on_message function a good way to log out of ur bot
No
Use a command instead
like a complicated command or
And be sure to make it owner only or.... rip
how do u do that
!d discord.Client.logout
!d discord.Client.close
await close()```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Closes the connection to Discord.
no the owner command
!d discord.ext.commands.owner_only
No documentation found for the requested symbol.
!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").
O my discord is lagging now ;-;
Rip
How to get the server pfp of a member
Found it out, just do embed.title = 'new title' or embed.description = 'new desc'
literally that simple
!d discord.User.avatar
property avatar: Optional[discord.asset.Asset]```
Returns an [`Asset`](https://discordpy.readthedocs.io/en/master/api.html#discord.Asset "discord.Asset") for the avatar the user has.
If the user does not have a traditional avatar, `None` is returned. If you want the avatar that a user has displayed, consider [`display_avatar`](https://discordpy.readthedocs.io/en/master/api.html#discord.User.display_avatar "discord.User.display_avatar").
!d discord.Member.display_avatar
property display_avatar: discord.asset.Asset```
Returns the member’s display avatar.
For regular members this is just their avatar, but if they have a guild specific avatar then that is returned instead.
New in version 2.0.
It returns the avatar they have
Not the server avatar
Damn discord do be lagging
!d discord.Member.display_avatar
property display_avatar: discord.asset.Asset```
Returns the member’s display avatar.
For regular members this is just their avatar, but if they have a guild specific avatar then that is returned instead.
New in version 2.0.
Does it return server specific pfp?
Yea...
No, if you mean the nitro thing which I don't think is accessible yet in the API
It does tho
I mean the nitro thing
Have you tested it?
Lemme test
Can someone tell how to get server specific pfp
try display_avatar ig
Isn't that what I am talking about...?
ctx.author
ctx.author*
¯_(ツ)_/¯
He said the same thing
oh
Damn discord do be lagging too much today
@verbal cairn, You don't need all of this, just check for your user ID.
so
@bot.command()
async def logout(ctx):
if ctx.author == bot.owner:
await bot.close()
^ This is what im going for
bot.owner is not a thing?
it is!
Tf is bot.owner
no
bruh
its prob not as safe as checking for ID's but idk
you can either use is_owner() decorator , or compare a user/member object , but bot.owner does not exist
@bot.command(aliases=['log'])
async def logout(ctx):
if ctx.author.id == 596428514895593472: #This is your ID taco.
await bot.close() # not sure if bot.close is a thing, if it is, continue to use it if you want.
else:
await ctx.send(f'{ctx.message.author.mention}, You do not have access to this command.')
maybe it's a bot variable
Else statement isn't needed, but there you go @verbal cairn
!d discord.ext.commands.Bot.close
await close()```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Closes the connection to Discord.
but .owner is a thing
yea possibly if they defined it themselve
yes
how is it not
but the way they say that , dont think so
ty bro
np
because danny did not add it
but it works with my code?
did you define it manually somewhere?
no
also "works for my code" is not a valid statement
How can i make my own discord client/edit it?
you can use bot.user.edit
ok but I havent added anything to make .owner a thing
so does it turn your bot off without any errors?
yes
bot.owner = Taco#3025
async def is_owner(ctx):
return ctx.author.id == 316026178463072268
@bot.command(name='eval')
@commands.check(is_owner)
async def _eval(ctx, *, code):
"""A bad example of an eval command"""
await ctx.send(eval(code))
thats is_owner ig
or you could use the default is_owner() check
@bot.command(aliases=['log'])
async def logout(ctx):
if ctx.author == bot.owner:
await bot.close()
or
@bot.command(aliases=['log'])
async def logout(ctx):
if ctx.author.id == 596428514895593472:
await bot.close()
or
@bot.command(aliases=['log'])
@commands.is_owner
async def logout(ctx):
if ctx.author.id == bot.owner.id:
await bot.close()
idk which is best really
they all do the same thing
for the 1st or 3rd to work
the bot.owner has to be a discord.Member object
not your name and discrim
wait so .owner is showing guild owner or what
It shows bot's actual owner from discord developer portal
Cant you just do
@bot.command()
@is_owner()
async def logout(ctx):
await bot.close()
theres no bot.owner
you have to manually set it if you want
I think so
there is in disnake?
If the check is false it doesn't do the function
yeah
Which is better
I just dont know why ppl keep saying .owner isnt a thing
And no need for the if statement
@is_owner alone makes it think its not a command
wait so does command.is_owner
im confused now
Idk never used it
def is_owner():
async def predicate(ctx):
return ctx.author.id == 316026178463072268
return commands.check(predicate)
@bot.command(name='eval')
@is_owner()
async def _eval(ctx, *, code):
"""A bad example of an eval command""
it says this in discord.py library
Yeah the commands.is_owner i think is the decorator dpy has and @is_owner is a custom one
bot.lavalink = lavalink.Client(bot.user.id)```
Totally new to lavalink
And I can't understand wtf is this line
im new to virtual envs, youre supposed to gitignore these right?
using virtualenv module btw
well
you don't have to gitignore them
but yeah it would certainly be a little annoying to have a ton of generic binary files on your repo...
you should pip freeze > requirements.txt and add that to the repo
so that you can clone this repository and re-install all of the requirements
Cz there are permissions set for those commands
not only my bot
but for all the bots
U can't see the slash commands or u can't use them?
yeah
Yeah to?
?
I asked two different things haha
2021-12-04T05:38:38.121789+00:00 app[worker.1]: disnake.ext.commands.errors.ExtensionFailed: Extension 'cogs.music' raised an error: ImportError: cannot import name 'menus' from 'disnake.ext' (unknown location)```
Can someone tell me whyyyy
U didn't install ext.menus
i cant see slash commands nor use them lol
Huh?
how can i use them when i cant see them-
Ah
Well caching issues. It takes time for the slash commands to sync with all the guilds
Discord issue, u can't really do anything
its been 12 hours-
Weird
WDYM sir?
Did u try restarting your discord client and reinviting the bot with application.commands scope?
Can you give me the module name
Just saw your messages in the disnake server
sure
Yup
i ll wait a lil more
What should I do @maiden fable
Yea ext.menus is a different package, not with disnake or dpy
No need to kick the bot
Didn't knew that
Just click on the invite link with the application.commands scope and select your guild. This way, u will add the application.commands scope without kicking the bot (:
Now u know haha
2021-12-04T05:49:00.471728+00:00 app[worker.1]:
2021-12-04T05:49:00.471738+00:00 app[worker.1]: Traceback (most recent call last):
2021-12-04T05:49:00.471740+00:00 app[worker.1]: File "/app/main.py", line 1607, in <module>
2021-12-04T05:49:00.472369+00:00 app[worker.1]: bot.load_extension("cogs.music")
2021-12-04T05:49:00.472370+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/disnake/ext/commands/common_bot_base.py", line 487, in load_extension
2021-12-04T05:49:00.472507+00:00 app[worker.1]: self._load_from_module_spec(spec, name)
2021-12-04T05:49:00.472509+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/disnake/ext/commands/common_bot_base.py", line 432, in _load_from_module_spec
2021-12-04T05:49:00.472656+00:00 app[worker.1]: raise errors.ExtensionFailed(key, e) from e
2021-12-04T05:49:00.472681+00:00 app[worker.1]: disnake.ext.commands.errors.ExtensionFailed: Extension 'cogs.music' raised an error: TypeError: wavelink.Client expected type <commands.Bot or commands.AutoShardedBot> not <class 'disnake.ext.commands.bot.Bot'>```
How to fix it
a
U need an instance of commands.AutoShardedBot, not commands.Bot
wait bot is the file name right
No IG
It's the file name of the commands.Bot class
but the error says expected type <commands.Bot
🤔
I think you would need a monkey patch to work with disnake
ah
Yea
lavalink requires discord.py
I have made it
It works only with discord.ext.commands.Bot
lavalink is finding the dpy version of commands.Bot not disnake's one
¯_(ツ)_/¯
LINK
not their fault
didn't you join my server in august by the way? 🤔
Ytdl should be allowed
What server
I srsly can't understand whatever that was
A powerful Lavalink library for Discord.py. Contribute to HarrisAhmed/Wavelink development by creating an account on GitHub.
Why are you giving me wavelink's git?
Oh it's not the official one
I modified it
Let's see if it works
nodes = {'MAIN': {'host': 'http://lava.link/',
'port': 80,
'rest_uri': 'lava.link',
'password': 'anything as password',
'identifier': 'MAIN',
'region': 'us_central'
}}```
Is that right?
I am sorry but I am totally new to wavelink
try it and see
2021-12-04T05:57:16.487697+00:00 app[worker.1]: Traceback (most recent call last):
2021-12-04T05:57:16.487718+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/wavelink/websocket.py", line 76, in _connect
2021-12-04T05:57:16.487719+00:00 app[worker.1]: self._websocket = await self._node.session.ws_connect(uri, headers=self.headers, heartbeat=self._node.heartbeat)
2021-12-04T05:57:16.487727+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/aiohttp/client.py", line 754, in _ws_connect
2021-12-04T05:57:16.487728+00:00 app[worker.1]: resp = await self.request(
2021-12-04T05:57:16.487735+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/aiohttp/client.py", line 520, in _request
2021-12-04T05:57:16.487736+00:00 app[worker.1]: conn = await self._connector.connect(
2021-12-04T05:57:16.487743+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/aiohttp/connector.py", line 535, in connect
2021-12-04T05:57:16.487744+00:00 app[worker.1]: proto = await self._create_connection(req, traces, timeout)
2021-12-04T05:57:16.487751+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/aiohttp/connector.py", line 892, in _create_connection
2021-12-04T05:57:16.487752+00:00 app[worker.1]: _, proto = await self._create_direct_connection(req, traces, timeout)
2021-12-04T05:57:16.487759+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/aiohttp/connector.py", line 1011, in _create_direct_connection
2021-12-04T05:57:16.487760+00:00 app[worker.1]: raise ClientConnectorError(req.connection_key, exc) from exc
2021-12-04T05:57:16.487771+00:00 app[worker.1]: aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host http:80 ssl:default [Name or service not known]```
no idea
oof
