#development

1 messages ยท Page 346 of 1

compact cairn
#

...

#

O O F

compact cairn
#

Anyone know discord.js commando

#

?

prime cliff
#

Read the docs.....

pale light
#

@compact cairn it left out "!" because you didn't put the +

#

ยฏ_(ใƒ„)_/ยฏ

compact cairn
#

Wut

#

No not that

earnest phoenix
#

no

#

wrong

#

jk

#

idk

#

oof

#

use message.channel.send(`stuff ${roll}...`) idk if answered yet so k

#

@abstract mango OH ME GOODS NESS

#

d.py rewrite is great

#

JUST

#

python -m discord newbot --prefix ! --sharded bot-dir

smoky rampart
#

hot isn't it

earnest phoenix
#

I'm in love

#

@smoky rampart why aren't you in d.py guild

smoky rampart
#

don't care to be

earnest phoenix
#

but channel's ded

bronze mason
#

@fossil oxide The @worthy nova has a link that has expired.

earnest phoenix
#

@bronze mason What do you mean

bronze mason
earnest phoenix
#

And?

bronze mason
#

It's expired.

earnest phoenix
#

And?

#

Dont tag Oliy over stuff like that

#

Thats a bots game, its not our bot thus we dont care about it

#

If you want to tell someone about the invite being expired. go contact the owner of the bot

gilded plankBOT
#
Bot info
ID

346704840673722382

Username

Robot-Moderation

Discriminator

9533

Short Description

This is a super simple moderation bot.

Library

discord.js

Prefix

!

Upvotes

5

Server Count

No server count

Owner(s)

@zealous lantern
@vapid pivot

Links
fervent goblet
#

@earnest phoenix there IS no dpy guild

worldly steeple
#

is having full command documentation on discordbots.org sufficient for certification or would i need to make my own site?

rich kiln
#

you can leave it as N/A lol

worldly steeple
#

i did that last time and got rejected with Please add another form of documentation as well as your help commands xD

rich kiln
#

Thonk so add it to your boat page tho

worldly steeple
#

welp, submitted it again, we'll see how it goes
now to make a bot that asks if the mods have reviewed it yet every 30 mins

fervent goblet
#

rofl

earnest phoenix
#

@hasty hedge

#

#id

#

oh shit

earnest phoenix
#

I need someone

#

to check my bot..

#

I wait 4+ hours

languid dragon
#

nice, i've waited 4+ days jennie

#

join the patience party mmLol

earnest phoenix
#

How can i check if the authot upvoted for the bot or not

#

for example

north fog
#

pretty sure there is a api

earnest phoenix
#

...

lethal sun
#

lol

earnest phoenix
#

xD

lethal sun
#

use ๐Ÿ˜‚

earnest phoenix
#

i can't use ๐Ÿ˜‚

lethal sun
#

k

north fog
earnest phoenix
#

kk

#

thanks

north fog
#

np

earnest phoenix
#

is it for discord.js ?

north fog
#

just send a get request and read the responce

earnest phoenix
#

ok

lethal sun
#

SNACK-FETCH

#

๐Ÿ˜‚

earnest phoenix
#

-bots @lethal sun

gilded plankBOT
#
Vanished#3101
Bots

@lavish flax
@deft lily
@haughty radish

lethal sun
#

-.-

earnest phoenix
#

xD

lethal sun
#

don use ze cmd here

earnest phoenix
#

.

lethal sun
#

jk

earnest phoenix
#

_>

fervent goblet
#

discordfail

earnest phoenix
#

Iam dumb...
How can i send a request

#

_>

fervent goblet
#

rofl

lethal sun
#

snekfetch.get?

north fog
#

i know jquery, but not node.js

lethal sun
#

use snekfetch.get

#

i think that will help

tawny lava
#

I need a third monitor

#

but no desk space

#

gg

lethal sun
#

lol

#

gg

earnest phoenix
#

<_<

#

@merry yoke UNBLOCK ME KASDKAKSDNANSDLN

lethal sun
#

@tawny lava steal a 150 year old desk

earnest phoenix
#

HOW CAN I SEND A REQUEST

#

HA?

#

_>

lethal sun
#

snekfetch.get

#

i think

earnest phoenix
#

omgh

#

what da hell is dat

lethal sun
#

snekfetch

north fog
#

a lib

earnest phoenix
#

what da hell is dat

lethal sun
#

๐Ÿ˜„

earnest phoenix
#

oh

#

lol

#

xD

lethal sun
#

lmao

earnest phoenix
#

i use discord.js

#

..

lethal sun
#

yeh

earnest phoenix
#

ohh

#

nvm

#

๐Ÿคฆ

lethal sun
#

snekfetch is for js

#

lol

earnest phoenix
#

kkk

tawny lava
#

instead of answering with "what's that" google it

umbral pelican
#

snekfetch is a vegetable

earnest phoenix
#

GUYSD

lethal sun
#

lol

tawny lava
#

kek

hallow nimbus
#

-bots

gilded plankBOT
#
eliteeliteSeraTT#2255
Bots

@blissful gate

earnest phoenix
#

WHAT IS DAT

lethal sun
#

why

earnest phoenix
#

rip

lethal sun
#

do

#

people

#

use

#

-bots

gilded plankBOT
#
Vanished#3101
Bots

@lavish flax
@deft lily
@haughty radish

lethal sun
#

here

#

ugh

earnest phoenix
#

no

#

HELP

umbral pelican
#

no

north fog
#

just get request https://discordbots.org/api/bots/<BOT ID HERE>/votes

earnest phoenix
#

k

#

..

#

@thick gulch

lethal sun
#
var snack = snekfetch.get("https://discordbots.org/api/bots/<BOT ID HERE>/votes")```
earnest phoenix
#

...

#

ohh

north fog
#

there is your json responce with the people that have voted

earnest phoenix
#

NVM

#

guys iam dumb

north fog
#

we noticed

earnest phoenix
#

xD

lethal sun
#

yes

inner jewel
#

missing token

#

no token -> 401

earnest phoenix
#

-_-

lethal sun
#

hm lemme get my code

earnest phoenix
#

so.

#

if(!snack) return;

#

?

#

_>

#

Can someone check my bot?

#

no

#

xD

#

jk..

#

xD

#

I wait 5+ hours

#

i waited 1 month

#

:3

#

OMG

#

ok

#

there are a lof of bots

#

just wait

#

ok

#

:3

#

;D

#

ty

lethal sun
#

@earnest phoenix you just got one more hour to wait because you said staff to review ur bot

earnest phoenix
#

xD

north fog
#

@earnest phoenix my calculation is 10 hours + (Amount of bots before you in queue * 10 mins) + (Times asked to approve * 1 day) sometimes when people are really annoying about asking to get proved the 1 day turns to 1 year, and because of that it is over the limit of waiting time, your bot will get instant denied

earnest phoenix
#

@north fog HELP

#

so now

#

if(!snack) return msg.reply(You need to upvote for the bot.)

#

?

#

ok

#

ty

#

very much

#

_>

north fog
#

no,you need to read the json and look the if the id of the user is in the json

#

if you they have voted

#

if not they havent

earnest phoenix
#

wait what

lethal sun
#
 snekfetch.get(`https://discordbots.org/api/bots/BOTID/votes`)
 .set("Authorization", "DBLTOKEN") //Credit goes to Skweezi! wink```
#

that may work

earnest phoenix
#

what should i replace in "DBLTOKEN"?

north fog
#

ow yeah, forgot about the authorization header

lethal sun
#

YOUR DBL BOT TOKEN

earnest phoenix
#

OK

north fog
#

look at the bottem of the page

lethal sun
#

@median lintel there thanks โค

#

look up

earnest phoenix
#

wait what

north fog
#

examine https://discordbots.org/api/docs on the bottum of the page, you need to login to generate a DiscordBotList TOKEN (the token you need as authorization, because we cannot see who has voted on your bot, only the bots/people with the authorization token)

earnest phoenix
#

Ok..

#

Then.. ?

lethal sun
#

...

earnest phoenix
#

...

lethal sun
#

WOW

earnest phoenix
#

WOW

#

What

lethal sun
#

my visual studio was closed

#

and

earnest phoenix
#

THE

#

CODE

lethal sun
#

my rich presence was on

#

lmao

earnest phoenix
#

HOW CAN I USE RICH PRESENCE

#

IM THE ONLY ONE

#

who doesn't know

north fog
#

hacking discord

earnest phoenix
#

#Exposed

#

what

lethal sun
#

install a extension called vs-discord

#

then reload it and bam

earnest phoenix
#

kk

uncut slate
#

don't

#

vs-discord is a bad meme

earnest phoenix
#

omg

uncut slate
#

use Discord Presence instead

#

vs-discord fucks with registries

#

for no reason

earnest phoenix
#

WHAT ARE U TALKING ABOUT

uncut slate
#

someone just suggested vs-discord

#

don't use it

#

it sucks

#

bad meme

earnest phoenix
#

:rip:

#

@daring fjord

#

xD

#

@daring fjord

#

The first app?

lethal sun
#

im using Discord Presence i jus want to tell storm ze wrong and ze bad one

earnest phoenix
#

Bye

#

jk

#

:3

#

npm i vs-discord --save

#

xD

#

?

lethal sun
#

wow

#

just wow

earnest phoenix
#

Shoot

#

xD

lethal sun
#

i want to quit but eh

uncut slate
#

it's a vscode plugin

earnest phoenix
#

ok bye

uncut slate
#

and, again, don't use vs-discord

earnest phoenix
#

and, again, i'll use it!

lethal sun
#

WOW

earnest phoenix
#

WHAT

lethal sun
#

go away @earnest phoenix

#

smh

earnest phoenix
#

PowerPoint?

lethal sun
#

ok imma go back to my chamber and eat bread and jam

#

bye

earnest phoenix
#

omg

#

strange boy/girl

neon pasture
#

Lol

earnest phoenix
#

CUTE

lethal sun
#

dont mind me watching you on your computer trying to install a vs-discord npm package

earnest phoenix
#

wait what

#

WHAT DOES THAT MEAN?

#

Oliyyy

#

BRUH

#

DONME

#

I GOT IT

#

:3

#

ok

#

wut

earnest phoenix
#

i need help

#

my bot has mute, ban, and kick and my bot cannot do any of those

languid dragon
#

what lib

earnest phoenix
#

discord.js

languid dragon
#

show code

earnest phoenix
#

const {RichEmbed} = require('discord.js');
const {caseNumber} = require('../util/caseNumber.js');
const {parseUser} = require('../util/parseUser.js');
const settings = require('../settings.json');
exports.run = async (client, message, args) => {
const user = message.mentions.users.first();
parseUser(message, user);
const modlog = client.channels.find('name', 'mod-log');
const caseNum = await caseNumber(client, modlog);
if (!modlog) return message.reply('I cannot find a mod-log channel');
if (message.mentions.users.size < 1) return message.reply('You must mention someone to ban them.').catch(console.error);
// message.guild.ban(user, 2);

const reason = args.splice(1, args.length).join(' ') || Awaiting moderator's input. Use ${settings.prefix}reason ${caseNum} <reason>.;
const embed = new RichEmbed()
.setColor(0x00AE86)
.setTimestamp()
.setDescription(**Action:** Ban/n**Target:** ${user.tag}\n**Moderator:** ${message.author.tag}\n**Reason:** ${reason})
.setFooter(Case ${caseNum});
return client.channels.get(modlog.id).send({embed});
};

exports.conf = {
enabled: true,
guildOnly: false,
aliases: [],
permLevel: 2
};

exports.help = {
name: 'ban',
description: 'Bans the mentioned user.',
usage: 'ban [mention] [reason]'
};

languid dragon
#

uh

#

i cant even read that ngl

earnest phoenix
#

?

languid dragon
#

try wrapping it in this
```JS

#

for example
```JS
code = goes.here;
```

    code = goes.here;
earnest phoenix
#

to were?

languid dragon
#

around the code you sent

glossy sand
#

well as far as I can tell, you have the line message.guild.ban(user, 2) commented out

#

which, you know, means it never gets executed

earnest phoenix
#

and how to make bot online 24/7

inner jewel
#

get a vps

earnest phoenix
#

my bots console just spamming (node:14212) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 18): DiscordAPIError: Missing Access

glossy sand
#

well obviously your bot doesn't have permission to do something

#

and presumably you're trying to run that process in a loop somewhere, which you shouldn't be doing

earnest phoenix
#

!ban @earnest phoenix
securityBOT - tรคnรครคn klo 18.16
(muokattu)
Action: Ban/nTarget: Hiiva#0173
Moderator: ItzKissaz | Finprison.net#4794
Reason: ei vittu kiinosta
Case 3

#

sori

#

๐Ÿ˜„

#

unohin ottaa ton @ jutun pois

#

Channel for chatting about bot development. If you have questions, ask the questions and wait for someone who can answer to help you. Do not ask to ask. Provide all possible information so people know what's up. Just saying "I get an error" doesn't give us enough information on your problem. Do not @mention people randomly.

#

Do not @mention people randomly.

#

sori

#

.

neat falcon
#
    "1": {
        "number": "1",
        "title": "test",
        "synopsis": "test"
    },
    "2": {
        "number": "1",
        "title": "",
        "synopsis": ""
    }
}```

how 2 fix ma json
sinful meadow
#

looks fine to me

neat falcon
#

TypeError: Cannot read property 'title' of undefined

#

.setTitle(einfo[1].title)

#

einfo = const einfo = require("./modules/episodeinfo.json");

#

that's the error i am getting

#

i want to be able to grab episode info from a file

#

for each episode

#

of something

sinful meadow
#

looks fine to me

neat falcon
#

what about my code?

something must be wrong

#

exports.run = (client, msg, args, einfo) => {
    let episode = args.slice(0).join(" ")
    if (!args[0]) { return msg.channel.send(":x: Sorry, but you must specify an episode to search for.") }
    msg.channel.send("", { embed: new Discord.RichEmbed().setTitle(einfo[1].title).setColor("#00D4FF").setDescription("**Description**\n" + einfo[1].synopsis).setFooter("Information sourced from love-live.wikia.com") });
}```

this is the full command
sinful meadow
#

Try giving it a actual string instead of ""

neat falcon
#

ok, how?

#

i don't really know much JSON

sinful meadow
#

1 sec

#
{
    "1": {
        "number": "1",
        "title": "test",
        "synopsis": "test",
    },
    "2": {
        "number": "1",
        "title": "test",
        "synopsis": "test"
    }
}
#

Try that

neat falcon
#

Same error

sinful meadow
#

hmmmmmmmmmmm

#

i dont know

neat falcon
#

looks like i'll need to do this manually

#

if episode = whatever send this

jagged plume
#

it should be einfo[โ€œ1โ€] because you set it to a string

#

?

earnest phoenix
#

@neat falcon um

#

don't use it like that

#
[
    {
        "number": "1",
        "title": "test",
        "synopsis": "test",
    },
    {
        "number": "1",
        "title": "test",
        "synopsis": "test"
    }
]```

Use this code, and use `einfo[0].title` to get the title from the first object
#

the reason yours wasn't working is because the first index was "1" which is a string, but you were trying a number 1

neon pasture
#

Only the first ] need to be [

earnest phoenix
#

oops

#

fixed

neon pasture
#

And that looks way cleaner

earnest phoenix
#

yea

neon pasture
#

I always do it like that too

earnest phoenix
#

yup

#

setting increasing numbers as the key looks derpy

thorny hinge
#

ohlookitsderpy ๐Ÿ‘€

earnest phoenix
#

Hey guys?

#

My code isnt working as it should be

#

When, I see nothing wrong at all

#

Does anybody know why it may not be working?

#
else if (message.content.startsWith('---shutdown') && !message.author.id === '376147022660632587') {
        message.channel.send('Only the bot owner may use this command!')
    }
#

Theres more but this is the part that doesnt work

#

For some odd reason

cosmic plover
#

!== btw

earnest phoenix
#

Oh, I thought it was the same as !expression

cosmic plover
#

no idea in JS

#

but it's generally a better practice

earnest phoenix
#

๐Ÿ‘

cosmic plover
#

also, why don't you do this

inner jewel
#

!(x === y)

#

isn't the same as !x === y

earnest phoenix
#

Ik

inner jewel
#

second one negates x and then compares

#

first one negates after comparing

earnest phoenix
#

That isnt what

#

???

inner jewel
#

!x === y

cosmic plover
#
if(message.content.startsWith("---shutdown") {
    if(message.author.id !== '376147022660632587') {
         message.channel.send('Only the bot owner may use this command!')
        return
    }

    //handle shutdown command for owner
}```
inner jewel
#

is the same as

earnest phoenix
#

Ik ik

inner jewel
#

(!x) === (y)

earnest phoenix
#

@cosmic plover Well that would work too

inner jewel
#

and js allows you to negate anything

#

because it's a retarded lang

cosmic plover
#

would be cleaner

#

than checking twice if the message starts with ---shutdown

earnest phoenix
#

But isnt that the same as using &&?

#

Ill try it tho

cosmic plover
#

yes but you're checking for that

#

and then checking again if it starts with shutdown for you

#

xD

#

which is kinda wasteful and unclean

earnest phoenix
#

Okay

#

Wait yea why

#

Its still not working

#

The console shows no errors

#

It just doesnt run ๐Ÿ˜

#

And according to the rules of javascript it should be working

#

So im just rlly confused

#

Heres my full code

#
let exit;

function exitProcess() {
    exit = client.setTimeout(exitProcessMain, 3000)
}
function exitProcessMain() {
    process.exit(1);
}
client.on("message", (message) => {
    if (message.content === '---shutdown' && message.author.id === '376147022660632587') {
        message.channel.send('Shutting down!')
        client.destroy();
        exitProcess();
    } else if (message.content.startsWith('---shutdown')) {
        if (!message.author.id === '376147022660632587') {
           message.channel.send('Only the bot owner may use this command!') ;
        }
    }
});
#

No

#

That is not how JS works

#

you can only use ! to negate a boolean or force negate a variable

#

You must use !== instead of !x === y

#

@earnest phoenix

#

You should really learn JS before making a bot

#

also why do you have useless exitProcessMain functions?

#

Trying to use ! on any string will return false

#

@earnest phoenix Thing is

cosmic plover
#

told you to use !==

earnest phoenix
#

I did that

cosmic plover
#

did you REALLY not listen to me

#

xDD

earnest phoenix
#

Still didnt work

#

:/

#

Plus I know that and because I want a delay

#

Also I know javascript and I tried both ways

cosmic plover
#

also that check is horrible

earnest phoenix
#

^

cosmic plover
#

I literally gave you one 1000% cleaner

earnest phoenix
#

^

#

listen to Kodehawa

#

seriously

#

Your the one who-

#

Okay im done

#

Lol

#

You're just ignoring him

cosmic plover
earnest phoenix
#

or her, can't assume

cosmic plover
#

specially for ya'

earnest phoenix
#

Yea

#

Watch that

#

I do know javascript ๐Ÿคฆ

#

Instead of mocking me

#

do you really?

#

jk

#

It would be useful

#

Okay wait

#

I wanna hear dis

cosmic plover
earnest phoenix
#

Why do you think this isnt working?

cosmic plover
#

@earnest phoenix

earnest phoenix
#

lel

#

! of a string is always false even if the string is "false"

#

Yes, ik

cosmic plover
#

I WROTE A CHECK FOR YOU Q~Q

earnest phoenix
#

So, if the string is false

#

Do something

#

oml

#

Which still doesnt work

cosmic plover
#

oh my god

#

OH MY GOD SHOOT ME

earnest phoenix
#

Kodehawa wrote a great example

#

I think, let me scroll up

#

Yes

#

use that

inner jewel
#

reporting for self harm

earnest phoenix
#

report button where? thanks stable

cosmic plover
#

same

earnest phoenix
#

I don't even think it's on Canary yet, is it?

cosmic plover
#

nope

#

only for some users

earnest phoenix
#

oof

#

This already doesnt work

cosmic plover
#

u dont work

inner jewel
#

it's on A/B testing

earnest phoenix
#

Before I even run this

#

The string isnt highlighting

cosmic plover
#

LKSDKFJSDLFKJSDF

earnest phoenix
#

None of the methods are either

#

oh I see

#

error

#

missing )

#
if (message.content.startsWith("---shutdown")) {
    if (message.author.id !== '376147022660632587') return message.channel.send('Only the bot owner may use this command!');
    // handle shutdown command for owner
}```
#

there have fun

#

Hm

#

Okay yeah

#

Imma try to run dis

cosmic plover
#

lmao

earnest phoenix
#

That is literally the same thing Kodehawa posted, but with a fixed )

#

and moved the return to in-line with if statement

#

Oh I see!

#

I thought I might have needed a return

#

๐Ÿคฆ

cosmic plover
#

o my

earnest phoenix
#

But I thought against it

#

No

#

you didn't really

#

The code has a return

#

but it's just simplier

#

But okay

#

Wait

#

Honestly you don't need return, it just reduces the amount of else in your code

#

But this-

#

This is the exact same code but with a return

#

well it works the same

#

but improved

#

Okay

#

also I fixed a bug

cosmic plover
#

it's less ugly

earnest phoenix
#

But then

#

If this is the exact same code

#

Yes

#

But with a return

#

Then why wasnt it working before ๐Ÿ˜

#

prob because you did something wrong

#

a bug

#

we don't know, you never posted an error

#

:/

#

There was no error

#

Well you weren't comparing properly

#

that's why

#

But i've used that multiple times ๐Ÿ˜

#

And its worked ๐Ÿ˜

#

Well it shouldn't of

#

Example

#
} else if (!message.member.hasPermission("MANAGE_GUILD")) {
#

This works

#

Yeah, because .hasPermission returns a boolean

#

๐Ÿคฆ

#

Oh how interesting

cosmic plover
#

LOL

earnest phoenix
#

I do know js

#

Okay well thank you for clarifying that

#

np

#

Im just gonna use !== from now on

#

good

cosmic plover
#

good

#

pat pat

earnest phoenix
#

hug

#

jk

wanton plover
#

Is there a easy way to test sharding, like be sure that 2 servers are on different shards?

sinful meadow
#

Not that i know of

wanton plover
#

hmm, just threw a higher number than what I would be and it worked. Was easier than I was thinking

hushed berry
#

@wanton plover you can run the calculations that Discord does to determine which shard each guild is assigned to

#

I'm kinda late tho

#

(guild_id >> 22) % num_shards == shard_id

shrewd field
#

Can someone help

#

Error js ]: /app/bot.js:4632017-11-28T13:36:07.462340+00:00 app[worker.1]: } {2017-11-28T13:36:07.462342+00:00 app[worker.1]: ^2017-11-28T13:36:07.462342+00:00 app[worker.1]: 2017-11-28T13:36:07.462350+00:00 app[worker.1]: SyntaxError: Missing catch or finally after try

#

Code
permissions: [] }); } { catch(err) } }

languid dragon
#

try{

}catch(e){

}

inner jewel
#

^

stone kiln
#

^

shrewd field
#

Ok

#

Like this

#
     });

       } {
            catch(err)
     }```
#

Like this correct

languid dragon
stone kiln
#
try{
    // some code here
}catch(e){
    // OOF WEW NO!
}```
shrewd field
#

Ohh

#

Like this js } catch(err){ }

languid dragon
#

probably

shrewd field
#

Hey

#

Do I need the }) ; before the } before catch

stone kiln
#

...

inner jewel
#

..

shrewd field
#
});
} catch(err) {

}```
inner jewel
#

no

#

it's catch not CATCH

shrewd field
#

Correct now

stone kiln
#

...

shrewd field
#

Yes. Or no

stone kiln
#

NOOOOOOOOOOOOOOOO

languid dragon
#

we cant see what ur doing lmfao

inner jewel
#

the catch part yes

languid dragon
#

you've posted the tiniest amount of code

stone kiln
#

^

inner jewel
#

the }); depends on what's before

languid dragon
#

how are we supposed to read it at all?

shrewd field
#

OK I will post more

inner jewel
#

we don't have a crystal ball to guess what your code is

shrewd field
#
let role = message.guild.roles.find("name" , "Muted");
     if(!role) {
       try {
         role = message.guild.createRole({
           name: "Muted",
           color: "#000000",
           permissions: []
         });

       } catch(err){
     } ```
languid dragon
#
let role = message.guild.roles.find("name" , "Muted");
     if(!role) {
       try {
         role = message.guild.createRole({
           name: "Muted",
           color: "#000000",
           permissions: []
         });
       }catch(err){
        // handle "err" here
       }
     } 
stone kiln
#
<HTML>

<HEAD>
<SCRIPT LANGUAGE = "Javascript">
document.firstline = "Welcome to this page"
</SCRIPT>
<TITLE>some test</TITLE>
</HEAD>

<BODY>
<SCRIPT>
document.open()
document.write(document.firstline)
document.open()
</SCRIPT>

</BODY>
</HTML>```
Ken do you think i did this correct?
shrewd field
#

What is handle. Err here for

neon pasture
#

dude

#

<script>
</body>

#

Do it like that

languid dragon
#

uhhhhhh

#

what r u doin

shrewd field
#

Ken

languid dragon
#

just console.log(err)

shrewd field
#

In handle err here what do I put

#

Ok

neon pasture
#

Are you making a site?

stone kiln
#

log stuff to a document

neon pasture
#

with html?

stone kiln
#

local stuff

#

wanted to test something

inner jewel
#

document = null

languid dragon
#

r u trolling with that html or r u being real

neon pasture
#

he's for real

languid dragon
#

aaaaaa

neon pasture
#

Those caps are ugly AF

languid dragon
#

why are you trying to use javascript to write things

#
<html>
    <head>
        <title>Website title</title>
        <script>
            // ur website-based javascript
        </script>
        <style>
            /* ur website-based styling */
        </style>
    </head>
    <body>
        <header>
            <h1>Nice header boi</h1>
        </header>
        <main>
            <section></section>
        </main>
        <footer>
            nice footer, nerd
        </footer>
    </body>
</html>
#

@stone kiln

shrewd field
#

Hey

#

I don't understand

languid dragon
neon pasture
#

To post your guild count to the site

#

Ken, oeff

shrewd field
#

What guild count

neon pasture
#

nice html5 tags

shrewd field
#

Like

neon pasture
#

Your fucking server count dumbo

languid dragon
#

this

neon pasture
#

Btw ken

shrewd field
#

Ok

#

How

neon pasture
#

Pick one

#

and your done

inner jewel
#

there are like

#

15 different js examples

#

ready for copy pasting

shrewd field
#

So I put them in my cod

#

Code

#

What they do

languid dragon
#

what do they do?

#

I WONDER???

shrewd field
#

If your bot isn't there

#

Will it work

inner jewel
#

ofc not

neon pasture
#

LOL

shrewd field
#

Ok

neon pasture
#

Just wondering, how old are you @shrewd field

shrewd field
#

Why

neon pasture
#

Just wondering

shrewd field
#

Am I acting weirdly

#

And guess a age

neon pasture
#

14

shrewd field
#

Nope

cosmic plover
#

12

shrewd field
#

Nope

neon pasture
#

13

shrewd field
#

Far

neon pasture
#

11

cosmic plover
#

7

neon pasture
#

10?

languid dragon
#

4?

cosmic plover
stone kiln
#

@languid dragon nah mate was just a joke

cosmic plover
#

Do us a lil favor

languid dragon
#

ok good

#

i panicked

cosmic plover
#

and maybe a favor to yourself

languid dragon
#

i was about 2 slap you @stone kiln

neon pasture
#

lol

#

Ken, you are a good boy. Using html5 tags ๐Ÿ˜›

stone kiln
#

My real code is way better

neon pasture
#

umm.

stone kiln
#

Auto updates from private repo mmLol

tawny lava
#

he's 5

quiet bobcat
#

im 5

smoky rampart
#

67

slim solar
#

Hu

#

Can i help me ?

languid dragon
#

What lib?

umbral pelican
#

"can I help me" thonk

slim solar
#

@languid dragon Discord.js

tawny lava
#

yes, you can help you

languid dragon
#
client.user.setPresence(/*presence data here*/);

https://discord.js.org/#/docs/main/stable/typedef/PresenceData

umbral pelican
#

you need master for watching/listening to in d.js

slim solar
#

@languid dragon no for

languid dragon
#

?

slim solar
languid dragon
slim solar
#

@umbral pelican can help me for master xd?

neat falcon
#

@earnest phoenix thanksโ„ข coding this is gonna be easier now kek

sinful meadow
#

@slim solar what do u need help with

earnest phoenix
#

How do I check if a string is inside a list in JavaScript (discord.js)

#

I can't figure it out Thonk

prime cliff
#

Aint you the guy with the bot that has been denied and kicked multiple time for lots of stuff Manock ๐Ÿ‘€

sinful meadow
#

ARRAY.includes("shit") @earnest phoenix

earnest phoenix
#

Thanks ๐Ÿ˜„

neon pasture
#

Give me a few seconds

sinful meadow
#

Do mw a favor @slim solar

#

Me*

#

Go into general and search tyye: 0

#

Donut types how to do it last night

#

Donut types how to do it last night

neon pasture
#

never mind

sinful meadow
#

Yes it ia atop lying @neon pasture

#

Stop*

neon pasture
#

Dude sorry

#

Didn't knew you where going to cry

sinful meadow
#

Im not lmao

#

Mess with that number

neon pasture
#

type: 0 is playing

#

type: 1 is steaming

sinful meadow
#

We aint going to spoon feed u

neon pasture
#

I don't fucking know

#

Do something by yourself please

#

just play with that number.

slim solar
#

@ripe harbor

neon pasture
#

muted LOL

earnest phoenix
prime cliff
#

Yea that bot has been doing some bad stuff

#

Lots of modlogs

neon pasture
#

bad stuff like?

sinful meadow
#

He used a selfbot to act like he did nothing @neon pasture

neon pasture
#

lol

sinful meadow
#

He deleted his messages

#

Hahhahaha

neon pasture
#

With his selfbot

sinful meadow
#

Yep

earnest phoenix
#

Does he not realise that everything is basically logged

neon pasture
#

Stealing code, not going to help him anymore

sinful meadow
#

Yep same

earnest phoenix
#

I really love this server lmao

sinful meadow
#

๐Ÿ˜›

earnest phoenix
#

I basically abandoned my friend just now cause I was so exited of seeing soo many people that knew code

prime cliff
#

I know html

quiet bobcat
#

I don't know html

prime cliff
#

:3

sinful meadow
#

Normally the servers nice just don't get on people's bad sides or else you might get banned or muted @earnest phoenix

earnest phoenix
#

I'm basically a 14 year old programming student, that does python in school, and since it was so basic and my mind was much more advanced than the shit we're doing there, I decided to start in C# and JavaScript, and made bots in both of them

sinful meadow
#

Unless you want to be a sarcastic f*** like me and then everybody just hates me ๐Ÿ˜‚๐Ÿ˜‚

quiet bobcat
#

How do I add timestamps to console logs?

earnest phoenix
#

Now I'm here

#

backstory ^

quiet bobcat
#

js and d.js

prime cliff
#

Oh cool

#

I guess you have listed a bot here?

earnest phoenix
#

I do, yes

#

Everyone I know loves it lol

#

I made it really sarcastic

sinful meadow
#

let f = new Date()
console.log(f) @quiet bobcat

earnest phoenix
#

I'm having trouble with getting thumbnails to work in embeds

quiet bobcat
#

Thank you Zambia

sinful meadow
#

Np

#

Yea thumbnails are weird with embeds @earnest phoenix

earnest phoenix
#

Like, nothing works

#

๐Ÿคฃ

tawny lava
#

nice comment

sinful meadow
#

You put a link

earnest phoenix
#

How do you get that though

#

cause something like discorduser.avatarURL won't work for me

sinful meadow
#

Idk a link of a image or something

languid dragon
earnest phoenix
#

I tried clearing space with fields, doesn't work either

sinful meadow
#

Ive been working on a new bot command

earnest phoenix
#

How would you get it to be a picture of a discord user though

sinful meadow
#

Im a bot

tawny geode
#

hi bot

#

im dad

fervent goblet
#

Hey dwad

cerulean osprey
#

Hey guys, how would I have my page on discordbots.org show my bot as online?

prime cliff
#

@cerulean osprey It already does that?

sinful meadow
#

Yea it does

#

lmao

cerulean osprey
#

But it's not tho. There are just a bunch of ??? where it should be

sinful meadow
#

site might be down

#

or API

prime cliff
#

Then the bot isnt in here?

#

Which bot?

cerulean osprey
#

Oh, my bot was kicked. I didn't know having it in here was a requirement to show it as online

prime cliff
sinful meadow
#

on the page it says online

cerulean osprey
#

Ya, like I said I just didn't know it was a requirement. It was kicked last time due to it dming people upon entry. I'll just code an exception for this server and ask to have it added back.

prime cliff
#

Oh

cerulean osprey
#

Thanks for letting me know

warm gate
#

Hmm

#

.png

#

:D

earnest phoenix
#

How can I check if a string is a number in JavaScript? Please @mention me if you answer.

sinful meadow
#

@earnest phoenix you can do this

#

if(isNaN(VALUE)) { do some shit } else { do other shit }

earnest phoenix
#

Thanks man ๐Ÿ‘

sinful meadow
#

Np

#

@earnest phoenix Add me if you need anyhelp just message me

earnest phoenix
#

Sure, thanks for your help

sinful meadow
#

Np

inner jewel
#

commando

#

commando

#

there's your error

#

missing an =

#

yes

#

a = b sets the value of a to b

#

a == b compares a to b

thorny hinge
#

=== is ideal

white acorn
#

better?

warm canopy
#

I have a question

#

So, can you do commands but instead of doing a mention you can just type their username?

#

I'm using discord.js

crisp warren
#

works with username+discrim

warm canopy
#

Erm how would you do that?

crisp warren
#

or

#

Guild.members.find()

warm canopy
#

ok thanks!

crisp warren
#

yw

sinful meadow
#

tf is message.delete.bind(message)

#

Ive never saw that

earnest phoenix
#

@warm canopy Members don't have the .username property iirc

#

you must use guilds.members.filter(m => m.user.username.toLowerCase() === search.toLowerCase()) which will return a collection

warm canopy
#

ty

earnest phoenix
#

np

woven birch
#

How do I have my bot token be read from a file so it won't show on github?

glossy sand
#

google "reading strings from a file <lang>"

woven birch
#

thx

earnest phoenix
#

@woven birch Or you can use environment variables...

#

that would work a lot better, because you wouldn't need to read anything

#

it's native in Node

#

process.env.DBL_TOKEN

#

env DBL_TOKEN = "my awesome token" in console.

#

put that in your .bash_profile somewhere

#

(If you use Node.js, by the way)

lethal hamlet
restive silo
#

you disable redirect url on that bot account

bitter sundial
#

either add a redirect uri or just have scope bot

neon pasture
#
 object = JSON.parse(json, true);```, what's wrong with JSON.parse?
fervent goblet
#

Dont parse it

#

It's turned into a js object automatically

neon pasture
#

ayy, thanks

uncut slate
#

var in 2017

thorny hinge
#

var is life

#

var is love

languid dragon
#

let var die

uncut slate
#

var constantly reminds me of old farts

stone kiln
earnest phoenix
#

@slim solar

vital lark
#

yes Senpai

scenic crest
#

@earnest phoenix ask your questions here

earnest phoenix
#

k

#

do you guys know of any clouds

#

to rn a bot simotaniusly

umbral pelican
tawny lava
#

Wot

earnest phoenix
#

@earnest phoenix look at OVH

#

Also, it's called a VPS

#

whats OVH?

#

oh

#

A company

#

He wants free

#

lmao

#

lamo my ass

#

lamo

umbral pelican
#

are you assuming their gender thonkangEyes

tawny lava
#

Yes

earnest phoenix
#

Lol

daring charm
#

Why do people recommend OVH instead of say, Hostgator or Vultr?

formal hatch
#

hey so i'm helpin someone make an automated answering bot for discordtel aand uhh i can't figure out how to use awaitMessages GWchadThonkery

tawny lava
#

collected.first()

formal hatch
#

oh

tawny lava
#

hmm

umbral pelican
#

awaitMessages returns a promise

formal hatch
#

yep

#

waait i just realised

tawny lava
#

oh ye

#

forgot about that kek

formal hatch
#

i don't even need that if statement

#

since awaitmessages would do the job for me

#

ok but then it instantly avoids the awaitmessages and then just sends it anyway

umbral pelican
#

awaitMessages returns a promise

formal hatch
#

yes...

#

OK then.. let's try this

umbral pelican
formal hatch
#

i really don't understand awaits and asyncs GWchadThonkery

umbral pelican
#

await can only be used inside an async function

formal hatch
#

OH

umbral pelican
#

not near one

formal hatch
#

again GWchadMEGATHINK

umbral pelican
#

send returns a promise as well, and you've got max set to 1 for the awaitMessages

formal hatch
#

ah

umbral pelican
#

the order it's likely executing in:

  1. send message
  2. awaitMessages
  3. message actually sent
#

you just need to read up on promises tbh

earnest phoenix
#

@daring charm because OVH is high quality and has good support

#

No one uses Hostgator

young cradle
#

OVH

#

quality

#

o no

earnest phoenix
#

Yes

#

Quality

daring charm
#

Well, I would say that the OVH website is poorly designed really, got a VPS during the black Friday sale and it was quite unintuitive to navigate the website. Vultr and Hostgator seem to be much better designed according to reviews. GWbowsuBlobThonkeng

#

I am not saying that the OVH servers are bad, just a poorly designed website.
The server is fine and running great.

steel shoal
#
      client.reload(command)
#

who can help me out

#

thats not a function it saids

umbral pelican
#

because it's probably not?

#

unless you added it

steel shoal
#

haha ik

#

here sec

tawny lava
#

you need to create the function yourself

steel shoal
#

: TypeError: client.reload is not a function

#

i did

thorny hinge
#

It's not a function

tawny lava
#

you need to create the function yourself

thorny hinge
#

^

#

Are you trying to use a command handler or something?

steel shoal
#

yes

thorny hinge
#

Which one

steel shoal
#

but all the commands are working but this one wont work ๐Ÿ˜…

#
exports.run = (client, message, args) => {
thorny hinge
#

uh

#

Idiots guide?

steel shoal
#

yes

thorny hinge
#

well thats not how you reload commands

#

The idiots guide actually says how

#

Lmao

steel shoal
#

haha

#

i take a look

thorny hinge
#

:+1:

ornate shadow
#

it seems I can't store discord emojis in a mysql VARCHAR ๐Ÿ˜• instead of :smile: it stores ????

#

any ideas?

thorny hinge
#

Try the unicode?

#

๐Ÿ˜„

smoky rampart
#

\๐Ÿ˜„

#

crazy

#

\๐Ÿค”

thorny hinge
#

๐Ÿ˜„

#

ree

#

\๐Ÿ˜„

#

aha

smoky rampart
#

\๐Ÿถ

ornate shadow
#

try the unicode? what?

#

๐Ÿคฆ

smoky rampart
#

\๐Ÿคฆ

#

unicode bro

#

it's like

#

something you should learn about

ornate shadow
#

I just tried converting from utf8 to utf8mb4 and it still doesn't work

#

don't tell me about unicode O_o

#

"bro"

#

it's like saying

#

"try using characters"

#

"try breathing air instead of... air"

#

I asked for help not for trolling

earnest phoenix
#
client.user.setPresence({status:"idle"})``` isn't working.. any idea why?
thorny hinge
#

Uh client.user.setStatus("idle")

#

@earnest phoenix

ornate shadow
#

it was a node js problem and I used the emoji-text package to fix it

sinful meadow
#

You know you could have used the unicode lmfao @ornate shadow

ornate shadow
#
let string1 = message.content.slice(13 + BotSettings.prefix.length);

this was my code. how could I "use the unicode"?

sinful meadow
#
\:smile: 
#

DO what i did there

#

and you get the unicode

old badge
#

when someone joins how do i find out if they're online, dnd, so on?

ornate shadow
#

and if the user types in

<3greeter join welcome! :smile:

?

old badge
#

using discord.js

sinful meadow
#

member.presence @old badge

old badge
#

will that give me something like online, idle, etc?

sinful meadow
#

Yea

ornate shadow
#

that's how you use my bot to set up the welcoming message

#

the administrator will never use the backslash or w/e

old badge
#

alright ty

inner jewel
#

@ornate shadow discord replaces :emojiname: with the raw unicode

ornate shadow
#

it doesn't seem like it because when I was console.log-ing the string I would get two question mark "blocks" instead of the raw unicode @inner jewel

#

it may be so if your OS is windows and not debian based

inner jewel
#

what discord sends doesn't matter on the os lol

old badge
#

\๐Ÿ˜„

ornate shadow
#

it may be true ๐Ÿ˜•

old badge
#

unicode emojis are ew

ornate shadow
#

I read somewhere that it depends on your OS how your terminal perceives the unicode

#

anyway it didn't work. now it works cuz I used emoji-text package

inner jewel
#

how they're displayed depends on the OS

ornate shadow
#

it had nothing to do with mysql (first I thought it had)

inner jewel
#

but the actual text is the same

ornate shadow
#

hmm then why did mysql perceive it as 4 question marks instead of the raw unicode? I tried using utf8 and utf8mb4

#

it may be a flaw on my part though

sinful meadow
#

in mysql i think you have to use VARCHAR

inner jewel
#

some emoji are 4 bytes

ornate shadow
#

I used VARCHAR...

inner jewel
#

1 char -> 2 bytes

old badge
#

in new discord.js, is it new Discord.RichEmbed() or new Discord.MessageEmbed()? someone said it changed to the latter

sinful meadow
#

Nope

#

new Discord.RichEmbed()

old badge
#

alright ty

ornate shadow
#

so I guess mysql stored it as a 4 byte emoji

#

cuz 4 question marks

#

so it didn't take it as raw unicode afterall

#

again

thorny hinge
#

RichEmbed will be changed to MessageEmbed

#

Its already changed on master

sinful meadow
#

@thorny hinge Your joking right?

#

RIP ALL MY CODE

thorny hinge
#

I'm not joking

sinful meadow
#

FUUUUUUUUCK

inner jewel
#

find and replace

#

profit