#development

1 messages · Page 591 of 1

earnest phoenix
#

the one is supposed to go before the keycap

obtuse vortex
#

1 ⃣

cold harness
#

lol im confused

high lava
#

How did you even type the one before the keycap if the keycap came first

#

And how the hell did you even type the keycap

earnest phoenix
#

by using my brain

go to the website, copy the keycap emoji, paste it into the chat, press left arrow key and enter a number

high lava
#

1⃣

#

It literally looks like this

#

1⃣

amber fractal
#

Jaylon did you ever solve that?

sick vine
#

Today's Big Mistake

Writing my bots with Discord.js, but writing the portal for them in Flask, which is python. 🙃

high lava
#

I'll try this one out

#

But not yet

#

Ok. that worked

obtuse vortex
#

It worked @earnest phoenix

high lava
#

But it looks so fucked up

obtuse vortex
#

Thanks a lot

earnest phoenix
#

it looks different from the gif i posted above because i modified windows to have a twemoji font for emoji rendering so i can use twemoji in browser

high lava
#

ah

#

Well thanks

#

Perfect

next wedge
#

hy. Im pasted the discordbotsapi python code and edited the dbl token, but its does not updating the server count

#

still says N/A

earnest phoenix
#

im creating a bot list . i need help with something

#

when someone submits their app how can it automactially post to bots page?

languid dragon
#

you're not getting help here for your own bot list

#

what are you even thinking? LMAO

next wedge
#

xDDD

languid dragon
#

figure it out yourself

next wedge
#

but me

languid dragon
#

if you ask again itll be a lengthy mute

vague chasm
#

Appending a ? to my URL, for example: mydomain.com/?code=lol redirects me to my 404 page

#

Why?

languid dragon
#

provide more information

vague chasm
#

Ok

#

So I am using discord OAuth2 thing

#

when it redirects me back to my site...

#

domain.com/?code=8324mxj4ithnfm

#

it redirects me to 404 page

languid dragon
#

more code information

#

re-describing the issue wont help lmao

earnest phoenix
#

you didn't set up your indexing correctly

#

🤷

vague chasm
#
http.createServer(function (req, res) {
    let responseCode = 404
    let content = fs.readFileSync('./page-not-found.html')

    if (req.url === '/' || req.url === '/home') {
        responseCode = 200
        content = fs.readFileSync('./views/index.html')
    }
  if (req.url === '/login') {
    responseCode = 200
        content = fs.readFileSync('./views/login.html')
  }
    res.writeHead(responseCode, {
        'content-type': 'text/html;charset=utf-8',
    })
    res.write(content)
    res.end()

}).listen(8080)```
next wedge
#

Im tried to change the asyncio timer but still not posts the bot server count

earnest phoenix
#

you're matching with the exact string

next wedge
#

im think im a noob lol

vague chasm
#

yeah

#

so

earnest phoenix
#

exact

#

appending anything to the path will return false

vague chasm
#

ow

#

Should I use .startsWith?

earnest phoenix
#

yes

vague chasm
#

Okayyy thx

next wedge
#

so how can i post my server count to the bot list? I tried everything. But the Discordbotsapi code doesn't work.

vague chasm
next wedge
#

Ok

vague chasm
#
if (req.url === '/') {
    
  }```
I want the user to be redirected to `/home` directory if he/she comes to `/`.. what should I put inside that ^?
#

I guess req.send('/home')?

earnest phoenix
#

try it and see

#

you can also set the Location header

vague chasm
#

I changed my idea and I am trying something else now

steel heath
#

res.redirect('/home'); @vague chasm iirc

vague chasm
#

Ok

earnest phoenix
#

i'm having issues with my website could anyone help please?

#

dont ask to ask

#

just ask your question

#

My website is like...... i'm not very intelligent um i think it's like not working i don't know why sorry i'm not smart

#

provide more info

#

idk what the issue is though

unique nimbus
#

is there any errors

earnest phoenix
#
<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta property="og:title" content="DoneBot">
    <meta property="og:site_name" content="Discord DoneBot">
    <meta property="og:image" content="https://cdn.discordapp.com/avatars/553909681949507585/a6248662bedb805cdf817e8e48399caf.png?size=256">
    <meta property="og:description" content="A discord bot trying to connect people through communities they love. Fun, featureful, and fantastic at what it does!">
    <meta name="theme-color" content="#7289DA">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>GiveawayBot</title>

    <!-- Bootstrap Core CSS -->
    <link href="css/bootstrap.min.css" rel="stylesheet">

    <!-- Custom CSS: You can use this stylesheet to override any Bootstrap styles and/or apply your own styles -->
    <link href="css/custom.css" rel="stylesheet">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

    <!-- Custom Fonts from Google -->
    <link href='https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'>

</head>

<body>

    <!-- Navigation -->
    <nav id="siteNav" class="navbar navbar-default navbar-fixed-top" role="navigation">
        <div class="container">
#
   <!-- Logo and responsive toggle -->
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="#">
                    <span class="glyphicon glyphicon"></span>
                    GiveawayBot
                </a>
            </div>
            <!-- Navbar links -->
            <div class="collapse navbar-collapse" id="navbar">
                <ul class="nav navbar-nav navbar-right">
              <li>
                  <a href="/invite">Invite</a>
              </li>
              <li>
                  <a href="https://www.instagram.com/arda_tiryaki1/">Instagram</a>
              </li>
              <li>
                  <a href="/support">Support</a>
              </li>
              <li>
                  <a href="https://paypal.me/OverdoneisHOT">Donate</a>
              </li>
          </ul>

unique nimbus
#

you dont need to give us the whole code

#

bro

languid dragon
#

what are you doing

unique nimbus
#

what is the error

earnest phoenix
#

um

#

idk

#

😢

unique nimbus
#

how can we help

earnest phoenix
#

i'm not smart

languid dragon
#

just explain the issue you're having omfg

earnest phoenix
#

can you paste the code into hastebin and not in chat, you're cluttering for no reason

#

I DON'T KNOW ANYTHING IM STUPID 😭

unique nimbus
#

you made a bot and not everyone can make a bot

#

you aint stupid

earnest phoenix
#

eh

languid dragon
#

@earnest phoenix it doesn't take a genius to tell us why you're asking for help

#

all you have to do is 1. tell us what isn't working

#

thats it

earnest phoenix
#

it says /login was not found

languid dragon
#

where are you getting that error

earnest phoenix
#

when i try to login

#

how about not copypasting giveawaybot's html

languid dragon
#

where are you logging in

earnest phoenix
#

of course it won't work

#

😢 i'm trying my best

#

there's more than just surface html

#

well i tryed editing

languid dragon
#

so basically all you did was copy HTML and thought it would work on it's own

#

that's not how websites work

earnest phoenix
#

well i can't do anything

languid dragon
#

then google it

#

learn

earnest phoenix
#

i either pay people or try learn it just won't stick in

languid dragon
#

please don't waste our time if you're not going to actually try

#

in all fairness it doesn't take a genius to learn how to do something

#

copying other peoples code is just not fair, especially if you weren't given permission

earnest phoenix
#

well to me i struggle with somethings so eh

languid dragon
#

unless giveawaybot's code is public (which i doubt)

earnest phoenix
#

and i just want a website

rocky mesa
#

there are many free templates you can try out

earnest phoenix
#

someone made one for me and scammd me :/

#

so idk

#

@rocky mesa im intressted

languid dragon
#

just google

#

it literally

#

its so easy

rocky mesa
#

^

languid dragon
#

why cant anyone ever google

earnest phoenix
#

google is scary

languid dragon
#

you have the internet at your finger tips

earnest phoenix
#

and plagiarism is your way to make up for that scam lol

languid dragon
earnest phoenix
#

maybe could one of you maybe try teach me or no....

#

no

#

we're not here to teach you

west raptor
#

there are many free learning resources

earnest phoenix
#

there are services that do that, we're here to help existing problems on already existing projects

west raptor
#
#

literally thousands, all it takes is a quick google search

earnest phoenix
#

google is scary

west raptor
#

there

languid dragon
#

its not

#

stop

earnest phoenix
#

why no work xd

west raptor
#

.-.

grim aspen
#

oml

earnest phoenix
#

do you even own the domain

grim aspen
#

no

#

not me

languid dragon
#

no its not a search engine

earnest phoenix
#

was referring to hot-dog

grim aspen
#

you have to buy the domain @earnest phoenix

earnest phoenix
#

and that's just an ad

#

i own a domain

#

xd

#

but it died

languid dragon
#

mind if i ask how old you are? @earnest phoenix

earnest phoenix
#

15

grim aspen
#

visible confusion

earnest phoenix
#

^

#

ublock origin and greasemonkey anti adblock killer script = clean site

#

also

#

if you don't want to write all css yourself

#

just use a framework

#

like materialize

#

or even better use a SPA framework like react

#

and use something like material-ui

#

in english please

languid dragon
#

google.

#

it.

#

oh my god

#

if you keep going on and asking to be spoon fed about website stuff im taking action

earnest phoenix
#

when you say " im taking action" what do you mean?

west raptor
#

mute, ban, etc etc

earnest phoenix
#

that they'll take action 🙃

#

o

#

yeh, imma stop now

#

anyways, i suggest picking up react

languid dragon
#

no

earnest phoenix
#

react?

languid dragon
#

you're wasting your time suggesting something like that to someone who doesn't know how to buy a domain or even setup backend

earnest phoenix
#

🤷

#

backend i heard of that.... idk wht it is

#

it's self explanatory lol

languid dragon
#

what is your bot even made in?

earnest phoenix
#

inb4css

west raptor
#

the shit you dont see

grim aspen
#

i think he's using dbm

#

i could be wrong

earnest phoenix
#

js

grim aspen
#

better

earnest phoenix
#

anyway 💤

#

its still bad lol

languid dragon
#

so you wrote your bot with backend/frontend code but you dont know what backend is

#

😩

earnest phoenix
#

^

#

anyway bye

#

implying they wrote it

languid dragon
#

???????????????????

earnest phoenix
#

i wrote 60%

languid dragon
#

this is so stupid

earnest phoenix
#

yup

grim aspen
#

60%

earnest phoenix
#

anyway bai

#

cba

simple otter
#

im new to making bots, and i was wondering if there is any free service that run your bot for you, 24/7. id rather not have my computer on all day

amber fractal
#

Free or good take your pick

simple otter
#

free i guess

#

it isnt a big bot just a fun project ive had

amber fractal
#

I believe Amazon AWS has a 12 month trial

simple otter
#

thanks ill check it out

quartz kindle
#

google and amazon are the best free hosts, but its free only for 12 months (google is still super cheap after the free trial is over)

#

other than that, heroku and glitch are completely free but they have certain annoying limits, like shutting down your bot after a while, which can be overcome with a few tricks and scripts

#

but they're still very limited in resources, google and amazon are far better, even with low amounts of ram

languid dragon
#

tim can you do me a quick favour

#

can you type ]]ping here

quartz kindle
#

]]ping

languid dragon
#

ty

quartz kindle
#

did it work? whatever you're trying to do lmao

languid dragon
#

yeah

#

it responded to a bot dev and idk why

quartz kindle
#

lul

fiery stream
#

Yooop

#

Wopdy poop

lilac geyser
#

If bot has manage channels, does it necessarily mean it can read all categories? If not...?

west spoke
#

It does

#

If a bot has manage channels, it can view any channel

fiery stream
#

passport oauth google help pls

lilac geyser
#

@west spoke sorry, i mean category

#

Apparently it's not, though.

#

I still get missing access for category even when bot has manage channels

idle basalt
#

bots can always view all channels. they cant see the content in the channels unless they have read message perms

lilac geyser
#

Im very sure no, putting into account channel overrides

#

But im not so sure for category

fiery stream
#

chamburr

#

do u google auth i am having trouble help pls

lilac geyser
#

@fiery stream you mean google authenticator

fiery stream
#

passport google auth

lilac geyser
#

Authy ftw lol

#

Eh

fiery stream
#

yeee

lilac geyser
#

No

fiery stream
#

ohh rip

sly pond
#

@fiery stream @fiery stream @lilac geyser fgb

#

0

#

0

#

0

#

0

lilac geyser
#

huh

simple bluff
#

const { Command } = require('klasa');

module.exports = class extends Command {

    constructor(...args) {
        super(...args, {
      requiredPermissions: ['MANAGE_CHANNELS'],
            runIn: ['text'],
            description: 'Add involved user to a ticket.',
            usage: '<member:user>',
            usageDelim: ' '
            
        });
    }

    async run(msg, [member]) {
      msg.channel.overwritePermissions({
      permissionOverwrites: [
        {
           id: member.id,
           allow: ['VIEW_CHANNEL', 'SEND_MESSAGE', 'READ_MESSAGE'],
        }
      
      ],
  });
     
     }
};
#

hi i am trying to add user to private channel

#

it edits the private channel

#

and goes pubhlic

earnest phoenix
#

@simple bluff make so everyone role cant read it

simple bluff
#

wait huh?

#

its my ticket bot

#

so every channel opened everyday

earnest phoenix
#

Ok MATE

#

Channel settings

#

Everyone role

simple bluff
#

need this to work

earnest phoenix
#

So you assume everyone role is guild id?

simple bluff
#

sorry but you don't know what your doing

#

you can't help me

earnest phoenix
#

I own a bot with over 2000+ votes a month, I work as a software developer irl and my bot has over 5500 lines of code after clean up.

#

So if you tell me I don't know what I'm doing, take a look in the mirror since you are asking for help.

simple bluff
#

yeah you don't know what your doing

#

i can take a look in the mirror

#

because i am not ugly

#

looking at your pic

#

make me sick

quartz kindle
#

someone's ego was hurt lol

earnest phoenix
#

HAHAHA

mossy vine
#

LMAO

earnest phoenix
#

@simple bluff are u ok?

#

You seem a bit angery

#

He blocked me

#

I cant

languid dragon
#

@simple bluff why are you being toxic?

#

@earnest phoenix if you dont stop ill be muting you, throwing fuel on the fire isn't helping.

earnest phoenix
#

I didn't do anything

#

Deftones, next time approach me with a threat of mute wen you finished your sentence

languid dragon
#

to anyone else who wants to talk back to me or talk shit in this channel

#

it's for development

#

not for having petty arguments

late hill
#

It's even more funny because he's right

#

The everyone role has the same id as the guild

#

Learnt from tonku my master

#

uwu

#

What would be an efficient way of getting an array with all member ids

harsh nova
#

Wait it is?

late hill
#

Yeh

harsh nova
#

Damn didn’t know that

late hill
#

What would be an efficient way of getting an array with all member ids.
I mean I can just use a for loop to go through all members and push their id into an array but I'm questioning if there's a better way perhaps.

#

Eris wink

harsh nova
#

But if guild.id works as the @everyone Id why didn’t his code work? The code looks correct to me

#

(Yes I was aware that I can’t ping, otherwise I wouldn’t do it)

sinful lotus
#

everyone is the guild id

#

try doing msg.content on a message that has everyone mention

slender thistle
#

Isn't it plain @everyone?

pallid zinc
#

Nope

slender thistle
#

d.py does it that way RenShrugGif

inner jewel
#

it is

#

the everyone/here mentions are plain @everyone/@here

earnest phoenix
#

the mentions are plain, you are thinking of the role which has the same id as the guild

silent cloud
#

hey guys

#

can somebody help me

#

what free hosts have for bots?

#

24/7

amber fractal
#

Free vs good

silent cloud
#

heruko i dont like, glitch not 24/7

amber fractal
#

Amazon AWS has a 12 month trial

silent cloud
#

nty

#

google too dont need

mossy vine
#

mate just buy a fucking vps instead of asking almost every day for an alternative that doesnt exist

dusky steeple
#

glitch can be 24/7 if you set up some kind of pinging process every 5min if I understood correctly

silent cloud
#

i setup it

#

but he off every 12 hours if it working nonstip

#

know somebody enything else

#

without heruko, glitch, google, amazon

mossy vine
#

no

#

those are the only free hosts

#

or you go for something very sketchy

#

just buy a fucking vps

#

or settle with what you have

earnest phoenix
#

help

#

i'm facing this error which i don't know how to fix

mossy vine
#

what error

earnest phoenix
#

can i dm you it?

#

the message is big XD

blazing star
#

well discord does have a message limit of 2000 characters

mossy vine
#

no, post it here so if i cant, someone else can help you

earnest phoenix
#

(node:17810) 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: 7)

(node:17810) UnhandledPromiseRejectionWarning: Error: SetLevel function parameter toSet needs to be a number!

at Object._SetLevel (/rbd/pnpm-volume/7e364553-725c-442a-a4fa-8e5336d9620c/node_modules/.registry.npmjs.org/discord-leveling/1.0.3/node_modules/discord-leveling/index.js:90:47)

at Queuing._executeQueue (/rbd/pnpm-volume/7e364553-725c-442a-a4fa-8e5336d9620c/node_modules/.registry.npmjs.org/discord-leveling/1.0.3/node_modules/discord-leveling/queue.js:41:41)

at Timeout.setTimeout [as _onTimeout] (/rbd/pnpm-volume/7e364553-725c-442a-a4fa-8e5336d9620c/node_modules/.registry.npmjs.org/discord-leveling/1.0.3/node_modules/discord-leveling/queue.js:86:22)

at ontimeout (timers.js:436:11)

at tryOnTimeout (timers.js:300:5)

at listOnTimeout (timers.js:263:5)

at Timer.processTimers (timers.js:223:10)

(node:17810) 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: 8)

#

here

silent cloud
#

ohhh god

mossy vine
#

in a code block pls

earnest phoenix
#

Ok

#

i send you the code

mossy vine
#

also if you read the error you would know what the issue is

earnest phoenix
#

Idk js XD

silent cloud
#

setLevel need umber

earnest phoenix
#

ik python

mossy vine
#

then dont use js

silent cloud
#

number

mossy vine
#

if you dont know it

earnest phoenix
#

I did put 20 as a number

blazing star
#

could you send the code?

silent cloud
#

can show code?

earnest phoenix
#

Ok

#

if (command === 'setlevel') {

var amount = args[0]
var user = msg.mentions.users.first() || msg.author

var output = await dl.SetLevel(user.id, amount)
msg.channel.send(`Hey ${user.tag}! You now have ${amount} levels!`);

}

#

here

#
 
    var amount = args[0]
    var user = msg.mentions.users.first() || msg.author
 
    var output = await dl.SetLevel(user.id, amount)
    msg.channel.send(`Hey ${user.tag}! You now have ${amount} levels!`);
  }```
silent cloud
#

ummmm

blazing star
#

amount won’t be an integer, it will be a string

earnest phoenix
#

how?

blazing star
#

you would have to convert it

earnest phoenix
#

um

#

how?

#

XD

mossy vine
blazing star
#

by using parseInt

earnest phoenix
#

Uhh

#

i just remove the code

blazing star
#

oh

earnest phoenix
#

That code is not important anyway

blazing star
#

ok

earnest phoenix
#

bruh how to make that someone gets xp every minute in js?

blazing star
#

code it

mossy vine
#

tickNo using an easy function to solve a problem
tickYes deleting the entire command

blazing star
#

yes

rose peak
#

There are numerous tutorials for an xp system...

dusky steeple
trim saddle
#

lemme seee..

#

i commented out most of the mongo stuff but heres what i got in the base command

#
#user = self.db.posts.find_one({"user": ctx.author.id})

            if not str(ctx.author.id) in todo:
                todo[str(ctx.author.id)] = {
                #post = {
                    "TODO" : [],
                    "rTODO" : []
                }
                #self.db.posts.insert_one(post)
                D2.save_json("todo.json", todo)

            else:
                pass

            await asyncio.sleep(1)

            #data = owo.posts.find_one({"user": user.id})
            #new = data['Todo'].append("watch hentai") <-- yes hentai
            #owo.posts.update_one({"user": user}, {"$set":{"Todo": new}})
#

idk

languid dragon
#

oh

#

python

trim saddle
#

no shit

languid dragon
#

welp

#

cant help what's already lost /s

trim saddle
#

theres no fixing it? oh

languid dragon
#

sorry i have no experience in python

#

i'd help otherwise

#

:(

trim saddle
#

you tried.

#

thats all that matters

#

even though you did nothing..

languid dragon
trim saddle
#

im just gonna practice rethink

restive silo
#

rethonk you should rethink that decision mmlol

slender thistle
#

@trim saddle What is self.db

trim saddle
#

the mongoclient

slender thistle
#

You need a database and then a collection

#

Or use it as an attribute aka

s = MongoClient()
db = s.voters
collection = db.vote
trim saddle
#

im saving this snippet for later

earnest phoenix
#

anyone help me?

amber fractal
#

Don't ask to ask

earnest phoenix
#

How to make webhook for website?

slender thistle
#

Host a webhook on your VPS

#

aka webserver

earnest phoenix
#

not code?

amber fractal
#

A webhook has code

earnest phoenix
#

I dont know

#

code

amber fractal
heady shale
#

What’s the rate limit on status changes

next wedge
#

hey, someone can send me a server count poster? i tried everything. i tried #312614469819826177 too. But it does not work. 😦

#

for python please

slender thistle
#

https://discordbots.org/api/bots/BOT_ID_HERE/stats will be the API endpoint you need. (Change BOT_ID_HERE to your bot's ID)
Look up aiohttp examples on how to send a POST request in aiohttp

next wedge
#

ok i will try

amber fractal
#

Yup

#

Thats what stats returns

next wedge
#

and now what?

#

im noob 😦

slender thistle
#

You wanna post or get server count?

next wedge
#

post

slender thistle
#

I hope you did read the part where I said that you will need to use aiohttp

amber fractal
slender thistle
#

aka use your code, not your browser

next wedge
#

yeah

#

okay

slender thistle
#

In browser, you send a GET request instead when visiting that link

naive gull
#

i think people told me this many times but one last time xD,

#

how to get the servercount on my bot page?

#

like that

slender thistle
#

Post it on the website, you mean?

naive gull
#

ye

slender thistle
naive gull
#
Look up aiohttp examples on how to send a POST request in aiohttp```
#

thx

eternal mesa
#

Anyone familiar with the SQLite settings provider in commando

amber fractal
#

Wrong place, bad meme

naive gull
#

oof\

west spoke
#
  File "D:\Bot - Copy\bot.py", line 2769, in on_message
    '\n"damage": "' + str(itemdmg) + '"'
TypeError: must be str, not int
#

not in need of help

#

but this is dumb

#

it is a string xd

slender thistle
#

Error is probably somewhere else

west spoke
#

where it is thinking its at tho

slender thistle
#

Python can sometimes be dumb on errors

west spoke
#

first it said it couldnt be str() so i changed it to int() as it was needed

#

and now its doing that

#

its funny, in a way

#

but ive got it handled enough, im just trying to make the file look a little better :I

#

meh

#

my idea of course didnt work

#

cri

west spoke
#

oof

#

why cant i send a image xd

#

meh

grizzled spruce
#

How does one get the amount of servers ther bot is on to display on the discord bot page

unique nimbus
#

make it good

#

and unique

#

nobody wants 50 bots which does the same command

slender thistle
#

Send the server count to DBL API

#

Either use an already existing library or send an HTTP request yourself

naive gull
#

does dbl request the servercount it self?

#

i did it if its ready?

silent cloud
#

hey guys

#

need help

#

why dont work?

#
    let kUser = msg.guild.member(msg.mentions.users.first() || msg.guild.members.get(args[0]));
    if (!kUser) return msg.channel.send("Не могу найти человека!");
    if (!msg.member.hasPermission("KICK_MEMBERS")) return msg.channel.send("К сожалению у тебя не хватает прав друг!");
    if (kUser.hasPermission("MANAGE_MESSAGES")) return msg.channel.send("Этот человек не может быть кикнут!");
    let embed = new Discord.RichEmbed()
    .setTitle('')
    .setDescription('Это кик:anim_ban: \nЯ заметила, что кого-то кикнули!:anim_cat:')
    .addField("Кикнут человек:", `${kUser} с ID ${kUser.id}`)
    .addField("Кикнут человеком:", `<@${msg.author.id}> с ID ${msg.author.id}`)
    .addField("Кикнут в канале:", msg.channel)
    .addField("Время:", msg.createdAt)
    .setThumbnail('https://cdn.discordapp.com/attachments/463276215663591435/558748363143512086/IMG_20190322_222615.png')
    .setColor('0x2c69d3')
     msg.guild.member(kUser).kick("Кикнут звёздочкой")
     msg.channel.send({embed})
     }```
zealous veldt
#

Please properly format your code blocks

#

And you need to be more specific. What isn't working? What error does it through, what are you trying to do? @silent cloud

silent cloud
#

js

#

code write all right, but dont kick

#

but he dont got kick

earnest phoenix
#

Does the bot has the required perms?

silent cloud
#

perms?

#

permussions

unique nimbus
#

permissions

#

разрешение

silent cloud
#

i set up only admin

#

xD ty for russian

unique nimbus
#

administrator?

#

np

silent cloud
#

yep

#

=8

unique nimbus
#

I might move to russia idk

silent cloud
#

xD

unique nimbus
#

anyway

#

your kick command isnt working?

silent cloud
#

yep

#

but ban work

unique nimbus
#

does it give an error?

silent cloud
#

wait he give but i saw and dont understand

#

wait second

unique nimbus
#

okay dokie

earnest phoenix
silent cloud
#

ohhh

#

i lost hub

#

what the site name to paste code

#

h....hub

earnest phoenix
#

hastebin

silent cloud
#

ty

#

ohh rly

#

bin

earnest phoenix
#

xd

silent cloud
earnest phoenix
#

@unique nimbus take a look at it. I don't understand js lol

silent cloud
#

xD

unique nimbus
#

Neither

#

you don't have a catch block

silent cloud
#

ummm

unique nimbus
#

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()

silent cloud
#

i dont understand

unique nimbus
#

Эта ошибка возникла либо в результате выброса внутри асинхронной функции без блока catch, либо в результате отклонения обещания, которое не было обработано с помощью .catch ()

earnest phoenix
#

xD

silent cloud
#

lol

unique nimbus
#

Google Translate good

silent cloud
#

xD

#

but how i need to fix

#

msg.catch()

unique nimbus
#

idk sorry

silent cloud
#

or how

#

ohhh

#

let's wait somebody

unique nimbus
#

yes

#

sorry bro

#

сожалею

silent cloud
#

xD

earnest phoenix
#

Glitch Maintenance in like 1 hour for 30 minutes!

#

what maintenance?

unique nimbus
#

server most likely

earnest phoenix
#

We will be performing an infrastructure upgrade. We anticipate a short, 2-minute downtime during this upgrade

#

there's a buddy looking for help and hes just joining the chat givin' infos for his server.

#

if it's an anouncement for your bot nobody cares lol

zealous veldt
#

No need to be a jerk @earnest phoenix

earnest phoenix
#

not a jerk, just being honest and indifferent about it 🤷

#

do you care that their bot is going down? exactly

#

stuff like that should be contained to your bot's support guild

#

what if everyone started posting when their bot is going down in here

zealous veldt
#

Ok, we get it

earnest phoenix
#

heyyy i need some coders for a nice Discord Global Chat project.
i need writersfor python who know how the json databanks works and other

clever radish
#

O.O

earnest phoenix
#

pm me if anyone has interest ^^

lament meteor
#

json database zoomeyes that would be for beginers tbh. using json as a db is bad

earnest phoenix
#

"hey lets ignore everything that literally has database in it's name and use json WOOOOOOO!"

rustic axle
#

What exactly is a "Discord Global Chat project"

silent cloud
#

maybe chat in chatthonkku Thonk

earnest phoenix
#

its a programm with you can chat with guys from other servers in a channel.
like a global chat in a game with allow you to chat with other kingdoms etc

#

that's more than likely against the tos

#

you're not allowed to login with a user token outside of the discord client

#

that is not what i do...

quartz kindle
#

he just wants to do the same thing yggdrasil and many other bots do

earnest phoenix
#

ok lets explain it a little bit.
its is simple to write but i want to expanse it lol.
you write he prefix of the bot and a message,
the bot send than in example follow message in the "global" chat
[your server where you write the cmd] Niko#1375: hello
the bot send the messeage in all servers who use this bot in a specific channel

#

ah

#

a telephone

silent cloud
#

xD

#

@tim

#

@quartz kindle

#

you understand js?

quartz kindle
#

yes

silent cloud
#

can help me

#
    let kUser = msg.guild.member(msg.mentions.users.first() || msg.guild.members.get(args[0]));
    if (!kUser) return msg.channel.send("Не могу найти человека!");
    if (!msg.member.hasPermission("KICK_MEMBERS")) return msg.channel.send("К сожалению у тебя не хватает прав друг!");
    if (kUser.hasPermission("MANAGE_MESSAGES")) return msg.channel.send("Этот человек не может быть кикнут!");
    let embed = new Discord.RichEmbed()
    .setTitle('')
    .setDescription('Это кик:anim_ban: \nЯ заметила, что кого-то кикнули!:anim_cat:')
    .addField("Кикнут человек:", `${kUser} с ID ${kUser.id}`)
    .addField("Кикнут человеком:", `<@${msg.author.id}> с ID ${msg.author.id}`)
    .addField("Кикнут в канале:", msg.channel)
    .addField("Время:", msg.createdAt)
    .setThumbnail('https://cdn.discordapp.com/attachments/463276215663591435/558748363143512086/IMG_20190322_222615.png')
    .setColor('0x2c69d3')
     msg.guild.member(kUser).kick("Кикнут звёздочкой")
     msg.channel.send({embed})
     }```
#

thats a code

#

he send about he kick him, but he in a server

#

and error is...

quartz kindle
#

that error is usually related to file paths, but nothing there is accessing any file. you can try changing some stuff and see if it works:

.addField("Кикнут в канале:", msg.channel) -> .addField("Кикнут в канале:", msg.channel.id)
msg.guild.member(kUser).kick("Кикнут звёздочкой") -> msg.guild.members.get(kUser.id).kick("Кикнут звёздочкой")
msg.channel.send({embed}) -> msg.channel.send(embed)```
#

anyway i need sleep, good luck

earnest phoenix
#

Glitch: Scheduled maintenance is currently in progress. We will provide updates

silent cloud
#

ty I'll try

earnest phoenix
#

how can you do that only the developers of the bot can use a command?

#

have an array of whitelisted ids then check if the command's author id is in the array

#

Hm

#

Okay

vale raptor
#

is this an appropriate place to ask about requirements for bot approval?

amber fractal
earnest phoenix
#

my discord bot is throwing a 401 on the load up when i regened a fresh token

#

discordia btw

#
2019-03-23 01:39:25 | [INFO]    | Connecting to Discord...
2019-03-23 01:39:25 | [ERROR]   | 401 - UNAUTHORIZED : GET https://discordapp.com/api/v7/users/@me
2019-03-23 01:39:25 | [ERROR]   | Could not authenticate, check token: HTTP Error 0 : 401: Unauthorized
#

thats the log

#

Ive changed the token and created new apps

#

still same 401

bright spear
#

401 (UNAUTHORIZED) The Authorization header was missing or invalid

#

so either

  1. no token is being sent
  2. the token is invalid (not an actual discord token)
earnest phoenix
#

its most likely not being sent

#

because the tokens are from the application page

vale raptor
#

my question about requirements for bot approval isn't specifically covered by the rules page

#

my bot was denied for having a command (google image search) that could produce nsfw content in sfw channels. my question is whether or not it would be acceptable to have the google search function be blocked in sfw channels by default, with the option for an administrator to enable googling in any channel.

#

through a config command

#

is there somewhere specific I should be asking this question? I apologize if it doesn't quite belong here.

lime geode
#
  File "/data/user/0/ru.iiec.pydroid3/files/accomp_files/iiec_run/iiec_run.py", line 31, in <module>                        start(fakepyfile,mainpyfile)                              File "/data/user/0/ru.iiec.pydroid3/files/accomp_files/iiec_run/iiec_run.py", line 30, in start                           exec(open(mainpyfile).read(),  __main__.__dict__)         File "<string>", line 40                                      async def ban(ctx, members: commands.Greedy[discord.Member],reason: str)                                                           ^                                            SyntaxError: invalid syntax                                 [Program finished]```


Need help plz 🙏
west skiff
#

wow that formatting is fucked

#
async def ban(ctx, members: commands.Greedy[discord.Member],reason: str)```
#

isn't valid

kind wyvern
pallid zinc
#

What to install

kind wyvern
#

dm

pallid zinc
#

Sqlite

kind wyvern
#

can any1 help

pallid zinc
#

Use npm I sqlite3 -S

#

@kind wyvern

lime geode
#
  File "/data/user/0/ru.iiec.pydroid3/files/arm-linux-androideabi/lib/python3.6/site-packages/discord/ext/commands/core.py", line 304, in _parse_arguments
    transformed = yield from self.transform(ctx, param)
  File "/data/user/0/ru.iiec.pydroid3/files/arm-linux-androideabi/lib/python3.6/site-packages/discord/ext/commands/core.py", line 225, in transform
    raise BadArgument('Converting to "{0.__name__}" failed.'.format(converter)) from e
AttributeError: 'str' object has no attribute '__name__'```

I'm new at this pls can anyone help me please..?
prime cliff
pallid zinc
#

I am .js so I can't help

prime cliff
#

It literally tells you what is wrong kek

core.py", line 225, in transform
    raise BadArgument('Converting to "{0.__name__}" failed.'.format(converter)) from e
AttributeError: 'str' object has no attribute '__name__'```
lime geode
#

I only have 40 Lines -.-

prime cliff
#

What is discord/ext/commands/core.py then a client/command handler?

#

Then something in the command handler or your commands are breaking it

lime geode
#

Ok

lime nest
#

does anyone know how to do announcements from the console in node.js?

#

well how to code it

slender thistle
#

@lime geode What command does that happen on?

#

@prime cliff Actually no, it doesn't tell what is wrong

#

The original error either wasn't posted or didn't appear because another one happened in the d.py code itself

lime geode
#

I found it and fix it ;)

prime cliff
#

Hm?

lime geode
#

Now I have an other Problem :^D

slender thistle
#

Which is?

spare goblet
#

api says that GET/bots/{bot.id?}/check checks for past 24h. what if someone votes like twice. cuz like the cooldownis just 12h right

#

or is it just assumed that they wouldnt have voted twice

#

😂

mossy vine
#

it checks if a user has voted in the last 24 hours. 12 hours < 24 hours

spare goblet
#

so i can't check if they voted for the past 12 h instead?

#

okay lol

lime geode
#

My Bot can't kick he is Unauthorized... @slender thistle

#

(On my Server)

slender thistle
#

Error please

lime geode
#
  File "/data/user/0/ru.iiec.pydroid3/files/arm-linux-androideabi/lib/python3.6/site-packages/discord/ext/commands/core.py", line 374, in invoke
    yield from injected(*ctx.args, **ctx.kwargs)
  File "/data/user/0/ru.iiec.pydroid3/files/arm-linux-androideabi/lib/python3.6/site-packages/discord/ext/commands/core.py", line 54, in wrapped
    raise CommandInvokeError(e) from e
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: HTTPException: UNAUTHORIZED (status code: 401): 401: Unauthorized```
mossy vine
#

are you coding on a phone or tablet?

#

@lime geode are you coding on a phone?

lime geode
#

Yes

mossy vine
#

read this guide

lime geode
#

...

lime nest
#

does anyone know a script for node.js that adds a feature so i can announce updates in servers that use my bot?

silent cloud
#

can rly somebody help

#

i cant fix it

#
    let kUser = msg.guild.member(msg.mentions.users.first() || msg.guild.members.get(args[0]));
    if (!kUser) return msg.channel.send("Не могу найти человека!");
    if (!msg.member.hasPermission("KICK_MEMBERS")) return msg.channel.send("К сожалению у тебя не хватает прав друг!");
    if (kUser.hasPermission("MANAGE_MESSAGES")) return msg.channel.send("Этот человек не может быть кикнут!");
    let embed = new Discord.RichEmbed()
    .setTitle('')
    .setDescription('Это кик:anim_ban: \nЯ заметила, что кого-то кикнули!:anim_cat:')
    .addField("Кикнут человек:", `${kUser} с ID ${kUser.id}`)
    .addField("Кикнут человеком:", `<@${msg.author.id}> с ID ${msg.author.id}`)
    .addField("Кикнут в канале:", msg.channel)
    .addField("Время:", msg.createdAt)
    .setThumbnail('https://cdn.discordapp.com/attachments/463276215663591435/558748363143512086/IMG_20190322_222615.png')
    .setColor('0x2c69d3')
     const user = msg.mentions.users.first();
     const member = msg.guild.member(user);
     member.kick("Кикнут звёздочкой")
     msg.channel.send({embed})
     }```
slender thistle
#

@lime geode Are you trying to kick someone who is not in the server?

silent cloud
#

nope

#

wait i give screenshot

slender thistle
#

I wasn't even talking to you lul

lime geode
#

No

thorny atlas
#

Can I ask about discord servers here

silent cloud
#

hey guys

#

i cant find

#

what command to show all bot servers name

#

in js

slender thistle
#

Iterate through all your servers and output their names

#

rtfd for more help ;^)

silent cloud
#

ohhh

#

i reading discord.js but nothing about it

slender thistle
#

Iterating is basic js

idle basalt
#

learn js before making a bot in js is a pretty basic rule

silent cloud
#

ty

#

but

#

can u too help with this?

#
    let kUser = msg.guild.member(msg.mentions.users.first() || msg.guild.members.get(args[0]));
    if (!kUser) return msg.channel.send("Не могу найти человека!");
    if (!msg.member.hasPermission("KICK_MEMBERS")) return msg.channel.send("К сожалению у тебя не хватает прав друг!");
    if (kUser.hasPermission("MANAGE_MESSAGES")) return msg.channel.send("Этот человек не может быть кикнут!");
    let embed = new Discord.RichEmbed()
    .setTitle('')
    .setDescription('Это кик:anim_ban: \nЯ заметила, что кого-то кикнули!:anim_cat:')
    .addField("Кикнут человек:", `${kUser} с ID ${kUser.id}`)
    .addField("Кикнут человеком:", `<@${msg.author.id}> с ID ${msg.author.id}`)
    .addField("Кикнут в канале:", msg.channel)
    .addField("Время:", msg.createdAt)
    .setThumbnail('https://cdn.discordapp.com/attachments/463276215663591435/558748363143512086/IMG_20190322_222615.png')
    .setColor('0x2c69d3')
     const user = msg.mentions.users.first();
     const member = msg.guild.member(user);
     member.kick("Кикнут звёздочкой")
     msg.channel.send({embed})
     }
solar isle
#

I think

member.kick("Кикнут звездочкой");

Should be in english

slender thistle
#

Who cares

#

Russian language in strings doesn't matter

silent cloud
#

yep

#

ban code is work

#

but it give error

earnest phoenix
#

have you tried replacing cyrillic text to latin one by one

silent cloud
#

yep

#

nothibg

#

nothing

earnest phoenix
#

error still occurs?

silent cloud
#

yep

#

still

#

you dont know yep?

#

ohhhh

pallid zinc
#

Can I host my bot on mobile

jagged birch
#

No wtf

pearl sandal
#

you can on android

frank drum
#

@pearl sandalhow

#

If you know how then dm me how

pearl sandal
#

Google it

frank drum
#

Ok

quasi forge
#

Am I too late? Lol

loud salmon
#

A guide for coding on mobile

languid dragon
pearl sandal
#

@loud salmon lmfao true

mossy vine
#

@languid dragon shut and blame gh pages

languid dragon
#

gh pages is https

mossy vine
#

Ik

#

And its set to https only

languid dragon
mossy vine
#

Main website is secure, others not for whatever reason

#

Whatever i gtg now

west spoke
#

What OS for the hosting @pallid zinc

#

and what lang

vital wave
#

is this the server for "Server-Stats" ??

slender thistle
#

Negative answer

loud salmon
#

@vital wave nope

#

]]supportserver

covert turtleBOT
#
Spider#5879

This server is NOT the support server for ANY bot. You need to click on the Support Server button. not the Join Discord button.

slender thistle
#

Anyone good with regex here?

languid dragon
#

yes

#

but this is why im good with regex

slender thistle
#

How would I get the end part of an URL? thonk_think

languid dragon
slender thistle
#

👌

ruby dust
#

my bot uses a regex that finds all valid urls in a message

slender thistle
#

I don't need the entire URL

ruby dust
#

mk

slender thistle
#

Yep, got it dogeThumbsUp

pallid zinc
#

@west spoke android

west spoke
#

ah

#

what lang are you coding it in tho

#

if its python

#

get Pydroid

#

and most likely there are others for different languages

amber fractal
#

can we dont code on mobile tho tbh?

slender thistle
#

What if one can't afford a laptop/Pc

amber fractal
#

Nothing coded on mobile will turn out as you want it to.

slender thistle
#

Though in most cases you are correct, sometimes even a phone is enough

#

It's actually pain in the ass to code on phone

amber fractal
#

My phone costs the same as a cheap laptop ~$120 tho Thonk

slender thistle
#

Prices, at least in my country, are not that low for laptops

#

Even some shitty ones cost enough

slim heart
#
const ipc = require('node-ipc');
ipc.config.id = "jpbbot";
ipc.config.retry = 1000;
ipc.config.silent = false;

ipc.serve(() => {
    
    //MESSAGES;

    ipc.server.on("dblVote_CB", (message) => {
        console.log("Received Message: " + message);
    })
})

ipc.server.start();```
I'm just starting with ipc and this is my code,
It keeps giving me this error and exits:
```2| jpbBOT  | starting server on  /tmp/app.jpbbot
2| jpbBOT  | starting TLS server false
2| jpbBOT  | starting server as Unix || Windows Socket
2| jpbBOT  | TypeError: this.indexOf is not a function
2| jpbBOT  |     at Server.Array.contains (c:\Workspace\bots\jpbbot\index.js:5:21)
2| jpbBOT  |     at Server.emit (c:\Workspace\node_modules\event-pubsub\es5.js:74:21)
2| jpbBOT  |     at Server.onStart (c:\Workspace\node_modules\node-ipc\dao\socketServer.js:45:14)
2| jpbBOT  |     at Object.onceWrapper (events.js:285:13)
2| jpbBOT  |     at Server.emit (events.js:197:13)
2| jpbBOT  |     at Server.EventEmitter.emit (domain.js:439:20)
2| jpbBOT  |     at emitListeningNT (net.js:1290:10)
2| jpbBOT  |     at processTicksAndRejections (internal/process/next_tick.js:76:17)```
earnest phoenix
#

@languid dragon nice x overflow

#

noob

languid dragon
#

suck me

earnest phoenix
#

gladly furweary

languid dragon
loud salmon
#

😩

echo pasture
carmine echo
#

When sending code in discord you use ```thing. Now the question is, which thing should I use when sending js code? Just look at this

condition ? object.prop.subprop : object.props.prop7
#

absolutely colorless. I am using js. What does a better job of highlighting js than js?

amber fractal
#

Well you should use the lang that the code is

#

it goes at the top

carmine echo
#

The code is javascript. I used ```js, which is supposed to be for javascript, yet there are no colors

amber fractal
#

That should have colors

#

I cant tell because mobile

carmine echo
#
condition ? object.prop.subprop : object.props.prop7
amber fractal
#

Was mine even highlighted?

carmine echo
#

yes

amber fractal
#

Then discord might not give ternary syntax highlighting

carmine echo
#

annoying

#

and even for objects

#

like how is that even possible

earnest phoenix
#

mobile doesnt do highlighting

amber fractal
#

I know

#

I said that

carmine echo
#

that's completely beyond my point

earnest phoenix
#

why? because the mobile devs are retarded

carmine echo
#

rartaded*

earnest phoenix
#

yes

#

i swear to god the entire team should be fired and they should hire new interns

carmine echo
#

imagine firing the ceo

earnest phoenix
#

they're ignoring community suggestions and opinions and only made the app worse and more unstable than a few months back

#

reason? "consistency"

carmine echo
#

They added that stupid gift button literally in the chat box

#

they're literally just asking you for money

earnest phoenix
amber fractal
#

I wouldnt be surprised

carmine echo
#

And you can't turn it off! And their point is "if we added a toggle for everything there would be too many toggles". Honestly, everyone would prefer a toggle instead of 3 buttons I never use

#

ok this is the wrong channel

earnest phoenix
idle basalt
#

want better codeblocks? hit up hastebin

#

code blocks are ehhh in discord

adding standard syntax highlighting wouldnt be very difficult

#

and adding it to mobile would be the same

grim aspen
#

i'm getting a 504 gateway error

#

also known as a HTTP error

carmine echo
#

Ok I am shit at regex and I need help. This is my regex /foo|bar/gi. It only matches foo but not bar

#

I'm assuming I just need to add a letter but idk which one

#

It does match bar if foo is present

quartz kindle
#

i think is /[foo|bar]/

#

i dont remember, you can just check a regex linter online or something

slender thistle
#

Ken sent this before today

carmine echo
#

nvm fixed it the issue was completely unrelated

#

thanks for this resource though

earnest phoenix
#

can you not flood the chat with code

#

post it to hastebin or something

#

wat

lofty hamlet
#

If you don't help me don't write plz

earnest phoenix
#

that made 0 sense

#

you are flooding chat, especially for mobile users, posting your code to hastebin reduces it to one line, a link

grim aspen
#

put it in a hastebin next time

lofty hamlet
#

Hi i have a problem
:
My code :

grim aspen
#

your code is just :?

rotund ferry
lofty hamlet
#

Wait

#

My code :

#

This code has a problem, it works however when the PC is full but nino if in the PC ex: in pc 1 there are only a few pokémons and not 25 it shows no pokémon so : Aucun Pokémon Type

west raptor
#

uhh

#

what

#

the indentation on this is horrible

gentle fractal
#

can somebody help me get my bot's PLAYING status to work?

#

this is what i have thus far: ```client.setInterval(() => {
let Status = [
Status 1,
Status 2,
Status 3,
];

client.user.setActivity(Status[Math.floor(Math.random() * Status.length)], { "type": "PLAYING" }); 

client.user.setStatus('online'); 

}, 30 * 1000);

amber fractal
#

have you ensured the interval is running?

gentle fractal
#

i don't remember how to do so.

west raptor
#

console.log is your friend

amber fractal
#

just a console.log inside of it to ensure it actually starts to run

earnest phoenix
#

does anyone here know through JS, how to post infomation on a webpage regarding a bot stats?

west spoke
#

some sort of <script> code idk

earnest phoenix
#

lmao thx XD

west spoke
#

i know a bit of html but i dont know java

earnest phoenix
#

i know it will be in the form of a script, but just don't know how to set it up

west spoke
#

google

#

idk

earnest phoenix
#

i have, nothing

#

¯_(ツ)_/¯

west spoke
#

me

#

absolutelly me and mood

earnest phoenix
#

XD

#

i guess Im going to go look in discord.js api page

marble needle
#

java and javascript are not the same thing

#

read into how to write an own api and expose data about your bot that you want to display on your website

misty rune
#

How do you guys get rank of someone in an exp leaderboards for example ?

#

Do you store the rank in a column ?

#

Or do you use a trick to get a position with sql ?

#

I don't want to destroy performances

idle basalt
#

depends on your db and how youre storing the data

west spoke
#

id use a json

amber fractal
west spoke
#

and have it replace with whatever value is updated

#

like if someone were to have lets say $1000, then it would update w/ the name, and the current balance

#

idk

amber fractal
#

Why json

idle basalt
#

json is not a good way to store data

#

its prone to corruption if you write often

#

json is useful as a read-only set of static data

#

for any dynamic storage, you should move up to a database

amber fractal
#

^

idle basalt
#

there are simple key/value dbs that work just like json files

amber fractal
#

Except better mmLol

idle basalt
#

ye ofc

kind roost
#

hi

pallid zinc
#

No errors but not working

earnest phoenix
#

How would i grab the invite code?

pallid zinc
#

Discord permission calculator

#

@earnest phoenix

earnest phoenix
#

Im trying to make a command that will show invite link info etc

slender thistle
#

Get guild invites and output them, you mean?

pallid zinc
#

If( messege.contain === 'invite') {
message.reply === ( link here );
}
@earnest phoenix

slender thistle
#

massege mmLol

pallid zinc
#

My perfect english any problem @slender thistle

slender thistle
#

@earnest phoenix Could you give some more details?

#

Do you want to output all guild invites or info only for the one that will be in a message?

earnest phoenix
#

module.exports = async (client, message, guild, args, user) => {
    message.delete()
    function verification_level() {
        let verification;
        if (message.guild.verificationLevel == 0) {
            verification = `No Verification`
        }
        if (message.guild.verificationLevel == 1) {
            verification = `Email Verification`
        }
        if (message.guild.verificationLevel == 2) {
            verification = `5 Minute Waiting`
        }
        if (message.guild.verificationLevel == 3) {
            verification = `10 Minute Waiting`
        }
        if (message.guild.verificationLevel == 4) {
            verification = `Phone Verification`
        }
        return verification;
    }
    let inviteslogEmbed = new Discord.RichEmbed()
        .setTitle(`Invite Link was created by ${message.author.tag}`)
        .setThumbnail(message.guild.iconURL)
        .addField(`Server Name:`, message.guild.name)
        .addField(`Invite Code:`, `${invite.code}`)
        .addField(`Inviter:`, message.author)
        .addField(`Server ID:`, message.guild.id)
        .addField(`Server Channel:`, `${message.channel}`)
        .addField(`Server Invite:`, value =`[Click Here]()`)
        .addField('Verification Level:', verification_level(), true)
        .setColor(message.guild.member(client.user).displayHexColor)
    message.channel.send(inviteslogEmbed).catch(console.error);
}```
#

here my code

pallid zinc
#

Okk

slender thistle
#

And where do you want to get an invite from?

earnest phoenix
#

like its show you info about the invite code

slender thistle
#

What invite code

earnest phoenix
#

any invite code that you create

slender thistle
#

I guess pick a random one out of all guild invites

#

That will be more of basic js + read the docs thing

sacred bronze
#

Theres a <Guild>.fetchInvite() or something.

silent cloud
#

guys

#

now somebody can help?

#
    const args = msg.content.slice('*kick'.length).split(' ');
    let kUser = msg.guild.member(msg.mentions.users.first() || msg.guild.members.get(args[0]));
    if (!kUser) return msg.channel.send("Не могу найти человека!");
    if (!msg.member.hasPermission("KICK_MEMBERS")) return msg.channel.send("К сожалению у тебя не хватает прав друг!");
    if (kUser.hasPermission("MANAGE_MESSAGES")) return msg.channel.send("Этот человек не может быть кикнут!");
    let embed = new Discord.RichEmbed()
    .setTitle('')
    .setDescription('Это кик:anim_ban: \nЯ заметила, что кого-то кикнули!:anim_cat:')
    .addField("Кикнут человек:", `${kUser} с ID ${kUser.id}`)
    .addField("Кикнут человеком:", `<@${msg.author.id}> с ID ${msg.author.id}`)
    .addField("Кикнут в канале:", msg.channel)
    .addField("Время:", msg.createdAt)
    .setThumbnail('https://cdn.discordapp.com/attachments/463276215663591435/558748363143512086/IMG_20190322_222615.png')
    .setColor('0x2c69d3')
     const user = msg.mentions.users.first();
     const member = msg.guild.member(user);
     member.kick("Кикнут звёздочкой")
     msg.channel.send({embed})
     }```
#

i rly cant fix

silent cloud
#

ty

#

but

#

it doesn't work

#

again this error

west spoke
#

what lang

#

are you meaning to create a json file?

tardy shell
#

can anyone help me with discord bot? (python)

west spoke
#

ah

#

rewrite or not rewrite

covert turtleBOT
#

Dont ask to ask
Just ask your question
it wastes time if you say "i need help" or "can someone help me?" instead of just saying what the problem is. Save your time and other people's time by just asking the question.

west spoke
#

meh

lilac geyser
west spoke
#

good point

lilac geyser
#

do anyone of you meet this problem as well?

tardy shell
#

okay

#

when i try to make word logs

west spoke
#

AIOHTTP error i guess?

lilac geyser
#

or is that something on my side?

tardy shell
#

this is my script

west spoke
lilac geyser
#

aiohttp?

west spoke
#

my god do you even know how to do that @tardy shell

tardy shell
#

this is problem

west spoke
#

are you using file storage?

tardy shell
#

no?

west spoke
#

that would happen if you were using a file storage as your main method of doing it

tardy shell
#

when i type something then bot spams this message

west spoke
#

why tho

tardy shell
#

idk

#

this is problem

west spoke
#

if its added here you are gonna die

#

from spam

tardy shell
#

no

#

you can help me?

west spoke
#

idk

#

if i cant see all of your code, for that command i cannot help

tardy shell
#

@client.event
async def on_message(message):
channel = client.get_channel('559353981944725504')
await client.send_message(channel, f" {message.author} said {message.content}")

#

is my code

west spoke
#
@client.event
async def on_message(message):
    if message.content.startswith(''):
         channel = client.get_channel('559353981944725504')
         await client.send_message(channel, {message.author} + 'said' + {message.content})
#

try that

tardy shell
#

ok

#

nothing happens

ruby dust
#

I'm not gonna expose you the truth, but you should understand this yourself

#

on_message basically means do something when a message is sent, anywhere

west spoke
#

^

ruby dust
#

regardless of a channel, who sent it, where it was sent

west spoke
#

yuh

ruby dust
#

are you still not getting what is your issue?

tardy shell
#

no because im very starter of coding im using async

west spoke
#

mmm

ruby dust
#

then don't go straight to bots, learn the language first

west spoke
#

yeh

#

before i made my bot i made a small text-based game

#

using py

#

try that

ruby dust
#

my first project was a basic console calculator built in C#

west spoke
#

mm

#

i was working on a graphing calculator

#

now that i know pillow i can likely try to make a coordinate plane in it and actually do stuff

late hill
#

I want to stop people from automating commands.
I'd do this by having certain "suspicious users" verify being human.
Any ideas on how I could do this? 👀

west spoke
#

Like a capcha?

late hill
#

Yeh

west spoke
#

what lang

late hill
#

js

west spoke
#

look into some sort of image generation

#

or create a random number and text message (likely less secure than a imagee tho) and have the user have to respond with that

#

ill try to work on one, idk

#

but it'll be in python unfortunately

late hill
#

Yeh just making it a message they have to type

#

Would be simple to implement

west spoke
#

yeh

late hill
#

But a selfbot that listens for messages could still solve it

west spoke
#

mhm

#

so a image

slender thistle
#

@tardy shell Your on_message doesn't exclude bots

ruby dust
#

shivaco no

#

why

west spoke
#

oh

#

YEH WHY DELET

#

DEEELET

slender thistle
#

Let's see how far we can get with common sense

late hill
#

Maybe I'll just start with that

west spoke
#

a developer named Kanno did something similar to what you are trying to do in JS

late hill
#

Should already stop a lot of people

west spoke
#

lemme get what he made as it

late hill
#

👀

ruby dust
#

I already gave him a mood to learn python, no need to make him get used to being spoonfed

slender thistle
#

spoonfed*

ruby dust
#

whatever

west spoke
late hill
#

oh

west spoke
#

thats essentially what it was

#

a iteral capcha

#

but if its just numbers a bot may just have a script to add 1 to whatever number to get in

late hill
#

yeh

#

limited tries

west spoke
#

maybe

late hill
#

I tried searching for some kind of service I could use for it

#

But couldn't rly find anything helpful

west spoke
#

hmm

#

i know if you were using Python you could use Pillow

#

lemme look for a image creation thing

late hill
#

Preferably I'd just have something that returns a link to an image + the secret word on it

#

😐

slender thistle
#

PIL/Pillow not having async libs

#

sad

inner jewel
#

there's no benefit in making something CPU bound async

slender thistle
#

I guess using asyncio.run_in_executor is the only way at this point, eh?

soft plaza
#

anyone know why the dispatcher when i do .playSteam start than stops right after, the stream is valid and i get not error or debug info, i using discordjs

grim aspen
#

how much are you willing to pay?

west spoke
#

pfffff

grim aspen
#

jk i'm not making you one, please learn to code one

west spoke
#

just get galacticbot or sth