#discord-bots
1 messages · Page 655 of 1
The 5$ plan is overkill for bots with 100 or less guilds
yeah
Has 2gb of ram
even so uptime robot will work
Depending on how many members the guilds have it will be overkill
Not everything is always behind a pay wall my man
Free isnt always good either
I know I firmly believe in you get what you pay for
But Uptime Robot is good
trust me
lol
Any free vps is horrible compared to premium ones
If it works for you well good for you
reloading modules, Is there one with the help of a command?
Hi
How can i make my bot do that
no
Whos talking about replit?
mb
Do what?
Where is it based
Send a range of numbers?
a = list(range(11))
@bot.command()
async def test(ctx):
for b in a:
await ctx.send(b)
Yes
Thx
Oh your talking about that my bad
i thought you meant what zones and regions there are for gcp
anyways aws is good if your a student, just need to sign up with student info
Nah nvm
Not really discord-bots related
maybe try #python-discussion
with variables?
Well if you use database its different
a = 100
b = 1000
transfer_amount=50
newWallet = a+tranfer_amount
newBank = b+transfer_amount
a, newWallet = newWallet, a
b, newBank = newBank, b
@slate swan
a and b is wallet and bank
if i have a function or definition thing i want to run in a code, but the actual definition is in another code
this is discord bot related
its still got to do with the buttons
How do i format a request using json.dumps with aiohttp?
how do i run it*
what
do you mean
you have a function in another py file?
nonononon
here, let me make an example...
python file 1:
def hello():
print("hi")
the one they say is transfer_amount
yeah
python file 2:
print("hello")
lets say...
i wanted to run python file 1 in python file 2
without copying over the code
i know there is a way to do this, i just dont remember how
so
print(hello())?
use import file1
if it doesn't work make a folder then place the py file in it then ```py
from folder import file1
yeah
thank you, ill try that
@stark lintel you can import the local file and call the function
#file 1
def func():
print("function")
#file 2
import file1
file1.func()
output:
function
thanks both of you, this will help
Classes can also be done in separate files
transfer_amount = await bot.wait_for('How much are you depositing?', check=check(ctx.author))
that's not how you use wait_for
https://discordpy.readthedocs.io/en/stable/api.html#discord.Client.wait_for look the example here
try it
nvm this
ttry this
try it then tell me if there is an error
you should use it still
I said to ignore it
I was wrong lol
👍
does await embed.delete() not work?
memberData.wallet = memberData.wallet
memberData.bank = memberData.bank
what is this for @slate swan ?
await message.delete()?
did you convert it to int?
int(transfer_amount)
To delete a msg its:
await message.content.delete()
for me message.delete() works
Does it?never tried it
for newWallet and bank
shouldn't wallet be -
not +
can you place print (int(transfer_amount))
and tell me what is prints?/
category = discord.utils.get(interaction.guild.categories, name="Tickets")
if trusted_role is None:
await interaction.guild.create_role(name="Trusted")
if category is None:
new_category = await interaction.guild.create_category(name="Tickets")
category = await interaction.guild.fetch_channel(new_category.id)
overwrites = {
interaction.guild.default_role: discord.PermissionOverwrite(read_messages=False),
member: discord.PermissionOverwrite(read_messages=True, send_messages=True),
administrator_role: discord.PermissionOverwrite(read_messages=True, send_messages=True)
}
ticket_channel = await category.create_text_channel(f'ticket-{randint(100, 999)}',
overwrites=overwrites)```
Any idea why im getting
``` category = await interaction.fetch_channel(new_category.id)
AttributeError: 'Interaction' object has no attribute 'fetch_channel'```
.
you dont even have wait_for in your code
then how would you wait for the reply
how do I create a thread that handles discord interactions and closes when it's completed?
does anyone here wanna create a discord bot collaboratively, friend req and dm if so
loop = asyncio.get_event_loop()
loop.create_task(self.team_find_thread(interaction))
I tried this but the active thread count just keeps increasing till the bot crashes
Pasting large amounts of code
If your code is too long to fit in a codeblock in discord, you can paste your code here:
https://paste.pythondiscord.com/
After pasting your code, save it by clicking the floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.
asdass
yo
anyone bot devs
in discord py
that have some knowledge
can we make a bot together
dm me if you want to do it
I doubt anyone will if you don't give any information
i.e What is the bot made for? How long should the project take? How much experience do you have? Do you have a model and list of commands you want to work towards creating?
The bot is basically a calculator, but instead of the basic functions, there will be different ones for different subjects like for example if u do "!geometry" there will be like sin, tan, cos, distance formula, mdpt formula, etc. It can take as long it it will take, I have at least 1 year of experience programming, I have ideas for certain subjects like algebra and geometry, and if we have time we can expand more
Hi, this doesn't seem to be working at all... any idea what my problem is? Not getting the print or the csv updated
oh wait, i'm dumb
it's on_guild_join and not on_join_guild 😭
jesus christ these variable names
why won't you just let it be .deposit 100 like dank memer?
@bot.command()
async def deposit(ctx, amount: int):
memberData = loadMemberData(ctx.author.id)
newWallet = memberData.wallet - amount
newBank = memberData.bank + amount
memberData.wallet, newWallet = newWallet, memberData.wallet
memberData.bank, newBank = newBank, memberData.bank
saveMemberData(ctx.author.id, memberData)
Is discordpy updated to use the new button features? or is there another discord library?
discord.py has everything except slash command implementation
which will be forced to bots with 75+ server count after a year
Do you guys think that you can make a career out of discord bot development?
no
no
Hmm but there are some examples like dank memer etc who have their patron pages
I think very few people can still make a career out of it (depends on their luck and their bot popularity)
im pretty sure just making discord bot is not the developer's career
it is just the developer's anothet thing to earn money from
yes
Not really but if your working with stuff related to apis and api wrappers then yes you can
It can open you to various opportunities... Like imagine ur bot gets very famous then you can open a website etc and promote your other related projects via it? Just an opinion .
You dont get money from discord for making a bot and you rely on donations or people who buy premium plans of your bot
Only thing your learning is about oop and other stuff
Hmm I think it's mostly oop + rdbms
A bot doesnt really need a db but for projects that are big and dbs will be needed then yes
I mean even normal bots will need it depending upon features they want to provide .. like dbs can be used for a lot of things.. so imo every type of bot might need it even if it's big or small
I think it depends on the dev how much far they want to go with the project
Yes really depends on what the bot does
you can get the experience of some basic database management
i dont think anyone would care about the other stuff of your bot. I personally believe it will be better if try to make your own discord.py instead of learning to use it
No. Since a lot of discord bots are available for free. or such a low price that it's not worth trying to get competitive
But why make a new "discord.py"? For the experience..?
No point in really monetising things, especially since there is gonna be 50+ other bots that do the same thing your locked feature does for free
Hmm
Well, for making your own discord wrapper you have to learn how to use discord's RESTful API, how to connect to their gateway, (websocket) and acking heartbeats to keep it alive, etc.
There is a lot of library abstraction in discord.py that makes things easy for the user but a lot of hard stuff is done backend, good experience
there is alot of stuff you can learn with it, discord unfortunately made it very tough to use it with all the stuff like intents and stuff (compared it with revolt api)
Intents are easy, just identify to the gateway with them
Then the websocket sends relevant payloads
Damn.. well that sounds like a lot of complex stuff
Not really
i find it pain in the ass
How so
I know if I wanted a lite bot, I wouldn't want to receive payloads for event's I don't care about E.g PRESENCE_UPDATE
The simple answer would be no since a lot of bots provide different features that suit the user, but atleast you can make a bot project for your github lmao
i tried to connect to the discord api, my websocket didn't crash, i got that "hello" response and the "ready" event but then after some time my bot goes down
Are you sending the heartbeat payloads that you are supposed to?
How did you calculate the intents?
of the heartbeat interval
XD
i didnt, i just pasted the default one for testing
that's why i find it pain in the ass
If you send a correct payload response to IDENTIFY and start the heartbeat it should be working fine
im probably gonna try doing it someday again
Maybe you aren't handling resume and reconnect events
oh yeah, i didn't. maybe that was causing it
Or you don't have a for-loop reading messages from the websocket
Could be a lot of things
but i didn't get any response to that says to resume
Do you actually have a loop to read messages from the websocket??
If the gateway sends a RESUME or RECONNECT operation code your while loop should get the event
Do you only get a READY event
A proper connection should have READY -> GUILD_CREATE X amount of guilds
only that one
i think it had it
my bot was in one server
so there were a few ids
You should still receive a GUILD_CREATE for that guild
Like here in my discord api wrapper
or maybe it was just the bot because my intents were wrong 🤷♂️
What intents value are you passing to the IDENTIFY response
i forgot now and i currently dont have access to my pc
arch btw
@bot.command()
async def ign(ctx, ign:str):
user_exists = False
for i in range(0,len(Json_Items)): #It doesn't exist
for x in Json_Items[i]:
if int(x) == int(ctx.message.author.id):
if len(Json_Items[i][x]["User IGN"]) == 0:
Json_Items[i][x]["User IGN"] = ign
await ctx.send(f"Registered your IGN as:{ign}")
await abc(ctx)
user_exists = True
return
How can I get this code to pass ign to the json?
It is originally defined as "User IGN": "", and doesn't change when this code is ran
u can use json methods instead
like dump
Is it possible to get a nonetype on context
if it doesn't change, possibilities are that your if statement is false or you didn't dump the file
?
Sounds like an XY problem lol
What are you really trying to accomplish?
xy?
Sounds like your question is what you think is a solution to another issue
yes, i guess
Right, what is it?
It shouldn't be possible to get NoneType for context, that is granted you haven't overridden get_context of Bot
It's a really odd question, which is why I immediately sniffed out the possibility of an XY question haha
no need, i was getting nonetype on sending a message to a channel that wasn't cached yet, and I had channel.send and ctx.send so i got confused lol
I see
ctx.send is a shortcut to ctx.channel.send
Your Messageable.send was returning None instead of a message?
If that's what your saying that makes no sense at all
No, it was giving a NoneType has no method "send" error, or something along those lines
Simple issue really, channel was not found/not cached
Oh ok
see my calculator code
buttons = [
[
Button(style=ButtonStyle.grey, label='1'),
Button(style=ButtonStyle.grey, label='2'),
Button(style=ButtonStyle.grey, label='3'),
Button(style=ButtonStyle.blue, label='x'),
Button(style=ButtonStyle.red, label='Exit')
],
[
Button(style=ButtonStyle.grey, label='4'),
Button(style=ButtonStyle.grey, label='5'),
Button(style=ButtonStyle.grey, label='6'),
Button(style=ButtonStyle.blue, label='÷'),
Button(style=ButtonStyle.red, label='←')
],
[
Button(style=ButtonStyle.grey, label='7'),
Button(style=ButtonStyle.grey, label='8'),
Button(style=ButtonStyle.grey, label='9'),
Button(style=ButtonStyle.blue, label='+'),
Button(style=ButtonStyle.red, label='Clear')
],
[
Button(style=ButtonStyle.grey, label='00'),
Button(style=ButtonStyle.grey, label='0'),
Button(style=ButtonStyle.grey, label='.'),
Button(style=ButtonStyle.blue, label='-'),
Button(style=ButtonStyle.red, label='=')
],
]
def calculator(exp):
o = exp.replace('x', '*')
o = o.replace('÷', '/')
result = ''
try:
result =str(eval(o))
except:
result='An error Occured'
return result
Copied
client.command()
async def info(ctx):
name = str(ctx.guild.name)
description = str(ctx.guild.description)
owner = str(ctx.guild.owner)
id = str(ctx.guild.id)
region = str(ctx.guild.region)
memberCount = str(ctx.guild.member_count)
icon = str(ctx.guild.icon_url)
embed = discord.Embed(
title=name + " Server Information",
description=description,
color=discord.Color.green()
Whats wrong?
)
embed.set_thumbnail(url=icon)
embed.add_field(name="Owner", value=owner, inline=True)
embed.add_field(name="Server ID", value=id, inline=True)
embed.add_field(name="Region", value=region, inline=True)
embed.add_field(name="Member Count", value=memberCount, inline=True)
await ctx.send(embed=embed)
Bruh
it says
Wtf
that interaction failed
Whats the error
wait join thi server to seee wats the problem
no
Wait nvm😭
u mean token right?
Nah nvm nvm😭
Anyone good with tasks
Are you planning to go public with this command?
Like let other people use it
Eval 👁️👄 👁️
who cares
If so enjoy getting fucked by eval
oof
good luck not getting your servers nuked
Bruh
Dude, it's just a calculator, read his code
i am gonna nuke ur face first
Bruh
Do you even know what eval does?
Whats the error
He doesn’t even filter out anything
wait
Yes, do you? Read his code
¯\_(ツ)_/¯
but whats the error..
I’ve obviously read it. And so have two other people. That’s probably why they're commenting on it. But I guess you don’t get that. 
How tf do u paginate embeds
class discord.ui.View(*, timeout=180.0)```
Represents a UI view.
This object must be inherited to create a UI within Discord.
New in version 2.0.
Yes but how do u make that
If your using disnake the git has examples
or wait…. I could be wrong here
subclass discord.ui.View
I could be getting exec and eval mixed up
doesn't matter if they commented on it or not, it's not "open" eval, he's just using the function to calculate numbers and people can't do anything else besides clicking the buttons
Sending mail
i made 1
nice
for 2days then went go crazy aaaaaa
sus
?
That’s valid I suppose. I guess I didn’t read into it as much as I thought i did
wouldn’t be the first time
I thought I was gonna get an answer rip
parsing and solving expressions manually is fun 👍
code
helps you understand how it actually works, stacks are very very helpful as well. you can try to do this instead of eval
Full code or
the chunk
but.......doesnt the write function only print statements and not write anything
Look at the error
I did smh
wait
print the output of os.getcwd()
Where
terminal
code
In what part of the code ofc
@sullen shoal
At the tip?
before the open
you didnt call it
import os
I did
then get os.getcwd()
in the debug session
type import os there
then execute os.getcwd()
Ok
Like this?
not there bro
Lmao which line
No…
just run and put import os
there
ok i guess i am wasting more time by doing this
@normal ginkgo remove everything we did then put print(os.getcwd())
on pine 43
!d os.listdir
os.listdir(path='.')```
Return a list containing the names of the entries in the directory given by *path*. The list is in arbitrary order, and does not include the special entries `'.'` and `'..'` even if they are present in the directory. If a file is removed from or added to the directory during the call of this function, whether a name for that file be included is unspecified.
*path* may be a [path-like object](https://docs.python.org/3/glossary.html#term-path-like-object). If *path* is of type `bytes` (directly or indirectly through the [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike "os.PathLike") interface), the filenames returned will also be of type `bytes`; in all other circumstances, they will be of type `str`.
This function can also support [specifying a file descriptor](https://docs.python.org/3/library/os.html#path-fd); the file descriptor must refer to a directory.
Raises an [auditing event](https://docs.python.org/3/library/sys.html#auditing) `os.listdir` with argument `path`.
from discord import DiscordException, Embed, Forbidden, Thread
By the way, importing Thread is right?
os.listdir(path=‘./input/)?
Or my code's wrong
Don't know..
os.getcwd()
pass that to it
Ok
what is your file structure
set_image(*, url)```
Sets the image for the embed content.
This function returns the class instance to allow for fluent-style chaining.
Changed in version 1.4: Passing [`Empty`](https://discordpy.readthedocs.io/en/master/api.html#discord.Embed.Empty "discord.Embed.Empty") removes the image.
Um?
So ./output/out_filtered2.txt doesn't work?
Yeah
Wait
U think?
dont use replit for discor bots unless your repl is private
How?
Yes
no dont even use it
use vsc or some proper ide
Also this isn't the right channel btw
valid point i use vsc
@normal ginkgo you should get a help channel
true ok back to discord dev
Vsc is a code editor, not a hosting service really
Although I use pycharm
i do use a hosting service
Dobe
Dobe?
Done*
Same error
Okay hmm
#❓|how-to-get-help go there, make a help channel and then ping me
This isn't the proper channel
Try making a new repl
that should work
they didn't put ./
New repl won't solve the issue and let's not continue here
Yeah
self.queue = queue seems like you haven't initialized queue
#help-donut go there, they made a help channel
oh 
its, nextcord.Color.blue() ig
- Why are you using
bot.say - it's
nextcord.Color.blue()notnextcord.color.blue() - Error says you forgot a comma, try running the command again
!d nextcord.Colour.blue <==
classmethod blue()```
A factory method that returns a [`Colour`](https://nextcord.readthedocs.io/en/latest/api.html#nextcord.Colour "nextcord.Colour") with a value of `0x3498db`.
Client doesn't work
so I thought I'd use bot
!d disnake.ext.commands.Param
bot.saydoesn't exist (except if your using an old version of dpy)- add a parameter to the command
indeed
Why do I keep getting another instance of VSC somehwere, I have to keep shutting my pc off to fix that and it's annoying
Multiple instances
You can reset the token, which will stop all the instances immediately
^
If you could run multiple times on vsc, it opens up new instances
neither do you host on replit

you host on a vps not replit
replit is good
Yeah I know lol
use bot i guess
Hosting of really small bots with one to two commands on replit is fine not the ones with a higher number of commands
bot doesn't work either
Just for testing purposes
Client isnt even defined
Yeah
your literally reading his error again
bot.run
because it's obvious already?
Do I need Client = ?
everyone is dumber than they usually sound
nope, you already have bot
do you know what variables are? @vapid ingot
Not really
lol
Then you should learn basic python before this
told ya
Discord.py nextcord and whatever lib you are using
No nitro moment
learning algebra was a joke xD
When I try to learn basic python it leads me no where and I don't retain the info
My DMs are open I wont mind a gift
I'm just trying to learn as I go I guess
you simply dont have interest
then learn it properly?
Nah im good keep it
I do I just don't have tons of time and I need to get this bot up
wont work
You need ||passion|| 
will to learn yes
Well, if you are making a bot, you need to learn programming
Its simple logic really
If you want fly a plane, you need to know the plane
Thanks guys I appreciate that and I will do that, I just want to know how to embed atm
You can't fly a plane but not know how it works and what its controls are
I mean, when I first made a bot, I didn't know python but I learnt it on the way 😎
^^
That's the worst thing you can do
silly
That's like sitting on a rocket, learning how to add 2 + 2
Was I the only one who watched a 13 hour tutorial first 🥲
embed = nextcord.Embed(...)
await ctx.send(embed=embed)``` the `...` will be the arguments which you'll pass into `nextcord.Embed`
Did the same thing and i ended up being ||braindead||
Agreed, and I didn't ask questions in the dpy server cause I knew I'd get roasted
Only watched like 5mins
ingenious

you don't even need to understand python to watch a video that long
Do I remove this?
Watched a 5hour tutorial about python after that i realized it was python ||2.0|| 😔
no, that seems correct, change the @client.command() to @bot.command()
it was a waste of time lmao
lmaoooo
bot.command?
this is why you should always see the release dates of each video
@vapid ingot you learned algebra?
Yeah do it ever since
I swear😭
Same output
Of course, what is your issue? If you know everything I'm sure you can solve this issue.
opinions on replit https://cdn.discordapp.com/emojis/914706259830276146.gif?size=128
Same error, embed never generates
Even if I did now I wont, I was just saying that if you learned algebra, variables in that and variables in programming are same
You never had the answer, maybe you should go brush up.
I don't understand why you need to drown out the knowledge of others with your negativity.
can you send all of the code
yes
please refrain from non-constructive messages
Thank you mina
what did I even do 
from nextcord.ext import commands
bot = commands.Bot(command_prefix="!")
@bot.command(name="Join")
async def join(ctx: commands.Context):
await ctx.send("""Upon entering our discord you received a dm from @spring summit
Please follow all instructions listed there
If you need further assistance please head to #❓support
Here's an example of how I joined //add RogueAlien86
Enter your gamertag **exactly** how it appears in miencraft""")
@bot.command()
async def displayembed():
embed= nextcord.Embed(
title= 'Title',
description = 'Plot Test',
color = nextcord.Color.blue()
)
embed.set_footer(text='footer')
embed.set_image(url='https://cdn.discordapp.com/attachments/748496947291226172/915417044986503198/pic_1.png')
embed.set_thumbnail(url='https://cdn.discordapp.com/attachments/776192375323230259/917149822748860446/topia.png')
embed.set_author(name='Author Plot Topia')
icon_url='https://cdn.discordapp.com/attachments/776192375323230259/917151883427217459/pastel.png'
embed.add_field(name='Field Name', value='Field Value', inline=False )
embed.add_field(name='Field Name', value='Field Value', inline=True )
embed.add_field(name='Field Name', value='Field Value', inline=True )
await bot.say(embed=embed)
bot.run("token")```
that's everyone here, I'm not singling anyone out
uh ok, thanku
bot.say isnt a method
Wasnt that deprecated?
your command should take a parameter, ctx, which you can reply to or use to send to the channel
it doesnt even exist anymore
Bruh😭
that was before the rewrite lol
3 years ago or so iirc
at the top he uses ctx then at the bottom he uses say
@client.command()
async def hack(ctx):
botmsg = await ctx.reply(f'Commencing hack!')
await asyncio.sleep(5)
botconfirm = await ctx.edit(botmsg=f"Successfully hacked into their device!")
i am making hack command, first msg gets sent, 2nd doesnt
the edit msg doesnt get sent
i import asyncio
Doesn't display any embeds
wait
You need to use the edit function on the message sent and pass the content parameter
thats because in !join you didnt make an embed
oh
Do I add that here as well
@client.command()
async def hack(ctx):
botmsg = await ctx.reply(f'Commencing hack!')
await asyncio.sleep(5)
botconfirm = await ctx.content.edit(botmsg=f"Successfully hacked into their device!")
idk if i did it wrong
wrong
context has no attr content
!d discord.ext.commands.Context.message <= use this
The message that triggered the command being executed.
ok
Type !displayembed and you will get the embed as the embed is set to that command you will need to make a embed in the join command
How can I change my token as well? I didn't realize I shared the token earlier
developer portal
i think i did it wrong...
@client.command()
async def hack(ctx):
botmsg = await ctx.reply(f'Commencing hack!')
await asyncio.sleep(5)
botconfirm = await discord.ext.commands.Context.message.edit(botmsg=f"Successfully hacked into their device!")
You need to edit the instance, not the type
wdym
you're trying to edit discord.ext.commands.Context.message which is a property on a type (Context) rather than the actual message
ctx.edit?
you've already saved the message earlier to botmsg, so use that
i did botmsg=
yes, and then proceeded to ignore that variable
yeah so edit it
you need to use edit on that
botmsg.edit
yes
finally
anyone know this theme used in this vid; https://www.youtube.com/watch?v=AquIwgga0ek&ab_channel=Lucas ( i do not watch lucas )
In this video we learn about events and how to use them in our discord bot.
NOTE: Discord released a breaking change a while back that prevents bots from receiving information about various events unless they opt into it. As I cannot edit the video, if you want a quick explanation of what you will need to do, you can join my discord help server...
sorta wrong channel
trying to make a channel with slowmode pre-enabled(manually), its a verification channel, so you send "(pre)verify" and you get dmed a captcha to fill out blah blah blah
but using this source
def checkk(message):
return message.channel.id == 917289006335680592
@bot.event
async def on_message(message):
purgeChannel = bot.get_channel(917289006335680592)
await purgeChannel.purge(limit=1, check=checkk)``` none of my commands work
why is that
await bot.process_commands(message) after
lmao thanks
alright question two, how can i make a variable check for another variables output
so lets say i have a bunch of captcha images
what
and captcha 1 gets picked (of ten)
how can i make the bot tie a specific message to that captcha
god thats hard to explain
idk what you talking bout
can you send the code so I can understand you better
I've given up on embeds for the night
After trying to add another command I get Command "social" is not found
async def social(ctx: commands.Context):
await ctx.send("""First time followers can earn themselves some cool rewards. Be sure to ask a staff member about some extra perks!
https://vm.tiktok.com/ZM8qmyREn/
https://www.youtube.com/channel/UCDi0BvhS_CDDhyglD5MnOGQ""")```
Dm me i got you
you don't need to put ctx:commands.Context
By the way
category = discord.utils.get(interaction.guild.categories, name="Tickets")
if trusted_role is None:
await interaction.guild.create_role(name="Trusted")
if category is None:
new_category = await interaction.guild.create_category(name="Tickets")
category = await interaction.guild.fetch_channel(new_category.id)
overwrites = {
interaction.guild.default_role: discord.PermissionOverwrite(read_messages=False),
member: discord.PermissionOverwrite(read_messages=True, send_messages=True),
administrator_role: discord.PermissionOverwrite(read_messages=True, send_messages=True)
}
ticket_channel = await category.create_text_channel(f'ticket-{randint(100, 999)}',
overwrites=overwrites)```
Any idea why im getting
``` category = await interaction.fetch_channel(new_category.id)
AttributeError: 'Interaction' object has no attribute 'fetch_channel'```
ok so, ive got an idea to explain what i need
pycord?
@worldly banediscord.py 🙂
this is captcha 1, if someone executes my verify command, it sends them this in dms (ill obviously format it in an embed and make it pretty), but if this image is selected, the bot knows that if the user replys with "KZEXEH", they've successfully passed the verification. otherwise, theyve failed and must re-execute the command. lets say i have 3 captchas, how can i tie the proper verification key (such as "KZEXEH") to its proper coresponding captcha image
hopefully that makes sense
it did
use a dictionary?
wha....
OK SO im self taught but ik what im doing, just need steering in the right direction
not spoonfeeding, but steering
dictionary={
"KZEXEH": "some.png"
}
a_dictionary = {
"captcha1.png": "KZEHDX",
"captcha2.png": "WRJKCOC"
}
^^these are dictionaries
so you are using a randomizer to send the image right?
pretty much
just see which image was sent and add if-else statements
dictionary.get("captcha1.png")
@client.event
async def on_member_join(member, get):
guild = client.get_guild(730651046459998218)
channel = await (await client.fetch_channel(885464532959526913)).send(f'Welcome to server **{member.mention}**.')
role = get(member.guild.roles, name='Unverified')
role = get(member.guild.roles, name='•.¸¸.•:Colours:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•')
role = get(member.guild.roles, name='•.¸¸.•:Verification:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•')
role = get(member.guild.roles, name='•.¸¸.•:Age:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•')
role = get(member.guild.roles, name='•.¸¸.•:Gender:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•')
role = get(member.guild.roles, name='•.¸¸.•:Sexuality:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•')
role = get(member.guild.roles, name='•.¸¸.•:Preference:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•')
role = get(member.guild.roles, name='•.¸¸.•:Height:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•')
role = get(member.guild.roles, name='•.¸¸.•:Distance:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•')
role = get(member.guild.roles, name='•.¸¸.•:Ethnicity:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•')
role = get(member.guild.roles, name='•.¸¸.•:Hobbies:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•')
role = get(member.guild.roles, name='•.¸¸.•:Relationship:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•')
role = get(member.guild.roles, name='•.¸¸.•:Location:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•')
role = get(member.guild.roles, name='•.¸¸.•::•.¸¸.•`Seeking`•.¸¸.•``•.¸¸.•``•.¸¸.•')
role = get(member.guild.roles, name='•.¸¸.•:DM:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•')
role = get(member.guild.roles, name='•.¸¸.•:Levels:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•')
role = get(member.guild.roles, name='•.¸¸.•:Games:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•')
await member.add_roles(role)
print(f"{member.name} has joined the server")
Ignoring exception in on_member_join
Traceback (most recent call last):
File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\client.py", line 343, in _run_event
await coro(*args, **kwargs)
TypeError: on_member_join() missing 1 required positional argument: 'get'
don't put member, get
just put member
well it wants me to define get as i do want it to add multiple roles
when a member joins
so
dictionary.get(random.choice("captcha1.png", "captcha2.png")
to shorten the code, add all the rolenames in a list, and iterate through them
string
Wdym iterate through them?
just try this
if random_image_name == "captcha1":
key = "whatever"
elif .......
I dont understand your question now
so i add the file extension or
everything
and how can i see if the message the user replys to the image with is the proper key
Wdym iterate them?
dm me a command idea i need those 🤔
roles_list = ["role1", "role2"]
for i in roles_list:
role = discord.utils.get(ctx.guild.roles, name=i)
member.add_roles(role)
use .wait_for
just convert it after the response is back
is there a doc for that
crab
!d discord.ext.commands.Bot.wait_for
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**...
^
thanks ill look into that
shouldn't it be amount: int 🤔
jk idk if that works
Ohh so then i would exchange role1, role2 string to my rolenames right?
may cause errors sometimes, happened with me
yeeeshhh
as many as you want
ayeeee ok no matter what the limit is ?
yeppp, just see that you dont cross the ratelimits xD
Add only 5 roles at a time that is
Ohh ok is that for each role_list variable?
whats the point of sending this?
transfer = await ctx.channel.send('How much are you willing to deposit, sir? ')
the content in the list
yes
transfer = await ctx.channel.send('How much are you willing to deposit, sir? ')
^^remove this
yep
and send a message to the user at the end
and see if it works
try and except int(transfer)
the transfer parameter is where they mention the amount
you should place a check since they could place pls dep what
yeah
try and except could do it
and that command is gonna give a lot of errors since there are a lot of possibilities in an economic command
Question for every role_list do i have to add member.add_roles(role) each time?
give me an example of what you mean
ok
an embed object requires arguments, plain text wont work
Am bad at explaining some things
!d discord.Embed
class discord.Embed(*, colour=Embed.Empty, color=Embed.Empty, title=Embed.Empty, type='rich', url=Embed.Empty, description=Embed.Empty, timestamp=None)```
Represents a Discord embed.
len(x) Returns the total size of the embed. Useful for checking if it’s within the 6000 character limit.
bool(b) Returns whether the embed has any data set.
New in version 2.0.
Certain properties return an `EmbedProxy`, a type that acts similar to a regular [`dict`](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.9)") except using dotted access, e.g. `embed.author.icon_url`. If the attribute is invalid or empty, then a special sentinel value is returned, [`Embed.Empty`](https://discordpy.readthedocs.io/en/master/api.html#discord.Embed.Empty "discord.Embed.Empty").
For ease of use, all parameters that expect a [`str`](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.9)") are implicitly casted to [`str`](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.9)") for you.
async def on_member_join(member, ctx, get):
guild = client.get_guild(730651046459998218)
channel = await (await client.fetch_channel(885464532959526913)).send(f'Welcome to server **{member.mention}**.')
roles_list = ["•.¸¸.•:Colours:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•", "•.¸¸.•:Verification:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•","•.¸¸.•:Age:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•","•.¸¸.•:Gender:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•","•.¸¸.•:Sexuality:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•"]
for roles in roles_list:
role = discord.utils.get(ctx.guild.roles, name=roles)
member.add_roles(role)
roles_list = ["•.¸¸.•:Preference:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•","•.¸¸.•:Height:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•"]
member.add_roles(role)
seems like it
and there is no await ctx.send(embed=embed)
only one
roles_list = ["•.¸¸.•:Colours:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•", "•.¸¸.•:Verification:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•","•.¸¸.•:Age:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•","•.¸¸.•:Gender:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•","•.¸¸.•:Sexuality:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•"]
for roles in roles_list:
role = discord.utils.get(ctx.guild.roles, name=roles)
member.add_roles(role)
will work
Is it because I'm using a link?
let me see role rate limits
nope every embed requires parameters
bruh
First command isn't embeded and it worked
try:
int(transfer)
except Exception:
#respond
indent the for
smh, the Embed object requires title, description, color <--- optional
# an embed example
embed = nextcord.Embed(title="smh", description="smh", color=nextcord.Color.blue())
embed.add_field(name="smh", value="smh")
await ctx.send(embed=embed)
detect error
Any role rate limit?
the frustration lol
every argument for nextcord.Embed is optional
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
ohh sad
well you can't send an empty embed right?
smh very
you can
ok ill just add the roles as they are and will see what happens
never tried it
here
Rate limits are dynamic. They change with every request u make
await ctx.send or print()
Yea
except Exception as e:
print(e)```
but thats not related to role rate limit
it is
It is. Role rate limits are also dynamic
if u want
catch ValueError instead
this @slate swan
async def on_member_join(member, ctx, get):
guild = client.get_guild(730651046459998218)
channel = await (await client.fetch_channel(885464532959526913)).send(f'Welcome to server **{member.mention}**.')
roles_list = ["•.¸¸.•:Colours:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•", "•.¸¸.•:Verification:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•","•.¸¸.•:Age:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•","•.¸¸.•:Gender:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•","•.¸¸.•:Sexuality:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•",
"•.¸¸.•:Distance:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•","•.¸¸.•:Ethnicity:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•","•.¸¸.•:Hobbies:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•","•.¸¸.•:Relationship:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•","•.¸¸.•:Location:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•",
"•.¸¸.•::•.¸¸.•`Seeking`•.¸¸.•``•.¸¸.•``•.¸¸.•","•.¸¸.•:DM:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•","•.¸¸.•:Levels:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•","•.¸¸.•:Games:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•"]
for roles in roles_list:
role = discord.utils.get(ctx.guild.roles, name=roles)
member.add_roles(role)```
RIght?
try:
int(transfer)
except ValueError:
pass
('Error!') doesn't do anything
Irrc you Cant use ctx in on_member_join
Well you mentioned ctx as it is
Yea
so
There's only member arg there nothing else
member.guild.roles
Yeah and ctx is a positional arg which always has to be first but in this case its member
then?
bruh i sent nitro
Traceback (most recent call last):
File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\client.py", line 343, in _run_event
await coro(*args, **kwargs)
TypeError: on_member_join() missing 1 required positional argument: 'get'```
async def on_member_join(member, get):
guild = client.get_guild(730651046459998218)
channel = await (await client.fetch_channel(885464532959526913)).send(f'Welcome to server **{member.mention}**.')
roles_list = ["•.¸¸.•:Colours:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•", "•.¸¸.•:Verification:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•","•.¸¸.•:Age:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•","•.¸¸.•:Gender:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•","•.¸¸.•:Sexuality:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•",
"•.¸¸.•:Distance:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•","•.¸¸.•:Ethnicity:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•","•.¸¸.•:Hobbies:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•","•.¸¸.•:Relationship:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•","•.¸¸.•:Location:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•",
"•.¸¸.•::•.¸¸.•`Seeking`•.¸¸.•``•.¸¸.•``•.¸¸.•","•.¸¸.•:DM:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•","•.¸¸.•:Levels:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•","•.¸¸.•:Games:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•"]
for roles in roles_list:
role = discord.utils.get(member.guild.roles, name=roles)
member.add_roles(role)
print(f"{member.name} has joined the server")
why did it get deleted
why?
because im generouse
self bots will snipe it
whats a self bot?
a user account in which a bot runs it
oh ok
or autoclicker
did it get deleted or sniped?
More probably sniped
your abt me says gift me nitro and you are giving nitro sus
Since I am damn sure there are many self bots here
it doesnt delete the message after receiving so ig python bot deleted it
I have a command that is like +command and then I have on_message_events. When I have the on_message_events on, the +command doesn't work. How can I like pass this
await bot.process_commands(message)
Traceback (most recent call last):
File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\client.py", line 343, in _run_event
await coro(*args, **kwargs)
TypeError: on_member_join() missing 1 required positional argument: 'get'```
async def on_member_join(member, get):
guild = client.get_guild(730651046459998218)
channel = await (await client.fetch_channel(885464532959526913)).send(f'Welcome to server **{member.mention}**.')
roles_list = ["•.¸¸.•:Colours:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•", "•.¸¸.•:Verification:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•","•.¸¸.•:Age:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•","•.¸¸.•:Gender:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•","•.¸¸.•:Sexuality:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•",
"•.¸¸.•:Distance:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•","•.¸¸.•:Ethnicity:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•","•.¸¸.•:Hobbies:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•","•.¸¸.•:Relationship:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•","•.¸¸.•:Location:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•",
"•.¸¸.•::•.¸¸.•`Seeking`•.¸¸.•``•.¸¸.•``•.¸¸.•","•.¸¸.•:DM:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•","•.¸¸.•:Levels:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•","•.¸¸.•:Games:•.¸¸.•``•.¸¸.•``•.¸¸.•``•.¸¸.•"]
for roles in roles_list:
role = discord.utils.get(member.guild.roles, name=roles)
member.add_roles(role)
print(f"{member.name} has joined the server")```
whats get doing there
its telling me to define it
you defined it thats why
told him it
passing get?
show error
?
Traceback (most recent call last):
File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\client.py", line 343, in _run_event
await coro(*args, **kwargs)
TypeError: on_member_join() missing 1 required positional argument: 'get'
Remove the get
its raising this error because the library is only passing one argument
role = discord.utils.get(member.guild.roles, name=roles but it needs to be passed through the role
from nextcord.ext import commands
bot = commands.Bot(command_prefix="!")
@bot.command(name="Join")
async def join(ctx: commands.Context):
await ctx.send("""Upon entering our discord you received a dm from @spring summit
Please follow all instructions listed there
If you need further assistance please head to #❓support
Here's an example of how I joined //add RogueAlien86
Enter your gamertag **exactly** how it appears in miencraft""")
@bot.command(name="social")
async def social(ctx: commands.Context):
em = nextcord.Embed(description="""First time followers can earn themselves some cool rewards. Be sure to ask a staff member about some extra perks!
https://vm.tiktok.com/ZM8qmyREn/
https://www.youtube.com/channel/UCDi0BvhS_CDDhyglD5MnOGQ""")
await ctx.send(embed=em)```
first command works, second one doesn't
then copy paste the first command and then paste with with the 2nd and then just change
Show error?
Ignoring exception in command None: nextcord.ext.commands.errors.CommandNotFound: Command "social" is not found
It seems like the bot can only handle one command and there may be an underlying issue here
When I change Join to ``Jointest`
Ah
How to send bot to spesific channel ?
Enclose them inside another curly brackets
!d discord.Client.get_channel
get_channel(id, /)```
Returns a channel or thread with the given ID.
!d discord.TextChannel.send
await send(content=None, *, tts=None, embed=None, embeds=None, file=None, files=None, stickers=None, delete_after=None, nonce=None, allowed_mentions=None, reference=None, mention_author=None, view=None)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).
Sends a message to the destination with the content given.
The content must be a type that can convert to a string through `str(content)`. If the content is set to `None` (the default), then the `embed` parameter must be provided.
To upload a single file, the `file` parameter should be used with a single [`File`](https://discordpy.readthedocs.io/en/master/api.html#discord.File "discord.File") object. To upload multiple files, the `files` parameter should be used with a [`list`](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.9)") of [`File`](https://discordpy.readthedocs.io/en/master/api.html#discord.File "discord.File") objects. **Specifying both parameters will lead to an exception**.
To upload a single embed, the `embed` parameter should be used with a single [`Embed`](https://discordpy.readthedocs.io/en/master/api.html#discord.Embed "discord.Embed") object. To upload multiple embeds, the `embeds` parameter should be used with a [`list`](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.9)") of [`Embed`](https://discordpy.readthedocs.io/en/master/api.html#discord.Embed "discord.Embed") objects. **Specifying both parameters will lead to an exception**.
sql-fstring
f-strings
!f-strings
Creating a Python string with your variables using the + operator can be difficult to write and read. F-strings (format-strings) make it easy to insert values into a string. If you put an f in front of the first quote, you can then put Python expressions between curly braces in the string.
>>> snake = "pythons"
>>> number = 21
>>> f"There are {number * 2} {snake} on the plane."
"There are 42 pythons on the plane."
Note that even when you include an expression that isn't a string, like number * 2, Python will convert it to a string for you.
No it was my bad. But I read somewhere that if u wanna print curly braces just add them inside another pair of brackets
Eh I know I don't know shit about Python don't bulli ;-;
hmmmm
guys anyone here who can tell me how to wait for the btos message itself in someones dm
!d discord.ext.commands.Bot.wait_for
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**...
profilePicture = user.avatar_url
wow
where are you using it?
im trying to send the author's profile picture
in part of the embed
but idk how to get the pfp
user,avatar.url
ctx.author.avatar_url (if not dpy 2.0)
which one =.=
.
user,avatar.url or user.avatar.url?
,-,
;-;
Depends on your dpy version
ok
If it's 2.0 then it's user.avatar.url
If it's 1.7 then it's user.avatar_url
If it's older than 1.7 then.... || only God can tell you ||
that god is Rapptz? or Danny?
Well that God gonna be like: Why the fuck you are not using 1.7 and still on the older version
So yea, better is to not ask the God and be on at least 1.7 :D
pfp = ctx.author.avatar_url
works in older versions that 1.7
=.=
TL;DR, DON'T use older versions as long as u don't wanna get bullied (:
old is gold 
||rarely||
lmao
embed.set_thumbnail(url = user.avatar.url ),
Why does everyone use reserve psychology on me ;-;
hm?
big error
🤣
nice
Than smaller ones ^^^
ss
Ah u somewhere did something like
🤣
(a=b, c)
embed.set_thumbnail(url = user.avatar.url ),
this is the error
U did this somewhere
the whole line is the error
code and error
Do u have that period at the end in code or only in the message tho
no?
light mode
Remove the period
i cant turn it to dark mode
comma*
if its replit you can 
Nvm
YESS
Also
I FOUND THE DARK THEME
Move that outside of the embed function
ok
embed = discord.Embed(...)
embed.set_thumbnail(...)
!d discord.Embed
class discord.Embed(*, colour=Embed.Empty, color=Embed.Empty, title=Embed.Empty, type='rich', url=Embed.Empty, description=Embed.Empty, timestamp=None)```
Represents a Discord embed.
len(x) Returns the total size of the embed. Useful for checking if it’s within the 6000 character limit.
bool(b) Returns whether the embed has any data set.
New in version 2.0.
Certain properties return an `EmbedProxy`, a type that acts similar to a regular [`dict`](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.9)") except using dotted access, e.g. `embed.author.icon_url`. If the attribute is invalid or empty, then a special sentinel value is returned, [`Embed.Empty`](https://discordpy.readthedocs.io/en/master/api.html#discord.Embed.Empty "discord.Embed.Empty").
For ease of use, all parameters that expect a [`str`](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.9)") are implicitly casted to [`str`](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.9)") for you.
yes?
Yea
O my net dies
can i just do ctx.author.avatar.url
🤣
Sure
ok nice
why do people still use ctx: commands.context
=.=
more words more not neat code
dont tell me u use msg
good night
huh...
People like me who don't remember the methods and need help of auto completion
It literally takes me 10 min to write a kick/ban command cz I never remember methods
thats why u need this button
its call auto format
i mean how is the check supposed to be?
or refactor code
check=lambda msg: msg.author == ctx.author and isinstance(msg.channel, discord.DMChannel)
guys any bot command suggestion?
Yea
now I know why I don't get auto complete lol
what kind of bot
!voiceverify
mod bot?
Make a bot command to suggest us new ideas for bot commands
like a normal bot
this
cap
It's called type hinting
No cap
captain
u used auto complete not me
I just copied u
sollu
hey i need some more help, in this
Haha well that way your IDE comes to know that what's the type of the object and so it just gives u suggestions
Sure
i have that
Ask that commannd then (:
smort
like i already have that command and i want make some more
that check it waiting for whose message, the author of the dm or the bot , cause i want the bot to wait for its message
not the author
Author of the command
It's checking if the message author is the command author and the channel is a DM Channel
make an rpg bot
i want to check it whether the user who send the message in the dm is a bot
will keep you occupied
function?
i want to execute it when the bot msgs
msg.author == bot.user then
idk
whats wrong now 🤦
msg.author.avatar_url then
ah wont it give bot is not defined?
like what will it do
U r on 1.7
lmao ok
Well then just do ctx.bot.user
it is ctx.author.avatar_url
ok
is there any new version?????????????
2.0
2.0
Last version of dpy.
rip
Won't get updated anymore
got it
Totally not bias towards disnake
use py-cord
i use pycord but pycord not that good
ur a "Notable Contributer" lol
I personally don't like py-cord
ah guys i have became a bit rusty, so can somebody tell me whats the required argument in the on_member_join event?
like they have built-in ipc support but no slash command
member
disnake is good
on_member_join(member)
has all the application already
Can we just ignore that? Don't wanna talk about that ngl
only one required
async def on_member_join(ctx):
print(ctx.name)
isn't it member
yes gve me ntiro
dont be an idiot, its member.
ctx != member
Dude u can name the param literally anything
we’re here to help, not to confuse
It will always be a member object
ctx stands for context, which is not being passed. someone will try and use ctx.channel or some shit and calling the param ctx is unnecessary and stupid
And there ain't a rule that u gotta name your context object ctx. It's just the same thing we do with self
