#development

1 messages ยท Page 377 of 1

olive ridge
#

( {*

#

omfg

#

) {*

abstract mango
#

@prime cliff xmlhttprequests/fetch

prime cliff
#

Yea im trying multiple methods and they all fail ;-;

abstract mango
#

honestly try using a helper lib

#

axios

#

etc

#

(heck even jquery $.ajax)

prime cliff
#

But donut is using the same method and it works for him >_>

prime cliff
#

This is driving me nuts AHHHHHH

muted oxide
#

Can I ask.. I can't import DBLClient! How do I fix this?

dull mica
#

How would i turn on safesearch on python for discord thonk
for a google search command

austere meadow
#

if you search google through a package, see if theres a way to enable safesearch through the package

dull mica
#

Ahh

#

thanks man

austere meadow
dull mica
#

;p

gusty topaz
#

Safesearch aims to disable nsfw shit. Right?

quiet bobcat
#

Yeah

dull mica
#

yeah thank god

gusty topaz
#

If result.contains('porn') { dontShow(); }

dull mica
#

but what if they manage to show something else

quiet bobcat
#

if(result.contains(args[1]) return;

#

idk

prime cliff
#

_> Im using both jquery getjson and xmlhttprequests and it never works even with multiple methods AHHHHH KILL ME

dull mica
#

@austere meadow

#

What do you recommend, moderate or high?

#

nvm dont know how to edit it

austere meadow
#

i suppose high would be ideal

dull mica
#

it requires json stuff and s

#

so i wont deal with that

#

i was using a different api key

prime cliff
#

@earnest phoenix Hey if you are not busy can you help me use javascript httprequests in my bot page i have been trying for 1/2 hours and its KILLING ME

austere meadow
#

what are you trying to do @prime cliff?

prime cliff
#

Using httprequests in my bot page to get json from an external api

austere meadow
#

hmm

#

i would use AJAX personally

#

since im more experienced with that

prime cliff
#

All im getting is network errors and status 0 with every method i have tried

bitter sundial
#

@prime cliff use the request function already on the page?

prime cliff
#

Wait what

#

Which one?

bitter sundial
#

what do you mean which one

#

there's only one that I know of

prime cliff
#

Xmlhttprequest?

bitter sundial
prime cliff
#

Ah so i need to define a json with the options and then use the request function

#

Ill try it later i just got off my computer on mobile atm thanks Tonkku

muted oxide
#

So, I was going to actually run my bot, but in Python 3.6.2 the error was :

ImportError : cannot import name DBLClient

Any ideas that could work?

earnest phoenix
#

How can i host ma bot @earnest phoenix

#

Guysss

bitter sundial
#

you buy a VPS

#

then you run the bot in the VPS

#

???

#

profit

earnest phoenix
#

What vps should i use

#

And there is a tut or something

#

@bitter sundial

languid dragon
earnest phoenix
#

The developers community is coolllll af

#

Dope

#

hi

lucid stump
#

hello are tickety down?

earnest phoenix
#

HOW do i check my dbl api?

mortal mural
#

Does anybody know how to make a Google-searching command, that can teach me?

earnest phoenix
#

How do I grab a random image from this imgur link?

#

I want to grab a pretty birb

slim heart
elder rapids
#

๐Ÿ‘€ ๐Ÿ‘€ ๐Ÿ‘€ ๐Ÿ‘€ get that ToS breaking thing out of here

gilded blaze
#

has anyone had experience with Grafana and NodeJS?

solemn obsidian
#

whats the issue?

gilded blaze
#

I can't set up a panel (graph) and docs don't help whatsoever

solemn obsidian
#

elaborate?

fleet mason
#

guys any know about a good guide that teaches me how to use help : "jhjdsja" and make a command handler for that?

#

or what its called?

earnest phoenix
#
client.on("ready", function() {
    const snekfetch = require('snekfetch')
  setInterval(() => {
  snekfetch.post(`https://discordbots.org/api/bots/stats`)
    .set('Authorization', 'supersecrettokenverynice')
    .send({ server_count: client.guilds.size })
    .then(() => console.log('Updated discordbots.org stats.'))
    .catch(err => console.error(`Whoops something went wrong: ${err.body}`));
}, 3600000)
    console.log(`Ready! with - ${client.guilds.size} servers!`)
    client.user.setActivity('fn!stats | fn!patch', { type: 'PLAYING' });
    client.user.setStatus("online");
});

this just doesnt update

uncut slate
#

how long did you wait

earnest phoenix
#

idk like a minute

#
(node:9636) ExperimentalWarning: The http2 module is an experimental API.
C:\Users\Jake\Desktop\stats\node_modules\snekfetch\src\node\index.js:93
          options.connection.close();
                             ^

TypeError: options.connection.close is not a function
#

so that meaning its an 'experimental api' i cant use it?

gusty topaz
#

no

#

the http2 thing shows up on any node process

earnest phoenix
#

what does the error actaully mean?

elder rapids
#

TypeError: options.connection.close is not a function

gusty topaz
#

close is not a function

elder rapids
#

Your actual error

gusty topaz
#

on the connection object

earnest phoenix
#

right

#

so its my connection?

#

no

#

thats not even in my code here

#

its a snekfetch error then

#

nan

bright karma
#

ok so I am back with the issue of the server count, I don't want to get the server count of just one shard I wan't it to print the server count of each shard, in the order like

Shards     Guilds
1:               1000
2:              340

like that but when I use

>eval client.shard.broadcastEval('this.guilds.size').then(results => {
  msg.channel.send(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);
})

it still display's 0 guilds as I mentioned above yesterday

spring bone
#

Would somebody Help me?

#

How i can put the "Playing" in js to "streaming"

topaz fjord
#

is there a way to share a constructor along multiple classes

uncut slate
#

How do you mean?

#

classes can extend each other but I'm not sure if that's what you're asking..?

topaz fjord
#

so what im doing is im making an api wrapper

#

my main file is class api { constructor(token) { this.token = token; } }

#

and in my other file i have ```js
class AuditLogs extends api {
async test(userid) {
return userid;
}
}

#

im trying to be able to use the function test but just doing

const user = new api("token here");
api.test("220271040658407424");
#

but im not sure how to actually do that

scenic crest
#

you'd need to do

#
const api = new AuditLogs()```
#

because AL is a child of api

#

and that's not how OOP works

uncut slate
#

yeah ^ afaik, you don't extend that way

#

I'd do something along the lines of

module.exports = class AuditLogs {
  async test(id) {
    return id;
  }
};

and then

class API {
  constructor(token) {
    this.token = token;

    // read all of the sub-modules and append them to `this`
  }
}
scenic crest
#

uh

#

test() in a constructor?

uncut slate
#

Keep in mind that's if you explicitly want to use classes for the submodules

#

async test() isn't the constructor

topaz fjord
#

oh ok thanks

uncut slate
#

but again, that's if you want the submodules to be classes, they probably don't need to be tbh

topaz fjord
#

i tried asking in Coding Den but they werent very helpful

#

@uncut slate i tried it the way you said with appending the modules with this but when i try to do api.test("359038337228472320") i get Class Constructor AuditLogs cant be invoked without new

uncut slate
#

how did you append them

topaz fjord
#

this.test = require('./types/AuditLogs');

uncut slate
#

yeah no

#

it's still a class

#

you need to pass new

topaz fjord
#

in what way should i pass new

uncut slate
#

this.test = new require(...)

topaz fjord
#

oh and api is

#
const api = require('./src/index');

const wrapper = new api("");
#

passing it as this.test = new require(...); also doesnt work for some reason

uncut slate
#

what's the error

#

oh

topaz fjord
#

same one as before

uncut slate
#

new (require(...))()

topaz fjord
uncut slate
#

show code

topaz fjord
#

Thonk wrapper.test aint a function

uncut slate
#

show code

topaz fjord
#
// Index.js

class api {
    constructor(token) {
        this.token = token;

        this.test = new (require('./types/AuditLogs'));
    }
}

module.exports = api;

// AuditLogs.js

class AuditLogs {
    async getAuditLogs(id) {
        return id;
    }
}

module.exports = AuditLogs;

// test file

const api = require('./src/index');

const wrapper = new api("");

console.log(wrapper.test("359038337228472320"))
uncut slate
#

new (require(...))()

#

missing ()

#

and

#

it'd be wrapper.test.getAuditLogs(id)

topaz fjord
#

erggg

unborn oracle
#

So i'm trying to check my bot's vote with the node lib.

const DBL = require("dblapi.js");
const dbl = new DBL(client.config.discordbots_org);
console.log(dbl.getVotes(true))```
However, all i'm getting is `Promise { <pending> }`
#

i imagine its something stupid that i'm just not noticing

uncut slate
#

it returns a promise

#

not the direct content

bitter sundial
#

really gotta update the docs

#

but

#
dbl.getVotes(true).then(votes => {
  // Do something with the votes
  console.log(votes)
}).catch(e => {
  // There was an error getting votes
  console.error(e)
})
unborn oracle
#

thanks

earnest phoenix
#

can someone explain this error, is it related to snekfetch

#
C:\Users\Jake\Desktop\stats\node_modules\snekfetch\src\node\index.js:93
          options.connection.close();
                             ^

TypeError: options.connection.close is not a function
#
client.on("ready", function() {
  setInterval(() => {
  snekfetch.post(`https://discordbots.org/api/bots/stats`)
    .set('Authorization', '')
    .send({ server_count: client.guilds.size })
    .then(() => console.log('Updated discordbots.org stats.'))
    .catch(err => console.error(`Whoops something went wrong: ${err.body}`));
}, 360000)
    console.log(`Ready! with - ${client.guilds.size} servers!`)
    client.user.setActivity('fn!stats | fn!patch', { type: 'PLAYING' });
    client.user.setStatus("online");
});
uncut slate
#

/api/bots/stats isn't right

earnest phoenix
#

oh is it for my bot?

uncut slate
#

you need to provide your bot ID

earnest phoenix
#

how can i acsess that sorry?

uncut slate
#

your bot ID.. the ID of your bot, you know

#

right click the avatar and then select copy ID assuming you have developer mode

earnest phoenix
#

oh righty

#

yes

#

thanks

uncut slate
#

the right endpoint is /api/bots/$ID/stats

earnest phoenix
#

id needs to be in template literals?

bitter sundial
#

@uncut slate ๐Ÿ‘€

uncut slate
#

No, ahah

#

first of all, don't put the $ there literally

#

you also don't need to percent-encode it, it's just the path

bitter sundial
uncut slate
#

hm?

bitter sundial
#

it's not required

uncut slate
#

oh

#

TIL

bitter sundial
#

you can post to /bots/stats

#

it'll look at the ID from the token

uncut slate
#

my bad

#

hmm, not sure what's going wrong then

earnest phoenix
#

tonkku whats the error from?

bitter sundial
#
C:\Users\Jake\Desktop\stats\node_modules\snekfetch\src\node\index.js:93
          options.connection.close();
                             ^

TypeError: options.connection.close is not a function
earnest phoenix
#

correct

bitter sundial
#

looks like a snekfetch error

earnest phoenix
#

its only after the time is up

#

shall i reinstall snekfetch?

topaz fjord
#

use superagent kek

uncut slate
#

sure, but I don't think it's an error on their side unless it's severely outdated

#

or a recent version broke

bitter sundial
#

most recent version added that

#

2 days ago

uncut slate
#

gg

earnest phoenix
#

reinstalled, same error

bitter sundial
#

snekfetch code got weirdly complex all of a sudden

uncut slate
#

try installing a past version @earnest phoenix

bitter sundial
#

npm install snekfetch@4.0.0

earnest phoenix
#

im going to console.log something and see if its something else

#

ok il give that a go

#

npm ERR! code ETARGET
npm ERR! notarget No matching version found for snekfetch@4.0.0
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Jake\AppData\Roaming\npm-cache_logs\2018-02-25T19_12_02_690Z-debug.log

#

ya

#

Should i host my bot in time4VPS

#

so no such version as 4.0.0

#

how odd

bitter sundial
#

oh?

earnest phoenix
#

Dude

#

where do you host your bot

bitter sundial
#

I wonder what the last released version was tthen

earnest phoenix
#

GUYSSSSS

#

chill out man fuck, use whatever you want, free heroku, paid, glitch

#

im trying request.post

#

request is not defined

#

ik

#

PืฉืŸื’

#

Paid plz

bitter sundial
#

@earnest phoenix 3.6.4

earnest phoenix
#

3.6.4?

#

ight

#

@bitter sundial sorry for the ping owoah - works great Updated discordbots.org stats.

#

Which host service should i use

solemn obsidian
#

or literally any vps/dedi provider

topaz fjord
#

is that trixter

toxic oracle
#

no

abstract mango
#

@earnest phoenix whatever works for you and your budget

#

that's what you should use

earnest phoenix
#

I dont know what is what

#

i can pay 20$ to month is it fine?

old burrow
#

shit494

#

ooo

earnest phoenix
#

@abstract mango

abstract mango
#

that will get you some good stuff at most cheap providers

#

look here

earnest phoenix
#

is it support NODE AND DISCORD JS and dbl api

#

@abstract mango

abstract mango
#

a vps will support any program linux (usually) can run

earnest phoenix
#

But its kind of a plugi

#

pplugin

topaz fjord
#

node isnt a plugin Thonk

earnest phoenix
#

discord js

topaz fjord
#

discord.js is a module

#

it just needs node to run

earnest phoenix
#

ok

#

and node is supported in time4vps

topaz fjord
#

you need to install it on the vps

earnest phoenix
#

how

topaz fjord
#

google

gusty topaz
#

lowendbox isnt the best deal

earnest phoenix
#

there is a full GOOD tut?

abstract crystal
#

VPS providers:

  • Digitalocean (i have referral code, DM me)
  • Linode
  • Scaleway
#

scaleway has the lowest prices but currently it has available only ARM boxes which aren't really fast

fading wigeon
#

does anyone else have problems while pushing to the API with the example provided for python in #312614469819826177 ? ```python
TypeError: _request() got an unexpected keyword argument 'json'

gusty topaz
#

@abstract crystal wrong, their ARM boxes can be faster than intel machines with the same price

#

provided your application can leverage multiple cores

#

so web servers and microservice based bots are going to work better there

abstract crystal
#

i have one vps on scaleway (C1) and DO (2GB one) and DO is better (YES web and bots work better, agreed)

gusty topaz
#

I mean

#

you can get less software for ARM

abstract crystal
#

yes

gusty topaz
#

but everything open source is almost guaranteed to work

solemn obsidian
#

Any experience on vultr?

gusty topaz
#

its too expensive for my tastes

solemn obsidian
#

Scaleway looks interesting, but I doubt they are able to provide the resources you pay for without overloading the machine

gusty topaz
#

I mean

#

ARM cores are very cheap

earnest phoenix
#

Vultr is a very good host and very reliable

gusty topaz
#

its expensive

earnest phoenix
#

Been hosting with them since 2016 and they've never let me down

#

Yes but well worth it if you dont need good specs

#

bc 24/7 uptime on a fast network

#

its great

gusty topaz
#

I need good specs

#

I am a node.js developer

earnest phoenix
#

most node bots dont need good specs unless they're bigger bots

#

or poorly made

gusty topaz
#

or they cache last 1000 messages in each channel in RAM in a global var as d.js message objects oof

earnest phoenix
#

wew

#

but yes

#

I'd go with Vultr over Scaleway

gusty topaz
#

I should switch to hdd caching

earnest phoenix
#

Scaleway gives me headaches

#

I dont host my bots on Vultr tho

#

bc cant afford

abstract crystal
#

where do you (host them)?

earnest phoenix
#

I use VPSDime

gusty topaz
#

I am switching hosts and so rn I am running my bot on an old computer in my grandfathers basement (they have really fast internet)

earnest phoenix
#

4 intel xeon cores with 6GB of RAM for $7

inner jewel
abstract crystal
#

general performance?

inner jewel
#

oof

#

i can't move

#

2TB traffic too low

gusty topaz
#

hmmm

earnest phoenix
#

I've been with them for a few months now and they've been really good with hosting @cosmic shoal @cinder stream and @clever fog as well as a few other things outside of Discord

inner jewel
#

RX bytes:2597627340356 (2.5 TB) TX bytes:1937242466639 (1.9 TB)

gusty topaz
#

I have no data limit on home internet

abstract crystal
#

same here

earnest phoenix
#

I had a TB limit for two months

#

had to get that shit off

#

bc once we reached 900GB of usage

#

it started crashing PUBG

inner jewel
#
Ping: 3.587 ms
Download: 591.51 Mbit/s
Upload: 255.88 Mbit/s```
abstract crystal
#

all providers in my country have unlimited data

inner jewel
#

current internet (scaleway)

earnest phoenix
#

yeah my home internet is around 300Mb down and 10Mb up

quasi marsh
#

Well I've vowed to switch if I get more multiday outtages

inner jewel
#

mine's 50/50

earnest phoenix
#

lemme get my bot server speed

quasi marsh
#

The only outage I've had recently was when I acidentially ran poweroff on server instead of local

inner jewel
#

but i usually get 20-40 up/down on my laptop

earnest phoenix
inner jewel
#

because reasons aka brother hogging up all internet

earnest phoenix
#

its usually around there

gusty topaz
#

hmmm

#

I have 10/0.5 at home

#

my grandparents have 500/50 ;-;

#

and they pay half as much as me

solemn obsidian
#

Define good specs (about vultr)

earnest phoenix
#

Do you need lots of ram and more than 1-2 CPU cores

#

1-2 x86 intel xeon cores

solemn obsidian
#

Most intensive app would be probably lavalink

earnest phoenix
#

Well figure out what specs you need

#

and compare prices

#

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

#

idk ur budget

inner jewel
#

Threads: 138

abstract crystal
solemn obsidian
#

Just for lavalink nodes, planning on 2x 20 dollar vpses in eu and us

topaz fjord
#

lol

solemn obsidian
#

What exactly is funny?

topaz fjord
#

u

#

how to find emoji ids?

hushed oyster
pale light
#

\๐Ÿ

hushed oyster
#

put a backslash before the emoji

#

unless it isn't a custom emoji

pale light
hushed oyster
#

if it isn't a custom emoji, just do :emoji:

topaz fjord
#

doesnt really work that well for me

inner jewel
#

@solemn obsidian lol how many voice connections?

#

that seems a bit excessive

solemn obsidian
#

i mean i dont know how much it uses

#

But probably just gonna start with $10 one

#

Don't know where to ask about resource usage though blobShrug

inner jewel
#

pretty low

#

you can probably handle 50 VCs with 1GB/4C

#

and still have resources to spare

#

(scaling my bot's usage would be close to that, and both use LP)

solemn obsidian
#

Thats good to know, thanks

unborn oracle
#

is there a way to check when a user voted? I would like to reward people who vote everyday with extra currency.

abstract crystal
#

you have webhook ( weebhook ) or just the usual GET

unborn oracle
#

How could I setup a webhook that my bot can listen to (JS)?

quasi marsh
#

You will need a webserver, I think you can use express

#

I don't know if you use Eris but afaik you can combine express and eris just fine

unborn oracle
#

discord.js

quasi marsh
#

I'm not sure about combining Express and discord.js

#

Otherwise, my solution is, although for python, to have a separate webserver and bot which are both connected to the same database

#

Using redis pubsub which triggers something in another bot that shows vote count in a channel, and the main bot can just read the vote count from the database

unborn oracle
#

could i possibly put a discord webhook URL in, and have it post in a private channel the webhook's data?

#

and then have my bot parse it

inner jewel
#

no

unborn oracle
#

out of curiosity, why wouldnt that work?

gusty topaz
#

the webhook format that dbl uses

#

isnt a message webhook

#

its a data webhook designed to be received by bots

unborn oracle
#

ah

inner jewel
#

if you have redis and want to use a pubsub i have a (go) webserver that pushes to a redis pubsub for webhooks

#

resource usage should be fairly low

quasi marsh
#

You could parse the data yourself to transform it into a discord webhook

inner jewel
#

no point in doing that tbh

#

would just complicate stuff

quasi marsh
#

I have it because of curiousity

#

Well the bot just posts it to a channel

inner jewel
#

and you'd have to handle ratelimits

#

if for whatever reason you got, say, 6 upvotes in 5s

quasi marsh
#

tfw you 429 DBL

inner jewel
#

you'd get a 429 on the discord webhook

quasi marsh
#

I just use webhooks on a server I mod for twitter and weather

#

Just says everyday at 7:00 that's its hella cold and the bot hopes y'all freeze to death

#

But yeah I'm still thinking about a feature to use for upvote locking

#

But first dbl needs to actually fix the upvote login bug

gusty topaz
#

Hmmm

#

About webhook security

#

You could paste a webhook url with a secure string in it

#

Like

#

GET /hook/:hookToken

#

Or post

#

Or whatever

quasi marsh
gusty topaz
#

Hmm

quasi marsh
#

Have your webserver check the querystring

gusty topaz
#

Something like that

quasi marsh
#

I've actually posted in #414124730715734068 that there should be a way to set an Authorization header

#

So it's a header and not a querystring

#

Although afaik post requests are decently secure

gilded blaze
#

Anyone know a lib that is more efficient than discord.py?

earnest phoenix
#

Anyone here know about python?

#

Nope?

abstract mango
#

yeah, what's up

earnest phoenix
#

and then it closes automatically

quasi marsh
#

try installing aiohttp again

#

python3 -m pip install aiohttp

#

Or your OS's equivalent of pip

abstract mango
#

ye

earnest phoenix
#

Ok, I'll try

cerulean spade
#

ะบั‚ะพ ั€ัƒััะบะธะน?

#

ะฟะพะผะพะณะธั‚ะต

#

ะบะฐะบ ัƒะทะฝะฐั‚ัŒ ัะฒะพะต ะฐะนะดะธ

pale light
#

Stop

abstract mango
#

@earnest phoenix your internet also might be going

pale light
earnest phoenix
#

Well my internet is ok sooo

#

Well

#

my bots fixed now

#

Thanks guys!

cerulean spade
#

to create a bot you need to have your website ready?

earnest phoenix
#

no

#

Just leave it blank

#

How do I use webhooks to see if someone upvoted?

inner jewel
#

you need to run a webserver

earnest phoenix
#

Is there an easier way?

#

I just want to know if an user upvoted

inner jewel
#

oh

#

you can use the api

earnest phoenix
#

@quasi marsh Thanks! @abstract mango Thanks!

inner jewel
#

GET /api/bots/:bot_id/votes

abstract mango
#

np

earnest phoenix
#

oh ok

#

so how'd I do that in node?

inner jewel
#

you need the (dbl) bot token

earnest phoenix
#

Does the get request return an array?

#

oh

#

This looks ez

#

ty

earnest phoenix
#

Is there a way to get how many bots are in a server in discord.js?

pale light
#

@uneven trellis

meager lintel
#

@earnest phoenix It is possible to create a script that goes through all the users in the server and see if they have the bot property. https://discord.js.org/#/docs/main/stable/class/User?scrollTo=bot

prime cliff
#

Yea that is too easy bloblul

wide tree
#

help

#

!ftn kingmyc

pale light
frank otter
#

SUGGESTION:
Bind Bot to Channel, Make it so the bot can not be moved from channel, if it is it auto goes back to channel ID

topaz fjord
#

No

#

The server owners can do that, only the bot owners can

frail kestrel
#

oh nvm

#

it disappeared

#

and it appeared again wtf

earnest phoenix
#

C:\Users\q\Desktop\Bots\events\message.js:16
let perms = client.elevation(message);
^

TypeError: client.elevation is not a function
at Client.module.exports.message (C:\Users\q\Desktop\Bots\events\message.js:
16:22)
at Client.emit (events.js:165:20)
at MessageCreateHandler.handle (C:\Users\q\Desktop\Bots\node_modules\discord
.js\src\client\websocket\packets\handlers\MessageCreate.js:9:34)
at WebSocketPacketManager.handle (C:\Users\q\Desktop\Bots\node_modules\disco
rd.js\src\client\websocket\packets\WebSocketPacketManager.js:102:65)
at WebSocketConnection.onPacket (C:\Users\q\Desktop\Bots\node_modules\discor
d.js\src\client\websocket\WebSocketConnection.js:325:35)
at WebSocketConnection.onMessage (C:\Users\q\Desktop\Bots\node_modules\disco
rd.js\src\client\websocket\WebSocketConnection.js:288:17)
at WebSocket.onMessage (C:\Users\q\Desktop\Bots\node_modules\ws\lib\EventTar
get.js:103:16)
at WebSocket.emit (events.js:160:13)
at Receiver._receiver.onmessage (C:\Users\q\Desktop\Bots\node_modules\ws\lib
\WebSocket.js:146:54)
at Receiver.dataMessage (C:\Users\q\Desktop\Bots\node_modules\ws\lib\Receive
r.js:389:14)

#

wft?

restive silo
#

thats not a thing

deep parrot
#

^

frail kestrel
#

what were u trying to do

jagged birch
#

Read the error. โ€œclient.elevation is not a functionโ€ @earnest phoenix

gleaming summit
#

Anyone can help me with enmap-level (Install C++ compiler for mac)

#

installution

abstract mango
#

@frail kestrel normal

#

since linters can't see how the function => command, it assumes it's unused

earnest phoenix
#

Guys how do i send messages in specific channel? Discord js

gusty topaz
#

use the get functions on a collection of channels avaliable in the client object

#

to get the channel by id

earnest phoenix
#

But the id change from server to server

#

@gusty topaz can you drop an example

gusty topaz
#

#Client.channels.get(channelId)

#

returns the channel

earnest phoenix
#

How do i choose channel id?

gusty topaz
#

idk

#

its up to you

earnest phoenix
#

It cant be on a channle nane

#

Name

gusty topaz
#

no

#

find is less efficient in collections

#

.get(id)

earnest phoenix
#

No iddd the NAME

#

Can you give me an examplw

gusty topaz
#

hmmm

earnest phoenix
#

Dude plzzz

fathom pebble
#

@earnest phoenix you want to find a channel name?

earnest phoenix
#

Ysr

#

Yess

fathom pebble
#

client.channels.find('name', 'logs'); I think that works

earnest phoenix
#

Logs?

fathom pebble
#

logs is the channel name

#

it could be anything

earnest phoenix
#

And name

#

What is name

#

Dudeee

quiet bobcat
#

How would I go about making a page system in discord.js?

earnest phoenix
#

Not noww

fathom pebble
#

@earnest phoenix name means you want the channel name
if you wanted the id, you would use id

earnest phoenix
#

OK'

gusty topaz
#

@quiet bobcat wdym?

#

in discord or a website

earnest phoenix
#

message.channel.find('name', 'staff').send({embed: {

#

Thats now woking

#

not*

quiet bobcat
#

Discord??? I want to make if there's more than 10 songs in a queue it creates another page

gusty topaz
#

ah

#

so pagination

earnest phoenix
gusty topaz
#

you essentially want to display a page

quiet bobcat
#

Yeah

gusty topaz
#

and then either wait for a reaction

#

or wait for a command

fathom pebble
#

@Apophis#6414 it's client/bot.channel.find

gusty topaz
#

to switch page/exit

earnest phoenix
#

Without send?

fathom pebble
#

You would set the channel as a var

gusty topaz
#
quiet bobcat
#

ah

#

thanks

earnest phoenix
#

What var?

quiet bobcat
#

alot

gusty topaz
#

with those 2 you could create a decent reaction based or message based system

#

for paging

quiet bobcat
#

๐Ÿ‘

fathom pebble
#

so var sendthemessagehere = client.channels.find('name', 'logs')

earnest phoenix
#

hi

#

guys

#

i want to host

#

my bot

#

how i can

elder rapids
#

Buy a vps

earnest phoenix
#

replace find with sendthemessagehere?

#

give me link @elder rapids

gusty topaz
#

๐Ÿคฆ

elder rapids
earnest phoenix
#

ok

gusty topaz
#

@earnest phoenix there are plenty of hosters

#

some free some paid

earnest phoenix
#

i want

elder rapids
#

Prefer paid

gusty topaz
#

do you want free hosting or paid?

#

free is really, really shit

earnest phoenix
#

free

elder rapids
#

Oh dear

earnest phoenix
#

and paid

gusty topaz
#

ok

#

let me get you some links

earnest phoenix
#

ok

elder rapids
#

Digital Ocean, OVH

#

He'll place more

earnest phoenix
#

@gusty topaz ok

gusty topaz
#

Comprehensive list of hosting companies
Free
https://glitch.com/ - They can host node.js programs, needs some setup
https://heroku.com/ - They can host boats in almost any lang, needs some setup

Paid
https://www.ovh.com/ - Cheap servers, not very fast network, quite decent reliability
https://www.scaleway.com/ - Cheap servers, decent network, decent reliability
https://www.vultr.com/ - Expensive, very good servers, excellent reliability
https://www.digitalocean.com/ - Expensive, extremely fast network, excellent reliability
https://vpsdime.com/ - Cheap, never have had experience with it
https://cloud.google.com/ - Expensive, scaleable, hosted by google, has free trial,
https://aws.amazon.com/ - Expensive, scaleable, hosted by amazon, has free trial
https://azure.microsoft.com/en-us/ - Expensive, scaleable, hosted by microsoft

Any feedback relating to this list, please ping me

#

ehm

#

how to disable OG embeds

earnest phoenix
#

thx

elder rapids
#

That needs a ๐Ÿ“Œ

gusty topaz
#

ffs discord

#

I need to fix that message

#

so the links dont embed

#

ok

#

I figured it out

#

ok

#

I had to enclose links in <>

#

And I agree about ๐Ÿ“Œ

elder rapids
#

pings mod to pin

gusty topaz
#

nah

#

For now I will just save it in a pernament gist

bitter sundial
#

copied from dapi I see

gusty topaz
#

?

#

I wrote it out myself

#

lol

bitter sundial
#

sure

gusty topaz
#

k

earnest phoenix
#

@gusty topaz what is the best to host my bot

gusty topaz
#

I have used ovh and scaleway

#

for my boats

earnest phoenix
#

is it

gusty topaz
#

both are fairly decent

earnest phoenix
#

good

gusty topaz
#

scaleway ARMv8 servers are quite fast

#

and OVH VPSes are not bad too

earnest phoenix
#

how is better

#

OVH

#

or scaleway

gusty topaz
#

I currently use scaleway

#

and I am quite happy with it

earnest phoenix
#

ok thx at all

old glade
#

I'm using a google cloud VPS

#

and it's really good

lethal sun
#

I'm using virmach VPS

#

and it's really good

weak parrot
#

I'm using a Core 2 Quad based system to host bots
and it's really good

earnest phoenix
#

How can i get the server icon

#

or name

#

@languid dragon hmm

languid dragon
#

ohhhhh myyy goooodddddd

#

just wait for an answer

earnest phoenix
#

XDDDDDDDD

languid dragon
#

no

earnest phoenix
#

no

#

sry bro

lethal sun
#

@earnest phoenix message.

#

something...

#

dot

#

name

#

...

vestal moth
#

This is how I would do prefixes right? py prefix = ["b!", "Brooklyn, "] bot = AutoShardedBot(command_prefix=prefix, description=description)

quiet bobcat
#

How would I go about adding reactions to a message in a specific channel in discord.js?

#

Ping me if you know how (going to sleep)

waxen quest
#

How can I hide the server / shard counters on my bot's page? please DM or ping.

quasi marsh
gusty topaz
#

iOS?

earnest phoenix
#

When i slice message content how can i remove mention

quasi marsh
#

No Firefox and Google Chrome

earnest phoenix
#

Nodejs

quasi marsh
#

@gusty topaz Actually iOS was the only one that did work

gusty topaz
#

hmm

#

ReeeeeeeCaptcha

#

dont use it

earnest phoenix
#

When i slice message content how can i remove mention in discordjs

quasi marsh
#

Interesting

#

Google's page is 404

olive ridge
#

What is .slice do?

#
if (message.content.startsWith(config.prefix + "say")) {
    if (message.author.id !== ("344671380412956673" && "275804941916962817")) {
      return message.channel.send(":x: Soupyz Only Command :x:")
    }
    message.delete(1);
    message.channel.send(message.content.slice(5, message.content.length));
  }
});
#

This no work

#

Only the second id person can use it

#

I tried || but it doesn't work as we;ll

#

Tried using ^ aswell ;-;

west cave
#

Oh

olive ridge
#

wait lol && is and

west cave
#

Lol

olive ridge
#

but others no work

west cave
#

Oh ok

olive ridge
#

;-

#

is

if (message.content.startsWith(config.prefix + "say")) {
    if (message.author.id !== ("344671380412956673" || "275804941916962817")) {
      return message.channel.send(":x: Soupyz Only Command :x:")
    }
    message.delete(1);
    message.channel.send(message.content.slice(5, message.content.length));
  }
#

Coorect syntax?

west cave
#

Should be

olive ridge
#

Wait

#

lemme try again

#

gotta get the second person to test it

#

NOPE

#

it dont work

#

Halp

jagged birch
#
if (message.content.startsWith(config.prefix + "say")) {
    if (message.author.id !== "344671380412956673" && message.author.id !== "275804941916962817") {
      return message.channel.send(":x: Soupyz Only Command :x:")
    }
    message.delete(1);
    message.channel.send(message.content.slice(5, message.content.length));
  }

Try this @olive ridge

earnest phoenix
#

hello anyone here do a canvas?

olive ridge
#

Ok, Pete! :3

#

It works! Thank you Pete. :3

#

I will remember to retype the message.author.id !== part.

jagged birch
#

np

languid dragon
#

does anyone know a lot about forking / spawning child_processes in nodejs?

frail kestrel
#

no

restive silo
#

i know a bit

#

maybe i can help

earnest phoenix
#

oh, its all good thanks @restive silo
figured my problem out lul

restive silo
#

wat you aren't the real ken angeryKirby

languid dragon
#

yes he is

restive silo
languid dragon
#

memes

restive silo
#

i c

languid dragon
#

was still logged into my alt so yes

restive silo
#

o

earnest phoenix
#

How do i make a clear messages command discordjs

restive silo
#

bulkDelete is what you want

earnest phoenix
#

@restive silo and how i can use it for sfecific amount of messages, example plz.

restive silo
#

.....

#

look in the d.js docs there is an example for that

earnest phoenix
#

@restive silo can you please send it?

#

Cant find it

solemn obsidian
#

What page are you currently looking at

earnest phoenix
solemn obsidian
#

Now there is a search bar

#

Type there bulkDelete

earnest phoenix
#

How do i set the number?

solemn obsidian
#

by typing it?

earnest phoenix
#

@solemn obsidian its suppost to be var?

hidden fern
#

I'm deceased

old glade
#

shit happens bro

#

at least you're out of this shitty painful world

solemn obsidian
#

read the first argument description to bulkDelete

earnest phoenix
#

xd

lucid stump
#

Hello, im trying to find some support ticked bot to host my self, like the bot TIM and TICKETY.. some one knows of a bot ? i want to host it my self for a "cean" bot pacage on my srver

primal escarp
#


parse error: Expected another key-value pair at line 17, column 3


parse error: Expected another key-value pair at line 17, column 3```

what does this mean?
#

it wont load any shards on my bot

umbral pelican
#

probably json

daring dust
#

Hey guys, heroku says that my free dyno hours have been used up for February 2018 so my bot is offline. If I don't do something fast i'll get pulled off this list. Can anyone help me to get the bot online or give alternative and free hosting solutions ples?

#

I created a new account on heroku and a project on that account to host my bot as a backup however I don't know if's it's actually working

elder rapids
#

You won't get pulled off the list for being offline

#

At least I rarely see them doing it

restive silo
#

you wont aslong you aren't certified

daring dust
#

oh thank you. so I can figure it out at my own pace i see

primal escarp
#

Locally host it for now.

daring dust
#

are there any other free hosting services. i couldn't find any good ones

primal escarp
#

Raspberry Pi

daring dust
#

how would i keep it 24/7 on local?

primal escarp
#

You cant

daring dust
#

rip that's what i thought

south finch
#

well you can but you'd be killing your pc doing that hmmm

primal escarp
#

^

gusty topaz
#

hmmm

#

most PCs arent harmed by being on 24/7

#

some older hard drives can go poof

#

but if you have an SSD

#

then it shouldnt be an issue

#

also fans

south finch
#

it's still not exactly the best thing to do though

gusty topaz
#

meh, I had my PC on for 2 months at one point

south finch
#

what the hell

gusty topaz
#

couldnt be bothered to shut it down

#

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

heady zinc
#

afaik my pc was running since 2017 until today's windows update

gusty topaz
#

windows isnt made for that

heady zinc
#

runs well, just need to clear the cache at some point

gusty topaz
#

and get a virus to delete all your registry keys

heady zinc
#

sure

#

i should use linux and get npm to fuck my permissions

gusty topaz
#

that was already fixed

#

and you should never use bleeding edge BETA versions on prod servers

inner jewel
#

the biggest issues of having a computer on 24/7 are power usage and noise

#

but you should turn it off every once in a while

south finch
#

^

elder rapids
#

power usage for me

#

noise not an issue

#

My computer is silent as fuck

#

But yes indeed that can be a problem, unless you store it somewhere

#

afaik depends on your PC for that

inner jewel
#

also if your power runs out/internet has issues

#

you'll have downtime

#

datacenters usually have backup power sources and more than one internet connection from different ISPs

elder rapids
#

Unless you're crazy enough to buy a UPS

#

The internet would still be a problem though

daring dust
#

lel i have 5 operating systems on my mac. sure i could use 1 distro of linux to host ๐Ÿ˜›

weak parrot
#

Honestly power in most places of the word per kilowatt is pretty cheap and if you host it on a PC that doesn't use much power this shouldn't be an issue

gleaming summit
#

anyone help me with install windows-build-tools ๐Ÿ˜ญ

gusty topaz
#

you need to run cmd/powerhsell as an admin

#

then npm -g i windows-build-tools

heady zinc
#

powerhsell

gleaming summit
#

Why I have a prob with installing is I am in linux env

gusty topaz
#

๐Ÿคฆ

gleaming summit
#

There is no cmd or powershell

gusty topaz
#

linux-build-tools

heady zinc
#

you don't install windows-build-tools on linux

gusty topaz
#

ok

#

are you in a terminal?

gleaming summit
#

SSH

#

yes

gusty topaz
#

ok

#

do su

#

and type in your root password

gleaming summit
#

Also I can do little

#

You don't need you tell me

#

like that

#

so?

gusty topaz
#

well, you need root access

#

to install linux-build-tools

gleaming summit
#

@gusty topaz ``npm i -g linux-build-tools`

gusty topaz
#

yes

gleaming summit
#

type this?

#

and one more plz

#

Is that command working on mac env too?

gusty topaz
#

npm i -g build-tools

gleaming summit
#

@gusty topaz Package not found..?

gusty topaz
#

dont use the linux- prefix

gleaming summit
#

And build-tools isn't worked

#

didn't

gusty topaz
#

what error

gleaming summit
#

I'll do it again

#

wait a sec

#

I remember the err was OS isn't win32?! go back

gusty topaz
#

dont prefix it with windows-

#

just

#

npm i -g build-tools

gleaming summit
#

So server is working. I'll mention you when its done

#

@gusty topaz

#
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! phantomjs-prebuilt@2.1.16 install: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the phantomjs-prebuilt@2.1.16 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2018-02-27T17_35_12_646Z-debug.log
#

part of err

gusty topaz
#

send me the file

#

/root/.npm/_logs/2018-02-27T17_35_12_646Z-debug.log

gleaming summit
#

ok

gusty topaz
#

put it on a paste/hastebin

earnest phoenix
#

guys i have c;ear command

#

and when the command is not giving a num to clear

#

the bot crash

#

like ?clearall

quiet bobcat
#

check if it's a number then

earnest phoenix
#

how

#

discordjs plz

quiet bobcat
#

that's for discord.js

#

or all js for that matter

gleaming summit
#

@gusty topaz

#

dm plz

earnest phoenix
#

How do i check in js if something wrond

#

wrong

#

in the "if" command

glossy sand
#

what do you mean by "something wrong"?

earnest phoenix
#

that not true

gleaming summit
#

um... installing build-tools not solved

earnest phoenix
#

like if (i = gay) FALSE { YOURE STRIGHT}

glossy sand
#

it's like

earnest phoenix
#

sry enslish bro

gusty topaz
#

oof

glossy sand
#
if (condition) {
  // do stuff
}
gusty topaz
#

its literally basic language syntax

earnest phoenix
#

yes

gusty topaz
#

if you dont know that... watch/read some tutorial

#

pls

earnest phoenix
#

but if its false do it

glossy sand
#

if the condition evaluates to true, do stuff is executed

gusty topaz
#

its else

glossy sand
#

oh you can negate a condition

gleaming summit
#

@gusty topaz do you know why??

earnest phoenix
#

and if its false?

gusty topaz
#
if (condition) {
 dostuff();
} else {
 dootherstuff();
}
glossy sand
#

the ! operator flips a condition

gusty topaz
#

@gleaming summit I have no idea anymore

glossy sand
#
if (!condition) {
  // do stuff
}
gleaming summit
#

@gusty topaz Also thank you very much

glossy sand
#

so like

if (!person.isGay()) {
  // the person is straight
}
gleaming summit
#
if (condition) do stuff
glossy sand
#

using your.... admittedly weird example

gusty topaz
#

phanta

#
if (condition) {
 dostuff();
} else {
 dootherstuff();
}

is better than the ! approach if you want to handle both cases

earnest phoenix
#

only 1 case

#

How do i check if var is sunber

#

number

glossy sand
#

use the typeof keyword

earnest phoenix
#

?

glossy sand
earnest phoenix
#

How do i send message to specific channel

topaz fjord
#

Are you using discord.js

earnest phoenix
#

Discordjs

#

yes

topaz fjord
#

Look at the discord.js docs

#

They have everything you need

earnest phoenix
#

How that called

quiet bobcat
#

?

topaz fjord
#

Wtf

earnest phoenix
#

What to search

quiet bobcat
#

there

earnest phoenix
#

What to look for

quiet bobcat
#

...

earnest phoenix
#

What the name of the send message o specific channel command

#

of*

quiet bobcat
#

look client or smth

#

there

#

rest you have to do yourself

earnest phoenix
#

How do i choose channel with his name

quiet bobcat
#

wym?

earnest phoenix
#

How to i send a messgae to a channel by his name

#

like send logs to channel named staff

quiet bobcat
#

google it?

earnest phoenix
#

Not very helping

#

PLZ HELP ME

solemn obsidian
#

You probably should learn basic javascript syntax and how to use docs before doing a discord bot

lucid stump
#

hello

pale light
old glade
#

hello ๐Ÿ˜ƒ

topaz fjord
#

did you relaunching

mossy fjord
#

How would I get this to send a picture not link

#

const Commando = require("discord.js-commando");
const Discord = require("discord.js");
const { get } = require('snekfetch');

module.exports = class PrefixCommand extends Commando.Command {
constructor(client) {
super(client, {
name: "catimage",
memberName: "catimage",
group: "basic",
description: "Get a random image of a cat!"
});
}

async run(msg) {
const response = await get('http://random.cat/meow')
const Link = response.body.file;
msg.attachment(Link);
}
}

#

@steel heath

#

Iโ€™m thinking docs confusingly dumb

steel heath
#

And I don't know your question sorry.

heady zinc
#

then continue not to

mossy fjord
#

K

heady zinc
mossy fjord
#

@heady zinc can you help

heady zinc
#

do smth smart

#

like idk send a message back

#

if you use commando cuz you don't know js at all, you may want to at least learn the basics

gusty topaz
#

I used to use commando because lazy

#

And it's not like you don't have to know the basics to use it

#

Ok so

#

In the file you want to run

#

You have to have a fuction

#

And all code in it

#

You do

#

module.exports = function(args) { code };

#

Then you do require('./filePath')(args)

#

Yes the command file

#

Well

trim plinth
#

module = file

gusty topaz
#

If you put ./ Before the file name

#

It will load from the directory you are in

#

Not node_moduless

#

So essentially ./help would load help.js

trim plinth
#

./ = put that shit in front of file names if you want to call one

gusty topaz
#

From your folder

trim plinth
#

in your code*

gusty topaz
#

Well

#

I can go in depth why you use that in bash to run a file as well

#

But walls of text are hard to type out on a phone

#

Nooo

#

Its module.exports

trim plinth
#

for example: ```javascript
const OwO = require("./mmLol.js");

gusty topaz
trim plinth
#

main file

#

whatever its called

#

try yourself

gusty topaz
#

I already mentioned it

#

Previously

#

require('./ping')()

#

Dont forget ./

#

Before filename

#

And no js extension

#

So ./ping

#

And yes

#

That will work

trim plinth
#

even though I barely helped, yw

trim plinth
#

nope

abstract mango
#

well

#

maybe if you use phpmyadmin and mysql
but both are shit

novel bronze
#

I have an object; let's call it result.
console.log(result) looks like this:

[ { '$': { num_results: '1' }, METAR: [ [Object] ] } ]```
but when when I do `console.log(result.METAR)`, it returns `undefined`.

Can someone help? This is JS btw
bitter sundial
#

looks like result is an array

#

so to access METAR you need to look for it from the first (and only?) element of the array

novel bronze
#

.

#

o

#

wow I didn't notice that

#

mfw haven't touched JS in like a year; fml

#

Thanks for the help lmao

still edge
#

idk dfdffdf

paper robin
#

Idk

#

idk

pale light
unborn stone
#

@terse quarry I don't know how to use the apis tho

terse quarry
#

Use a JS Reddit wrapper

unborn stone
#

@terse quarry don't know what that is

terse quarry
#

...

  1. Please do not ping me every response
  2. Google is your friend
unborn stone
#

ok

terse quarry
#

@unborn stone Did you figure out what you needed?

unborn stone
#

yes thank you

terse quarry
#

np

earnest phoenix
#

how do i send messages in specific channel by his name d.js

umbral pelican
#

his name thonkbag

#

you could use .find()

earnest phoenix
#

i used it

olive ridge
#

I'm trying to add economy bot code.
Here is the part that seems troublesome:

let userData = JSON.parse(fs.readFileSync'Storage/userData.json', 'utf8'));

The console returns:

C:\SoupyBot\Storage\bot.js:8
let userData = JSON.parse(fs.readFileSync'Storage/userData.json', 'utf8'));
                             ^^^^^^^^^^^^

SyntaxError: missing ) after argument list
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:607:28)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)
    at Function.Module.runMain (module.js:684:10)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:608:3
#

WAIIIT

earnest phoenix
#

forget an (

olive ridge
#

yeah

#

next error

earnest phoenix
#

can you help me after?

olive ridge
#

i can try

#

Im not good at coding

earnest phoenix
#

ok tnx

olive ridge
#
C:\SoupyBot\Storage\bot.js:82
  fs.writeFile('Storage/userData.json', JSON.stringify(userData), (err) -> {
                                                                         ^

SyntaxError: Unexpected token >
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:607:28)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)
    at Function.Module.runMain (module.js:684:10)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:608:3
earnest phoenix
#

same

#

another ) is missing

#

('Storage/userData.json', JSON.stringify(userData))

olive ridge
#
client.on("message", (message) => {
  if (!message.content.startsWith(config.prefix) || message.author.bot) return;

  //Economy Commands
  if (!userData[sender.id + message.guild.id]) userData[sender.id + message.guld.id] - {}
  if (!userData[sender.id + message.guild.id].money) userData[sender + sender.id + message.guild.id].money = 1000;
      
  fs.writeFile('Storage/userData.json', JSON.stringify(userData), (err) -> {
      if (err) console.error(err);
  })
#

its there

austere meadow
#

its => not ->

olive ridge
#

ok lol

#

MORE

#

;-;

earnest phoenix
#

how do i send messages in specific channel by his name d.js

olive ridge
#

if u use

#

message.channel.send it will send the message in the channel the command was writtin.

earnest phoenix
#

yes

#

but i want to other cannel

olive ridge
#

ok

austere meadow
#

you can grab channels in a guild by using guild.channels and then using the get function on that

#

so channels.get(id)

#

same goes with client.channels

earnest phoenix
#

let channelss = guild.channels.get("name", "staff");

#

is it fine?

#

channelss.sendMessage({embed: {

olive ridge
#
fs.js:646
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

Error: ENOENT: no such file or directory, open 'C:\SoupyBot\Storage\Storage\userData.json'
    at Object.fs.openSync (fs.js:646:18)
    at Object.fs.readFileSync (fs.js:551:33)
    at Object.<anonymous> (C:\SoupyBot\Storage\bot.js:8:30)
    at Module._compile (module.js:643:30)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)
    at Function.Module.runMain (module.js:684:10)
    at startup (bootstrap_node.js:187:16)
#
if (message.content.startsWith(config.prefix + "ping")) {
    message.channel.send({embed: {
      color: 3447003,
      description: ":ping_pong: Pong!" 
    }});
  }
``` my embed
#

comd

#

Not related to error

austere meadow
#

?

#

@earnest phoenix yeah that will work

#

although

#

you'd need to use find not get if you're using "name"

#

and i dont know why you're using sendMessage

earnest phoenix
#

it wrote that guild is undefined

austere meadow
#

then you can get a guild with the same method
client.guilds.get(id)

earnest phoenix
#

i want by name

#

ReferenceError: guild is not defined
at Client.client.on.message (C:\Users\user\Desktop\TheTeller\bot.js:194:25)
at Client.emit (events.js:160:13)
at MessageCreateHandler.handle (C:\Users\user\Desktop\TheTeller\node_modules\discord.js\src\client\websocket\packets\handlers\MessageCreate.js:9:34)
at WebSocketPacketManager.handle (C:\Users\user\Desktop\TheTeller\node_modules\discord.js\src\client\websocket\packets\WebSocketPacketManager.js:103:65)
at WebSocketConnection.onPacket (C:\Users\user\Desktop\TheTeller\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:330:35)
at WebSocketConnection.onMessage (C:\Users\user\Desktop\TheTeller\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:293:17)
at WebSocket.onMessage (C:\Users\user\Desktop\TheTeller\node_modules\ws\lib\event-target.js:120:16)
at WebSocket.emit (events.js:160:13)
at Receiver._receiver.onmessage (C:\Users\user\Desktop\TheTeller\node_modules\ws\lib\websocket.js:137:47)
at Receiver.dataMessage (C:\Users\user\Desktop\TheTeller\node_modules\ws\lib\receiver.js:409:14)

#

the id change