#development

1 messages ยท Page 990 of 1

pure lion
#

could it be because some guilds don't have memberCount?
w e h ?

feral aspen
#

You know.

#

Nvm

#

I just kept it like this better.. ๐Ÿคทโ€โ™‚๏ธ

#

bot.user.setActivity(`${bot.users.cache.size} members! || a!help`, { type:"WATCHING", })

pure lion
#

should I keep it as it is better?
you could just say the guild amount, if you update the description at every member youre gonna get rate limited

still merlin
pure lion
#

Does anyone know why this happens?
@still merlin send log

pale vessel
#

here's what i would do for my bot client.guilds.map(x => x.memberCount).reduce((x, y) => x + y)

#

mine returned NaN too but this fixed it

solemn latch
pure lion
#

woooooooooooooooooooooooooooooooooooooooooo

still merlin
pale vessel
#

can you like actually send the error instead of "error happened"

pure lion
#

^

still merlin
#

${error} is undefined apparently

pure lion
#

uh

#

:exhale:

pale vessel
#

cache?

still merlin
#

and I dont know how to define it

pale vessel
#

are you still on v11?

pure lion
#

try {eval} catch (err) {send(err)}

still merlin
#

No im on v12

pale vessel
#

guilds is a manager

#

so you know...

#

manager holds the cache

pure lion
#

client.guilds.cache.map

#

uwu

still merlin
#

I evaled catch (err) {send(err)} and a error

#

is the eval command incorrect?


client.on("message", (message) => {
  const args = message.content.split(" ").slice(1);

  if (message.content.startsWith(prefix + "eval")) {
    if (message.author.id !== "529770099285032980")
      return message.channel.send(
        "**error** Only the bot owner can execute this command!"
      );
    try {
      const code = args.join(" ");
      let evaled = eval(code);

      if (typeof evaled !== "string") evaled = require("util").inspect(evaled);

      message.channel.send(clean(evaled), { code: "xl" });
    } catch (err) {
      message.channel.send(``:x: Error preforming eval command`");
    }
  }
});
pale vessel
#

so err is undefined you say?

still merlin
#

no error is

pale vessel
#

just send the error message?

#

err.message

digital ibex
#

wait what, i've literally told u before to stop creating an event for each command.. why are you still doing that?

pure lion
#

bruj

pale vessel
#

sounds like a bad memory leak

digital ibex
#

it was a while ago too, and they had one then too

still merlin
#

You never said that OfficalyLost, Or I didnt see it

lusty quest
#

a event for every single command? wtf?

pale vessel
#

better get that checked out

lusty quest
#

would be to annoying for me to keep track of

digital ibex
#

yes you did, you even said it already says you've got a memory leak when i said your going to get a memory leak..

pure lion
#

You never said that OfficalyLost, Or I didnt see it
its like a n unwritten rule, use switch case-

lusty quest
#

or a command handler

still merlin
#

how does a memory leak effect code?

pale vessel
#

it leaks your memory lawllll

lusty quest
#

In computer science, a memory leak is a type of resource leak that occurs when a computer program incorrectly manages memory allocations in such a way that memory which is no longer needed is not released. A memory leak may also happen when an object is stored in memory but ca...

digital ibex
#

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

still merlin
#

do I just remove all client.on's then?

midnight granite
#

yo

#

ban yufi

still merlin
#

execpt one

digital ibex
#

yes

still merlin
#

ok

digital ibex
#

so like js client.on('message', message => { if (message.content == 'hi') message.channel.send('hi'); if (message.content == 'bye') message.channel.send({ embed: { title: 'hi' }}); });

lusty quest
still merlin
#

HH i need to re-write my hole code?

solemn latch
#

well, yes and no.
all your commands code can be the same, just how you are handling does

digital ibex
#

if you're not going to use a handler, you don't have to, its not going to change anything in performance or anything, just easier for you.

still merlin
#

ok

pale vessel
#

handler actually has better performance, based on my experience

#

but can't really prove it

solemn latch
#

doing it this way also allows you to have dynamic help commands

lusty quest
#

with a command handler you can have a way better track of your commands since every command is in his own file

pale vessel
#

and reloading commands would be easier

digital ibex
#

no, not nesaccarily, woo

pale vessel
#

but you can always have a collection of commands in one file

#

dynamic help command would be possible with or without a handler

digital ibex
#

yeah

lusty quest
#

the handler makes it more efficent i guess. since you dont end up with some sort of super spagetti code

digital ibex
#

that doesn't change efficiency tho

pale vessel
#

but it's still really handy to have one, for keeping commands organized

digital ibex
#

yea

pale vessel
#

and reloading, again

lusty quest
#

@digital ibex it makes the coding workflow a little bit more efficent

digital ibex
#

how

still merlin
#

Can I just copy and paste my package.json file into another one? (I'm gonna make another folder for a command handler incase it backfires- Most of my command handlers dont work)

lusty quest
#

you dont have to deal with clutter and keeping track of stuff in more complex commands

digital ibex
#

it makes it easier for u, and thats about it

lusty quest
#

@still merlin just make a copy of the entire bot and paste it somewhere

solemn latch
#

or, use git

digital ibex
#

u wot

lusty quest
#

(the main folder so you have your-bot and your-bot-copy)

still merlin
#

but can I copy my package.json thing inside of it

lusty quest
#

its not the most efficent but you have a fallback

solemn latch
#

oml

lusty quest
#

the package.json wont help you much

still merlin
#

ok

solemn latch
#

package.json is just the node modules you have installed

digital ibex
#

wtf

#

how is that not gonna help

solemn latch
#

backing that up does nothing for you

restive furnace
#

package-lock.json is gonna

#

prob?

lusty quest
#

if you want to add a command handler backup the entire bot. since you will edit not only the package.json

still merlin
#

I cant be bothered to install all of my packages again so I copied node modules package.json and package.lock.json to my other folder

#

.-.

lusty quest
#

why?

#

i do it even with crappy internet

solemn latch
#

how many packages do you have installed

pale vessel
#

why are you guys talking about package.json

digital ibex
#

ur node_modules folder should be in the root directory of the folder, but ig you don't have to do that

#

idek

#

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

restive furnace
#

i have only like 3 packages installed

#

with dash somewhat 5

digital ibex
#

dash as in dashboard?

#

or

restive furnace
#

dashboard

digital ibex
#

what do u use?

restive furnace
#

express + html & css + i forgot the third one lol

solemn latch
#

i have a handful, but because there are some prettifier things that im too lazy to write myself

pale vessel
#

html and css is a package?

digital ibex
#

wait wut

restive furnace
#

with dash somewhat 5
@restive furnace

#

2 more packages

#

so no

earnest phoenix
#

how would one go about Getting every user in ever server the bot is in so a (Total User Count) if you will Discord.py

solemn latch
#

how accurate do you wanna be?

earnest phoenix
#

as accurate as i can, lol

#

i know how todo it with guilds, but Users i'm having trouble with..

restive furnace
#

iterate through guilds, then save the members count in a variable, thats probably the most accurate way

earnest phoenix
#

so, len(guild.members) wouldn't work for this? ๐Ÿ˜‚

restive furnace
#

well it works if all the guild members are cached

earnest phoenix
#

salut

#
if (command) {
        if(command.timeout) {
          if(Timeout.has(`${message.author.id}${command.name}`)) {
            const p = new MessageEmbed()
            .setColor("#ff9900")
            .setDescription(`:no_entry_sign: **You can only use this command every ${ms(command.timeout)}!`)

            return message.channel.send(p);
          } else {
            Timeout.add(`${message.author.id}${command.name}`)  
            .setTimeout(() => {
              Timeout.delete(`${message.author.id}${command.name}`)
            }, command.timeout);
          }
        }
        command.run(bot, message, args);
      }```
#

help ?

restive furnace
#

remove "." in front of setTimeout

pure lion
#

Js

#

Jsjsjsjsjsjsjsjjssjjsjsjsjsjsjsjsjsj

earnest phoenix
#

What?

long yew
#

can

#

anyone help me?

#

how to i make a command called ${prefix}pokemon to display the pokemon for the user in the file mons

still merlin
#

it just does ^^

sudden geyser
#

Can you show the package file and main file

still merlin
#

ok

#

Package.json is

{
  "name": "discord-bot",
  "version": "1.0.0",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "amazrisf",
  "license": "ISC",
  "dependencies": {
    "dblapi.js": "^2.4.0",
    "discord.js": "^12.2.0",
    "ffmpeg-static": "^4.2.1",
    "ms": "^2.1.2",
    "opusscript": "0.0.7",
    "sequelize": "^5.21.13",
    "ytdl-core": "^2.1.2"
  },
  "devDependencies": {
    "prettier": "2.0.5",
    "sqlite3": "^4.2.0"
  },
  "description": ""
}
solemn latch
#

wheres client.login()

earnest phoenix
#

Lol

sudden geyser
#

Did you forget to log in?

#

Dang it too slow

still merlin
#

I have it

solemn latch
#

its not in the pastebin

still merlin
#

I just didnt put it in pastebin for some reason

earnest phoenix
#

how i do URLenconde in ruby?

solemn latch
#

your logging in on the ready event

#

but the ready event only happens when logged in

#

  url_encoded_string = CGI::escape("'Stop!' said Fred")
     # => "%27Stop%21%27+said+Fred"
languid pollen
#

Uh, I can't seem to find how to make a dynamic help command (discord.py). Could someone explain that to me?

rustic sundial
#

Hi, how can I do invert avatar command? It doesn't work for me.

#

Can someone help me, please?

solemn latch
#

what doesnt work for you

earnest phoenix
#
function randomStatus() {
      let statuses = [
        `${bot.guilds.cache.size} servers!`,
        `lt!help`,
        `${bot.channels.cache.size} channels!`,
        `Over ${bot.users.cache.size} users!`,
        `Version 1.2.0`,
        `Music Update!`
      ];

      let rstatuses = Math.floor(Math.random * statuses.length); 

      bot.user.setActivity(statuses[rstatuses], { type: "WATCHING"})
    }; setInterval(randomStatus, 20000)

Why my bot doesn't have any status ?

wicked pivot
#
let Liste = Trier.map((e, Gcompteur) =>  `${(Gcompteur+ 1)}) [${bot.guilds.get(e.guild).name}](${e.link})`)``` ![Detente_ref](https://cdn.discordapp.com/emojis/547849405210951708.webp?size=128 "Detente_ref")
sudden geyser
#

You can't use links like that in plain text. Only in embeds or unless you use a webhook.

wicked pivot
#

ow yes i'm stupid, sorry

rustic sundial
#

what doesnt work for you
@solemn latch everything :D

solemn latch
#

well, whats your code, and what errors?

rustic sundial
#

I tryed now image-js npm, gimme minute I'll send code

#
const { orange } = require("../../colours.json");
const fun = require("../../botconfig.json")
const db = require('quick.db');
const { Image } = require('image-js');
module.exports = {
    config: {
        name: "ainvert",
        usage: "ok ainvert",
        category: "fun",
        accessableby: "Members",
    },

    run: async (bot, message, args) => {
        if(message.channel.type === "dm") return;

        let section = db.get(`fun_${message.guild.id}`)
        if(section === null) section = fun;

        if(section === "false") return

    let member = message.mentions.members.first() || message.member;

    let avatar = member.user.displayAvatarURL({ format: "png" })

    let image = await Image.load(avatar)
  let grey = image
        .grey()
        .resize({ width: 128 })
      grey.save('bulgee-avatar.png');

        const send = new MessageEmbed()
        .setTitle(`${member.user.username}'s inverted avatar`)
        .setImage(grey);
        return message.channel.send(send);

}
}```
#
(node:177717) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 28)```
#

this is error

grizzled isle
#

avatar is a link, not an actual file

solemn latch
#

^

rustic sundial
#

I don't know how to fix it

earnest phoenix
#

i'm not wrong in saying there is a way to check for Guild owners right?

solemn latch
#

it would be in the guild collection

earnest phoenix
#

ty

honest perch
#

@twilit rapids tell him not to shit post in here

sinful belfry
wicked pivot
#
if(messages.content !== "fr" || messages.content !== "en")return message.channel.send(`the only lang available are french and english`)```
earnest phoenix
#

How to overwrite all channels permissions ?

summer torrent
#

loop

earnest phoenix
#
@bot.command()
async def rainbow(ctx):
    if ctx.message.author.Guild.owner:
        await ctx.message.delete()
#

i've 100% used the Guild.owner wrong,

#

lmao

grizzled isle
#

message.guild.owner

however python does it

#

Cause at that point you are trying to get a guild through a user, which doesnt make sense

pure lion
#

Hey, how do i use image-js with a URL?

languid pollen
#

I can't seem to find how to make a dynamic help command (discord.py). Could someone explain that to me?

earnest phoenix
#

i'm trying to make a Owner only command @grizzled isle only the Guild owner can run ,

grizzled isle
digital ibex
#
@bot.command()
async def rainbow(ctx):
    if ctx.author == ctx.guild.owner:
        await ctx.message.delete()
#

@grizzled isle thats not how python works

grizzled isle
#

@digital ibex I did state "however the syntaxes is with python"

solemn latch
#

what even is the var ctx supposed to be pikathink

digital ibex
#

thats not even a comparison operator in python ๐Ÿš

#

wym woo?

solemn latch
#

ctx means context typically

digital ibex
#

yes

pure lion
#

Sorry, I died. Did someone help me?

digital ibex
#

check it urself lol, scroll up or something

pure lion
#

Basically image-js, how to use with avatar URLs

#

Oh it's like 15 messages up

#

e

#

Can someone help me please?

#

I'll send code in a sec

digital ibex
#

what are you trying to do?

pure lion
#

Use image-js to invert an image

#

From a URL

#

Oh hey @rustic sundial

rustic sundial
#

Hi

solemn latch
#

youll need to download the image, with canvas there was always a function for it

#

idk about image-js

pure lion
#

@digital ibex (or woo lma9)

      h().catch(console.error);
      async function h() {
        let image = await Image.load(target.avatarURL())
        let invert = image.invert()
        return msg.channel.send(invert)
      }
solemn latch
#

that should be it

pure lion
#

not working, lemm try again

rustic sundial
#

Idk how to do it :v

digital ibex
#

r u getting any errors?

pure lion
#

Yeah

digital ibex
#

what are they

rustic sundial
#

I've tried ctx, but it doesn't work

pure lion
#

no such file or directory ('file path string with image url at the end')

digital ibex
#

im confused, what do u want to happen?

pure lion
#

it to send the inverted image into the channel

digital ibex
#

and invert the image d- ok

pure lion
#

wait ill buffer it ๐Ÿ˜„

solemn latch
digital ibex
#

u need to provide an actual url

pure lion
#

:ooooooooooooooooooooooooooooooooooooooooooooooooooooo

digital ibex
#

and then u just do .invert(url) or whatever

rustic sundial
#

:O

#

Magic

pure lion
#

w-

#

fuck

#

i am confusion

solemn latch
#

the example was
const image = await Image.load('https://example.com/image.png');

pale vessel
#

console.log(target.avatarURL())

rustic sundial
#

i am confusion
@pure lion me 2 XD

digital ibex
pure lion
#

the example was
const image = await Image.load('https://example.com/image.png');
but how was it loading this from the web, its searching from a file path on my pc and ugh wsoaighiodfshgliueshrgtioukhasdfiu

#

waitnvmimretarded

solemn latch
#

it appears .load gets it from the web

pure lion
#

look at my code

rustic sundial
#

and then u just do .invert(url) or whatever
@digital ibex idk where put this

pure lion
#

its using .load rn ://///

solemn latch
#

flaze said to log your target to make sure it exists

rustic sundial
#

Ok

pure lion
#

await console.log?

#

or just log-

solemn latch
#

console.log(target.avatarURL())

digital ibex
#
Image.load(target.avatarURL()).invert(1))```
#

there

solemn latch
#

invert goes to the image

#

not the url

digital ibex
#

theres two ways to do it apparently

pale vessel
digital ibex
#

u wot

sick cloud
#

what's the ratelimit for deleting messages

pure lion
#

100

sick cloud
#

100 per what

#

minute?

pure lion
#

wait nvm

#

ignore me

#

*dying*

pale vessel
#

not sure but you can only delete up to 100 per request

solemn latch
#

all of the rate limits are on the developer docs

rustic sundial
#

I still don't know how to invert it xd

solemn latch
#

well

rustic sundial
#

And send

pure lion
#

woooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo it logged it

sick cloud
#

i just wanna know ie, how many .delete() i can call say every 5s

solemn latch
#

its on the doc site

sick cloud
#

i'm too tired to trawl through the api docs lol

solemn latch
#

okay, well then im too tired to do it for you

rustic sundial
solemn latch
#

the full url @pure lion ?

pure lion
#

yeah

solemn latch
#

you might have to buffer it then

pale vessel
#

you can check headers [@sick cloud]

pure lion
#

ah shit

sick cloud
#

how would i do that

#

inside the messageCreate event if that's helpful

#

@pale vessel

pale vessel
#

maybe the raw event?

#

not sure myself

pure lion
#
      var request = require('request').defaults({ encoding: null });
      request.get(target.avatarURL(), function (err, res, body) {
        if (err) {
          console.log(err)
        } else if (res) {

        }
      });

what is res

sick cloud
#

dunno if eris even has a raw event

#

res = result

pure lion
#

i litera-

sick cloud
#

why are you making a request to the avatar url

pure lion
#

:inhale:

pale vessel
#

this is REST though

sick cloud
#

ah

pure lion
#

why are you making a request to the avatar url
StAcK SaiD sO

pale vessel
#

you can try that one

sick cloud
#

well don't

#

because you don't need to request the url for anything other than to waste discord's resources

#

also ok cool

solemn latch
#

so how do you modify an image

pure lion
#

ok how do i buffer shit-

pale vessel
#

it doesn't seem to have a response lol

sick cloud
#

@pale vessel so maybe rawREST will have the headers right

#

uh

#

yeah

pure lion
#

๐Ÿ‘๏ธ

pale vessel
sick cloud
#

i just want to know how many messages i can delete before i get ratelimited ๐Ÿ˜”

#

so i can put a time queue on this filter

pale vessel
#

you can also try asking in the discord developers server

sick cloud
#

no response

pure lion
#

waittheresadiscorddevserver?

sick cloud
#

lol yes

pale vessel
#

can't you use deleteMessages()?

rustic sundial
#

@pure lion does it work?

pure lion
#

uhhhh

rustic sundial
#

Ok xd

pale vessel
#

how can docs be wrong

earnest phoenix
#

@pale vessel i see u

pure lion
#

Error: Could not load data:image/webp;base64,UklGRnwAAABXRUJQVlA4WAoAAAAQAAAAfwAAfwAAQUxQSA8AAAABBxAREQBQpP//I6L/qX8AVlA4IEYAAABwBgCdASqAAIAAPm02mUmkIyKhIIgAgA2JaW7hdJAAT22IvEFRz2xF4gqOe2IvEFRz2xF4gqOe2IvEE2AA/v+VgAAAAAAA

#

sdfsldfskhjdfg

#

plerase

#

help

pale vessel
#

that's not a buffer

pure lion
#

ik

#

but

#

shit happened

#

i had a buffer

#

and when i fed it to image.load thats what it output

pale vessel
#

just- const buffer = await fetch(url).then(x => x.buffer());

#

but you shouldn't even need to do that

pure lion
#

*fucking explodes*

pale vessel
#

the module is broken, i guess

#

because URLs should work, like in their example

pure lion
#

It said that itd search for a path in node

pale vessel
#

it's not even a path

#

use another module like canvacord

pure lion
#

alright

pale vessel
#

or if you're not lazy, use canvas

#

canvacord is basically a wrapper for canvas and jimp

pure lion
#

I have canvas

pale vessel
#

try using it

pure lion
#

alright

#

okay it logs the buffer, but Image.load fucks shit up-

solemn latch
#

@pure lion are you specifying .png?

#

could it be loading a gif?

#

or

pure lion
#

U m

#

webp

solemn latch
#

can it handle webp?

pure lion
#

Probablynot

#

*slams head on table*

solemn latch
#

oop

pure lion
#

I literally-

#

iWantToAAAAAAA

#

How do i make it png

#

Tho

pale vessel
pure lion
#

Okay

solemn latch
#

i think its in the .avatarURL()

#

oop

#

i was slow

pure lion
#
const buffer = await fetch(msg.author.avatarURL({format = 'png'})).then(x => x.buffer());
earnest phoenix
#

wat is this

pale vessel
#

format:

earnest phoenix
#

is this where you make discord bots

pale vessel
#

it's an object

pure lion
#

i am going to die i am going to die i am going to die i am going to die i am going to die i am going to die i am going to die i am going to die i am going to die i am going to die i am going to die i am going to die i am going to die i am going to die

pale vessel
#

@earnest phoenix not really

earnest phoenix
#

what in the world is going on rn

#

oh

pure lion
#

I'm being retarded as usual

solemn latch
#

this is where you can get help making a discord bot

pure lion
#

DiscordAPIError: Cannot send an empty message

summer torrent
#

my internet sucks or your pfp is empty @pure lion MegaThonk

solemn latch
#

its empty

pure lion
#

Its just a blank png uwu

#

(node:13036) UnhandledPromiseRejectionWarning: TypeError [REQ_RESOURCE_TYPE]: The resource must be a string, Buffer or a valid file stream.

pale vessel
#

vAlId FiLe sTrEaM
bitch please

pure lion
#

ill just buffer the output

#

if it works i will secrete mayonnaise

pale vessel
#

sleep first

#

vsc for a day doesn't sound too good

pure lion
#

2 days

#

wait

#

eh its fine

#

who needs sleep

sick cloud
#

do any else of you use eris

#

and know the channel type numbers

#

its not in reference

solemn latch
sick cloud
#

so 0 is text

pale vessel
#

YEP

pure lion
#
      const buffer = await fetch(msg.author.avatarURL({format: 'png'})).then(x => x.buffer());
      console.log(buffer)
          
      h().catch(console.error);
      async function h() {
        let image = await Image.load(buffer)
        let invert = await image.invert()
        //return msg.channel.send(invert)
      

      let inverted = new Discord.MessageAttachment(
        invert, 'inverted.png'
      )
      msg.channel.send(inverted)
      }

hep
me
please

misty sigil
#

does anyone know how to

pure lion
#
(node:17920) UnhandledPromiseRejectionWarning: TypeError [REQ_RESOURCE_TYPE]: The resource must be a string, Buffer or a valid file stream.
misty sigil
#

change the colour of links

digital ibex
#

ive already told u how to do it

pale vessel
#

you didn't generate a buffer

digital ibex
#

jeremey, wym? w/ css or disocrd embed?

misty sigil
#

css

pale vessel
#

isn't it toBuffer()?

misty sigil
#

wai wrong server

pure lion
#

wait lemme have a look

pale vessel
#

please read docs

digital ibex
#

u can use text-decoration

turbid bough
#

what lib?

pale vessel
#

that's color

#

text-decoration is for underline and other styles

turbid bough
#

@pure lion what lib do you use?

pure lion
#

discord.js

pale vessel
#

new Discord.MessageAttachment( discord.js i'm assuming

turbid bough
#

i see no send function in the guildchannel docs wtf

pure lion
#

its returning the same error

pale vessel
#

it's a text channel

sick cloud
#

๐Ÿ‘

pale vessel
#

guildchannel is like the base

turbid bough
#

ah nvm, yeah it is on textchannel

misty sigil
#

now to make the nav bar transparent

pure lion
#

where am i putting toBuffer(), ive tried it in 2 different places

turbid bough
#

in the docs:

#
// Send a local file
channel.send({
  files: [{
    attachment: 'entire/path/to/file.jpg',
    name: 'file.jpg'
  }]
})
  .then(console.log)
  .catch(console.error);```
#

i think you need to add that attachment in files array

pure lion
#

okay

turbid bough
#

oh wait nvm

#

you are having that error in

#

messageattachment

#

right?

digital ibex
#

@misty sigil use opacity

turbid bough
#

or in the send

digital ibex
#

opacity: 0

misty sigil
#

@digital ibex doesn't that remove the links?

digital ibex
#

opacity?

pale vessel
#
let inverted = new Discord.MessageAttachment(
        invert, 'inverted.png'
      )``` should be correct
digital ibex
#

no it doesn't

pale vessel
#

apparently not since the module is broken and can't load URLs

turbid bough
#

weird

pale vessel
#

yeah, it's stupid

turbid bough
#

ah buy nvm i didnt see he wanted to modify the image too

pure lion
#

:////

#

same err

misty sigil
#

i think i got rid of the wrong thing

turbid bough
#

files must be an input of Array<FileOptions> or Array<BufferResolvable>

#

FileOptions then needs BufferResolve

#

and then a name, which is optional

pure lion
#

how would i do that

pure lion
#

okbrb

turbid bough
#

hmm

#

oh wait, then it should have worked Thonk

pure lion
#

:hmm:

#

doyouseewhatimgettingat?

pale vessel
#

how about using a module that isn't completely dogshit

turbid bough
#

can you double check if it is a buffer at all?

solemn latch
#

canvas is kinda nice HmmCoffee

pure lion
#

it logs the image before

turbid bough
#

console.log(buffer);

pure lion
#

as buffer

turbid bough
#

hmm

pale vessel
#

did you use toBuffer()?

pure lion
#

where

#

i put one in

pale vessel
#

the one before was in base64

pure lion
#

      const buffer = await fetch(msg.author.avatarURL({format: 'png'})).then(x => x.buffer());
      console.log(buffer)
          
      h().catch(console.error);
      async function h() {
        let image = await Image.load(buffer)
        let invert = await image.invert()
        //return msg.channel.send(invert)
      

      let inverted = new Discord.MessageAttachment(
        [{files: invert, name: 'inverted.png'}]
      )
      msg.channel.send(inverted)
      }

code rn

pale vessel
#

you didn't

pure lion
#

there was one before

#

invert().toBuffer()

#

but it did jackshit

pale vessel
#

because invert is a promise

#

you have to use then or just newline

pure lion
#

alright ill try then again

pale vessel
#
let invert = image.invert() // remove await because you don't need it
let buffer = await image.toBuffer()
// load as buffer

let invert = await image.invert().then(x => x.toBuffer());
// load as invert
// edit: doesn't work since invert doesn't return a promise
sick cloud
#

so if @everyone is the guild id, what's @here?

summer torrent
solemn latch
pure lion
#

i think i am going to die

solemn latch
pure lion
#

(node:16472) UnhandledPromiseRejectionWarning: TypeError [REQ_RESOURCE_TYPE]: The resource must be a string, Buffer or a valid file stream.

summer torrent
#

show code

pure lion
#

wait

#

im so close

#

i can smell my inverted pfp

#

ooooh boy

#

@pale vessel

TypeError: image.invert(...).then is not a function
earnest phoenix
#

so if @everyone is the guild id, what's @here?
@sick cloud
nothing, here isn't a role, everyone is

summer torrent
#

show code

pure lion
#

๐Ÿ˜ข

#

ok

pale vessel
sick cloud
#

er ok

#

so how do you mention here

pale vessel
#

@here

earnest phoenix
#

literally send @here

sick cloud
#

i just put @here but it doesnt want to

#

it has permission to mention

#

has admin

earnest phoenix
#

it doesn't

#

if it didn't mention

sick cloud
#

but it has admin

earnest phoenix
#

check your channel overwrites

pure lion
#
      let inverted = new Discord.MessageAttachment(
        [{files: invert, name: 'inverted.png'}]
      )
``` w hy n o s e n d i m a g e @pale vessel w h  y yy y y  y y  y y y y y  y yewmnr yn hjkbey
sick cloud
pale vessel
#

why did you even await the invert

#

try the tick

pure lion
#

idk

sick cloud
#

well if thats the case then i have to set that for all channels which is dumb

pale vessel
#

@pure lion

pure lion
#

aaaa

summer torrent
#

check your channel overwrites
@earnest phoenix admin bypasses all channel overwrites

sick cloud
earnest phoenix
#

that's weird

summer torrent
earnest phoenix
#

are you just sending @here as a string

sick cloud
#

yeah

earnest phoenix
#

this might have something to do with allowed_mentions field

#

or you might be setting it somewhere in your client config if it exists

sick cloud
#

i'm just using eris' defaults

pale vessel
#

change something

sick cloud
summer torrent
#

what is the default

sick cloud
#

yeah

pale vessel
#

check the source [@summer torrent]
edit: i see no default value, it's only mentioned in docs

sick cloud
#

so

super(process.env.DISCORD_TOKEN, {
            allowedMentions: {
                everyone: true
            }
        });

that should sort it

#

yee ok ty

pure lion
#

I think I got a headache from hitting my head on the desk

#

Btw @pale vessel it doesn't work

#

Time to not sleep because unfinished code makes me stressed

valid gyro
#

does anyone have a link to a free hosting service, as glitch has now banned the use of html pingers to keep bots awake

#

(heroku doesnt count, it only keeps programs awake for 30 minutes)

grizzled isle
#

There really isnt good hosting services. A couple bucks a month though could go a long way

valid gyro
#

being a freshman without a job doesn't work with a couple bucks a month unfortunately๐Ÿ˜•

#

i can always host on my computer, but thats not ideal for me

grizzled isle
#

Ah, well yea.

hollow saddle
#

I'd say to invest in a raspberry pi

#

They're a life saver for hosting if you can't afford a monthly vps payment

pure lion
#

WAIT

#

JSJDIAJDKS

#

I HAVE ONE OF THOSE

grizzled isle
#

lets not spam lol

pure lion
#

Please kindly walk me through

#

The steps

grizzled isle
#

Open You browser of choice
go to the default url
erase it
go to youtube
look up "how to host bot on rasberry pi"

lyric mountain
#

(heroku doesnt count, it only keeps programs awake for 30 minutes)
@valid gyro excuse me, but.....30 minutes?

#

It actually keeps it online for 23h and 55 min

#

And 22 days per month

valid gyro
#

the free version is only supposed to do 30 mins i thought

#

i found repl.it so im using that instead

quartz kindle
#

google and amazon offer free trials as well

#

1 year free trial

#

plus google also has an always free f1-micro instance

#

but they charge for excess bandwidth usage

#

which discord bots use a lot

lyric mountain
#

the free version is only supposed to do 30 mins i thought
@valid gyro no it doesn't

quartz kindle
#

(if you dont disable presences)

lyric mountain
#

Free version just limit u to 450 hours/month

#

Or 550 h/m if you register a credit card

#

You just need to use worker dyno instead of web dyno

valid gyro
#

oh cool!

north hollow
#

I need help how to make a private DM with this code help me

#
client.on('message', message => {
    if (message.content === Prefix + 'JoinBot') {
      const embed = new Discord.MessageEmbed
        user.send()
        .setTimestamp()
        .setTitle('This Is the Bot Link')
        .setAuthor('This Code Is By Xp And P O U T I N E')
        .setDescription('https://discord.com/api/oauth2/authorize?client_id=721775900949086240&permissions=8&scope=bot')
        .setColor(15844367)
        .setFooter(message.author.tag,message.author.displayAvatarURL());
      message.channel.send(embed);
    }
  });
solemn latch
#

user.send

north hollow
#

But where do I put that

lyric mountain
#

Right question is where you DON'T put it

solemn latch
north hollow
#

What

lyric mountain
#

Fifth line

#

That shouldn't be there

north hollow
#

No I just need the code with my code

lyric mountain
north hollow
#

O ok

#

But how do I do a dm thing that send it to the user when they do the command

lyric mountain
#

Get the user object -> open the user's dm channel -> build the message -> send to that channel

solemn latch
#

that link tells you, you get a User back

north hollow
#

I still don't get it but ok

solemn latch
#

okay. you have a message, and you want to know more about the properties of message right?

north hollow
#

Ya

solemn latch
#

so you can go to the docs, and itll tell you all about message.

#

these are all the things that you can do with message.

#

your looking to pm the author of the message, go to that section

#

and itll tell you this

#

message.author
will give you the author

#

if you click on the type(User)

#

itll give you the list of properties and methods of a user

#

if you look at the method, .send()

#

it tells you, that it sends a dm to that user

#

docs, are a chain you follow to get you the info you want

#

if you follow that chain, you get that information

north hollow
#

Ah am bad at coding I'm confused but can you put it in for my code

solemn latch
#

i am trying to teach you how to use docs, so you never have to ask these questions again

#

and can find it yourself

north hollow
#

Okay but can you at least show me example

solemn latch
#

i just did

north hollow
#

O

solemn latch
#

i told you EXACTLY how to find what you want

#

step by step

north hollow
#

So like this

#

.setFooter(message.author.tag,message.author.displayAvatarURL());
message.user.send(embed)

lyric mountain
#

Just asking, but where did u get that code you currently have?

north hollow
#

I made it

lyric mountain
#

Really?

north hollow
#

Okay my friend made

solemn latch
#

anyway, the point i was trying to make, is the docs explain everything, and just play around with the discordjs docs

lyric mountain
#

Thank u, knowing your level of experience is the first step to knowing how to help u

north hollow
#

.setFooter(message.author.tag,message.author.displayAvatarURL());
message.author.send(embed)

#

Like that

lyric mountain
#

I'd recommend watching some videos about d.js

#

Videos explain a lot better than text

#

And keep the docs open at all times

#

Whenever you have questions just jump into the docs

solemn latch
#

the docs are the bread and butter of a developer

north hollow
#

I like doing in text

lyric mountain
#

The bread is the internet

solemn latch
north hollow
#

@solemn latch what is this

#

.DMChannel

solemn latch
#

its just the channel thats "created" between two users

feral granite
#

How could I move a user to a voice channel using Discord.NET

north hollow
#

O ok

feral granite
#

Can't find anything

north hollow
#

And what for dms

solemn latch
#

you can send PMs that way, its more of something for creating a message collector, or checking if a user is typing

#

yeah, you can use DMChannel if you want, theres no real reason to. both work fine

north hollow
#

I need it to send it to the user dm not in a channel

solemn latch
#

well, like i said

#

message.author.send
sends it to the dm,
or if you wanna bother with dmchannel, you can use that

#

a DM is sent into a channel, its just a special type of channel, between two users

north hollow
#

What is Dm like in a Channel or like it was send it to them

solemn latch
#

your just asking the same question

north hollow
#

O

#

What

solemn latch
#

a DM is a channel, its just one between two users

north hollow
#

And how do a pm

solemn latch
#

both do the exact same thing here

#

one is just named something else

north hollow
#

O

#

But I need to send it to the user not in a channel

solemn latch
#

okay?

north hollow
#

๐Ÿค”

solemn latch
#

so

#

DM means direct message

#

if you didnt know

#

send, means send to the thing its being applied to

#

so author.send means, send to the user author

#

or DM him

#

why you gotta troll me like this FeelsSadDitch

north hollow
#

So It will send it to a channel or not in a channel

#

I am so confused

solemn latch
#

send, sends to the thing its being applied to

#

if you send something to a user

#

it goes to that user

#

and that user only

north hollow
#

O ok I get it now

#

So this code I will send it to then

solemn latch
#

author

north hollow
#

.setFooter(message.author.tag,message.author.displayAvatarURL());
message.author.send(embed)

#

Like that

solemn latch
#

yep

north hollow
#

Thx

#

And that took a long time

solemn latch
#

well, the answer was given instantly

#

you ignored it

#

so i tried to teach you how to use docs

#

then i gave you the answer, and you continued to say it was wrong

north hollow
#

Me : ๐Ÿ˜ You : ๐Ÿค› ๐Ÿ˜

solemn latch
#

its annoying to answer a question, and to have the answer ignored

#

repeatedly

#

for 20 minutes

#

especially since i stopped working on my own project to help SadCat

north hollow
#

O ok

feral granite
#

How the fuck do I stop my bot from exceeding rate limits

#

Im using code to make temporary voice channels and now it just wont turn on

shy turret
#

@feral granite how about make a event handler

#

which count discord rate limits

feral granite
#

I don't know how the rate limits work is the problem

shy turret
#

also add a cooldown if not alr

feral granite
#

I think I get why it happens, just have no idea how to fix

shy turret
#
Clients are allowed 120 events every 60 seconds, meaning you can send on average at a rate of up to 2 events per second.
#

You can make a function which allow up to 2 events every 1 second.

feral granite
#

To get it to start working again though, should I just wait for the rate limits to settle back down>

shy turret
#

yes

#

about a minute

feral granite
#

Huh

shy turret
#

about a minute

feral granite
#

Does discord.net have a system to tell you how much have been cut from that budget or do I need to count them? If so Im not sure how to count events

#

I knew I wasn't sending requests that often, but turns out I had a while to handle old voice channels using a bool = true as apposed to bool == true

midnight pike
#

Hi in this code I am trying to react with the 1๏ธโƒฃ emoji but I am not sure how I am supposed to input it in the parameter of the react method. I tried using unicode to put it in but It didnt work.
message.channel.send({embed: embed})
.then(message => message.react(': one :'))
.catch(err => console.log(err))

solemn latch
#

It might just be 1๏ธโƒฃ

#

No spaces

midnight pike
#

Their were no spaces between the colons in the code I just put spaces here so it wouldn't put the actual emoji

solemn latch
#

You might be able to just copy the actual emoji into the code CBPikaThink

midnight pike
#

I tried that and it just printed the unicode.

solemn latch
summer torrent
#

\:emoji:

midnight pike
#

I tried that too, it just says unkown emoji.

summer torrent
#

\1๏ธโƒฃ

#

wait what

#

\1๏ธโƒฃ

solemn latch
#

It says to just copy it in

summer torrent
#

\๐Ÿ˜„

#

\1๏ธโƒฃ

#

thonk

grizzled isle
#

Some emojis cant

midnight pike
#

ok

earnest phoenix
#

If I have separate CPUs for both of my server and database, which should I upgrade to reduce database lag like on writing?

dusk sphinx
#

Do i have to download npm

earnest phoenix
#

@dusk sphinx it comes with nodejs

dusk sphinx
#

I know but do i need to download it

earnest phoenix
#

do you have nodejs?

dusk sphinx
#

Not sure

earnest phoenix
#

do you have something called node.js command prompt installed in your computer?

summer torrent
#

node -v

dusk sphinx
#

I never had computer

earnest phoenix
#

...

#

where are you trying to download npm?

dusk sphinx
#

Mobile๐Ÿ˜…

earnest phoenix
#

well, you can't

#

at least you can't normally

#

android or ios?

dusk sphinx
#

Android

earnest phoenix
#

does it have root access?

dusk sphinx
#

Maybe

summer torrent
#

termux allows you to install nodejs on mobile iirc

earnest phoenix
#

i never tried installing nodejs directly into my phone before so idk

dusk sphinx
#

Node.js or discord.js for control the bot

earnest phoenix
#

do you even have anything that can run node files in your mobile?

dusk sphinx
#

No

#

Haven't try it

summer torrent
#

coding on mobile is so bad idea

dusk sphinx
#

Why

earnest phoenix
#

its not a bad idea actually

#

its just that you can't code directly

summer torrent
#

small keyboard/screen...

earnest phoenix
#

i mean i even code on my tv

dusk sphinx
#

Really๐Ÿ˜‚

earnest phoenix
#

ya my tv can install ssh clients so...

dusk sphinx
#

That's very large

earnest phoenix
#

i think the simplest way to code a bot on mobile is spend a few bucks to buy a vps and access it on your mobile using a ssh client

dusk sphinx
#

Why vps is simple

earnest phoenix
#

because i dont think you can install nodejs on your iOS or android mobiles

dusk sphinx
#

I try if it can install

earnest phoenix
#

just install an ssh client if you want to use vpss and a browser if you want to use glitch

#

but glitch is not recommended if you expect your bot to grow large tho

#

since it's actually made for webhosting and stuff

dusk sphinx
#

Mobile can download anything that has linked source

hot grove
#

hi someone told me about Keep Alive js and also Heroku. as this is my first project i wonder if anyone uses them and which one is more preferred?

dusk sphinx
#

How to make my bot worked

summer torrent
#

get a good hosting

dusk sphinx
#

How

#

Just downloaded node.js

summer torrent
#

check pinned messages

dusk sphinx
#

Where can i find it

copper cradle
#

google

reef mantle
#

Guys can someone give me an inventory system command?

#

Pls?

lusty quest
#

no spoonfeeding here

#

but if you want a hint. you need probably a few commands and a Database

copper cradle
#

we can't just give you code and expect it work, you'll need tl have a lot of things which you probably don't have already

#

fuck I can't type

lusty quest
earnest phoenix
#

does discord js embeded message support markdown text? Trying to format messages

raven torrent
#

I think so

earnest phoenix
#

there is nothing to support lol

#

markdown is unrelated to it

#

it's strictly parsed and displayed on client side discord

raven torrent
#

You don't understand what I've said but ok

#

We have a new captain obvious

turbid bough
#

Js does not support markdowns natively, but you can use markdown to send discord messages, and the client will render the markdown.

#

But if you want to render markdowns in source code Eyes, then you would need a plugin for that

steep garnet
#

problems with canvacord module.

earnest phoenix
#

so how would I do markdowns when sending a discord message?

turbid bough
#

Just send markdowns

#

*this is an unformatted markdown message*

#

Then copy that message, paste it into what you are sending to

dusk sphinx
#

Can anyone teach me how to do the bot system

feral aspen
#

Hello Following Devs.

#

I hope you are in good condition

#

Can anyone recommend me a very good bot online hosting?

#

As I am computer hosting and it is really not ok..

earnest phoenix
#

check the pins

pure lion
#

Or buy raspberry pi

lusty spade
#

help, i made a unmute command and its" working" . the problem is my test account is muted and there is no errors in my code but it still wont unmute my test account

code: https://pastebin.com/eesS7bh5

lusty quest
#

did someone here know if you can find with Mongoose all documents where the timestamp in the doc.timestamp > Timestamp.Now ?

turbid bough
#

A complete mess bro
@earnest phoenix what do you mean?

rocky escarp
#

does anyone know what the discord dev license can give to your bot?

brittle horizon
#

Idk

marble juniper
#

nothing

#

no shit

brittle horizon
#

Can i get a bot developer role?

rocky escarp
#

Someone told me it can do something for your bot

marble juniper
#

if you submit a bot

#

then you can

brittle horizon
#

i submitted a bot

#

Its waiting for approval

marble juniper
#

then wait

hoary elm
#

Once itโ€™s been approved you get the role ๐Ÿ‘Œ

marble juniper
#

and you get the role ONLY once it is approved

brittle horizon
#

Ok thx

#

Okkk

#

Thank you

earnest phoenix
#

i made a warn command using mongodb but i don't know how to delete all data from a specific user through a command ( ex: /clearwarns @granite pagoda ) help ?

pure lion
#

how do i change the font colour on canvas?

earnest phoenix
#

Someone told me it can do something for your bot
@rocky escarp
it does nothing for bots since you can have 50 bots per account lol

#

the license is meant for game developers

lusty quest
#

@rocky escarp after the 7.10.2020 you can get more than 100 Guilds. also he gets the verifyed tag

#

if your bot is not verified until than its capped at 100 Guilds

earnest phoenix
#

they're asking about the dev license, not bot verification

#

also that is false

lusty quest
#

ohh..

#

you can make a shop in your Discord Server

#

but it doesnt give anything to the bot

summer torrent
#

"game developer"

pure lion
#

How do I invert the colour of the entire canvas?

inland aurora
#

Hey I have a command which logs the "message.guild.roles" in the console, is there a way I can get it to dm the info to the user instead

cinder patio
#

Dice, draw a rectangle with the size of your canvas and the color you want

inland aurora
#

yeah I have this but it doesnt work: message.author.send('Server Info:' message.guild.roles);

#

error message: (node:28776) UnhandledPromiseRejectionWarning: DiscordAPIError: Cannot send an empty message

#

if I dont have 'Server info:' before

long yew
#

hi

#

is a module.export file normally json or js?

pure lion
#

Dice, draw a rectangle with the size of your canvas and the color you want
@cinder patio if im doing from imageLoad?

inland aurora
#

yeah I have this but it doesnt work: message.author.send('Server Info:' message.guild.roles);
anyone know what to change?

restive furnace
#

thats literally basic js (joining strings together)

long yew
lusty quest
#

is mmbr a array?

earnest phoenix
#

have you tried reading the error

long yew
#

i have

earnest phoenix
#

and what does it say

lusty quest
#

is mmbr a array?

long yew
#

i think

#

i did var mmbr

lusty quest
#

its not a array its a value. try to remove the [0]

earnest phoenix
#

it's undefined

long yew
#

but it needs the 0 so that the person can't chose another pokemon

lusty quest
#

then mmbr is not correctly defined

#

where did you get mons from?

long yew
#

mons is my json file

#

that stores all the pokemon people have

lusty quest
#

rip

long yew
#

what's bad?

lusty quest
#

file storage. and json can get corrupted easy

#

try quick.db or enmap

long yew
#

idk that stuff

lusty quest
#

both are sqlite style databases

earnest phoenix
#

docs exist for that very reason

#

for you to learn

#

don't use json as a database, especially when you have data which quickly alternates, like pokemon

lusty quest
#

^

long yew
#

ohhhh

#

where do i get quick.db or enmap data bases?

lusty quest
#

the page also includes a few how toยดs

long yew
#

which one do you think is better?

#

enmap or quick.db?

lusty quest
#

i never used quick.db and switched to Mysql then MongoDB after enmap used about 1GB ram on a bot with less than 10 Guilds

long yew
#

oh

#

is mongodb another data base?

lusty quest
#

yes

#

when i think about it probably one you could look into bcs you can get a Free Database hosted for you

long yew
#

what is bcs?

lusty quest
#

because

long yew
#

oh lol

#

ok ty

#

i'll try use mongo db

#

idek how to start but...

lusty quest
#

i suggest looking into mongoose tutorials (node.js mongodb client)

long yew
#

can u help me get started with basics of it?

lusty quest
#

i started using MongoDB 3 Days ago. i still learn it

long yew
#

oh ok

#

i'll continue using json until i finish my bot then try mongoDB

#

also do you know how i can keep my bot online all the time?

restive furnace
#

#getavps

long yew
#

what's that?

#

ohh

#

a vps

#

do you recommend any?

restive furnace
#

contabo, gcloud, azure, aws?

lusty quest
#

i use digitalocean

long yew
#

how much do they all cost?

restive furnace
#

free trials exists

#

and it depends what vps you choose

lusty quest
#

heroku is free but has a few downsides

long yew
#

ok

earnest phoenix
#

you should avoid completely free hosting

golden condor
#

^

earnest phoenix
#

heroku is really trash and glitch is starting to remove projects using things like uptime bots to keep the app alive

#

hi

restive furnace
#

ask2ask

earnest phoenix
#

can any body tell me how to get votes

restive furnace
earnest phoenix
#

of my bot

#

@_@

#

i am confused

small prairie
stuck scaffold
long yew
#

anyone good at js and json?

#
case 'pokemon':
      mmbr
#

how do i make my code so when i write .pokemon
it shows the pokemon in the mons.json file for the user

golden condor
#

@stuck scaffold can you try do client.on("debug", console.log) and see what happens

quartz kindle
#

@long yew require the json file, then get the data based on author id, then list the contents

long yew
#

okayyy i'll try

golden condor
#

Although it isn't recommended to use a JSON db

restive furnace
pale vessel
#

yeah not even a db

long yew
#

yeah i'll change from json to another later on

golden condor
#

Alright

long yew
#

i just wanna get a working basic code atm

golden condor
#

Ok

earnest phoenix
#

that's not a good way to go about it

long yew
#

@long yew require the json file, then get the data based on author id, then list the contents
wow that is harder than it seems

earnest phoenix
#

write optimised code as you go

long yew
#

i just started using json

earnest phoenix
#

which is a good moment to also stop using it

long yew
#

oh idk much about how to use or change using it

#

@long yew require the json file, then get the data based on author id, then list the contents
@quartz kindle what are basic codes that i need to use to do that stuff?

golden condor
#

You could use a forEach

lusty quest
#

enmap is relatively easy to use and is not bad in the beginning

#

but switching later one to something like Mysql or mongodb as already suggested earlyer makes sense

earnest phoenix
#

mysql is really bad from my experience w it

lusty quest
#

its not bad if you get the hang of it

earnest phoenix
#

yes it is

unique nimbus
#

What is a database I should learn which is good for my CV thonk

earnest phoenix
#

postgres is so much more optimal

lusty quest
#

thats true

earnest phoenix
#

oracle is just not a company that targets performance

quartz kindle
#

any sql db is good for a cv

earnest phoenix
#

you can see that from their jdk distributions ๐Ÿ‘๏ธ ๐Ÿ‘„ ๐Ÿ‘๏ธ

lusty quest
#

you could run mariadb wich is atleast opensource

quartz kindle
#

if you learn sql, you can work with any sql-based db

unique nimbus
#

Time to learn SQL ig

#

and corrupt it

lusty quest
#

MongoDB is also not bad

unique nimbus
#

I don't think many companies uses MongoDB

lusty quest
#

and seems to be more lightweight

quartz kindle
#

mongo is very popular, so definitely also a plus for a cv

unique nimbus
#

yes

long yew
#

You could use a forEach
@golden condor how?

lusty quest
#

array.forEach(userid => {Console.log(userid))}

long yew
#

ok

lusty quest
#

not sure if this is valid

quartz kindle
#

@long yew once you require your json file (mons = require("./myfile.json")), then you can access its contents using mons in the rest of your code. but then it depends how your json is structured

long yew
#

ok ty

#

my json is

{

}
#

then it fills itself

lusty quest
#

maybe nest the data per user

quartz kindle
#

for example if your json is structured like this js { "347593857459":["a","b","c"] } then you would do this mons[message.author.id].join(", ") for example to list a, b, c

#

where mons is the entire file and mons[message.author.id] is the contents of that specific id

long yew
#

ok

#
case 'pokemon':mmbr
    mons[message.author.id].join(", ")
#

i've done that

quartz kindle
#

what is mmbr?

long yew