#discord-bots
1 messages ยท Page 918 of 1
yes i need help
Ask in #python-discussion
its abt discord bots though
my question i mean
You question is tooo complecated
its still abt discord bots soo-
K
yes
now i get an error
code:
@commands.command(name="support", aliases=["sup"])
@commands.has_permissions(manage_messages=True)
async def support(ctx: commands.Context, self):
embed=discord.Embed(title=":BK_blobhelp: **Support** :BK_blobhelp:", description=":BK_redline: __Server Support__ \n > Ask Us Your Questions In This Channel\n> It Can Be Related To The Server And Bots\n> Reports Can Be Made Here\n\n:BK_yellowline: __Claiming Perks__\n> State which perk you wish to claim.\n> State the details regarding the perk.\n\n:BK_blueline: __Reports__\n> To Make A Report, Open a 'Report Ticket' in [#954330102756429864](/guild/267624335836053506/channel/954330102756429864/)", color="0x36393f")
await ctx.send(embed=embed)
await ctx.message.add_reaction(":tick:")```
how to speed up creation of embeds? they seem to take sometime to send
done
wdym
the cog appears on the help but no embed is sent
Still get this
@bot.slash_command(name = "rickroll", description="Rickrolls you", guild_ids=[808704986485620736, 910811019608223754, 947151111037526096])
async def rickroll(interaction: Interaction):
await interaction.response.send_message("https://tenor.com/view/rick-astly-rick-rolled-gif-22755440"
)```
ah cant do that, i require it to have multiple fields
After i use the slash command the bot stops working
?
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
ya i understand that, what i mean is it wouldnt look very nice and the line would be like 100 chars long.. any other way?
nvm it was a http 400 error
k
What's on line 29
oh but it can't be the bots permissions as it has admin
error handler?
how does @unkempt canyon do it, i dont imagine them using one-liner for all embeds
where
oh, so they cache the embed
ah didnt think of that, i was storing the data not embed
cool
Don't they already get the role when they have vanity in their status?
Just check if the user has the role, and if it has the role, just ignore them
I believe they meant that if a user already got pinged before and got their roles and everything, not to get pinged again and so on
In other words,
if role in member.roles: return
else:
#do all the stuff
#give role
#ping user
#send embed
@bleak karma Tell me if it works
finally, i found the error! It was the color part
from utils.util import Pag
``` How do I install utils.util?
Is it possible for bot to reply to private message....as in if someone sends "hey" then bot replies "hey"?
Itโs because of the message.delete thing
Don't think so tbh
wdym? why bot warn hiself
Umm let me try that!!
property bot```
Equivalent to [`User.bot`](https://discordpy.readthedocs.io/en/master/api.html#discord.User.bot "discord.User.bot")
tysm
it's kinda dumb to warn bots for using bl word
this right?
in front, do if message.author.bot lmao
or i should pute under message.channel.send()
message.delete() is also a bit buggy. You canโt really put it before message.send so thatโs a reason, why it sended so many messages once
you want it to check BEFORE anything gets deleted, so at the top
still not work, my bot now he not warn his self but he delete self message
still delete bad word message but warn not work
he delete after send
Wait, what the heck is even that any function
any(word in message.content for word in badword) is what u r looking for
Add this if statement at the top:
if message.author.bot: return
still not work
not work too
@bot.listen("on_message")
async def whatever(message):
if message.author.bot or message.author.id == bot.user.id:
return
if any(word in message.content for word in badword):
await message.delete()


Lmao
You check for a certain user after you already delete the message 
Pov : When ur friend asks u to whitelist them but you dont trust them
lol
Ahh thnx a lot Ryan
๐
i'd do be like that
who is gr
an entity summoned at Tuesday, 14 February 2006 07:24
What is happening here
idk
Please take this to an OT channel if the convo isn't related to the topic of the channel, that is, discord bots
What is @bot.listen? I only know event and command
it works just like an event
Okey okey
events
nvmd late
how do i make
admins get ignored?
how did u define admins?
!d discord.Member.guild_permissions
property guild_permissions```
Returns the memberโs guild permissions.
This only takes into consideration the guild permissions and not most of the implied permissions or any of the channel permission overwrites. For 100% accurate permission calculation, please use [`abc.GuildChannel.permissions_for()`](https://discordpy.readthedocs.io/en/master/api.html#discord.abc.GuildChannel.permissions_for "discord.abc.GuildChannel.permissions_for").
This does take into consideration guild ownership and the administrator implication.
messed up indents
ok but i want to make admins get ignored
and displays normal users
ok
if user in admins:
continue
huh????
!e ```py
admins = 1, 2, 3, 4, 5
for i in admins:
print(i)
@slate swan :white_check_mark: Your eval job has completed with return code 0.
001 | 1
002 | 2
003 | 3
004 | 4
005 | 5
lolllll
so uh i tried and it still shows admins
he think he will get error
xD
Lmao
lemme show code

!paste
is there a way to mention a server in pms as we mention <#abc> channels in server?
awofosuwuh
gg got the token
lmao stop
ok how do i make admins ignored in user or users
print "user"
imagine if bot crash
Real pain

bruh it just worked fine like few mins ago
member.
if you know what you're doing, there's a really slim chance of your bot crashing
omg thank u sorry for the late reply but ill try this
who knows
ye but
idk
huh?
imagine member being user
lol
Do u have intents?
.
ok
uhh yeah??
Tell me if it works out though
He is using disnake?
you can make your own getch in dpy too ๐
ok it works
i will
He be like: Tf is getch
lmao what
He already got a list has ids
bot = Bot()
async def getch(*, user_id: int):
return bot.get_user(user_id) or await bot.fetch_user(user_id)
or just subclass Bot and add a method 
its currency bot right
it just checks if the member/user is in the cache and if no, then it fetches and adds to the cache
admins is admins = id, id ,id
why classmethod ๐
Ah
oh wait
I'm high
await getch(925079016174682213)

Also, better is to subclass and make it a pos-only arg to maintain consistency
yeah
what
i have no understand
what u want?
bruh
use utils instead of getch
i want that admins are being ignored in the user
admins = 859353,53295,53295238
Uhhhh?
does user return an id?

That is all wrong...
uh idk
what....
๐ Ashley gonna help u I am out
What the
lol
new python?
no lol
so if user returns id then just checks if the id in the list(admins) for examplepy admins = [1, 2, 3] for user in users: if user in admins: continue #eh i hope this is going to help
guys how to make reminder command with button that will remind when time over?
@cosmic agate do u know how to make a mute command?
Hey @slate swan!
It looks like you tried to attach file type(s) that we do not allow (.exe). We currently allow the following file types: .gif, .jpg, .jpeg, .mov, .mp4, .mpg, .png, .mp3, .wav, .ogg, .webm, .webp, .flac, .m4a, .csv, .json.
Feel free to ask in #community-meta if you think this is a mistake.
idk
use a tuple over list for such
like this?
yes but name = ... #all other stuff like total leader and the other stuff should be outside the if statement
yes sir
@maiden fable @slate swan wanna enjoy? 
try:
await user.add_roles(role2)
b = disnake.Embed(title=f"Muted {user}",color=green,timestamp=datetime.utcnow())
await ctx.reply(embed=b)
except:
role = disnake.utils.get(ctx.guild.roles, name="Muted")
await role.edit(position=ctx.me.top_role.position+1)
b = disnake.Embed(title=f"Muted {user}",color=green,timestamp=datetime.utcnow())
await ctx.reply(embed=b)
else:
b = disnake.Embed(title=f"Cannot Mute {user}",color=red,timestamp=datetime.utcnow())
await ctx.reply(embed=b)
Sure, send me the username
pffttt
Yes

idk i blocked the person and closed the dms
btw why are u asking me?
Same logic as a mute command, just it sends a message instead of removing roles after x time
me?
Sad why

hmm
๐ถ
but not button
?
I think it works! Tysm!!
idk how to make via a certain time
easiest way is to use asyncio.sleep
.....
Do u even know the context of the convo....?
He wanna make a remind command
nah 
๐ Then stop
member = bot.get_user() is the problem
do you think I will?
Don't make me start ignoring u
why even start a loop when you are just continuing it
Uh ig continue keyword it works like pass keyword but ~~ it skip things~~
continue keyword just skips the current iteration and starts a new one
rude
Yes
Well, I am just saying ๐คท
what are you trying to do currently?
You think? lol
Well, good luck
ok
it works thank you!
๐imagine flexing on me
i want that admins to be ignored in users or user idk
You asked if someone else had it and I showed u
imagine having big screen
It is a chatbot, so uhhhhhh
stop chatting, do it mentally
I mean, I got access to the intent easily
Did u fill in for app discovery?
app discovery what....
the bot is not verified so doubt
for bot
๐ฟ
It isn't available for non verified bots? I thought it is
Wuts that for? I've seen it but didnt click on it
Ah my bad
Basically top.gg clone made by discord
the privacy policy and tos is a pain in the ass lol it's just a bot
will it ever?
Agreed
Anything is possible
Lmao ion have them
But then
what does the bot do
I deleted my bot app that was in 92 servers just for fun
I mean, I deleted HunAI when it was in 98 servers
Imagine using 2fa
just created it rn
give me your tos and priv pol
I, uhhhh, family issues
cool
what 
?
Nothin

Yhe
for tos, I have the contact us page (cz why not) and for pp, I uhhhh, idk
I almost lost my acc bc of 2fa
i got rate limited for using "new codes" and i forgot my backup code
Cz they are made seriously
nvm 
;-;
Sad, I don't even know where are my backup codes
Gonna redownload those, thanks for reminding
f
๐ซ
apply brain
Nvm, I remember it
forget the password and reset it 
Meh, might use google instead to see my password
THE NEW PASSWORD CAN'T BE THE OLD PASSWORD
IKR
Lmaoooo i can relate
ok no one help
i give up ๐
sheesh thanks for reminding, need to login to authy before all my codes expire 
lol
๐ Ashley, help him
!ot
Off-topic channel: #ot2-never-nesterโs-nightmare
Please read our off-topic etiquette before participating in conversations.
help him
ot
lmao
No, I am an idiot also I gotta go
i woke up like 1 hour ago
sad
d e d i c a t i o n
๐ฟ what's even your problem
lol
I'll just go get my glasses before I cry of eye strain ๐
@slate swan will help you in a min
Lmaooo thanks
you gotta go but you still here 
..
so ur telling me ur mouse doesnt have scroll wheel?

You do know that we ain't liable to help u, right?
blackmail
how to put slash commands in cogs?
slash = SlashCommand(Client, sync_commands=True)
@slash.slash(description="Viser bottens latency.")
async def ping(ctx):
await ctx.send(f'Bot speed - {round(Client.latency * 1000)}ms')```
People that don't find ah,ah's problem (starts from here)
not me
His problem is. bot.get_user retuns None so i believe that he needs member intents
@slate swan i suggest claim a help channel
no one will understand ๐
@slate swan
Wut abt ur code?
intents= discord.Intents.default()
intents.members = True
discord* he's using discord 
what
oh lol
lmao ๐ฟ
He wants to remove admins from leaderboard (Using id)
bot = commands.Bot(command_prefix=get_prefix,case_insensitive=True,activity=activity, intents=intents,status=discord.Status.online)
@slate swan
#imports
intents = discord.Intents.default()
intents.members = True
#Get_prefix, activity
bot = commands.Bot(command_prefix=get_prefix,case_insensitive=True,activity=activity, intents=intents,status=discord.Status.online)
chane disnake to discord

"not ur business"
lol
wait wtf is id_
hi
ok bye i give up
no
- break a table or hand
show ur main file code
@slate swan
wdym main file
where u put intents
I already gave u
I am literally coding with him
hiiiiiiiiiiiii
lol
idk that
hypeblox is also my bot dev
bot dev?
go talk with him he is not that dumb
Slave*
imagine bot dev not asking
Me dumb
He's owner i am his slave ๐งโโ๏ธ /j
@slate swan lmaoo where u at๐
idk what they doing what they want why they still here
I thought u were looking for glasses
hahah
ok whatever i google
๐ช
dies
i have no idea
@slate swan show ur code last time of the error part
I mean, to protect ur eyes
id_ = leader_board[amt]
huh?
try printing id_
.....
Print id_
Lmaoo didnt see ur msg
lmfaoooo
well done
๐ ๐
imagine
๐ญ
this is the 7th time i think
even ash cant help here
hi, how can I make my bot join a channel in on_ready event
It's just rate limits not ban ;-; (we must wait 30 mins somewhere)
await channel.connect()
!d discord.VoiceChannel.connect
await connect(*, timeout=60.0, reconnect=True, cls=...)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Connects to voice and creates a [`VoiceClient`](https://discordpy.readthedocs.io/en/master/api.html#discord.VoiceClient "discord.VoiceClient") to establish your connection to the voice server.
This requires [`voice_states`](https://discordpy.readthedocs.io/en/master/api.html#discord.Intents.voice_states "discord.Intents.voice_states").
yes
@slate swan np i helped them out
ur late.
There was no help
I could help ๐ but uhhh too lazy to apply brain
yes
bot just got rate limited
how the heck i am suppost to make bot not get rate limited or banned
Ask discord to increase rate limits
if i dont tell to print u were stuck here
thanks 

We didn't print, bot is rate limited
Im not copying sparky Just print "leader _board[amt]"
so why tf u here asking for help if u know everything
Cuz console said it is rate limited???
so?
@bot.event
async def on_ready():
channel = bot.get_channel("id")
await channel.connect()
``` I tried this but didnt work
I can't bot is rate limited
ah wait
the id should be an int
U can do that outside the command
(imean without the api stuff)
it is an int
plus its bad to make requests in on_ready
yes
but I need to make a bot which automaticly joins a vc
yes, use a task for that
can u give me a little example of code
_ it wasnt I forgot to delete "" ones _
from discord.ext import commands, tasks
bot = commands.Bot()
async def on_ready(): ''' your event here (dont do any shit other than print)'''
@tasks.loop(hours=1)
async def uwu_vc_joiner():
await bot.wait_until_ready()
guild = bot.get_guild(guild_id)
if guild.voice_client:
if guild.voice_client.channel.id == channel_id:
return
channel = guild.get_channel(channel_id)
await channel.connect()
uwu_vc_joiner.start()
bot.run('''your_uwu_token''')
uwu_vc_joiner()
what
nice name
so does it do uwu function for every 1 hour or after 1 hour ?
its loop okay
every 1 hour
you can set it to 24
to conserve resources
STOP please don't
๐ why you hate
Cz u have used the word a bit too many times that it is annoying now
hey, when u do this doesnt it give errors
cuz its trying to connect the channel it already in it
There's a check....
repl.it shares IPs amongst it's other servers, if someone using the same IP as you is ratelimited, you get ratelimited as well. Discord API ratelimits are IP based
you are right Im sorry
It's very likey that your code isn't the issue here, it's repl.it
is heroku the same ?
I'm pretty sure heroku does share IPs as well
yeah it does
I could be wrong, but since their service is free It makes no sense for them to offer non-shared servers
it will leak ur token
then what can I use, its probably gonna use max 15-20 mb of ram, I dont want to just pay for big vds's
it isnt good for hosting though
???
๐ my bot runs on only 170 MB or smth ram
there's a good chance if somebody else is running their bot on the same machine as yours, and gets ratelmited yours will get too
hunter use self host
then what can I use?
Hmmmmmm, ig yea
500 MB is still a bit too much imo, what are yr intents?
Ah then its fine
Well my bot doesn't use members intent
I mean, I did request access to the intent and I have it, but only for showing bot.users in the presence ๐คฃ
heroku
it is a little complicated to set up but it is worth it
the downtime is very rare
what now
if it is dyno hours i have a back up plan
what the hail
so far i have no problems
and i hosted my discord.js bot for 2 or 3 months there
can u help me
what is it
with hosting there
what help do you need
alr
go to dms
tbh thats the only technically free hosting other than railway. But i have to wait for a month to host something
Many messages which are pinned are his tags only lmao
so for now i am using heroku
and secondly ytdl which one of my music discord js libraries depends upon is banned there
so heroku is my only option
I thought heroku doesn't support C bindings like PyNacl
discord.py's music impl doesn't work without PyNacl
Do yk that i have like 20 heroku accs bc im too broke i cant pay for that so lmao
Slef hosting? Like making ur own host? Or some private host servers 
@slate swan do u have a credit card?
Currently no but i can get one if i want to but im too lazy๐ญ
cap
No I mean, Oracle is giving free VPS with 24 GB RAM and idk, 4/6 vCores in exchange of yr cc info
Ohh
I host HunAI on there
OT
It is related to discord bots, since its a talk about hosting one
So yea, no need to bother using the ot command
uhhh, out of context but okay
U still gotta pay for the electricity, or at least a good internet ๐
sounds sus
not seems to be really free
so
๐ Same, but then my internet is slow asf for most of the time sooooo
I, uhhhh cannot really comment
same
Yea, as in the download/upload speeds are slow and the ping can literally go upto 500ms
what
yeah i just checked myself
im using discord.js for music bot
i might switch to them 
not discord.py
when registering they ask for credit card details and i am a teenager
Yea, I mean the whole house is using the WiFi, even the cameras, soooo I don't feel that its viable to get a RPi and use my own internet
i dont own a credit card
"in exchange of yr cc info"
you can use railway.app but you need to wait for 30 days just to host something from github
Won't work
no
They will charge 1 USD for verification (tho they refund it within a few business days)
and doesnt support ytdl
me with 3 credit cards 
Gimme 1
Hunter trying to do credit fraud
They don't even accept Debit Cards ๐
As if Oracle cares, if a few people put in fake CCs
They do be earning in millions
and when i try to write the code in python. They need ffmpeg
which is pretty much almost impossible to install on replit
so the only option i had was heroku
for dyno hours i just made another repository with the same files as my original
so if my dyno hours run out for the month i can just switch to that
if that doesnt work i can just log in to alt account
so it requires credit card?
and do the same thing
yea
go for railway.app and wait for 30 days
Orcale won't care, but the federal government will ๐ณ
if you are hosting a music bot then you cant
time to use fake cc (yes this is a joke)
yup
@tawdry perch
Meh, no one cares in India
damn
Since we are already categorized as scammers, sooooo
!ot
i have parents
I have had a few instances of people saying that this is what they think when I tell them I am an Indian ยฏ_(ใ)_/ยฏ
๐ Might as well self host for the sake of a better ping
tbh when i self host i have a ping of 100+ lol
oof
.
Lucky
lol
how much ping do you have when not self host
Max a 100
can we like get the about me section of a user
@gaunt ice hey! Are your exams over?
is it in dpy yet
naw bro its like over in 10 days exactly
Guys did yall hear about MODALs!!!!!!
no
crazy
Sad life
yea
Its like google form
it's even on any lang ? i don't think so
it's out for over a month now ๐ฟ
Not out for android 
oof
lol its not youtube
lmfao
It doesnt work like that
who cares about android
how then
ah idk
lol
that's why you don't use heroku
maybe
h
bruh stop 
done
of
Guys,which is best on replit?
A)Replit DB
B)Mongo DB
C)SQLite
There is one
Then what you use to store data?
D)detabase
I don't prefer OSing my projects for some reason 
Guys,who wanna join my coding eh?
replit db is just json file lmfao
Which ones
Anyways why tf are we off topic
cant find slash in refer
they dont exist
sql s the best
but for connection mongo is easier
prob
Oh
nitro sheesh
!d disnake.ext.commands.slash_command ?
@disnake.ext.commands.slash_command(*, name=None, description=None, options=None, default_permission=True, guild_ids=None, connectors=None, auto_sync=True, **kwargs)```
A decorator that builds a slash command.
if you want a json-based relational SQL db, use postgres
what?
....
Calm down
!d disnake.ext.commands.Bot.slash_command
@slash_command(*args, **kwargs)```
A shortcut decorator that invokes [`slash_command()`](https://docs.disnake.dev/en/latest/ext/commands/api.html#disnake.ext.commands.slash_command "disnake.ext.commands.slash_command") and adds it to the internal command list.
gg f
tf
What
i swear didnt see this
It's fine
hunter path master
I used the same command and got a 404 
Aw
i see that ๐คฃ
@slate swan also dpy doesn't has slash commands in the stable version
page not found
!ot nice
yesyes sry
Ah, well just telling that they are only on master version
forget it
And I turned 14 last month(life sucks)
What
!e
a = 16 - 10
print(a)
@slate swan :white_check_mark: Your eval job has completed with return code 0.
6
be happy ma h boi
what
s t o p
!rule 7
7. Keep discussions relevant to the channel topic. Each channel's description tells you the topic.
after long time
Why you change your pfp daily like this server LOL
doesnt pose a problem
and ot
ok tf come ot
First time u used the command correctly ๐๐
!ot @maiden fable @slate swan come
Off-topic channel: #ot2-never-nesterโs-nightmare
Please read our off-topic etiquette before participating in conversations.
No I'm talking with others
Why is my ears saying balah blah blah
How do you hide a cog from a custom help command?
umm u can NOT mention it in the help cmd?
im pretty sure ur talking about the default help cmd
send() got an unexpected keyword argument 'components' i was attempting to use buttons on discord.py v2.0 with this code
components= [
{
"type": 2,
"label": "Clear les kick",
"style": 4,
"custom_id": "clear_kick_button"
}
]
await ctx.send("This message has buttons!", components= components) # Send your message with a button.
does someone know why?
dpy 2.0 abstracts components into Views which can listen for interactions on specific messages
there's examples of how to use them on the github
https://github.com/Rapptz/discord.py/tree/master/examples/views
also documented here https://discordpy.readthedocs.io/en/master/interactions/api.html#bot-ui-kit
Guys help
Guys how to check if a message has walls of text or repeated text or too many emotes?
@gaunt ice any idea
h
It doesnt work like that at all!
Its alot more complex
regex
What






regex






Dude ur spamming
regular expressions
yes
^
hes talking about regex/regular expression which you import in python as re
sure mods will
ok ping the mods because i put too many shiny stars oof
Google.exe is not working
[CLOSE] [OK]
OK
are you guys really gonna ping mods for a message that has a long repeating chain of emojis?
no
good
10 finger typing?
more like 2
huh
who types with 2 fingers though
anybody has command ideas that are complicated which need a db?
@slate swan yo know how to check if a message has walls of text or repeated text or too many emotes?
Cuz these guys have no brain

Leveling system
blockchain
eh no
I'd join the people with no brain, therefore, regex
I'd actually do some really complicated stuff and overload my bot so that it crashes 
https://cdn.discordapp.com/attachments/784465822180704340/955100592584417330/unknown.png
I have such an embed at the moment, and I would like to do it if there are more than 15, that it then creates a 2 page and I can then switch between the pages. Do you understand what i mean ?
learn pagination
yeah its called a paginator
you have a link for me ?

|| ||
woah
๐ง
just press space bar 2-4 time then select the space then see the options
how

there is the discord.ext.menus package you can use for reaction menus https://github.com/Rapptz/discord-ext-menus, although with discord's introduction of buttons, this is kind of outdated
how
@slate swan say???
bold space
** **
oh lol i have did this in my bot

no name
epic fail

clyde
Clyde is bad boy
ok bye
!ot ๐ฟ
Off-topic channel: #ot2-never-nesterโs-nightmare
Please read our off-topic etiquette before participating in conversations.
ur field grade officer.?
that 's google not me
im just a general here not an officer
Does anyone know how to create bot?
..
dev portal
u beginner to python?
yes
OK
and after that you can learn dpy https://vcokltfre.dev
A tutorial on how to use discord.py to create your own Discord bot in Python, written to fix the flaws of many other popular tutorials.
its a good website
yes
thanks
but someone indicates an application for me to start creating bot
i thing thats kinda common sense but it should be there
do u know python
not a lot
u should learn python first
then it will be easy for u to develop bots
developing bots needs python knowledge
ha
should learn basic py oop and async programming
ok
is using lavalink to play music legal?
yes its legal but its against tos
https://pypi.org/project/PycordPaginator/ is it this ?
tell me an app to download
ok so a verified bot should not use that ?
any bot shouldnt do it
ohk
so the way left to play music in discord.py is ?
no, i only want to use the legal way
there are multiple paginators, you can even create one if you want.
a friend of mine recommended vs code is it good to use in this action?
you can play music if its not copyright and you have permission to play the music
yeah its good
youtube dl is ded now ?
ok
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)
ohh is there any way to play music in discord.py with a easy and legal way ?
^
i don't know any way to play music :/
yes
copyright laws
no
copyright issues
get a license for whatever platform you're gonna use
there are many music bots i just want to know how they are playing music ?
ohh
basically any library that can play music (lavalink, pomice)
i asked above, is lavalink legal or against tos ?
the reason why groovy died
for the copyright issues?
violation of youtube's TOS
since yt didnt want people to take music from their platform because no ads iirc or copyright im not sure
against tos
ohh
๐
yes they were using youtube as there source

yeah
their*
no
jk
its still in dev
@boreal ravine can you tell me if my subclass is over the top?
water gazes said it was
some guys put rythm pfp now too
Might as well have, discord.py will be better than all other forks in terms of code quality. Thereโs no reason to use any of those forks nowadays
woah
yes they scammed me
#python-discussion for off topic chats
Scammed?
most people use forks for what danny did
this is channel for discord bots
!ot
Off-topic channel: #ot2-never-nesterโs-nightmare
Please read our off-topic etiquette before participating in conversations.
ohk the msg u sent is related with discord bots ?
no
ok
i wanna get more info if yes
- u cant post picture in python general
from __future__ import annotations
from disnake.ext.commands import Bot
import os
class Klaxo(Bot):
def __init__(self, token: str, cogsdir: str, *args, **kwargs) -> None:
super().__init__(*args, **kwargs)
self.token = token
self.cogsdir = cogsdir
async def on_ready(self) -> None:
print("Bots cache has been populated")
async def on_connect(self) -> None:
print(
f"Bot info:\nId: {self.user.id}\nName: {self.user.name}\nDiscriminator: #{self.user.discriminator}\nTag: {self.user.name}#{self.user.discriminator}\nGuild count: {len(self.guilds)}\nMember count: {len(self.users)}\nToken: {self.token}\nCog dir: {self.cogsdir}\nCreation date: {self.user.created_at}\n"
)
print("Bot has connected to the gateway")
def setup(self) -> None:
for filename in os.listdir(self.cogsdir):
if not filename.startswith("_") and filename.endswith("py"):
self.load_extension(f"cogs.{filename[:-3]}")
print(f"Loaded: {filename[:-3]}")
async def on_disconnect(self) -> None:
print("Bot has disconnected from the gateway")
def run(self) -> None:
self.setup()
super().run(self.token, reconnect=True)
and is their anything wrong in it
..
andy told me i can remove the setup method but i said no because the run method would be cluttered
lgtm, why don't you just pass in all the required/optional kwargs instead of passing them later
pardon?
@boreal ravine can ya help
what?
How to check if a message has walls of text or repeated text or too many emotes?
you can use count
super().__init__(*args, **kwargs)
How
you can split() the text and then you can use .count(element)
ah idk i like to pass all the args in the constructor
- count the new lines ig
- split the message to find if one word has lots of appearances in the message
- use regex and count them all
So like do it for every message and I'd like if I wouldve got an example ||Pls wait,Ima brb after drinking some water,feelin thirsty||
and so i can run other bots on the same subclass
:/
*_, = map(lambda f: load_extension(f"cogs.{f[:-3]}"), filter(lambda f: f[-2:]=="py"and not f[0]=="_", os.listdir("./cogs")))
super().run(token)
andy with his esoteric code
Give an example
yes
why aren't you using master branch?
you want to check if the text have repeating words?
oh you're using disnake
Yes
cause i like disnakes implementation more
Wtf is that,its way different than it should be,whats ur library
forgot i can use map ill use it later thx andy
Yep



btw do have something like


just take some rest and then ye
alright, I'm done, what was the issue?




