#development
1 messages · Page 407 of 1
Learn the language basics at first
At least you're not begging for code
And you are trying to learn
const memes = ["bad.png", "HCTHmeme.jpg", etc];
const meme = "./memes/tf2/" + memes[Math.floor(Math.random() * memes.length)];
sendMeme(meme)```
I guess
something like that
Ok
Yeah looks more clean
Ok
also
number = 7;
var number = Math.floor (Math.random() * (number - 7 + 7)) + 7;
switch (random)```
I screwed that up didn't I?
- you never use number
- number won't ever be in the range you want
- you switch on nothing
ok
I need help
async def on_message (message):
if message.content == "Hello"```
Wheres the syntax eror
Erro*
Error*
OHH
That was my mistake
I got another eror
erro*
Error*
async def on_ready():
print("Super Bot Is Online And Readyhh To Use!!!"):```
no colon there
Kk
It will give me the same error
Oh wait
async def on_message (message):
if message.content == "Hello":
await client.send_message(message.channel,) ":waving: Hello! I am super The Bot!"```
Oops
Theys still a eror
erro*
error*
Wait no
I fixed it
And btw
Its saying
from discord.ext.command import Bot
No Module Named `discord.ext.command
No wait from discord.ext.command import Bot
Oh damnit Im making mistakes
The "."
Is wrong
Darn
Another eror
error*
@inner jewel What wrong here
from discord.ext commands import Bot

Anyone help?
I forgot how to get the bot to send an image, how do I do that again with discord.js?
@inner jewel ????
I'd recommend against tagging people for help
they'll help you if you just wait
WHelp I gues Illl jus wait
how do we get bots to send images again I completely forgot
Ok wait I got it
ok
Darnit
Oh frick I found my msitake
mistake*
My bots turning on but the commands dont work
Oh no
FAILURE
Darnit
Same
lmfao
can someone pls help me get the bot to send the image? Here's me code:
https://hastebin.com/nuzudigaxu.js
it cannot send an empty message
or atleast that's what it says
ok
(node:12272) UnhandledPromiseRejectionWarning: DiscordAPIError: Invalid Form Body
embed.image.url: Not a well formed URL.
at item.request.gen.end (C:\Users\home\Desktop\node_modules\discord.js\src\client\rest\RequestHandlers\Sequential.js:71:65)
at then (C:\Users\home\Desktop\node_modules\snekfetch\src\index.js:215:21)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:182:7)
(node:12272) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:12272) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
It didn't work @toxic oracle
setImage wants a url not a path
I need hep
help*
What does this mean
Unexpected EOF While parsing.
Can Anyone Help?
¯_(ツ)_/¯
Learn to research. This is something you can solve by yourself. Just like all your previous questions.
I don't want to be mean - but you can't always depend on others. And others are annoyed if you constantly need help.
Just for future reference, researching is one of the - if not the - most valuable skill you can have as a developer.
Hey. Anyone know how I can split a message that will be > 2000 characters?
Google also depends on what language you are using which would have been good to know
how do i use lavalink without shards
https://github.com/Frederikam/Lavalink/tree/master/LavalinkClient this does stuff with shards
idk how to do it without
i mean you could just say that the shard id is 0
but what about the third argument
rip
setfield isn't a thing
oh your right xD
;-; I'm really new to this, how do you get your bot to be online? (I use sublime)
Do you know what a token is?
a token is what you use to authenticate your bot
@maiden mantle What lib are you using?
Yes, ik what a token is 👌
what's a lib
js yes
so Discord.js?
Yes
👍
i think ur using snekfetch wrong
const snekfetch = require("snekfetch");
module.exports = async () => {
const response = await snekfetch.get("https://api-to.get-a.life/dogfact");
return response.body.fact;
}```
how to use it properly(just an example ps the link is real)
Anyone have a good chat api or npm
i have a decent chat api still in alpha stage so isnt rlly gud
@earnest phoenix if u want to test it just go to #commands and type @Kyro Bot#2801 message
and tell me if u want the link or not
Help
Why wont my command work
Its not giving any error
async def ping():
await client.say('Pong.')```
Anyone?
Nah wait I fixed it
hey guys im using discord py and i just moved to rewrite and since i moved im having issues on what to import lol
The rewrite is the next major version of discord.py.
It is a massive breaking change. You can think of it as an entirely new library.
Some helpful links:
- https://github.com/Rapptz/discord.py/tree/rewrite for the source code
- http://discordpy.readthedocs.io/en/rewrite/ for the documentation
- http://discordpy.readthedocs.io/en/rewrite/migrating.html for a migrating guide from async -> rewrite
- https://github.com/Rapptz/discord.py/tree/rewrite/examples for examples
If you are interested in beta testing the rewrite you can install it by doing the following (requires git):
Do not install this if you don't want to help test this out, either by reporting bugs or asking for improvements.
$ python3 -m pip install -U git+https://github.com/Rapptz/discord.py@rewrite
# or with voice
$ python3 -m pip install -U git+https://github.com/Rapptz/discord.py@rewrite#egg=discord.py[voice]
After installing the rewrite, please type ?rewrite in #381963689470984203 so you can be up-to date on the latest development and breaking changes.
If you want to help test the rewrite, you must be willing to update. Not updating makes the beta testing aspect useless.
Please note that the API itself is not finalised. There are chances that an update might break your bot due to an error on my part. However, it is fairly usable. Until the rewrite is fully released I will make more breaking changes in the future to the API. However bug reports and feature requests are appreciated.
i dont think u need the {} around the embed name
you do, but you can't call it mEmbed
if you want to drop the value, it has to be called embed
so either { embed } or { embed: mEmbed }
ok
thx
now I get the url not formed well error
new error
but Imma getting there
How do I correctly form the URL?
if i try to start my bot in pm2 i get stuck in a restart loop
that's probably because your bot crash at the launch
then pm2 try to restart it
but because your thing crash it infinitely tries to restart it
¯_(ツ)_/¯
i tried to delete these files http://i64.tinypic.com/izpxrn.png then it started to happen
now it stopped
and the bot is logged in when i did pm2 stop
what is this trickery

Lol deleting sqlite files dun fucked up
Why is my bot on without its console????
why not
What editor do you use?
Me?
Yes
Visual Studio Code
Look at the views and make sure to Ctrl + C in the embedded terminal
I don't get
views?
I mean like
The commands are working
But the terminal is not on
Oh, no wait itsd
fine
Good?
Yupyup
I looked on my Task Manager And Saw it On.
Lemme go add mod commands on my bot
Where is the discord.py site?
nahh got it
Google
I forgot how to add mod commands
on my bot
Any one help
Wait no AI got it
jkj
I dont remember
AI got it 
Oh wait no
I meant mod Commands
Im not trolling xD
ok got it
But I still got a problem
@commands.has_role("Perms")
async def kick(ctx, user: discord.Member):
await client.say(":white_check_mark: ***User Has Been Kicked***")
await client.kick(user)```
Whats wrong with this code?
OHH
I don't python but shouldn't it me something like user=ctx.message.member
I don't even know discord.py it's just my guess
Hi, what would the permission be for using richembeds?
Embed links
Thank you!
embed_links for Discord.py.
How do I make a python kick command?
Discord.py async or rewrite?
async
http://discordpy.readthedocs.io/en/async/api.html#discord.Client.kick
await client.kick(user) or member instead of user, depending on what var is a Member object.
That's for ban command. 
Ik
async def ban():
print('User Has Been Banned')
await ban(member, delete_message_days=1)```
Is this correct??
IndendationError™
Oh wait
darni
async def ban():
print('User Has Been Banned')
await client.ban(member) ban(member, delete_message_days=1)```
Ok
Ok im comfused
How is your bot even defined?
confused*
client or bot?
client
async def ban():
print('User Has Been Banned')
await ban(member, delete_message_days=1)```
Is this correct?
Define member in async def part. 
Damnit I forgot
async def ban():
print('User Has Been Banned')
await client.kick(member) ban(member, delete_message_days=1)```
??
u wot
Is it correct?
Eh. Not.
Oh darnit
async def ban():
print('User Has Been Banned')
await client.ban(member) ban(member, delete_message_days=1)```
?
@client.command()
async def ban(self, member: discord.Member):
print('User Has Been Banned')
await client.ban(member, delete_message_days=1)
Ty!
You don't specifically need to define self, but w/e.
Anyone.
Because you didn't add a permissions "restriction".
How do I?
Elevator Music
Aight, finally found it. 😄
@client.command()
@commands.has_permissions(ban_members=True)
async def ban(self, member: discord.Member):
print('User Has Been Banned')
await client.ban(member, delete_message_days=1)
Should be that. 
Cbb to get working on mute command, kick is pretty much the same.
@commands.has_permissions(kick_members=True)
async def kick(self, member: discord.Member):
print('User Has Been Kick)
await client.kick```
Remove delete_message_days=1. 
Kk
@commands.has_permissions(kick_members=True)
async def kick(self, member: discord.Member):
print('User Has Been Kick)
await client.kick```
Correct??
Uh, nah.
Indention Error?
Parentheses on last line.
Ok
You didn't define who the last line should kick.
Why does this seem like spoon-feed to me
I am not just sending the ready code. 
"How2xplain ft. shivaco"
Yay, my aiohttp loop gives up on life again.
@commands.has_permissions(kick_members=True)
async def kick(self, member: discord.Member):
print('User Has Been Kick)
await client.kick(member)``` 
Is it correct?
Forgot an apostrophe on print line.
Darnit
Tf is even wrong with this?
https://i.boring.host/497doUt.png
I don't like python since indentation
@commands.has_permissions(kick_members=True)
async def kick(self, member: discord.Member):
print('User Has Been Kick`)
await client.kick(member)```
@slender thistle
Yep, you got it right.
Uh... yes?
How is that even related to my problem?
Youl know
My asyncio loop doesn't work.
WHich do you use
Win.

Or you can CD to the folder and type python filename.py
I have to wait 30 minutes to understand why it doesn't work.
It works upon start.
But not after 30 minutes, as supposed to.
The fucking loop gives up un life. Not just the whole part of the code.
Imma do it the worst way...
await asyncio.sleep(10)
Wonder if that will work.
Actually wait.
How do I make a command that gives you a role
^
Then learn python
Good reason. 
I tried googling it didnt kinda work
And probs study the docs of the lib
I have searched around a lot to try and find a way to be able to create roles in discord.py but I haven't found anything. I would like to be able to use a command to create and/or add roles to a us...
Lemme compile And see If My Bot works
I actually found how to
async def mute(ctx, user_id, userName: discord.User):
if ctx.message.author.server_permissions.administrator:
user = ctx.message.author
role = discord.utils.get(user.server.roles, name="Muted")
await client.add_roles(user, role)
else:
embed=discord.Embed(title=':x:***Unsifcient Permissions To Use Command***, description=":x:***You do not have permission to use this command.***", color=0xff00f6)
await bot.say(embed=embed)```
Wot eror is this
And?
yeah i see
OH
Well you did
But you closed it with a double quote
Yeah
Not a single
Fixed
you should get a plugin for your editor that does auto quotes for you
A linter
Eslint for me doesn't like double quotes for strings
Sublime Text 3. 
It still doesn't work. 😠
Lemme go test it
I hate asyncio.
why
Lemme see
asyncio is good
Why the hell is user_id defined there? -_-
btw
Doesn't like me. @low rivet

Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Erick>C:\Users\Erick\Desktop\SuperBot\Bot.py
Bot Is Ready.
User Has Sent A Message
Ignoring exception in command kick
Traceback (most recent call last):
File "C:\Users\Erick\AppData\Local\Programs\Python\Python36-32\lib\site-packag
es\discord\ext\commands\bot.py", line 846, in process_commands
yield from command.invoke(ctx)
File "C:\Users\Erick\AppData\Local\Programs\Python\Python36-32\lib\site-packag
es\discord\ext\commands\core.py", line 367, in invoke
yield from self.prepare(ctx)
File "C:\Users\Erick\AppData\Local\Programs\Python\Python36-32\lib\site-packag
es\discord\ext\commands\core.py", line 345, in prepare
yield from self._parse_arguments(ctx)
File "C:\Users\Erick\AppData\Local\Programs\Python\Python36-32\lib\site-packag
es\discord\ext\commands\core.py", line 304, in _parse_arguments
transformed = yield from self.transform(ctx, param)
File "C:\Users\Erick\AppData\Local\Programs\Python\Python36-32\lib\site-packag
es\discord\ext\commands\core.py", line 212, in transform
raise MissingRequiredArgument('{0.name} is a required argument that is missi
ng.'.format(param))
discord.ext.commands.errors.MissingRequiredArgument: self is a required argument
that is missing.```
erooor
What eror is this
@commands.has_permissions(ban_members=True)
async def ban(self, member: discord.Member):
print(':white_check_mark:***User Has Been Banned***')
await client.ban(member, delete_message_days=1)
@client.command()
@commands.has_permissions(kick_members=True)
async def kick(self, member: discord.Member):
print(':white_check_mark:***User Has Been Kicked***')
await client.kick(member)
@client.command(pass_context = True)
async def mute(ctx, user_id, userName: discord.User):
if ctx.message.author.server_permissions.administrator:
user = ctx.message.author
role = discord.utils.get(user.server.roles, name="Muted")
await client.add_roles(user, role)
else:
embed=discord.Embed(title=':x:***Unsifcient Permissions To Use Command***, description=":x:***You do not have permission to use this command.***', color=0xff00f6)
await client.say(embed=embed)
Whats the error
Those all my commands btw 😉
Mod commands*
@client.command(pass_context = True)
async def mute(self, ctx, user: discord.User):
if ctx.message.author.server_permissions.administrator:
author = ctx.message.author
role = discord.utils.get(author.server.roles, name="Muted")
await client.add_roles(user, role)
else:
embed=discord.Embed(title=':x:***Unsifcient Permissions To Use Command***', description=":x:***You do not have permission to use this command.***", color=0xff00f6)
await client.say(embed=embed)
What about the kick one?
Kick is fine
Ok
Wat
Nvm
My quotes are diffrent?
Ones starts and end with single quote, and the second one ends with double quote
Oh ok
There is no difference.
If string is closed with a quotation mark or an apostrophe, then it is fine.
Then post it?
ok
Darnit
Its because I copied it like this

shivaco - Today at 4:16 PM
@client.command(pass_context = True)
async def mute(self, ctx, user: discord.User):
if ctx.message.author.server_permissions.administrator:
author = ctx.message.author
role = discord.utils.get(author.server.roles, name="Muted")
await client.add_roles(user, role)
else:
embed=discord.Embed(title='❌Unsifcient Permissions To Use Command', description="❌You do not have permission to use this command.", color=0xff00f6)
await client.say(embed=embed)
With shivaco said
Is the color supposed to be in quotes?
It is
asdaj;fsljasldj
Oh?
shivaco
It's closed by a single quote
All commands have an error
Honestly im just gonna leave it at learn python
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Erick>C:\Users\Erick\Desktop\SuperBot\Bot.py
Bot Is Ready.
User Has Sent A Message
Ignoring exception in command kick
Traceback (most recent call last):
File "C:\Users\Erick\AppData\Local\Programs\Python\Python36-32\lib\site-packag
es\discord\ext\commands\bot.py", line 846, in process_commands
yield from command.invoke(ctx)
File "C:\Users\Erick\AppData\Local\Programs\Python\Python36-32\lib\site-packag
es\discord\ext\commands\core.py", line 367, in invoke
yield from self.prepare(ctx)
File "C:\Users\Erick\AppData\Local\Programs\Python\Python36-32\lib\site-packag
es\discord\ext\commands\core.py", line 345, in prepare
yield from self._parse_arguments(ctx)
File "C:\Users\Erick\AppData\Local\Programs\Python\Python36-32\lib\site-packag
es\discord\ext\commands\core.py", line 304, in _parse_arguments
transformed = yield from self.transform(ctx, param)
File "C:\Users\Erick\AppData\Local\Programs\Python\Python36-32\lib\site-packag
es\discord\ext\commands\core.py", line 212, in transform
raise MissingRequiredArgument('{0.name} is a required argument that is missi
ng.'.format(param))
discord.ext.commands.errors.MissingRequiredArgument: self is a required argument
that is missing.
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Erick>C:\Users\Erick\Desktop\SuperBot\Bot.py
Bot Is Ready.
User Has Sent A Message
Ignoring exception in command kick
Traceback (most recent call last):
File "C:\Users\Erick\AppData\Local\Programs\Python\Python36-32\lib\site-packag
es\discord\ext\commands\bot.py", line 846, in process_commands
yield from command.invoke(ctx)
File "C:\Users\Erick\AppData\Local\Programs\Python\Python36-32\lib\site-packag
es\discord\ext\commands\core.py", line 367, in invoke
yield from self.prepare(ctx)
File "C:\Users\Erick\AppData\Local\Programs\Python\Python36-32\lib\site-packag
es\discord\ext\commands\core.py", line 345, in prepare
yield from self._parse_arguments(ctx)
File "C:\Users\Erick\AppData\Local\Programs\Python\Python36-32\lib\site-packag
es\discord\ext\commands\core.py", line 304, in _parse_arguments
transformed = yield from self.transform(ctx, param)
File "C:\Users\Erick\AppData\Local\Programs\Python\Python36-32\lib\site-packag
es\discord\ext\commands\core.py", line 212, in transform
raise MissingRequiredArgument('{0.name} is a required argument that is missi
ng.'.format(param))
discord.ext.commands.errors.MissingRequiredArgument: self is a required argument
that is missing.
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Erick>C:\Users\Erick\Desktop\SuperBot\Bot.py
Bot Is Ready.
User Has Sent A Message
Ignoring exception in command kick
Traceback (most recent call last):
File "C:\Users\Erick\AppData\Local\Programs\Python\Python36-32\lib\site-packag
es\discord\ext\commands\bot.py", line 846, in process_commands
yield from command.invoke(ctx)
File "C:\Users\Erick\AppData\Local\Programs\Python\Python36-32\lib\site-packag
es\discord\ext\commands\core.py", line 367, in invoke
yield from self.prepare(ctx)
File "C:\Users\Erick\AppData\Local\Programs\Python\Python36-32\lib\site-packag
es\discord\ext\commands\core.py", line 345, in prepare
yield from self._parse_arguments(ctx)
File "C:\Users\Erick\AppData\Local\Programs\Python\Python36-32\lib\site-packag
es\discord\ext\commands\core.py", line 304, in _parse_arguments
transformed = yield from self.transform(ctx, param)
File "C:\Users\Erick\AppData\Local\Programs\Python\Python36-32\lib\site-packag
es\discord\ext\commands\core.py", line 212, in transform
raise MissingRequiredArgument('{0.name} is a required argument that is missi
ng.'.format(param))
discord.ext.commands.errors.MissingRequiredArgument: self is a required argument
that is missing.```
Hastebin
Fuck
the same damn error
after restart
Its restarted
And I get the same fuckin eror
erro8
error*
for mute ctx is missing
@commands.has_permissions(kick_members=True)
async def kick(self, member: discord.Member):
print(':white_check_mark:***User Has Been Kicked***')
await client.kick(member)```
Actually... define ctx in async.
pass_context=True
Im ssoooo confused
Use Google on how to define in functions python.
lmao
I feel like you really should learn Python. 🤔
Im just gonna search python mod commands
cD
Ik python
But not mod commands
Brb
How come you know Python
if you don't know how to define something in async def
Fuck yeah. It was wrong indentantion in a function for db.pw https://i.boring.host/49ApsLk.png
Then, how would you define ctx in async def?
A.K.A add it as an argument
Then you don't know Python
👆
Tbh, I was kinda the same when I tried making my bot.
😂
#GoogleTheBest
I started learning Python literally by just looking at example codes and stuff. 
^
Or not even that.
You just rush things right now
Don't get pressured and learn it
Developing will be so much better if you know how a language works
Erick 😛
Me
Aight, I hope my asyncio loops are fine now. 
It's fine to not know something, but instead of asking here everytime I'd consider learning the fundamentals
No it isnt
Because If you dont know something
People start raging at you
And start saying bad about you
Not if you literally keep asking a ton of times. 
No lol
I did not ask I ton of times before
Ive tried asking before
Without knowing
And I got kicked
banned*
Depends if the person gets pissed off easily or not. 
It was not against the rules
test post
Thats my point, is that asking other developers, to help you, if you dont now the language, just gets you hated and banned.
So I don't even think I should learn python
Because
Not banned, but I get a bit annoyed. The thing is that there are thousands of resources out there. And of all resources available you want to have someone "waste" their time helping you.
No
brb
There are forums, SO, search engines, blogs, guides, tutorials and all that
I am hungry. 😂
I once got banned from a server for asking without knowing
Well, that is unlucky and that guy was a dick then 🤣
Skitty you want a rope? I sell them for cheap 🙃
yis
Im just coding without knowing
Then learn?
Then suffer
Because If I learn it
@languid dragon The ordinary people call it a joke
Your logic makes no sense
People say I should learn it
You should
Oh wow I had no idea
Brian Gets it
It makes it easier
good for the "ordinary people"
@languid dragon are u extraterrestrial
keep those comments out of #development and out of this server
Im having an error right now, I dont even wanna ask for help
except when im involved
just ask
ppl here arent going to jump down ur throat
and if they do
they'll get muted
¯_(ツ)_/¯
try googling the error before you blindly ask, is all we really want
Still
ye i mean if its easy to google
I dont wanna ask
You guys should probs read up
if not, then sometimes it doesnt hurt to ask
i know he got banned for asking for help somewhere else
or the fact that he doesnt want to learn the language 
See, no one is going to spoon fed. The fact that you don't want to learn for yourself makes it harder to code a bot or make one. I recommend sololearn.com, it will explain to you in a simple and quick matter about coding.
u cant code without learning
then why not now?
You can't

i cbf to scroll up through the entire convo
i mean, theres a difference in asking to be spoonfed and trying to like learn
Then Code A bot
People ain't going to help you if you don't care to learn.
^
are there any statistics for what the majority of bots here are using? as their framework etc
Then explain mr. I don't want to ask
But you can see Im still typing
no
yes you can
Just type full sentences jesus
👀 good for you
I dont even wanna explain now
Then don't
imagine coming to a bot server and all you do is argue
Ok
Because this discussion is not going anywhere
Don't tell us that you don't want to explain.
Im still damn explaining
The type it in one big sentence
I asked For Help, But I did not know.
And then If I learn python
Then code a bot (While I know)
And then get an error
I'd just get kicked, or people would just refuse to help me
How is that relevant to here?
That's like saying I fell off my bike once, so I'm never going to ride it ever again
I'd just get kicked, or people would just refuse to help me
Koi, you need a car.
I have a car
I'd just get kicked, or people would just refuse to help me
^^
There
Read that part
Erick
And you understand what Im saying
People will refuse to help you because you don't bother to learn the language.
Thats not what im saying
I asked For Help, But I did not know.
And then If I learn python
Then code a bot (While I know)
And then get an error
I'd just get kicked, or people would just refuse to help me
We ain't being rude, you are just being easily offended.
You dont understand what Im saying
if you're not going to bother learning something for yourself, and you're just going to blindly ask for help then the logical response from everyone is to refuse to help you
You both still dont understand
Don't tell me what I do and don't know.
What Im saying
Then explain
I just did
I asked For Help, But I did not know.
And then If I learn python
Then code a bot (While I know)
And then get an error
I'd just get kicked, or people would just refuse to help me
That doesn't explain shit
You won't get kicked if you learn to code.
@floral stone shut.
You are just assuming shit
Your getting mad now
@floral stone im not saying it again
sry
Then explain this
I am back.
Nice timing. 😄

Have you tried googling it?
Funny thing is that should be defined there.
discord.ext.commands.errors.MissingRequiredArgument: self is a required argument that is missing.
oh my god
That is the relevant part
IM HELPING HIM
The error is too big @languid dragon
DOES EVERYONE NEED TO FUCKING JUMP IN
That is what you did to me as well lol
The error is too big to google

Brian, because you made inappropriate comment
What do you mean?
If you want to be snarky with me, you can sit in the naughty corner.
Oh wait nah
telling someone to hang themselves is totally different to helping someone with an error
@tulip steeple that entire thing is not an error

only a small amount of it is an error
if you read the lines you can actually find it and google it pretty easily
I dont know how to google
literally
I do but
shove any error in the search engine
and press enter
discord.ext.commands.errors.MissingRequiredArgument: self is a required argument that is missing.
search for that
get an answer
easy
There is nothing on that in Google. Ah 🤔
Sh
Can I see your code? I'm good in py
"line 212"
My whole code
remove it
Ill dm you
don't dm me plz
Remove the token from code and upload to hastebin
How is self missing if it is actually not missing, judging by the code 
Done
Eh, async def mute(self, ctx, user_id, userName: discord.User): @tulip steeple Please read this.
ban and kick command
Mhm?
They should be fine, try to edit the mute command.
https://hastebin.com/yogozinuhi.py Here is the haste bin
Shouldn't self var be used inside a class?
Not in Python.
Ya sure?
Well, it is an argument. 
How do you think almost all codes work
For example, my eval command:
async def py(self, ctx, *, msg):
Brb, getting distracted.
Yes, but I don't need to specify self for a bot.command() if it's outside a class.
Try async def mute(self, ctx, user_id, userName: discord.User):
Done
Ugh... maybe passing context for all 3 commands?
Ctx is a required argument that is missing
ok
how is that gonna fix it?
Passing context?
yes
Because 'Ctx is a required argument that is missing'?

@tulip steeple did it work
No
you don't need self,
I added the @client.command(pass_context=True)
remove self
Where
self is needed only if you have it defined in __init__
Ok Im removing it
Ah.
Lemme see if it works
Then what the fuck is the reason for 'self is a required argument that is missing'
Try async def mute(ctx, user_id, userName: discord.User):
but it seems like they using async, so not 100% if what I'm saying is correct at this point
@slender thistle it's because it's looking for self but it's not there
userName is a required argument that is missing
you have to actually use it as an argument in your command since you have it defined
what are the chances that they use a command with nothing in it?
of course they have to use it
@floral stone async def mute(ctx, user_id, userName: discord.User): Does not work
Are you even reading the messages here?
did you remove self from the other commands
Yaya
Let's hope so.
UserName Is A required argument that is missing
async def mute(ctx, user: discord.User):
is the error happening when you do the command
it means you didn't specify what usernane
Did you change userName to user?
You are probably specifying a mention for var user_id not username
put ctx argument at the beginning of both commands
What command is that?
@client.command(pass_context=True)
@commands.has_permissions(kick_members=True)
async def kick(ctx, user: discord.User):
print(':white_check_mark:***User Has Been Kicked***')
await client.kick(member)```
@commands.has_permissions(ban_members=True)
async def ban(ctx, user: discord.User):
print(':white_check_mark:***User Has Been Banned***')
await client.ban(member, delete_message_days=1)```
Oh right.
Ban and Kick
Change user to member in those commands in async def.
ll
I'm done, got stuff to do. That's a basic error as well. I recommend getting help from the official d.py server
kk
Ok its working
Every command is working
But
I tried banning or kicking myself
But kk
nahh wait
Member is not defined @slender thistle
Lemme try change member to user
Restart your bot as well as actually do what I told you to do before.
No problem. Good luck. 


I need help
@slender thistle
Its not actually an error
Here @client.command()
async def yomamajoke():
await client.say('Yo mama so ugly she was the reason why muslims say Allahu Akbar')
async def yomamajoke():
await client.say('Yo mama so ugly she was the reason why muslims say Allahu Akbar')```
Nahh
Wait yes
How do I make it choose randomly from multiple texts
Kkk
Uhm?
?
random.choice(foo) 
random.choice(bar)
You Are welcome. 
It says in logs that it was delcined
Uh... no?
oh yeah
I cant find the discord events js docs anymore.
anyone know where the hell they are?
Did you delete it?
,beep
client event ?
it's on Client page
On dark theme, some of the text on my bot page is invisible.
Why and how can I fix that?
Use a text color that supports both light or dark theme or specify a background color for body
@earnest phoenix
the background color stays white on both themes
so...
I should just overwrite the color?
yeah i guess you could
body {background-color: #fff !important;}
!important is your friend in that case
but even if I use
<font color="black">
</font>```
the font color stays white.
font element is deprecated, use css
^
^
okay
<b>
ah
but I think I can fix that on my own
thx
np
<style>body {background-color: #fff !important;}</style>
put that on top
of your code
it won't look nice on dark theme but you can change the color
or just force white background, that works fine too i guess
but that burns your eyes out
message.mentions.members.first()
there should be a mentions- yeah
true xD
ok



