#development

1 messages · Page 407 of 1

spring ember
earnest phoenix
#

not sure how to fix it

spring ember
#

Case 1

#

With a space

earnest phoenix
#

Ik what the error is

#

ok

#

thx

#

imma still learning

#

as I am sure you can tell

spring ember
#

Learn the language basics at first

#

At least you're not begging for code

#

And you are trying to learn

inner jewel
#
const memes = ["bad.png", "HCTHmeme.jpg", etc];
const meme = "./memes/tf2/" + memes[Math.floor(Math.random() * memes.length)];
sendMeme(meme)```
earnest phoenix
#

I guess

inner jewel
#

something like that

earnest phoenix
#

Ok

spring ember
#

Yeah looks more clean

earnest phoenix
#

Ok

inner jewel
#

also

#
number = 7;
    var number = Math.floor (Math.random() * (number - 7 + 7)) + 7;
    switch (random)```
earnest phoenix
#

I screwed that up didn't I?

inner jewel
#
  1. you never use number
  2. number won't ever be in the range you want
  3. you switch on nothing
earnest phoenix
#

Ok

#

I changed random to number

#

so it'd be

number - 7 + 1)) + 7
#

right?

inner jewel
#

floor(random() * amount)

earnest phoenix
#

ok

tulip steeple
#

I need help

#
async def on_message (message):
    if message.content == "Hello"```
#

Wheres the syntax eror

#

Erro*

#

Error*

inner jewel
#

if x**:**

#

missing a colon

tulip steeple
#

OHH

#

That was my mistake

#

I got another eror

#

erro*

#

Error*

#
async def on_ready():
    print("Super Bot Is Online And Readyhh To Use!!!"):```
inner jewel
#

no colon there

tulip steeple
#

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!"```
inner jewel
tulip steeple
#

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?

earnest phoenix
#

I forgot how to get the bot to send an image, how do I do that again with discord.js?

tulip steeple
#

@inner jewel ????

earnest phoenix
#

I'd recommend against tagging people for help

inner jewel
#

¯_(ツ)_/¯

#

^

earnest phoenix
#

they'll help you if you just wait

tulip steeple
#

WHelp I gues Illl jus wait

uncut slate
#

pretty sure that space has to be a period

#

from discord.ext.commands import Bot

tulip steeple
#

Which space?

#

Darnit

#

I almost have to go

#

But I have no help

#

😭

earnest phoenix
#

how do we get bots to send images again I completely forgot

tulip steeple
#

Ok wait I got it

earnest phoenix
#

ok

tulip steeple
#

Darnit

#

Oh frick I found my msitake

#

mistake*

#

My bots turning on but the commands dont work

#

Oh no

#

FAILURE

#

Darnit

prime cliff
#

Same

toxic oracle
#

lmfao

earnest phoenix
#

it cannot send an empty message

#

or atleast that's what it says

toxic oracle
#

.send(mEmbed)

#

without the braces

earnest phoenix
#

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

toxic oracle
#

setImage wants a url not a path

earnest phoenix
#

ok

#

then how would I fix it?

tulip steeple
#

I need hep

#

help*

#

What does this mean

#

Unexpected EOF While parsing.

#

Can Anyone Help?

abstract mango
#

your string doesn't end

#

lol

tulip steeple
#

WHich string?

#

Which string though?

restive charm
#

¯_(ツ)_/¯

abstract mango
#

do you think i know lol

#

i don't even have your code i'm not a mind reader :p

low owl
#

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.

tulip steeple
#

Ok ive fixed it

#

Ok

#

Ima do commands tommorow

stray cedar
#

Hey. Anyone know how I can split a message that will be > 2000 characters?

prime cliff
#

Google also depends on what language you are using which would have been good to know

gilded blaze
#

how do i use lavalink without shards

abstract mango
#

wdym i use it without shards lol

#

your client should support it sharded or not

gilded blaze
#

idk how to do it without

abstract mango
#

i mean you could just say that the shard id is 0

gilded blaze
#

but what about the third argument

inner jewel
#

shardId -> yourJdaInstance

#

or use shardmanager and getShardById

gilded blaze
#

this doesn't work though

inner jewel
#

that's not how lambdas work

#

argument->body

gilded blaze
#

rip

inner jewel
#

???

#

just replace 0 with shardId

gilded blaze
#

OH

#

yep it started

ashen quail
gilded blaze
#

setfield isn't a thing

ashen quail
#

oh your right xD

maiden mantle
#

;-; I'm really new to this, how do you get your bot to be online? (I use sublime)

brisk notch
#

Do you know what a token is?

mental solstice
#

a token is what you use to authenticate your bot

brisk notch
#

@maiden mantle What lib are you using?

maiden mantle
#

Yes, ik what a token is 👌
what's a lib

brisk notch
#

...

#

It's what you coding the bot in like Discord,js

maiden mantle
#

js yes

brisk notch
#

so Discord.js?

maiden mantle
#

Yes

brisk notch
#

ok

#

you do at the end of your code: client.login('TOKEN_HERE')

maiden mantle
#

Alright.

#

Thanks GWnanamiKonataThumbsUp

brisk notch
#

👍

earnest phoenix
#

I am having issues with a google command.

lament meteor
#

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)
earnest phoenix
#

Anyone have a good chat api or npm

lament meteor
#

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

earnest phoenix
#

@lament meteor yes

#

please

#

link

#

please

#

XD

tulip steeple
#

Help

#

Why wont my command work

#

Its not giving any error

#
async def ping():
    await client.say('Pong.')```
#

Anyone?

#

Nah wait I fixed it

bleak sapphire
#

hey guys im using discord py and i just moved to rewrite and since i moved im having issues on what to import lol

low rivet
#

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:

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.

earnest phoenix
#

ok then

lament meteor
#

i dont think u need the {} around the embed name

uncut slate
#

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 }

earnest phoenix
#

ok

#

thx

#

now I get the url not formed well error

#

new error

#

but Imma getting there

#

How do I correctly form the URL?

knotty steeple
#

if i try to start my bot in pm2 i get stuck in a restart loop

heady zinc
#

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

#

¯_(ツ)_/¯

knotty steeple
#

now it stopped

#

and the bot is logged in when i did pm2 stop

#

Thonk what is this trickery

slender thistle
toxic oracle
#

Discord cache

#

Unless it responds to commands

elder rapids
#

Lol deleting sqlite files dun fucked up

tulip steeple
#

Why is my bot on without its console????

fluid basin
#

why not

spring ember
#

What editor do you use?

tulip steeple
#

Me?

spring ember
#

Yes

tulip steeple
#

Visual Studio Code

spring ember
#

Look at the views and make sure to Ctrl + C in the embedded terminal

tulip steeple
#

I don't get

#

views?

#

I mean like

#

The commands are working

#

But the terminal is not on

#

Oh, no wait itsd

#

fine

spring ember
#

Good?

tulip steeple
#

Yupyup

#

I looked on my Task Manager And Saw it On.

#

Lemme go add mod commands on my bot

#

nahh got it

spring ember
#

Google

tulip steeple
#

I forgot how to add mod commands

#

on my bot

#

Any one help

#

Wait no AI got it

#

jkj

#

I dont remember

spring ember
#

AI got it thonkku

tulip steeple
#

:3

#

I forgot how to make bot commands , How do I do It again.

spring ember
#

What lib?

#

I really hope you aren't trolling though

tulip steeple
#

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

toxic oracle
#

I don't python but shouldn't it me something like user=ctx.message.member

night imp
#

Hi, what would the permission be for using richembeds?

toxic oracle
#

Embed links

night imp
#

Thank you!

toxic oracle
#

EMBED_LINKS for d.js, embedLinks for eris

#

Idk others

slender thistle
tulip steeple
#

How do I make a python kick command?

slender thistle
tulip steeple
#

async

slender thistle
tulip steeple
#

Hm

#

ban(member, delete_message_days=1) ?

#

Wait

slender thistle
#

That's for ban command. mmLol

tulip steeple
#

Ik

#
async def ban():
         print('User Has Been Banned')
        await ban(member, delete_message_days=1)```
#

Is this correct??

slender thistle
#

IndendationError™

tulip steeple
#

Oh wait

slender thistle
#

Nope.

#

You didn't define member. GWchadThink

tulip steeple
#

darni

slender thistle
#

And it is @bot.command(), iirc. Yes, it is. GWchadThink

#

Also, no. It is bot.ban and etc.

tulip steeple
#
async def ban():
    print('User Has Been Banned')
    await client.ban(member) ban(member, delete_message_days=1)```
#

Ok

#

Ok im comfused

slender thistle
#

How is your bot even defined?

tulip steeple
#

confused*

slender thistle
#

client or bot?

tulip steeple
#

client

#
async def ban():
    print('User Has Been Banned')
    await ban(member, delete_message_days=1)```
#

Is this correct?

slender thistle
#

Define member in async def part. mmLol

tulip steeple
#

Damnit I forgot

#
async def ban():
    print('User Has Been Banned')
    await client.kick(member) ban(member, delete_message_days=1)```
#

??

slender thistle
#

u wot

tulip steeple
#

Is it correct?

slender thistle
#

Eh. Not.

tulip steeple
#

Oh darnit

#
async def ban():
    print('User Has Been Banned')
    await client.ban(member) ban(member, delete_message_days=1)```
#

?

slender thistle
#
@client.command()
async def ban(self, member: discord.Member):
    print('User Has Been Banned')
    await client.ban(member, delete_message_days=1)
tulip steeple
#

Ty!

slender thistle
#

You don't specifically need to define self, but w/e.

tulip steeple
#

Ok

#

But

#

Can any member use the command?

#

Or someone with admin?

slender thistle
#

Anyone.

tulip steeple
#

;

#

Ok wait Lemme see if I can fix that

slender thistle
#

Because you didn't add a permissions "restriction".

tulip steeple
#

How do I?

slender thistle
#

Uh, what was it...

#

One sec.

tulip steeple
#

Elevator Music

slender thistle
#

Aight, finally found it. 😄

tulip steeple
#

Kk

#

Can ya send it

slender thistle
#
@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. GWchadThink

tulip steeple
#

Ty what about mute command?

#

and kick

slender thistle
#

Cbb to get working on mute command, kick is pretty much the same.

tulip steeple
#

Ok wait

#

Is this kick

slender thistle
#

Nope.

#

That's ban. GWjiangoOmegaLUL

tulip steeple
#
@commands.has_permissions(kick_members=True)
async def kick(self, member: discord.Member):
    print('User Has Been Kick)
    await client.kick```
slender thistle
#

Remove delete_message_days=1. GWchadThink

tulip steeple
#

Kk

#
@commands.has_permissions(kick_members=True)
async def kick(self, member: discord.Member):
    print('User Has Been Kick)
    await client.kick```
#

Correct??

slender thistle
#

Uh, nah.

tulip steeple
#

Indention Error?

slender thistle
#

Parentheses on last line.

tulip steeple
#

Ok

slender thistle
#

You didn't define who the last line should kick.

topaz fjord
#

Why does this seem like spoon-feed to me

slender thistle
#

I am not just sending the ready code. mmLol

#

"How2xplain ft. shivaco"

#

Yay, my aiohttp loop gives up on life again.

tulip steeple
#
@commands.has_permissions(kick_members=True)
async def kick(self, member: discord.Member):
    print('User Has Been Kick)
    await client.kick(member)``` ![GWempMoan](https://cdn.discordapp.com/emojis/404075917288407042.webp?size=128 "GWempMoan")
#

Is it correct?

slender thistle
#

Forgot an apostrophe on print line.

tulip steeple
#

Darnit

slender thistle
topaz fjord
#

I don't like python since indentation

tulip steeple
#
@commands.has_permissions(kick_members=True)
async def kick(self, member: discord.Member):
    print('User Has Been Kick`)
    await client.kick(member)```
#

@slender thistle

slender thistle
#

Yep, you got it right.

tulip steeple
#

I know

#

Is that python?

slender thistle
#

Uh... yes?

tulip steeple
#

Ok

#

Take the file

#

Wait, what computer are you on?

#

Mac, Windows

slender thistle
#

How is that even related to my problem?

tulip steeple
#

Youl know

slender thistle
#

My asyncio loop doesn't work.

tulip steeple
#

WHich do you use

slender thistle
#

Win.

tulip steeple
#

Ok

#

Take the whole file

#

Open CMD

topaz fjord
tulip steeple
#

And drag the py file into the CMD then press enter

#

It should tell you the error

topaz fjord
slender thistle
#

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.

tulip steeple
#

It does?

#

Does it close immidietly after you open it GWfroggyBlobThonk GWfroggyBlobThonk GWfroggyBlobThonk

slender thistle
#

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.

tulip steeple
#

How do I make a command that gives you a role

slender thistle
#

Can't you Google how to?

#

As well as learn a bit of Python? Thonk

topaz fjord
#

^

tulip steeple
#

I cant make mod commands

#

Thats all I cant do

#

Cuz

#

Nah

topaz fjord
#

Then learn python

slender thistle
#

Good reason. GWchadThink

tulip steeple
#

I tried googling it didnt kinda work

topaz fjord
#

And probs study the docs of the lib

tulip steeple
#

Ok wait I found it

#

Done

slender thistle
tulip steeple
#

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

topaz fjord
#

And?

tulip steeple
#

Wait lemme see the error

#

OH

topaz fjord
#

You never opened the quoted

#

Quotes

abstract mango
#

yeah i see

tulip steeple
#

OH

topaz fjord
#

Well you did

tulip steeple
#

Yes

#

But no close

topaz fjord
#

But you closed it with a double quote

tulip steeple
#

Yeah

topaz fjord
#

Not a single

tulip steeple
#

Fixed

abstract mango
#

you should get a plugin for your editor that does auto quotes for you

topaz fjord
#

A linter

abstract mango
#

e.g. ' turns into ''

#

linter as well

topaz fjord
#

Eslint for me doesn't like double quotes for strings

slender thistle
#

Sublime Text 3. GWrjkKappaLUL

topaz fjord
#

Vscode

#

Good

tulip steeple
#

Ok no errors

#

My bots on

slender thistle
#

It still doesn't work. 😠

tulip steeple
#

Lemme go test it

slender thistle
#

I hate asyncio.

tulip steeple
#

Heheh

#

I lob asyncio

#

DARNIT AN EROR!

#

ERRO*

#

ERROR*

slender thistle
#

NO WAY!

#

What is it?

low rivet
#

why

tulip steeple
#

Lemme see

low rivet
#

asyncio is good

slender thistle
#

Why the hell is user_id defined there? -_-

abstract mango
slender thistle
#

Doesn't like me. @low rivet

low rivet
tulip steeple
#
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*

slender thistle
#
@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)
tulip steeple
#

What about the kick one?

slender thistle
#

Kick is fine

tulip steeple
#

Ok

topaz fjord
#

U still didn't close it

#

Wait no

tulip steeple
#

Wat

topaz fjord
#

Nvm

tulip steeple
#

My quotes are diffrent?

#

Ones starts and end with single quote, and the second one ends with double quote

slender thistle
#

I did.

tulip steeple
#

Oh ok

slender thistle
#

There is no difference.

tulip steeple
#

Im still getting eror

#

error*

slender thistle
#

If string is closed with a quotation mark or an apostrophe, then it is fine.

#

Then post it?

tulip steeple
#

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

topaz fjord
#

Is the color supposed to be in quotes?

slender thistle
#

Nah.

#

Why the fuck is title in embed line not closed with a quote mark?

topaz fjord
#

It is

tulip steeple
#

asdaj;fsljasldj

slender thistle
#

Oh?

tulip steeple
#

shivaco

topaz fjord
#

It's closed by a single quote

tulip steeple
#

All commands have an error

slender thistle
#

Not really.

#

What is the error even?

#

Can you post it?

tulip steeple
#

Its the same

#

Error I had before

topaz fjord
#

Honestly im just gonna leave it at learn python

tulip steeple
#

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.

topaz fjord
#

Wtf

#

Pls

#

Hastebin

tulip steeple
#
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.```
topaz fjord
#

Hastebin

tulip steeple
#

ok

slender thistle
#

Meh.

#

Why the fuck is it missing self

#

Did you restart the code btw? mmLol

tulip steeple
#

Fuck

slender thistle
#

😂

#

My DBL loop should be fixed.

#

Now... .pw one. GWjiangoOmegaLUL

tulip steeple
#

the same damn error

#

after restart

#

Its restarted

#

And I get the same fuckin eror

#

erro8

#

error*

slender thistle
#

Wait, kick?

#

Tf?

tulip steeple
#

yeye

#

Too many errors

slender thistle
#

How is kick even related there Thonk

#

This error is a magic.

tulip steeple
#

hehe

#

self

#

Is missing

slender thistle
#

No?

#

Send me your kick command.

tulip steeple
#

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)```
slender thistle
#

Actually... define ctx in async.

tulip steeple
#

I dont get

#

at all

slender thistle
#

Google.

solid cliff
#

pass_context=True

slender thistle
#

Not necessary there.

#

Oh wait

#

Right.

tulip steeple
#

Im ssoooo confused

slender thistle
#

Use Google on how to define in functions python.

solid cliff
#

lmao

slender thistle
#

I feel like you really should learn Python. 🤔

tulip steeple
#

Im just gonna search python mod commands

#

cD

#

Ik python

#

But not mod commands

#

Brb

slender thistle
#

How come you know Python

tulip steeple
#

Well

#

Im a bit new

#

😄

slender thistle
#

if you don't know how to define something in async def

tulip steeple
#

async def ban(

#

I can

#

I can define

#

it

#

async def kick(

slender thistle
#

Then, how would you define ctx in async def?

#

A.K.A add it as an argument

tulip steeple
#

Well

#

I dont know much of defining

#

All I can do

#

Is async def kick(

low owl
#

Then you don't know Python

slender thistle
#

👆

#

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. GWjiangoNegaLUL

tulip steeple
#

How long did it take?

#

6000000 years?

slender thistle
#

Nah.

#

Around one month before I got good at it.

low owl
#

^

slender thistle
#

Or not even that.

low owl
#

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

slender thistle
#

Who did you tell to learn Python, btw? Me or Erick? GWcentralPikaLUL

#

inb4 both

low owl
#

Erick 😛

tulip steeple
#

Me

slender thistle
#

Aight, I hope my asyncio loops are fine now. Thonk

low owl
#

It's fine to not know something, but instead of asking here everytime I'd consider learning the fundamentals

tulip steeple
#

No it isnt

#

Because If you dont know something

#

People start raging at you

#

And start saying bad about you

slender thistle
#

Not if you literally keep asking a ton of times. GWchadThink

tulip steeple
#

It happend to me before

#

No

low owl
#

No lol

tulip steeple
#

I did not ask I ton of times before

#

Ive tried asking before

#

Without knowing

#

And I got kicked

#

banned*

slender thistle
#

Depends if the person gets pissed off easily or not. GWchadThink

tulip steeple
#

It was not against the rules

muted prawn
#

test post

tulip steeple
#

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

low owl
#

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.

tulip steeple
#

No

slender thistle
#

brb

low owl
#

There are forums, SO, search engines, blogs, guides, tutorials and all that

slender thistle
#

I am hungry. 😂

tulip steeple
#

I once got banned from a server for asking without knowing

low owl
#

Well, that is unlucky and that guy was a dick then 🤣

muted prawn
#

my bot is entirely written in jqury

#

thank u stackoverflow

low owl
#

Skitty you want a rope? I sell them for cheap 🙃

muted prawn
#

yis

languid dragon
#

@low owl

#

👀

#

?

#

What kind of comment is that

tulip steeple
#

Im just coding without knowing

topaz fjord
#

Then learn?

tulip steeple
#

No

#

I dont think I should

topaz fjord
#

Then suffer

tulip steeple
#

Because If I learn it

topaz fjord
#

All up to you

#

/shrug

tulip steeple
#

Then I have learnt it

#

Then I ask for help from an error

low owl
#

@languid dragon The ordinary people call it a joke

topaz fjord
#

Your logic makes no sense

tulip steeple
#

People say I should learn it

topaz fjord
#

You should

languid dragon
#

Oh wow I had no idea

tulip steeple
#

Brian Gets it

topaz fjord
#

It makes it easier

languid dragon
#

good for the "ordinary people"

topaz fjord
#

@languid dragon are u extraterrestrial

languid dragon
#

keep those comments out of #development and out of this server

muted prawn
#

pls no drama

#

but tbh i love drama

tulip steeple
#

Im having an error right now, I dont even wanna ask for help

muted prawn
#

except when im involved

south finch
#

just ask

#

ppl here arent going to jump down ur throat

#

and if they do

#

they'll get muted

#

¯_(ツ)_/¯

languid dragon
#

try googling the error before you blindly ask, is all we really want

tulip steeple
#

Still

south finch
#

ye i mean if its easy to google

tulip steeple
#

I dont wanna ask

topaz fjord
#

You guys should probs read up

south finch
#

if not, then sometimes it doesnt hurt to ask

#

i know he got banned for asking for help somewhere else

topaz fjord
#

Not that

#

All the way up

south finch
#

or the fact that he doesnt want to learn the language think

floral stone
#

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.

south finch
#

u cant code without learning

tulip steeple
#

I wanted to

#

But

south finch
#

then why not now?

floral stone
#

You can't

south finch
tulip steeple
#

Look

#

Up

#

U explained why

#

I*

south finch
#

i cbf to scroll up through the entire convo

tulip steeple
#

As I said

#

I asked

#

And people got annoyed

#

If I learn pytrhon

#

python*

south finch
#

i mean, theres a difference in asking to be spoonfed and trying to like learn

tulip steeple
#

Then Code A bot

floral stone
#

People ain't going to help you if you don't care to learn.

south finch
#

^

muted prawn
#

are there any statistics for what the majority of bots here are using? as their framework etc

tulip steeple
#

Just let me explain

#

Im not even done

#

as I said

languid dragon
#

then how about you type full sentences

#

instead of

floral stone
#

Then explain mr. I don't want to ask

languid dragon
#

like

#

this

#

where we assume

#

you've finished talking

tulip steeple
#

But you can see Im still typing

languid dragon
#

no

tulip steeple
#

yes you can

floral stone
#

@muted prawn The majority is d.py and djs

low owl
#

Just type full sentences jesus

tulip steeple
#

.

#

Annoyed

languid dragon
#

👀 good for you

tulip steeple
#

I dont even wanna explain now

languid dragon
#

Then don't

muted prawn
#

imagine coming to a bot server and all you do is argue

floral stone
#

Ok

low owl
#

Because this discussion is not going anywhere

floral stone
#

Don't tell us that you don't want to explain.

tulip steeple
#

Im still damn explaining

floral stone
#

The type it in one big sentence

tulip steeple
#

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

languid dragon
#

How is that relevant to here?

tulip steeple
#

Read it again

#

And you will understand what Im saying

languid dragon
#

That's like saying I fell off my bike once, so I'm never going to ride it ever again

tulip steeple
#

I'd just get kicked, or people would just refuse to help me

floral stone
#

Koi, you need a car.

languid dragon
#

I have a car

tulip steeple
#

I'd just get kicked, or people would just refuse to help me
^^

#

There

#

Read that part

languid dragon
#

Erick

tulip steeple
#

And you understand what Im saying

languid dragon
#

if you're going to be a smartass

#

you'll get kicked for that

floral stone
#

People will refuse to help you because you don't bother to learn the language.

tulip steeple
#

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

floral stone
#

We ain't being rude, you are just being easily offended.

tulip steeple
#

You dont understand what Im saying

floral stone
#

I do

#

I read it

tulip steeple
#

@floral stone Im not offended

#

No you dont

languid dragon
#

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

tulip steeple
#

You both still dont understand

floral stone
#

Don't tell me what I do and don't know.

tulip steeple
#

What Im saying

languid dragon
#

Then explain

tulip steeple
#

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

languid dragon
#

That doesn't explain shit

tulip steeple
#

Ok

#

QUite

#

Listen

#

Ill explain better

floral stone
#

You won't get kicked if you learn to code.

tulip steeple
#

.

#

I said wait

languid dragon
#

@floral stone shut.

floral stone
#

You are just assuming shit

tulip steeple
#

Your getting mad now

floral stone
#

I'm not mad

#

I'm actually dancing atm

languid dragon
#

@floral stone im not saying it again

floral stone
#

sry

tulip steeple
#

Ok

#

Right now

#

I tried asking but I did not know

#

(did not know)

languid dragon
#

Did you ask here?

#

yes/no?

tulip steeple
#

Yes

#

Shh

languid dragon
#

What was your question

#

And who gave you shit

tulip steeple
#

I had a big error

#

Wait

#

Ok yes

#

Shivaco

#

Said

languid dragon
#

No

#

Show me your error

tulip steeple
#

Then explain this

slender thistle
#

I am back.

low owl
#

Nice timing. 😄

slender thistle
tulip steeple
#

@languid dragon Theres my error

languid dragon
#

Have you tried googling it?

slender thistle
#

Funny thing is that should be defined there.

low owl
#

discord.ext.commands.errors.MissingRequiredArgument: self is a required argument that is missing.

languid dragon
#

oh my god

low owl
#

That is the relevant part

languid dragon
#

IM HELPING HIM

tulip steeple
#

The error is too big @languid dragon

languid dragon
#

DOES EVERYONE NEED TO FUCKING JUMP IN

low owl
#

That is what you did to me as well lol

tulip steeple
#

The error is too big to google

south finch
languid dragon
#

Brian, because you made inappropriate comment

tulip steeple
#

What do you mean?

languid dragon
#

If you want to be snarky with me, you can sit in the naughty corner.

tulip steeple
#

Oh wait nah

south finch
#

telling someone to hang themselves is totally different to helping someone with an error

languid dragon
#

@tulip steeple that entire thing is not an error

south finch
languid dragon
#

only a small amount of it is an error

tulip steeple
#

xD i just realise

#

realised*

#

But

#

i dont know how to google it

#

Not like

languid dragon
#

if you read the lines you can actually find it and google it pretty easily

tulip steeple
#

I dont know how to google

languid dragon
#

literally

tulip steeple
#

I do but

languid dragon
#

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

slender thistle
#

There is nothing on that in Google. Ah 🤔

tulip steeple
#

Sh

languid dragon
#

then you continue to google lines

#

until you get an answer

tulip steeple
#

I did not know who to search it like that

#

But ok

floral stone
#

Can I see your code? I'm good in py

languid dragon
#

"line 212"

tulip steeple
#

My whole code

languid dragon
#

"self" is a required argument that is missing

#

it's simple english

floral stone
#

yes

tulip steeple
#

I should show it all

#

I cant show my token

floral stone
#

remove it

tulip steeple
#

Ill dm you

floral stone
#

don't dm me plz

tulip steeple
#

Then How Do I show you?

#

Ohh haste bin

floral stone
#

Remove the token from code and upload to hastebin

tulip steeple
slender thistle
#

How is self missing if it is actually not missing, judging by the code Thonk

tulip steeple
#

Done

slender thistle
#

Eh, async def mute(self, ctx, user_id, userName: discord.User): @tulip steeple Please read this.

floral stone
#

ban and kick command

tulip steeple
#

Mhm?

slender thistle
#

They should be fine, try to edit the mute command.

tulip steeple
floral stone
#

Shouldn't self var be used inside a class?

slender thistle
#

Not in Python.

floral stone
#

Ya sure?

slender thistle
#

Well, it is an argument. GWchadThink

#

How do you think almost all codes work

#

For example, my eval command:
async def py(self, ctx, *, msg):

#

Brb, getting distracted.

floral stone
#

Yes, but I don't need to specify self for a bot.command() if it's outside a class.

tulip steeple
#

so what do I do?

#

??

slender thistle
#

Try async def mute(self, ctx, user_id, userName: discord.User):

tulip steeple
#

Done

slender thistle
#

Ugh... maybe passing context for all 3 commands?

tulip steeple
#

Ctx is a required argument that is missing

slender thistle
#

Right.

#

@client.command(pass_context=True)

#

For all the 3 commands.

tulip steeple
#

ok

ruby dust
#

how is that gonna fix it?

slender thistle
#

Passing context?

ruby dust
#

yes

slender thistle
#

Because 'Ctx is a required argument that is missing'?

ruby dust
slender thistle
#

Also, add ctx, after self, in async def parts.

#

Totally not spoon-feed.

floral stone
#

@tulip steeple did it work

tulip steeple
#

No

floral stone
#

you don't need self,

tulip steeple
#

I added the @client.command(pass_context=True)

floral stone
#

remove self

tulip steeple
#

Where

slender thistle
#

Meh.

#

You go ahead.

ruby dust
#

self is needed only if you have it defined in __init__

tulip steeple
#

Ok Im removing it

slender thistle
#

Ah.

tulip steeple
#

Lemme see if it works

slender thistle
#

Then what the fuck is the reason for 'self is a required argument that is missing'

floral stone
#

Try async def mute(ctx, user_id, userName: discord.User):

ruby dust
#

but it seems like they using async, so not 100% if what I'm saying is correct at this point

floral stone
#

@slender thistle it's because it's looking for self but it's not there

tulip steeple
#

userName is a required argument that is missing

slender thistle
#

Right.

#

I gave you another code.

ruby dust
#

you have to actually use it as an argument in your command since you have it defined

slender thistle
#

Nonono.

#

Wait.

#

Change userName to user.

ruby dust
#

what are the chances that they use a command with nothing in it?

#

of course they have to use it

slender thistle
#

None.

#

Or wdym

tulip steeple
#

@floral stone async def mute(ctx, user_id, userName: discord.User): Does not work

slender thistle
#

Are you even reading the messages here?

tulip steeple
#

Ojk

#

Ok*

floral stone
#

did you remove self from the other commands

tulip steeple
#

Yaya

slender thistle
#

Let's hope so.

tulip steeple
#

UserName Is A required argument that is missing

floral stone
#

async def mute(ctx, user: discord.User):

#

is the error happening when you do the command

#

it means you didn't specify what usernane

tulip steeple
#

I did

#

Im doing it in my server

#

I pinged myself

slender thistle
#

Did you change userName to user?

tulip steeple
#

Yes

#

Lemme see if it worksd now

floral stone
#

You are probably specifying a mention for var user_id not username

tulip steeple
#

Ok mute is working

#

But kick and ban dont work

#

it saysit says

floral stone
#

put ctx argument at the beginning of both commands

tulip steeple
#

name Member Is not Definied

#

Thats the error

slender thistle
#

What command is that?

tulip steeple
#
@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)```
slender thistle
#

Oh right.

tulip steeple
#

Ban and Kick

slender thistle
#

Change user to member in those commands in async def.

tulip steeple
#

ll

floral stone
#

I'm done, got stuff to do. That's a basic error as well. I recommend getting help from the official d.py server

tulip steeple
#

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

slender thistle
#

Restart your bot as well as actually do what I told you to do before.

tulip steeple
#

Kk

#

IT WORKS!

#

Thank you so much!

#

:DDd

#

Lemme add more commands

#

On my own

slender thistle
#

No problem. Good luck. mmLol

tulip steeple
#

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

slender thistle
tulip steeple
#

Kkk

toxic oracle
#

Uhm?

slender thistle
#

?

solid cliff
#

random.choice(foo) mm

elder rapids
#

random.choice(bar)

tulip steeple
#

Yay added super bot

#

Shivaco Thanks for help.

slender thistle
#

You Are welcome. GWchadThink

tulip steeple
#

:DDD

#

:GWchadThink:

#

:3

#

@slender thistle Was my bot just declined?

slender thistle
#

You added it.

#

But it did not get declined because nobody checked it yet.

tulip steeple
#

It says in logs that it was delcined

slender thistle
#

Uh... no?

tulip steeple
#

oh yeah

topaz fjord
earnest phoenix
#

I cant find the discord events js docs anymore.

#

anyone know where the hell they are?

tulip steeple
#

Did you delete it?

earnest phoenix
#

,beep

halcyon abyss
#

client event ?

#

it's on Client page

earnest phoenix
#

On dark theme, some of the text on my bot page is invisible.
Why and how can I fix that?

floral stone
#

Use a text color that supports both light or dark theme or specify a background color for body

#

@earnest phoenix

earnest phoenix
#

the background color stays white on both themes

#

so...

#

I should just overwrite the color?

abstract mango
#

yeah i guess you could

floral stone
#

body {background-color: #fff !important;}

abstract mango
#

!important is your friend in that case

earnest phoenix
#

but even if I use

<font color="black">
</font>```
the font color stays white.
abstract mango
#

font element is deprecated, use css

floral stone
#

^

knotty steeple
#

^

earnest phoenix
#

okay

abstract mango
#

which element do you use for text

#

<p>?

earnest phoenix
#

<b>

abstract mango
#

ah

earnest phoenix
#

but I think I can fix that on my own

abstract mango
#
b { color: black !important; }
#

to turn <b> element black

earnest phoenix
#

thx

abstract mango
#

np

floral stone
#

<style>body {background-color: #fff !important;}</style>

#

put that on top

#

of your code

abstract mango
#

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

knotty steeple
#

how would i get the first mentioned user for my command

#

discord.js

earnest phoenix
#

message.mentions.members.first()

abstract mango
#

there should be a mentions- yeah

earnest phoenix
#

true xD

knotty steeple
#

ok

abstract mango
#

in d.py there's message.mentions

#

:p