#development

1 messages ยท Page 322 of 1

bitter sundial
jagged plume
#

^

bitter sundial
#

knowing how to HTTP POST is pretty useful

earnest phoenix
#
Updated DBL
Updated DBL
Updated DBL
Updated DBL
Updated DBL
Updated DBL
Updated DBL
Updated DBL
Updated DBL
Updated DBL
Updated DBL
Updated DBL
Updated DBL

So much for spam then

karmic parcel
#

You're on an old version of that bte

#

Btw

#

The wrapper

earnest phoenix
#

Ok

karmic parcel
#

I took over that project and updated it

earnest phoenix
#

Well I don't really understand it that well.

#

First time having to do anything with API for a bot list

bitter sundial
#

whats with the spam

karmic parcel
#

It's really not bad. I take it you don't have much experience with APIs in general?

earnest phoenix
#

This is the first time I've ever started doing anything with Discord. I'm just learning as I go along

bitter sundial
#

but do you have experience with any REST API

karmic parcel
#

I doubt it

bitter sundial
#

or is this your first as well

earnest phoenix
#

No, yes

#

I feel a slight of "triggering"

karmic parcel
#

I don't see why we'd be triggered for you being new at this

#

You could have just lied and tried to make it seem like you were a pro but actually had no clue. I would have actually been triggered then lol

uncut slate
#

mhm

earnest phoenix
#

I have that feeling because of Discord API I see people get pissed when someone new to Discord asks for help

karmic parcel
#

Well, the wrapper was made for new people or people who didn't feel like writing the code themselves. I personally prefer writing my own requests but eventually you'll do it so much you'll basically write your own wrapper anyways

earnest phoenix
#

I just envy the people who can do this shit

karmic parcel
#

We all started somewhere

earnest phoenix
#

I'm sooner or later going to stop Discord coding. I'm going to be doing Game Development as a Career

karmic parcel
#

They can go hand in hand

bitter sundial
#

games in discord

earnest phoenix
#

lol

bitter sundial
#

gamebridge SDK

karmic parcel
#

And with the game bridge sd

#

Ya

#

Lol

bitter sundial
#

but thats a good goal

#

just gotta start somewhere

earnest phoenix
karmic parcel
#

UE 5?

earnest phoenix
#

4

#

I did the most of the tutorial and I got some of it working

#

lol

karmic parcel
#

Lol, I messed around with Unity. I downloaded a free menu asset and their logic was wrong so it didn't work right blobjoy

#

I had to fix it

earnest phoenix
#

I actually remade pong on Unity

#

It was the most cancerous thing ever

#

It's probably the most attention I've ever gotten

#

I got GameJolt API working so I guess I've done some API stuff

bitter sundial
#

API

#

but not REST

earnest phoenix
#

idc lol

karmic parcel
#

Uh yeah, well dbl.js was just updated in the past few days since I took it over

#

I see you were referencing an old version. Look at npmjs.com for dbl.js

#

Should get you set up

earnest phoenix
#

Well I got it working. So I don't want to worry about it

karmic parcel
#

I would suggest updating because that seemed like it was before I updated it, it had things that weren't working and the example page would give you errors lol

karmic parcel
#
const Client = require('../lib/index');

const bot = new Client({token: "token", autorun: true});

bot.on('ready', () =>
{
  /*
  let message = await bot.sendMessage('352851932273967114', 'Edit me harder')
  message.edit('Async edit, too?');
  */
  console.log(`Bot Desu's servers: ${JSON.stringify(bot.servers)}`);
});

bot.on('message', (message) =>
{
  console.log(`${message.content} posted by ${message.author.username}`);
  if(message.content === 'ping desu')
  {
    bot.sendMessage(message.channel_id, bot.ping);
  }
});

bot.on('guildCreate', (server) =>
{
  console.log(server);
});
neat falcon
#

Wew

karmic parcel
#

that's just my test file rn

#

async works fine

#

as well

jagged plume
#

eris x d.js = dicksword โค

neat falcon
#

Music support?

#

Less ram usage?

jagged plume
#

lol

karmic parcel
#

ram usage will depend on the cache and how many servers the bot is on

jagged plume
#

LOGGING MESSAGES BAN

neat falcon
#

Spotify ain't lightweight it takes 500mb

#

Sad

karmic parcel
#

that's how it works with any lib, tbh

neon pasture
#

You guys making a music bot?

jagged plume
#

what

neat falcon
#

I have some

neon pasture
#

nvm

neat falcon
#

I want to maybe rewrite

karmic parcel
#

but I'm not directly supporting voice, because that'll take hella long

#

I'll include something to use like some lava shit

#

but I'm focusing on everything but voice at first

jagged plume
#

๐Ÿ‘

karmic parcel
#

voice is pretty rip with the info

vital lark
#

I need to rewrite Yumi's music module.

#

but That will be in the v4.0.0 rewrite ๐Ÿ‘Œ

#

all d.js

tawny lava
#

so many rewrites lol

vital lark
#

not really

#

the current version isn't one

#

I had to code really fast to get Yumi booted bloblul

indigo notch
#

Hi Auguu

#

xd

rich glade
#
                if s["USER"] == points:
                    continue

                if str(user.id) in s["USER"]:
                    oglosepoints = str(points[0]["LOSES"])
                    ogtiepoints = int(points[0]["TIES"])
                    ogwinpoints = str(points[0]["WINS"])
                    newtiepoints = ogtiepoints + 1
                    datadel = {"USER": str(user.id),
                               "LOSES": str(oglosepoints),
                               "TIES": str(ogtiepoints),
                               "WINS": str(ogwinpoints)}
                    points.remove(datadel)
                    data = {"USER": str(user.id),
                            "LOSES": str(oglosepoints),
                            "TIES": str(newtiepoints),
                            "WINS": str(ogwinpoints)}
                    points.append(data)
                    dataIO.save_json("data/general/rpspoints.json", self.points)
                elif str(user.id) not in s["USER"]:
                    data = {"USER": str(user.id),
                            "LOSES": str(0),
                            "TIES": str(1),
                            "WINS": str(0)}
                    points.append(data)
                    dataIO.save_json("data/general/rpspoints.json", self.points)```
this is the code i have so far... it wont creat any new users tho... how can i fix?
#

oh wait

#

ik

#

i think

#

welp

#

not that

vital lark
rich glade
#

i got it

icy epoch
#

@rich glade I don't suggest using the dataIO, it's kinda poorly put together but it's up to you, you're probably just as well off making your data interactions yourself

earnest phoenix
#
            var prem = ""
            
            var forb = this.client.guilds.get(`250486125431488512`)
            var donors = forb.roles.find("name", "Donator");
            var contris = forb.roles.find("name", "Contributor");
            var supports = forb.roles.find("name", "Supporter");
            var legends = forb.roles.find("name", "Legendary");

            if (message.guild.owner.user.roles.has([donors, contris, supports, legends])) {
                prem = "true"
            } else {
                prem = "false"
            }

I'm trying to get if the Guild Owner has one of these roles it returns. It stops at has

bitter sundial
#

message.guild.owner.user.roles is a Collection and there's no has

#

try using find

earnest phoenix
#

Ok

#

find returned undefined too. Also I'm pretty sure it's has

#
getUser.roles.has(supportRole.id)

Which also works for this

bitter sundial
#

oh yea I forgot Collection extends Map

#

I don't think you can pass an array to the key part

earnest phoenix
#

Trial and Error

earnest phoenix
#

I did forget .id but no change. It still returns false. and .user didn't need to be there

earnest phoenix
#

I also figured I was testing it from my current guild (testing one) instead of var forb

floral stump
#

Pytho. Is shit

uncut slate
#

Yeah.. no.

timber juniper
#

Does any library yet support screen share on canary?

karmic parcel
#

Are you asking if any bot lib has support for endpoints that bots don't have?

delicate zephyr
#

Anyone willing to help me?

#

how would one get all the channels in a guild that the bot has permission to send to, and then get the first one

timber juniper
#

Wait there is no api for vidchat?

#

That's just stupid

uncut slate
#

not yet afaik

karmic parcel
#

I'm not sure it's going to

uncut slate
#

ye, the only possible scenario is if they bring "video calls in guilds"

#

in which case.. maybe.

timber juniper
#

Can bots use direct calls tho?

#

It not

karmic parcel
#

considering they don't have "friends"

delicate zephyr
#

nope

timber juniper
#

RIP vidapi

uncut slate
#

well like I just said

#

maybe

karmic parcel
#

doubtful, though

uncut slate
#

if they bring video calls in guilds, there may possibly be an API for it.

#

yeah

timber juniper
#

sounds unlikely tho

uncut slate
#

yeah, it is

karmic parcel
#

It would just be Porn/YouTube video calls anyways

#

๐Ÿ˜‚

bitter sundial
#

there is an API but no docs

uncut slate
#

coughs where's tom at

timber juniper
#

API for vidcalls or voicecalls?

bitter sundial
uncut slate
#

:blobeyes:

delicate zephyr
#
    bot.guilds.map(guild => {
        var broadcastChannel = require('../guilds/broadcastSettings/' + guild.id + '.json').custombroadcastChannel;
        var broadcastEnabled = require('../guilds/broadcastSettings/' + guild.id + '.json').broadcastEnabled;
        if(broadcastChannel === "") {
            var channel = guild.channels.first().then(ch => {
            ch.send("This is a broadcast")
            })
        } else {
            guild.channels.get(broadcastChannel).send("This is a broadcast");
        }
    })```
uncut slate
#

fix your codeblock

delicate zephyr
#

wdym?

uncut slate
#

the lang is on a new line

delicate zephyr
#

Is now

indigo notch
#

@delicate zephyr just <client>.shard.broadcastEval(send()) and then make an class send() witcha stuff in it

#

works fine for me

#

also dont use json for settings

#

use an db

#

ty

uncut slate
#

he's not using broadcastEval as far as I can see

indigo notch
#

-bots Luke

gilded plankBOT
#
Luke#6723
Bots

@neon scarab

delicate zephyr
#

How bout go away Im working on a free VPS, I'll do it after I build my server

#

I'll use a DB when I can be bothered

uncut slate
#

@delicate zephyr Collection.first() doesn't return a promise

delicate zephyr
#

I know I had this origionally

#

guild.channels.first().send()

#

didnt work though

indigo notch
#

which Djs version

delicate zephyr
#

v11.2.0

uncut slate
#

guild.channels returns all channels, including voice channels

#

you want to filter it to text channels

#

and you also want to filter it to the ones your bot can send to

indigo notch
#

use filter yeah

delicate zephyr
#

thats what ive been trying to figure out how to do

uncut slate
#

channels.filter(c => c.type === 'type')

delicate zephyr
#

Oh

uncut slate
#

where type is the type of the channel

delicate zephyr
#

Ok

#

and then for hasPermission i have tried it like that because but no luck

indigo notch
#

c.permissionsFor

#

use that

uncut slate
#

you want the inchannel permission yeah

delicate zephyr
#

๐Ÿ‘Œ thanks

#

Thanks for helping ๐Ÿ˜„

uncut slate
#

and like wessel said

#

please use a db

delicate zephyr
#

I will

#

when I get a server that isnt free

uncut slate
#

y

delicate zephyr
#

because this is literally being done in my spare time

uncut slate
#

a db is less of a headache than json storage is

delicate zephyr
#

not when its only {"broadcastEnabled":"true","custombroadcastChannel":""}

#

I mean

#

I could literally just search the dir for the guild id too if someone has a problem

#

Either way

#

I'll set up a database when I have my own server + actually have time dedicated to do this

#

I have not worked on my bot for about 7/8 weeks

#

so I have this now ```js
var channels = guild.channels.filter(c => c.type === "text")

How would I make it check permissionFor
I tried this
```js
var channel = guild.channels.filter(c => { 
                c.type === "text";
                c.permissionsFor("SEND_MESSAGES") === true;
            })

didnt work tho

uncut slate
#

&&

delicate zephyr
#

ok

uncut slate
#

and that's'not how permissionsFor works

#

read the docs

delicate zephyr
#

oh

#

so it would be c.permissionsFor(bot.user).hasPermission("SEND_MESSAGES") judging by the docs?

uncut slate
#

yes

delicate zephyr
#

wait

#

ok

uncut slate
#

no

delicate zephyr
#

Yea

uncut slate
#

.has

delicate zephyr
#

ok

#

I will stop doing that spamme thing, I keep doing it, I need to break that habbit lmao

uncut slate
#

๐Ÿ‘€

delicate zephyr
#

this

#

literally a second between them each

delicate zephyr
#

yo, can someone tell me why this aint workin

#

nvm fixed it

#

the else one isnt working

#

im trying to add channel customisation my my broadcast command (togglable is already done)

feral rain
#

How long does it take for the website moderator or website adminstrator to approve your bot?

delicate zephyr
#

We cant pin point the timing, since the queue is large on some days and small on others, just be patient @feral rain

feral rain
#

Okay.

median lintel
#

thats dope mmLol

trim steppe
#

whoops

earnest phoenix
#
events.js:182
      throw er; // Unhandled 'error' event
      ^

Error: unexpected server response (503)

Uh what?

inner jewel
#

discord is shitting itself

earnest phoenix
#

Why is it crashing on that??

inner jewel
#

because it can't access the discord api

#

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

earnest phoenix
#

Is there a fix to this? Or do I just wait?

vital lark
#

^

inner jewel
#

wait

earnest phoenix
#

It's working now

indigo notch
uncut slate
#

@indigo notch how many guilds does your bot have

indigo notch
#

My test bot has around 3

uncut slate
#

how many guilds will your actual bot have

indigo notch
#

wump has rn i think 1k

#

but i want to be early

#

;p

uncut slate
#

then you don't need eris-sharder

indigo notch
#

ah

jagged plume
#

just edit maxShards

uncut slate
#

eris-sharder doesn't actually shard

indigo notch
#

but when i do hit the point that i need it, how would i fix it?

uncut slate
#

eris-sharder creates clusters

indigo notch
#

ahhhhhh

uncut slate
#

eris in itself already shards for you

indigo notch
#

ah oki

uncut slate
#

also I can see you're just taking over memer's code

indigo notch
#

tru

#

but how

#

would i make an cmd handler

#

just like

#

my old one?

uncut slate
#

sure

#

eris and d.js are super similar

jagged plume
#

you can use the exact same code

indigo notch
#

oki

jagged plume
#

lol

uncut slate
#

whatever you do, Memer is licensed under AGPL v3

indigo notch
#

Ohhh

uncut slate
#

so if you take our files you need to credit us

jagged plume
#

I am using the same code I was using with d.js, just edit Discord interactions like messages

uncut slate
#

yeah ^

indigo notch
#

didnt knew

uncut slate
#

Eris and D.js are basically the same, Eris lacks some utility functions but you can add those yourself

#

just use VSC's repository search, search for msg.guild and change all instances to msg.channel.guild

jagged plume
#

((i stole the richembed class from d.js because i was using it too much))

uncut slate
#

search for msg.channel.send and change all instances to msg.channel.createMessage

#

also embed builders really aren't needed

#

just write your embeds raw

jagged plume
#

i was already using it

#

couldnt be bothered to change it

uncut slate
#

yeah, so I would recommend you do

#

it would literally take 1 - 2 seconds to do with js eval replace

jagged plume
#

eh

#

i dont really care

uncut slate
#

sure, up to you

spark ridge
#

to post server count ?

uncut slate
#

on the API page

#

there's a button on the navbar at the top

spark ridge
#

thanks

neon pasture
#

How can my bot send a DM to me when someone use a commands? I'm using discord.js

surreal peak
#

you're gonna cry a lot and get your bot ratelimited but k

neon pasture
#

I want to make a suggestion command

#

Is that not a good idea?

earnest phoenix
#
.author.send()
neon pasture
#

yeah, but to me

#

only to me, not to the command sender

earnest phoenix
#

client.users.get(${owner}).send()

#

I think thats how u do it in d.js

neon pasture
#

and owner is my id?

earnest phoenix
#

not sure tho bc I havent used d.js in aminute

#

yes

neon pasture
#

@neon pasture

#

this right?

earnest phoenix
#

just your id

#

not the @ symbol or the <>

neon pasture
#

Thank you

earnest phoenix
#
var owner = message.guild.members.get("id")

owner.send()
#

or

#
message.guild.members.get("id").send()
jagged plume
#

dont do guild

#

what if he isnt in the guild

#

lol

earnest phoenix
#

Wait

jagged plume
#

just use what solace said

earnest phoenix
#

If he wan't in guild make a Varible of getting his guilds id. etc. But yea he could use that ๐Ÿ˜›

jagged plume
#

no

#

client.users.get

#

not hard

earnest phoenix
#

I was thinking of something else

neon pasture
#

I already have it working

surreal peak
jagged plume
#

i like how your name is also red

earnest phoenix
#

lol

surreal peak
#

im mod everyware

earnest phoenix
#

says "Member" lol

neon pasture
#

He didn't used my bot ๐Ÿ˜ฆ

earnest phoenix
#

Neither ๐Ÿ‘Œ

#

lol

uncut slate
#

@earnest phoenix what did it say

earnest phoenix
#

"DBL Down"

#
.catch(e => console.log("DBL Down"))
uncut slate
#

useful catch ._.

earnest phoenix
#

Ikr

#

From when I did the Post

uncut slate
#

change "DBL DOWN" to e.stack

karmic parcel
#

You could use dbl.js

earnest phoenix
#
Error: 404 Not Found
karmic parcel
#

but it seems to be a functional issue from not understanding quite what you are doing

earnest phoenix
#

I could if I knew how to use that :P. I just don't know why this one isn't working

#
            snekfetch.get(`https://discordbots.org/api/bots/${this.client.user.id}/stats`)
            .set('Authorization', 'token')
            .then(e => message.reply(e.body))
            .catch(e => console.log(e.stack))
Error: 404 Not Found

Any ideas why it 404s?

bitter sundial
#

is it an approved bot

earnest phoenix
#

Yes

bitter sundial
#

is the id right

earnest phoenix
#

Yes

bitter sundial
#

are you sending it before it's ready

earnest phoenix
#

idk

#
Forbidden โ„จBOT - Today at 12:26 AM
@Duck, [object Object]

It was something to do with ID. This happens

uncut slate
#

JSON.stringify(e.body)

earnest phoenix
#

Got it working thanks

#

Uh, lol. What would be the most efficient way of having it list like @gilded plank

uncut slate
#

using an embed

earnest phoenix
#

Yea I got that part. JSON.stringify makes look like a JSON file. Would I have to file write into a json file and them embed everything?

#

I guess I'll do that then

uncut slate
#

no

#

it's just an object

#

@earnest phoenix you would do something like

const res = [...];

msg.channel.send({ embed: {
    title: res[value];
    fields: [
        { name: 'something', value: res[value] }
    ]
});
earnest phoenix
#

Aight

#

I'm confused on how to do that. But I'll get trying thanks for the help. I'll let you know if I figure it out

tawny lava
#

is it possible to redirect nginx 404s to another domain? if so how?

#

couldn't find anything on google

earnest phoenix
#

I've been sitting here for a while and haven't figured it out RIP

uncut slate
#

@earnest phoenix I would suggest learning JavaScript basics, in that case.

#

What you're asking is really simple, and judging by your earlier suggestion of saving the object to a JSON file and then embed it from there, it seems like you aren't familiar with objects

torpid juniper
tawny lava
#

ya

torpid juniper
#

ok

tawny lava
#

instead of displaying the 404 for nginx

torpid juniper
#

it's been a while since i've done nginx but i'll try

tawny lava
#

aight

torpid juniper
#

hmmmmmmm

#
is this a highlighting format
#

YES

bitter sundial
#

looks like it is

torpid juniper
#

thanks hljs

brittle ember
#

How i can receive blob emojis?

torpid juniper
#

so lizard

#

you want it to work everywhere?

bitter sundial
#

step 1: get nitro
step 2: go and ask from another channel

brittle ember
#

Which channel?

bitter sundial
tawny lava
#

@torpid juniper basically, I have a subdomain that's for sharing images and what I want is that if you try to look for an image that's not there it redirects you

torpid juniper
#
server {
  location / {
    error_page 404 =302 https://http.cat/404.jpg
  }
}

try this, it might not work but you can give it a shot

tawny lava
#

alright I'll try that

#

ty

torpid juniper
#

no prob

#

just let me know if it breaks your nginx

tawny lava
#

lmao kk

torpid juniper
#

i have another solution if soooo

tawny lava
#

oo that works

torpid juniper
#

does it?

tawny lava
#

ya

torpid juniper
#

your very welcome my good sir/madam

tawny lava
#

ty vm

torpid juniper
tawny lava
#

kek

torpid juniper
#

yes

#

also, it works the same if you move the error_page line outside of the location block

#

it just means it doesn't get confused with subs

#

like that

#

oh

#

nevermind

tawny lava
#

lmao

#

it works either way

torpid juniper
#

but either way move it outside of that location block

#

tru

earnest phoenix
#
this.client.emojis.get("31725181622616064")

I'm trying to send dblSupporter from another guild but I can't seem to find a way to send it
Yes I have Nitro

bitter sundial
#

bots have nitro with emojis

umbral pelican
#

just send it as ![dblSupporter](https://cdn.discordapp.com/emojis/358282204104753153.webp?size=128 "dblSupporter")

bitter sundial
#

why are our ids different

umbral pelican
#

hmm Thonk

earnest phoenix
#

It doesn't work

#

I tried it it just sends :dblSupporter: as text

bitter sundial
#

is the bot here

earnest phoenix
#

yis

uncut slate
#

does it have the emoji perm

earnest phoenix
#

In the server it is in yes. It has Admin

umbral pelican
#

oh, I copied the message id bloblul

earnest phoenix
#

Nice one

languid dragon
#

but its online?

bitter sundial
#

looks like Luca is blind

earnest phoenix
#

When I use my f>announce command and I enter the emoji manually. It works. When I add it into the code. Nope

uncut slate
#

how did you add it into the code

languid dragon
#

just double checking it wasn't an issue with me ๐Ÿ˜„

earnest phoenix
#
.addField("Owner(s)", `${this.client.users.get(json.owners[0])}![dblSupporter](https://cdn.discordapp.com/emojis/317251816226160641.webp?size=128 "dblSupporter")\n${this.client.users.get(json.owners[1])}`, true)
uncut slate
#

odd

umbral pelican
earnest phoenix
#

Ok

#

I found something

tawny lava
#

hmm

earnest phoenix
#

It only seems to work with my Main Server

#

Maybe send me the dblSupporter image and I can upload it to there...

#

Actually

umbral pelican
#

oh, nvm my bot didn't have perms bloblul

earnest phoenix
#

I can get it off the website

bitter sundial
#

<dblSupporter317251816226160641>

#

lol

uncut slate
#

you need to use `

bitter sundial
#

my bot didn't have perms here tho

earnest phoenix
#

I am

uncut slate
#

yeah ik, but I was saying regardless

bitter sundial
#

@abstract aspen eval e.message.channel.sendMessage(![dblSupporter](https://cdn.discordapp.com/emojis/317251816226160641.webp?size=128 "dblSupporter"))

abstract aspenBOT
#
Input: e.message.channel.sendMessage(`![dblSupporter](https://cdn.discordapp.com/emojis/317251816226160641.webp?size=128 "dblSupporter")`)
Result: [object Promise]
bitter sundial
#

it does work

uncut slate
#

yeah

#

hmmm

#

let me try it in another server

languid dragon
#

what would be the best library to develop a bot in thonkku

uncut slate
earnest phoenix
#

This is weird

languid dragon
earnest phoenix
#

I'll see what happens if I upload the dblSupporter to one of my servers

#

and now it works perfectly fine

#

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

#

Strange stuff happen here

inner jewel
#

only works in embed description or field value

earnest phoenix
#

ok

pale umbra
#

dun dun dun

#

I'm going to create an bot now

surreal peak
#

k

pale umbra
#

can someone help me with 'creating an message'?

earnest phoenix
#

@pale umbra what language?

pale umbra
#

python pls

#

thx

abstract mango
#

are you using the normal client thing or ext.commands

vital lark
#

NO PY

#

USE JS

#

:3

abstract mango
#

no u

raven comet
#

hey

#

client.msg.guild.invite.code();

#

how bad is this

#

var x = msg.guild.invite.code();

#

os that how its done?

#

in discord.js

umbral pelican
#

what the

raven comet
#

help

umbral pelican
#

what are you trying to do

earnest phoenix
#

How to react with custom emojis?

raven comet
#

@umbral pelican Get the server invite of a guild and assign it to a variable

#

liek i want the server invite link

#

all from a message

umbral pelican
#

you can use message.guild.fetchInvites()
it returns a promise

raven comet
#

awesome

#

testing it now

earnest phoenix
#

o

umbral pelican
#

or message.channel.createInvite()

#

also returns a promise

raven comet
#

yep

earnest phoenix
#
                fchannel.send({embed}).then(msg => {
                    msg.react("โœ…") 
                    msg.react("โŽ")
                });

Discord Reactions are easy. How do you use Custom Reactins?

umbral pelican
#

it's kinda weird, you've got to put <:name:id

raven comet
#

@umbral pelican Returns with promise {(pending)}

umbral pelican
#

yeah, so either make the function async and await it
or use something like
message.guild.fetchInvites().then(invites => invites.map(inv => console.log(inv)))

earnest phoenix
#

@umbral pelican I tried <:name:id> but it didn't work

umbral pelican
#

that's not what I said lol

earnest phoenix
#

Without the > at the end? lol

umbral pelican
#

yeah

earnest phoenix
#

Strange

umbral pelican
#

mhm

earnest phoenix
earnest phoenix
#

should I meme

carmine berry
#

so should be bot.guilds.size @earnest phoenix

#

or atleast try that

#

what/

earnest phoenix
carmine berry
#

thats title

#

@earnest phoenix

earnest phoenix
#

Oh, my bad didn't see it in Docs

earnest phoenix
#

In the API Botinfo. What's the Date thing
"date":"2017-09-13T08:09:47.065Z"
?

#

When it was Verified or Added?

#

When it as Verified

#

@carmine berry that is not the title

#

that is the author

#

there is a difference

jagged plume
#

he was talking about the Bot info: part

#

which is a title

vital lark
#

How do I see my Tonkku? ๐Ÿฆ

earnest phoenix
#

oh, yes then

jagged plume
#

ye

languid dragon
#

a lot of the new bots are appearing offline on dbl?

jagged plume
languid dragon
low niche
#

I need help on how to get a random Reddit post with Discord.js and Snekfetch

#

never mind

distant flame
#

%%help

uncut slate
languid dragon
#

i get the error from this

#

that +"" was just for testing

karmic parcel
#

and what is the error?

languid dragon
karmic parcel
#

check what version of dbl.js is

languid dragon
#

3.10.10

karmic parcel
#

wat

languid dragon
#

idk

#

i did this

#

LOL

karmic parcel
#

dbl.js

languid dragon
#

comes up the same?

karmic parcel
#

that's not right lol

bitter sundial
#

is that npm version lol

uncut slate
#

npm 3.10

karmic parcel
#

it's only on 1.5

#

dbl.js

#

do npm list

#

and check it in there

#

while in the dir of your project

languid dragon
#

1.5.0

#

?

karmic parcel
#

hm, I'm not having issues when I just tried it

#

I just set my guild count to 100 ๐Ÿ˜‚

languid dragon
#

i even tried generating a new token

#

LOL

#

i didn't wanna get banne Thonk

karmic parcel
#

I have 1100 servers though

#

so I'm not like cheating

#

lol

languid dragon
#

jealous

#

thats lit

#

am i doing it in an incorrect order?

#

or

#

i tried putting it in bot.on('ready')

#

yano, to give it time to do its jazz

karmic parcel
#

are you sure you didn't save it with your token blanked out from the constructor?

languid dragon
#

im positive

#

ill try it again

#

1 sec

karmic parcel
#

like 1000000% because that header is for your DBL token

languid dragon
#

ye

#

token is the token you get from DBL API yeah?

#

and then the ID is your bots ID?

#

or my id?

karmic parcel
#

the token is the one you get from dbl api

languid dragon
#

yeah

#

i have that token in there

karmic parcel
#

the other one is your bot's id

languid dragon
#

okay so i did do it right

#

๐Ÿค”

karmic parcel
#

what OS are you on?

languid dragon
#

ubuntu

#

thats the code

#

with my bots ID

#

is that correct?

bitter sundial
#

yes

languid dragon
#

gave me the same error again

#

sorry to be a pain :L

karmic parcel
#

lemme try requiring it and testing it that way

languid dragon
#

ty for this x

karmic parcel
#

worked fine for me

#

again

umbral pelican
#

why not just use snek Thonk

languid dragon
#

what am i doing wrong

#

yeah ill try snek

karmic parcel
#

wew

#

I just tried the wrapper from a new install of it and it worked fine

#

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

languid dragon
#

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

#

using ubuntu?

karmic parcel
#

if you still wanna try to use it, try removing it and reinstalling

#

(the wrapper)

languid dragon
#

yeah i might try that real quick

karmic parcel
#

other than that, I can test it on debian

languid dragon
#

yes ples

karmic parcel
#

worked fine on a raspberry pi running raspbian (debian)

languid dragon
#

cries

karmic parcel
#

just set my count down to 100 again

#

dude

#

it's dbltoken

#

that's why

#

lmao

#

not just token

languid dragon
#

wot

karmic parcel
#

I was gonna add more services

#

like other lists eventually

languid dragon
#

so i replace token with dbltoken

karmic parcel
#

yus

languid dragon
#

oh

#

my

#

god

karmic parcel
#

I overlooked that one

#

rip

#

my fault

languid dragon
#

THANK YOUUUUUU

#

nah its ok

karmic parcel
#

that should work for you then

languid dragon
#

thanks for ur help

#

ill try it rn

karmic parcel
#

I assumed you got it from the examples

#

but I might have been wrong

languid dragon
#

yeah i got it from the examples LOL

karmic parcel
#

uh, it says dbltoken in the examples

languid dragon
#

u be goofing on me

karmic parcel
#

no

#

lol

languid dragon
#

oh

#

no i got it from

#

server-count-examples

#

๐Ÿ‘€

karmic parcel
#

oh, weeeew

#

should delet that one

#

that's probably Jacz

languid dragon
#

ooooh yeah i saw something about taking over

karmic parcel
#

yus

languid dragon
#

whoops

#

i shoulda read more into it LOL

#

huuuuge thanks for your help !

#

oooooooo boooyoyyyyyy

karmic parcel
#

loool

#

that's from the same thing?

languid dragon
#

i probably did something wrong

#

yeah

#

yeah

#

it wasn't a string

#

FIXED IT

#

HUEHUEHUE

karmic parcel
languid dragon
#

๐Ÿ˜™

karmic parcel
#

OwO

#

I deleted his example because it's incorrect

#

but yeah, keep an eye for updates and changes to it, I won't do anything that will break how it is now, I'll just probably accept more lists in the future

languid dragon
#

thanks a million x

earnest phoenix
#
this.client.users.get(message.author.id).roles.has(role.id)

Doesn't seem to work

umbral pelican
#

because users don't have roles

earnest phoenix
#

๐Ÿ˜” crap

#

Just realised. Well easy fix

karmic parcel
#

rip

umbral pelican
#

anyways, why would you use this.client.users.get(message.author.id) instead of just message.author Thonk

languid dragon
#

LOL

karmic parcel
#

wew

earnest phoenix
#

It was. But stuff kept Erroring over it so I just did that lol

tawny lava
#

thonk

earnest phoenix
#

I thonk too

uncut slate
#

depends on how you want it formatted

#

moment is nice to use

earnest phoenix
#

I heard it was

uncut slate
#

Sure

earnest phoenix
#

If I were to use Moment. How would I use it to format .joinedAt?

uncut slate
#

pretty sure it'd be something like moment(Member.joinedTimestamp).format('...')

earnest phoenix
#

Oh I see

#

Yea, that works. Neet

#

Does moment go by the Authors time?

#

Or how does it work?

uncut slate
#

Hoe do you mean?

#

You pass the timestamp into the moment function

jagged plume
#

gonna assume you meant how

earnest phoenix
#

When it formats the time. Who's time does it go by?

jagged plume
#

what

earnest phoenix
#

Don't worry

uncut slate
#

It goes by system time @earnest phoenix

earnest phoenix
#

Ok

uncut slate
#

there's no such thing as "authors time"

#

the API doesn't really let you detect the authors time

earnest phoenix
#

Yea I figured. I just wanted to know

queen violet
#

:jda:

#

:jda:

indigo notch
#

anyone knows why length of undefined? js process.exec(message.content.split(' ').slice(2).join(' '), (er, err, out) => { let output = er || err || out; if(er.length < 1 || err.length < 1 || out.length < 1) output = `*Output is empty*`; if(er.length > 1500 || err.length > 1500 || out.length > 1500) { client.fetch.post('https://hastebin.com/documents') .send(er || err || out) .then(data => output = `*Output Too long: <https://hastebin.com/${data.body.key}>*`).catch(error => message.channel.createMessage(`:x: Somenthing went wrong.`)); }

subtle turtle
#

0-0

bitter sundial
#

add some console logs to see what is undefined

indigo notch
#

oki

craggy robin
#

Anyone have any experience with storing usernames in mysql?

#

using utf8mb4 for the database type

#

but sitll ahvign issues with incorrect string

wanton plover
#

Do you require names or just a identifier for the user?

craggy robin
#

just the name.

#

so i can put it on a card

indigo notch
#

tonkku, its on this line js if($err.length < 1 || $er.length < 1) $output = `*Output is empty*`; if($err.length > 1500 || $er.length > 1500) {

craggy robin
#

and also on the website

#

xD its weird.

#

utf8 in sqlite so easy

#

LOLZ

wanton plover
#

in basic utf8 accents works on names on my bot

inner jewel
#

@indigo notch $er vs $err

indigo notch
#

i already fixed

earnest phoenix
#

@craggy robin I used to use MySQL and utf8mb4

#

Still need help?

#

utf8mb4 still can't store every type of character, that is why I switched to rethink (which can store anything)

craggy robin
#

hmm

#

i decided to just encrypt the data

#

bypass the whole need to store the characters

#

LoLz

indigo notch
#

but now i have an other question; howt o fetch an user (Not client.users.get but like in djs fetchUser)

uncut slate
#

well, you just pointed it out

indigo notch
#

Oh so its just fetchUser?

#

or does lcientusersget basiclly fetch it?

uncut slate
#

what lib

indigo notch
#

Eris

uncut slate
#

getUserProfile

#

maybe

#

wait nvm

indigo notch
uncut slate
#

I know Discord.js' fetchUser got gutted

#

maybe it got removed or sth, idk

indigo notch
#

i willt ry to transfer it over then

#

ty tho

#

and is client.channels.find("name", channel);an thing?

uncut slate
#

no, .find uses a filter

#

like vanillajs

indigo notch
#

what should i use then with it? ;3

livid cliff
#

does someone know how to use canvas in discord.js?

uncut slate
#

it uses a filter function @indigo notch

earnest phoenix
#
if (uuser.presence.status === "offline") {
                gpre = "None"
            } else if (uuser.presence.game.name == 0) {
                gpre = "None"
            } else {
                gpre = uuser.presence.game.name
            }

Keeps saying .name is null
uuser is client user
gpre is Game Presence

uncut slate
#

then there's no game

earnest phoenix
#

It should say "None" not

@Duck, An error occurred while running the command: TypeError: Cannot read property 'name' of null
You shouldn't ever receive an error like this.
Please contact Duck#6879.
uncut slate
#

yeah

#

you don't want to call .name if it doesn't exist

weary shoal
#

do } else if (uuser.presence.game && uuser.presence.game.name == 0) {

earnest phoenix
#

Ok

#

Same error

#

btw

#

How should I do presence game and not make it error?

uncut slate
#
const presence = uuser.presence.game ? uuser.presence.game.name : 'None';
earnest phoenix
#

RangeError: RichEmbed field values may not be empty

uncut slate
#

show full code

earnest phoenix
#
            const presence = uuser.presence.game ? uuser.presence.game.name : 'None';

            if (forb.member(uuser.id)) {
                if (ufuser.roles.some(r => [donors.id, contris.id, supports.id, legends.id].includes(r.id)) || ["190775609532612608", "268285836187926528", "186683613440376833", "305203825931845632", "313148898883534849", "339364228794155029", "339367267026468865", "290999596140986369"].includes(uuser.id)) {
                    prem = "true"
                } else {
                    prem = "false"
                }
            } else {
                prem = "not in server"
            }

            var content = uguser.roles.sort((a, b) => b.position - a.position).map(role => `${role.name}, `).join("")
            const embed = new Discord.RichEmbed()
            .setColor(`#2095AB`)
            .setTimestamp()
            .setAuthor(uuser.username, uuser.displayAvatarURL)
            .setThumbnail(uuser.displayAvatarURL)
            .addField("Name", uuser.tag, true)
            .addField("Nickname", unickname,true)
            .addField("Premium Member", prem, true)
            .addField("ID", uuser.id, true)
            .addField("Status", uuser.presence.status, true)
            .addField("Game", gpre, true)
            .addField("Join Date", moment(uguser.joinedAt).format('MMMM Do YYYY, h:mm:ss a'), true)
            .addField("Account Created", moment(uguser.user.createdAt).format('MMMM Do YYYY, h:mm:ss a'), true)
            .addField(`Roles [${uguser.roles.size}]`, content, true)
            message.channel.send({disableEveryone:true, embed});

This is from presence down

#

Also don't worry about the IDs I'll be making smaller

uncut slate
#

.addField("Game", gpre, true)

#

you're still using the old variable

earnest phoenix
#

Oh, whoops my bad

#

Thanks

uncut slate
#

np

#

now do you understand what it actually did

earnest phoenix
#

Not really.

uncut slate
#

okay so

#

what we did with the ? and the : is basically shorten this into one line:

let presence = undefined;

if (uuser.presence.game) {
    presence = uuser.presence.game.name;
} else {
    presence = 'none';
}
#

Basically, it means:

'if this is true' ? 'do this' : 'if not, do this'
earnest phoenix
#

Oh. owo

uncut slate
#

they can be really useful for cleaning up code, yeah

#

in addition to making your snippet use the proper values, I also shortened it to one line

earnest phoenix
#

I'll start using the in the future.

uncut slate
#

should, yeah.

#

you can also "nest them" but that starts getting ugly

#
var condition1 = true,
    condition2 = false,
    access = condition1 ? (condition2 ? "true true": "true false") : (condition2 ? "false true" : "false false");

console.log(access); // logs "true false"
#

and I really disrecommend that

earnest phoenix
#

Yea I see

#

Yea it's much better. I just started doing it to the rest of my Userinfo

gilded blaze
#

::user @gilded blaze

earnest phoenix
#
message.channel.send({disableEveryone:true, embed});

This works?

vital lark
#

Maybe do message.channel.send({embed});

earnest phoenix
#

@earnest phoenix yes

#

@earnest phoenix disableEveryone should be in the client constructor tho

vital lark
#
// Client constructer
let client = new Discord.Client({
   disableEveryone: true
});
earnest phoenix
#

Ok

#

Just wanted to make sure. I didn't want to be listing userinfo and it pinging everyone

umbral pelican
#

embeds don't ping roles

earnest phoenix
#

๐Ÿ‘Œ

earnest phoenix
#
A Detailed Description Of Your Bot (HTML allowed)

Is that where you edit the profile of the bot? Like the background and shit?

jagged plume
#

yes

earnest phoenix
#

How do you get the background to work with the entire page.

#

๐Ÿคฆ

#

idk use css

#

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

languid dragon
#

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

earnest phoenix
#

Can anyone here help me with showing server count with python?

#

nvm I gotta try something first

#

yeah I looked in there but I've never done anything with aiohttp before

#

I get syntax error on

#
async with aiohttp.ClientSession() as session:```
#

I solved that

#

I think I got it, I just need to test with my actual bot

earnest phoenix
#
message.channel.send(`Deleted '${numDeleted - 1}' of '${num}' messages \`3\``).then(msg3 => {
                setTimeout(() => {
                    msg3.edit(`Deleted '${numDeleted - 1}' of '${num}' messages \`2\``).then(msg2 => {
                        setTimeout(() => {
                            msg2.edit(`Deleted '${numDeleted - 1}' of '${num}' messages \`1\``).then(msg1 => {
                                setTimeout(() => {
                                    msg1.delete();
                                }, 1000)
                            });
                        },1000);
                    });
                }, 1000);
            });

Easier way than this?

jagged plume
#

woah what the hell are you doing lol

earnest phoenix
#

Editing a message to display a counter. In which the message gets deleted

jagged plume
#

i mean you could just edit the same message

#

instead of .then everywhere

#

because it's just returning the same object

#

or async await because async await is bae

earnest phoenix
#

lol

languid dragon
#

@earnest phoenix i have a solution

#

tested as well

earnest phoenix
#

I have it smaller.

languid dragon
#

well ill throw u some code anyway incase u want it

#
function deleter(msg){
    var time = 5,
        mess = "";
    var interval = setInterval(function(){
        if(time >= 0){
            var message = msg.content.replace(/`([0-9])`/g, "");
            msg.edit(message += "`"+time+"`");
            time--;
        }else{
            msg.delete();
            clearInterval(interval);
            return;
        }
    }, 1000);
}
earnest phoenix
#

Yea, I got it smaller

languid dragon
#

aight

earnest phoenix
#
        try {
            const timeout = ms => new Promise(res => setTimeout(res, ms))
            let msg = await message.channel.send(`Deleted **${numDeleted - 1}** of **${num}** messages \`${3}\``)
            for(let i = 2; i > 0; i--) {
                await timeout(1000);
                msg = await msg.edit(`Deleted **${numDeleted - 1}** of **${num}** messages \`${i}\``);
            }
            msg.delete(1001);
        } catch (Error) {
            message.channel.send(`${message.author}, not good! There was an Error!\n\`\`\`${Error}\`\`\``)
        }
#

Thanks to my other dev

languid dragon
#

ah i see

earnest phoenix
#

msg.delete is (1001) because it would delete half a second early with 1000
lol

#

It was strange

uncut slate
#

@earnest phoenix res()

jagged plume
#

you don't need to do msg = msg.edit

#

lol

#

msg object updates when you edit it

vital lark
#
        } catch (err) {
            message.channel.send(`${message.author}, not good! There was an Error!\n\`\`\`${err.stack}\`\`\``)
        }```
#

pls

tawny lava
vital lark
jagged plume
earnest phoenix
#

@vital lark Ok ๐Ÿ‘

jagged plume
#

i don't send stack or people would see the retarded folder names that bullet came up with

#

named the google account "funnymemexdheheh"

earnest phoenix
#

Yea neither can I. Just realised it exposes Personal Names

earnest phoenix
#
if (message.guild.me.permissions.has('MANAGE_MESSAGES'))

Doesn't seem to work

tawny lava
#

thonk

languid dragon
#

message.channel.guild.members.find("id", message.author.id).hasPermission('BAN_MEMBERS')

tawny lava
#

thonk

jagged plume
#

/bots

tawny lava
#

just use .get

jagged plume
#

not /bot

earnest phoenix
#

@languid dragon Didn't work

jagged plume
#

๐Ÿ‘Œ kk im going to sleep now

#

bye

languid dragon
#

it returns a boolean

tawny lava
#

message.member.permissions.has('BAN_MEMBERS') @earnest phoenix

languid dragon
#

works fine for me

tawny lava
#

why would you write all of that lol

#

when that works as well

languid dragon
#

just how i have my code written out

earnest phoenix
#

Becauses it's checking bots perms?

tawny lava
#

that checks the member's perms

#

message.guild.me.permissions.has('BAN_MEMBERS') checks the bots perms

earnest phoenix
#

Thats what it was before

#
if (!message.guild.me.permissions.has('MANAGE_MESSAGES')) return message.channel.send("I do not have the permission MANAGE_MESSAGES!");

Just won't work

jagged plume
#

try taking away it's perms

#

kek.

earnest phoenix
#

??

languid dragon
#

what error does it actuallly give?

earnest phoenix
#

I found my problem. The bot was saying "You don't" Not "I don't". Therefor it was saying the Author didn't have permission. I was just blind

#
const timeout = ms => new Promise(res => setTimeout(res, ms))
            let msg = await message.channel.send(`Deleted **${numDeleted - 1}** of **${num}** messages \`${3}\``)
            for(let i = 2; i > 0; i--) {
                await timeout(1000);
                msg = await msg.edit(`Deleted **${numDeleted - 1}** of **${num}** messages \`${i}\``);
            }
            msg.delete(1001);

Also according someone else, this is API Abuse

#

setTimeout can't be below "60000"

languid dragon
#

probably is

#

i mean considering you're sending multiple requests to constantly change and edit a message

#

its probably why you dont actually see it implemented anywhere

#

and why i couldn't code a Snake game

earnest phoenix
#

Well I removed it anyway

languid dragon
#

for the better :*

earnest phoenix
#

I also love how I get people in Discord API trash talk me saying "It's useless". That's why I also ask here first. lol

languid dragon
#

yeah i hated the official discord documentation servers

#

they get really salty if you're not a professional asking simple questions

#

everything quite laidback here and chill

earnest phoenix
#

Yea

languid dragon
#

can't guarantee any of my answers r perfect but here 2 help if u wanna tag me whenever

tawny lava
#

lol

karmic parcel
languid dragon
#

dont @ me

#

with ur judgements

tawny lava
#

@languid dragon you're eww

languid dragon
#

that hurts me at a very deep and spiritual level

keen nest
#

Meh

winged monolith
#

i wanna add a ban/kick command but i dont know how (using discord.js)

torn finch
#

well, you need to get the player to kick/ban's GuildMember object

#

then .kick() them

#

I use msg.mentions.members.first(); and have the user mention the player to kick

earnest phoenix
#

I'd also recommend making sure you add something to it
permissions.has('KICK_PERMISSIONS') Or whatever it is. It'll make sure no one can just kick/ban someone

torn finch
#

yeah

#

and also make sure the person is kickable/bannable

earnest phoenix
#

@vital lark Nice unclosed )

#

;-;

#

omg

#

that bugs me

#

lmao

weary shoal
#

Imma just delete

#

No bad code here

#

Looks at own code

brittle wolf
#

Lol

vital lark
#

@weary shoal mmBlob

earnest phoenix
#

hmm

#

nitro?

#

kek

#

k then

earnest phoenix
#

How do you check for in presence.game if it's empty? I've tried == 0 === "" === false === null === undefined

#

and with both .game.name and .game

radiant plover
#

what are you trying to do

jagged plume
#

if (!presence.game) // no game

radiant plover
#

yeah basically just do that

jagged plume
#

or if you wanna do it like this

#

you can do some fancy stuff

earnest phoenix
#

Ok

#

Thanks

#

Still didn't work

jagged plume
#

show code kek

#

and error

earnest phoenix
#
try {
                if (uuser.presence.game.name === null || !uuser.presence.game) { 
                    gpre = "None"
                } else {
                    gpre = uuser.presence.game.name
                }
            } catch(Error) {
                gpre = "Invalid"
            }
radiant plover
#

p_p

earnest phoenix
#

lol

jagged plume
#

just use !presence.game

earnest phoenix
#

I made the Try Catch. Someone I knew was making the bot Error using a broken Game

#

the Null was there to stop that

#

It was the one thing stopping it

jagged plume
#

no good checking if the name is null if the game is also null

#

that will cause an error

earnest phoenix
#

It never did?

jagged plume
#

you are catching it, you wouldn't see e.e

tawny lava
#
if(user.presence.game) { // do stuff } else { // do ther stuff }
#

shit

#

or if(!user.presence.game)

jagged plume
#

just use !presence.game pls

earnest phoenix
#

ok

tawny lava
#

ye

earnest phoenix
#

Well I guess you were right

jagged plume
#

see bloblul

earnest phoenix
jagged plume
#

๐Ÿ‘Œ

earnest phoenix
#
            try {
                gpre = uuser.presence.game ? uuser.presence.game.name : 'None'
            } catch(Error) {
                gpre = "Invalid"
            }

This is all g?

radiant plover
#

well at that point the try/catch is superfluous

earnest phoenix
#

For just in case moments I guess

bitter sundial
#

why the hell do you have Error inside the catch arguments

earnest phoenix
#

Does anyone know the easiest thing to use for Emailing, using a Bot?

jagged plume
#

mailing?

#

australia post

earnest phoenix
#

Emailing lol

jagged plume
#

have you tried google

#

ive found methods already

earnest phoenix
#
var args = message.content.split(` `).slice(2).join(` `).split(` | `);

Content undefined??? I use
message I don't get why out of all the times I've used it, it stops now

low niche
#

@earnest phoenix using a premade bot or making it?

earnest phoenix
#

It is all mine.

#

I'd never use premade and never have

low niche
#

realises that DiscordMail exists

#

jk

#

as far as I know, there is Mailgun to use

#

sorry 7coil

earnest phoenix
#

It's not about that. Atm this code is just testing the command

low niche
#

idk then

#

sorry man

earnest phoenix
#

All good

earnest phoenix
#
            var args = message.content.split(` `).slice(2).join(` `).split(` | `);
            var femail = args[0]
            var fsubject = args[1]
            var fmessage = args[2]

            if (femail == 0) return message.channel.send(`${message.author}, You must input an Email!`);
            else if (fsubject == 0) return message.channel.send(`${message.author}, You must input an Subject!`);
            else if (fmessage == 0) return message.channel.send(`${message.author}, You must input an Message!`);

How would I fix this? It doesn't like do == 0 it just goes right passed it

#
            if (fsubject >= 150) return message.channel.send(`${message.author}, The subject must not exceed 150 characters`);
            if (fmessage >= 1000) return message.channel.send(`${message.author}, The message must not exceed 1000 characters`);

Same with here

jagged plume
#

why are you checking if it's a number

earnest phoenix
#

checking if its empty

jagged plume
#

you are checking the content, not the length

#

"an email" !== 0

earnest phoenix
#

ok

jagged plume
#

femail.length == 0

#

instead of femail

earnest phoenix
#
TypeError: Cannot read property 'length' of undefined
jagged plume
#

it's undefined

#

lol