#development

1 messages ยท Page 1005 of 1

earnest phoenix
#

someone help with my mute cmd

#

please

#

no

pure saddle
#

send ur code and error

earnest phoenix
#

me

#

?

sudden geyser
#

Derku did you try it and did something go wrong

pure saddle
#

yes

errant perch
earnest phoenix
#

it doesnt work i may need to remake the wole cmd as i dont get it

pure saddle
#

u can remove .8123283 or smth

#

Math.round()

errant perch
#

ik

earnest phoenix
#

Math.floor()

errant perch
#

just glad it works

pure saddle
#

nice

errant perch
#

thank you

sudden geyser
#

Derku in the object you passed, there should be a data property which is an object of that role data

#

So like { data: { name: "Muted", ... } }

earnest phoenix
#

ok

#

So like { data: { name: "Muted", ... } }
@sudden geyser doesnt work

sudden geyser
#

did it create the role

#

and how'd you use it

stable nimbus
#

I have a set of status's that my bot uses, 3 status's that change every now and again, but how would I refresh that with a setTimeout function? Like every so often (say every 5 minutes) the status's reload with new data, so that way I don't have to bring my bot offline.

long yew
#

can someone help

#

so when someone writes .spawn it spawns a pokemon

earnest phoenix
#

So?

long yew
#

but when they write .catch it catches the most recent pokemon spawned on the whole bot but i want it so it only catches the pokemon in the channel it was spawned in

earnest phoenix
#

W-what is this

#

did it create the role
@sudden geyser it created role but it didnt set perms and name

misty sigil
#

so it turns out it was just I can't use https

earnest phoenix
#

Are you using json?

old hinge
#

when you use foreach to list the embed it is duplicated. How can I solve that?

sudden geyser
earnest phoenix
#

confused

sudden geyser
#

Try passing an empty array and see if any permissions are added to the role.

earnest phoenix
#

?

sudden geyser
#

What are you confused about specifically?

earnest phoenix
#

all of it

sudden geyser
#

Do you know how to pass a key/value object to a function? Do you know how to add a property ({ key: "something" })

languid pollen
#

Uh so, i try to deploy my discord bot to heroku but heroku just gives me this 'Build timed out while waiting to start.' anyone know what o can do?

warm marsh
#

Get a VPS?

earnest phoenix
#

Money?

pure lion
#

ยฃ

slender thistle
#

Aw shit here we go again

pure lion
#

Ahem

#

Anyway

tulip zealot
#

Hey. It has been a while now since I have been looking for how to retrieve a user's e-mail address via oauth2, only I have the impression that the subject is poorly documented. Do you have any information or links that could help me? My DMs are open, I prefer to get an answer from DM elsewhere. Thanks in advance.

earnest phoenix
#

it isn't poorly documented at all

#

all you need is to authorize the user with the identify scope

#

and make a call to the @me endpoint

#

it'll return the user object with the email

tulip zealot
#

Thank you

#

Do u have found a documentation ?

tulip zealot
#

Thx. :)

long yew
#

so when someone writes .spawn it spawns a pokemon
but when they write .catch it catches the most recent pokemon spawned on the whole bot but i want it so it only catches the pokemon in the channel it was spawned in
probably something to do with this

pure lion
#

Pspspspsps

long yew
earnest phoenix
#

you should seriously stop using json as your database

pure lion
#

@long yew make a map, set it with the guild ID and the pokemon

#

you should seriously stop using json as your database
This too

earnest phoenix
#

this is getting ridiculous, you want to store way too much data for a json database, which is a horrid choice in the first place

#

Who is french

#

To create a bot with me

#

@tribal belfry

tulip zealot
#

cry, I'm really sorry to bother you again .., but I was wondering if npm libraries like express were available on the JS of websites?

modest maple
#

what?

long yew
#

@earnest phoenix can u help me do it?

#

this is getting ridiculous, you want to store way too much data for a json database, which is a horrid choice in the first place
@earnest phoenix what do u recommend me doing?

earnest phoenix
#

What the actual

#

Have you tried not using a JSON

#

That can get easily corrupted

pure saddle
#

See here's the thing: If you're attempting to simultaneously read a file and write to it at the same time, or if you're writing to a file from more than one location, the file risks being corrupted. And the more this happens, the higher the chances. It might work for small bots, but as it grows you are going to lose that data.

magic jackal
#

jesus this mans DB is JSON

long yew
#

lol

#

what should i use instead?

magic jackal
#

Do you need a DB server? I can give you one to use

#

If you're asking that question, then don't even try moving

#

Do it when you have time to learn something like MongoDB or SQL

earnest phoenix
#

an someone help me make Say/Announcement Commands

wet dove
#

-atmods

gilded plankBOT
#

Please do not mention (ping) more than one or two moderators for help, unless there is an emergency.

Here are some examples of emergencies:

  • Raids / Multiple members mass spamming.
  • Severe disruption of Discord's ToS (NSFW content, etc)
  • Anything that requires more than 2 moderators to handle.
earnest phoenix
#

sorry

wet dove
#

You pinged 20+ Mods for that for something unnecessary. sad

flat pelican
#

...

earnest phoenix
#

sorry

ember atlas
#

..

earnest phoenix
#

can someone help me make Say/Announcement Commands

tepid canyon
#

What do you have so far

#

Have you started... anything?

earnest phoenix
#

no

west raptor
#

ghost ping?

tepid canyon
#

Ghosts dont exist

grizzled raven
#

someone pinged mods but they edited the message

west raptor
#

oh

#

ok

sudden geyser
#

@fossil surge the guide you're using is outdated.

#

You could look at what's on screen and mirror it in your IDE/code editor, but I recommend you check the documentation for the Guild class for all the data you likely need.

copper crane
#

yo anyone here got verified by them and know how long that takes?

sudden geyser
#

Who's them. Discord Bot List? Discord?

copper crane
#

discord bot list

solemn latch
#

2-3 weeks rn

copper crane
#

damn that's long

#

but I'm not going anywere lol

errant perch
#

how do i stop it from sending the main help screen when i ask for the other ones

#
    case `help`:
      var embed = new Discord.MessageEmbed()
    .setColor(0xffa500)
    .setAuthor('cheems Commands', 'https://i.imgur.com/u5Zb05O.png')
    .setThumbnail('https://i.imgur.com/u5Zb05O.png')
    .addFields(
    { name: 'Bot', value: '`-h commands`', inline: true },
    { name: 'Fun', value: '`-h fun`', inline: true },
    { name: 'Memes/GIFs', value: '`-h memes`', inline: true },
    { name: 'Admin', value: '`-h admin`', inline: true },
    )
    message.channel.send(embed);
    if(args[1] === "fun"){
      var embed = new Discord.MessageEmbed()
      .setTitle("Fun Commands")
      .addField("`coin, randomnumber, poll, 8ball, iq, clap, numberguess`", "Use - before each command")
      .setColor(0xffa500)
      message.author.send(embed);
      message.channel.send("Fun commands have been sent");```
solemn latch
#

you only want to display the main one when args doesnt exist

#

otherwise you send the requested page

errant perch
#

uh

#

yes

#

how do i check if args 1 doesnt exist

quartz kindle
#

if(!args[1])

#

! means NOT, aka it inverts things

#

so you can use it to check if things are NOT true, aka dont exist

pure lion
#

:o

solemn latch
errant perch
#

ok

quartz kindle
#

double !! is actually pretty common, its used to convert stuff to boolean lmao

pure lion
#

Basically it inverts the bo-

errant perch
#

got it ๐Ÿ˜Ž

solemn latch
#

oo

pure lion
#

oo

errant perch
#

oo

pure lion
#

= yes in Filipino

errant perch
#

i have been working on my bot all day

#

to distract me from the fact of how lonely i am

pure lion
#

:(

#

Would you like a hug?

errant perch
#

sure

pure lion
#

*hug*

pure lion
#

Yey

solemn latch
#

so my database stores 32 bit values(2.1billion)
I have a check to make sure it doesnt go over this.
i ran my code through codacy and i got this.
how do i perform this check properly?

pure lion
#

Why the fuck do you think that you'll go over 2.1 billion values

solemn latch
#

server owners can spawn

sudden geyser
#

Is JavaScript's BigInt useful?

pure lion
#

Idk are they

solemn latch
#

thanks lite i think thats the right way to do it

pure lion
#

(can't watch rn)

quartz kindle
#

yes BigInts are useful

pure lion
#

Smallint

quartz kindle
#

all javascript numbers are represented by 64 bit floats

pure lion
#

So bigint/2

quartz kindle
#

the maximum safe value a js number can have is 9007199254740991

pure lion
#

The fact that you remember that

quartz kindle
#

BigInt gives you a way to have numbers with unlimited size/length

#

without losing precision

pure lion
#

Oh shit that's cool

quartz kindle
#

here's an example

pure lion
#

1+2 = +1

quartz kindle
#

at that size, normal numbers start giving inaccurate results due to rounding, but bigints remain accurate

pure lion
#

That's so useful :oooo

solemn latch
#

so what was the issues with 2.1b being a different value at runtime?

quartz kindle
#

not sure honestly js isnt limited by 32 bits

solemn latch
#

probs codacy being dumb, because i tested it pretty hard, even one over it would throw the error properly

quartz kindle
#

not sure if PMD is related to codacy, but this is what PMD says

#

that second line number is much bigger than yours and its still ok

amber fractal
#

Well it rounds with division doesnt it?

#

BigInts

quartz kindle
#

yes

#

they cannot have decimals

amber fractal
#

So you trade precision somewhere for precision elsewhere then

quartz kindle
#

well they are integers, not floats, their precision is limited to integer-esque values

#

but since they have no limit, you could devise your own system with them

#

for example multiply by 100000000000000 and reserve x digits to act as if they were decimals lol

amber fractal
#

Lmao

#

How does it have no cap?

#

Im curious as to how that'd work

#

It cant be good for performance

quartz kindle
#

internally they are probably built with multiple integers in sections

solemn latch
#

you mean doing math larger than the number of bits you have?

#

its actually a really really intresting concept

#

you do the math stacked

#

i built a cpu, that had 8 bit bus width, but did 64 bit math on it

#

it took 3 days

quartz kindle
#

before they were introduced, there were many libraries that did the same thing, they held numbers as strings, and math operations would be applied in sections

solemn latch
#

to do something simple

amber fractal
#

So I'm guessing performance takes quite a hit?

solemn latch
#

huge hit

#

on modern pc's tho, the number of bits is 64 bits, your working with obserdly massive numbers before it becomes an issue

amber fractal
#

128 bit systems when

solemn latch
#

getting off topic, but you can kinda see how it stacks logically, its a great video

amber fractal
#

Yeah, I've done stuff like a binary half-adder before

#

Weird stuff

pure lion
#

How would I fetch a user from discord

#

If I wanna unban

#

?

#

:(

slender thistle
#

d.js

#

?

pure lion
#

Ye

slender thistle
#

fetchUser

pure lion
#

.js

#

Ok

topaz fjord
#

no js.d

slender thistle
#

But tbh it feels like an unnecessary API request

earnest phoenix
#

@pure lion you use djs v12?

#

If so then
<client>.users.fetch()

pure lion
#

B a l l s

earnest phoenix
#

So i was using puppeteer to screenshot websites, i used it on heroku with a buildpack and worked fine... But when i moved from heroku to a vps... On this vps it doesn't work and keeps saying Failed to launch the browser process! how can i fix this?
My launch of puppeteer is

<puppeteer>.launch({ args: ["--no-sandbox"], defaultViewport: { width: 1440, height: 1080 } });```
solemn latch
#

looking around on github, there are a handful of reasons this could happen, i think looking at the closed issues on github will probably have the answer for you

atomic quarry
#

Ok so I got my music bot to work but, its sending the message twice now

pure lion
#

@atomic quarry for all?

solemn latch
#

make sure you are not running the bot twice

pure lion
#

^

#

That happened to me earlier, scared the shit out of me

solemn latch
atomic quarry
#

Ok,

#

I'll check

solemn latch
#

i wonder what my bot would do if i ran it twice

#

ima test it

#

on my dev bot

atomic quarry
#

Interesting I just happened to check the log and...

#

DiscordAPIError: Missing Access
at RequestHandler.execute (/rbd/pnpm-volume/3b5f9c99-2ab5-49f0-a1fc-f120a96885d4/node_modules/.registry.npmjs.org/discord.js/12.2.0/node_modules/discord.js/src/rest/RequestHandler.js:170:25)
at processTicksAndRejections (internal/process/task_queues.js:88:5) {
name: 'DiscordAPIError',
message: 'Missing Access',
method: 'delete',
path: '/channels/723324276630880348/messages/727322367688179713/reactions',
code: 50001,
httpStatus: 403
}

solemn latch
#

that means you sent a request for something you couldnt do

atomic quarry
#

Hmm

solemn latch
#

intresting, since i generate balance every time i talk, and i dont reget it from the database every time(only update on add, not on checking)
two of my bot running at once breaks balance

#

even tho they run on the same db

#

which isnt really an issue, since balance is per guild.

atomic quarry
#

Doesn't look likeI'm running it twice

#

Oh and I also have a website for my bot

earnest phoenix
#

I want like:
Removed permissions: ['administrator', 'ban_members']
Addeds Permissions: ['speak']

solemn latch
#

theres an event called

#

GUILD_ROLE_UPDATE

opaque hawk
#

waow

wooden ember
#

is there a way to use command for a bot through the console?

opaque hawk
#

afaik, no

earnest phoenix
#

@solemn latch how i can get the permissions addeds/removed is my question

bitter loom
#

anyone know good alternatives to glitch.com. im broke

solemn latch
earnest phoenix
#

how?

solemn latch
#

@wooden ember it is possible, but you would have to build it yourself, and define the channel manually every time

wooden ember
#

yeah I know it would be hard to do but I was thinking of making something similar to the say command in a mincraft server console

solemn latch
#

you could just do !say channelID message

wooden ember
#

so like general say: and what you whanna say and the bot will post it

bitter loom
#

how do i make an embed response from a bot on user input

solemn latch
#

@earnest phoenix if old role has a permission new role doesnt have, it was removed.
if new role has a permission old role doesnt have, it was added

earnest phoenix
#

but i want a array xd

solemn latch
#

role permissions come in an array

#

so

#

xor actually might be what you want

#

if your comfortable performing bitwise operations

wooden ember
#

tryna look up a way to get the console to accept an input and I think my brain just caught fire

solemn latch
#

its really not worth it

#

when you can just do !say

wooden ember
#

I know but I whant to annonomusly ridicule people

solemn latch
#

your bot wont be approved if you do that

wooden ember
#

I not making it public

#

I but as you say ill probably just not do it at all

#

its 2:30 in the morning I started js two days ago why am I doing this to my self

earnest phoenix
#

Now pending for approval!

earnest phoenix
#

how i do like:
<bitfield_permissions>.toArray()?

summer torrent
#

yes

#

for get perm array of bitfield

earnest phoenix
#

?

#

but how

shut wolf
#

how can i add reaction on embed

solemn latch
#

same as any other message

earnest phoenix
#

Yo

#

I have new bot

#

Called Ware

solemn latch
#

pretty sure you can just declare the bits a new discord.permissions()

https://discord.js.org/#/docs/main/stable/class/Permissions

#

@earnest phoenix

weary ridge
#

Hi just wondering how do i make it send it to a specific user e.g. <dm @weary ridge

errant perch
#

anyone know how to get a users profile picture

#

discord.js

#

i have looked everywhere all the things i have tried havent worked

summer torrent
tribal rock
#

user.avatarURL()

clever rampart
#

is it possible to .setImage on a rich Embed with an image generated from Canvas?

solemn latch
#

yes

clever rampart
#

can you point me to where I can read up on it, or example code? I'm having a hard time figuring it out

solemn latch
#

i think you just can use the canvas buffer

#

canvas.toBuffer()

clever rampart
#

I can get this to work:

const attachment = new Discord.Attachment(canvas.toBuffer(), 'Test.png');
  message.channel.send(attachment)

But this generates an error message:

let rich=new Discord.RichEmbed()
  rich.setImage(attachment)
  return message.channel.send(rich)
summer torrent
#

you can't use Discord.Attachment in embed

clever rampart
#

hm, I tried using rich.setImage(canvas.toBuffer()) as well, but no dice

#

I think there's something I'm not understanding

summer torrent
#

use .attachFiles

clever rampart
#

hm, .attachFiles has it sending outside the rich embed itself. Thanks for the link, I'll try to poke around some more

tribal rock
#

sweet

#

try this

#

let buffer = canvas.toBuffer('image/png');
message.channel.send({files: [buffer]})

wheat valve
#

Also shouldn't RichEmbed() be MessageEmbed()

solemn latch
#

depends on the djs version

clever rampart
#

Quero that sends the image as it's own message, but I'm trying to get it as the .setImage value in a RichEmbed

#

and I will look into MessageEmbed(), thank you

spare mirage
solemn latch
#

those errors seem self explanitory

spare mirage
#

I just cant find the index.js error

solemn latch
#

it tells you the line number

#

or you can just click on it

spare mirage
#

oh wow

#

I made a var options here!?!?! then how is it not defined

earnest phoenix
#

beep boop error
@spare mirage take the note off thats why

#

take this off

#

// logs in

#

๐Ÿ™‚

spare mirage
#

no

#

that wasnt the problem

clever rampart
#

that's just a comment

spare mirage
#

I already fixed that

earnest phoenix
#

oh

solemn latch
#

i believe your issue is scope

earnest phoenix
#

that's just a comment
@clever rampart some times it does that for me i just take the not off and it works

#

it is rlly weird

#

but yeah

strange trout
#

Attach the buffer and then add the image to the embed

#

attachment://name.png

copper cradle
#

ok

spare mirage
#

"command handlers are easy to make"- this discord server
me: no!

copper cradle
#

@spare mirage you literally tried to re-define an argument to the function inside of it

#

you can't declare a variable that has the same name as a parameter inside a function

spare mirage
#

oh lmao i see

strange trout
#

So

channel.send({
     embed: {
          image: {
               url: "attachment://image.png"
          }
     }, 

     attachments: [
          {
               name: "image.png",
               file: <Canvas>.toBuffer()
          }
     ]
});
copper cradle
#

and, omg that indentation

solemn latch
#

i also dont see why your requiring so many things in your execute

strange trout
#

Mobile

solemn latch
spare mirage
#
function image(message, parts) {
 
    /* extract search query from message */
 
    var search = parts.slice(1).join(" "); // Slices of the command part of the array ["!image", "cute", "dog"] ---> ["cute", "dog"] ---> "cute dog"
 
    var options = {
        url: "http://results.dogpile.com/serp?qc=images&q=" + search,
        method: "GET",
        headers: {
            "Accept": "text/html",
            "User-Agent": "Chrome"
        }
    };
    request(options, function(error, response, responseBody) {
        if (error) {
            // handle error
            return;
        }
 
        /* Extract image URLs from responseBody using cheerio */
 
        $ = cheerio.load(responseBody); // load responseBody into cheerio (jQuery)
 
        // In this search engine they use ".image a.link" as their css selector for image links
        var links = $(".image a.link");
 
        // We want to fetch the URLs not the DOM nodes, we do this with jQuery's .attr() function
        // this line might be hard to understand but it goes thru all the links (DOM) and stores each url in an array called urls
        var urls = new Array(links.length).fill(0).map((v, i) => links.eq(i).attr("href"));
        console.log(urls);
        if (!urls.length) {
            // Handle no results
            return;
        }
 
        // Send result
        message.channel.send( urls[0] );
    });
 
}

because this is in my index.js file :/

copper cradle
#

also those params

solemn latch
#

most of these you already have acess to

copper cradle
#

wtf is require lmao

spare mirage
#

npm i --save require and you will seee

copper cradle
#

lemme guess, content is message.content

solemn latch
#

you can make this image function a module

#

so that anything that needs these can just be requested in the command itself

spare mirage
#

how?

solemn latch
#

the same way your doing your commands really

#

your commands are also modules

ember atlas
#

hiya, doing custom guild prefixes and it registers there is a custom prefix, but does not actually respond to it. Any ideas? ```ts
let db = await guildModel.findOne({guildID: msg.guildID})
let prefix = db.prefix
if (!prefix) {
prefix = config.prefix
}
if(msg.content.toLowerCase().startsWith(prefix)){
const args = msg.content.split(" ").slice(3);
const cmdLabelar = msg.content.split(" ").slice(2, 3);
const label = cmdLabelar[0].trim().toLowerCase();
return ["normal", label, args];
}

spare mirage
#

lemme guess, content is message.content
@copper cradle why do u have to be so mean tbh

copper cradle
#

bruh what

#

my comment wasn't even mean smh

spare mirage
#

nah just roasting me because im new to coding

solemn latch
#

im not sure boss, SadCat

#

tim would know

copper cradle
#

not really a roast

#

considering the stuff that usually happens here

solemn latch
#

@spare mirage you actually try, a lot of people who ask for help here, dont try at all

strange trout
#

What does prefix log?

ember atlas
#

$$

clever rampart
#

Alexis, using what you sent, I only generated an empty embed. I'm really not sure what url I would be using in "embed.image.url", since I'm generating an image from Canvas

ember atlas
#

which is the custom prefix i set

strange trout
#

The name of the buffer

solemn latch
#

is it because the way your slicing?

ember atlas
#

possibly, but it worked fine before i added the prefix getting from the db

solemn latch
#

at a fixed length, when your prefix can be different lengths

spare mirage
#

@solemn latch do I use module.exports
for image?

strange trout
#

You export the function

solemn latch
#

^

ember atlas
#

at a fixed length, when your prefix can be different lengths
@solemn latch dont think so considering the default prefix is way longer

solemn latch
#

well, if they are diffrent lengths, you need to account for that.

#
const args = message.content.slice(serverSettings.prefix.length).split(/ +/);
const commandName = args.shift().toLowerCase();

I'm slicing after the length of the prefix

ember atlas
#

it should.. no?

#

i mean thats probably it

spare mirage
#

I am actually confused

You export the function

#

do I export the function from index.js to image.js or the otherway around?

solemn latch
#
module.exports = {
  function righthere() {
  }
}
#

you make its own file

spare mirage
#

ah

solemn latch
#

and you require it in files that need it

strange trout
#

You can even add more functions as well

solemn latch
#

its 1am, i gotta get food, brb

spare mirage
#
    name: 'image',
    description: "this is an image command!",
    execute(require, cheerio, message, args){```
do I require it here?
solemn latch
#

you can require at the top

spare mirage
#

that woould work?

solemn latch
#

like that

summer torrent
#

@ember atlas prefix is $$ but you are slicing 3 Thonk

spare mirage
#

ahh

solemn latch
#

but not discord

summer torrent
solemn latch
#

yeah, just prefix.length

summer torrent
#

try prefix.length instead of 3

ember atlas
#

ok

solemn latch
#

ok brb

ember atlas
#

this was something my friend clearly did and i didnt realize

spare mirage
#

this was something my friend clearly did and i didnt realize
@ember atlas I dont believe u

ember atlas
#

@summer torrent still nothing

#

@spare mirage i didnt ask for you to believe me, but ok shruggiesrainbowcat

spare mirage
#

okok

#

:/

ember atlas
#

this is a shared bot that me and my 4 friends coded one night where we each took a section of the bot and coded it

spare mirage
#

the errors

#

must be great

strange trout
#

Are you slicing after splitting

ember atlas
#

yes

earnest phoenix
#

Team work

strange trout
#

slice first, split after

solemn latch
#

Good spot, I wouldnt have seen that in 2 weeks

strange trout
#

To get the arguments you need to slice the length of the prefix and then split

spare mirage
#

@solemn latch so I do


weird api stuff```
solemn latch
#

almost.

module.exports = {
  function righthere() {
  }
}
#

you need the second set of brackets

#

around the function

strange trout
#

I'd use an arrow function

spare mirage
#

so it is

module.exports = {
  function image(message, parts) { 
  weird api stuff
  }
}```
solemn latch
#

im used to doing module.exports at the end anyway tbh

strange trout
#

Unless you need to access this or use the call method lilySip

solemn latch
#

module.exports = { con, render };

strange trout
#

That's what I do

spare mirage
#

uhh

#

explain

solemn latch
#

its not something you really need to do

spare mirage
#

is con a function u made earlier?

solemn latch
#

you can declare the functions you have, and export at the end

strange trout
#

const myfun = () => {}

module.exports = { myfunc }
solemn latch
#

it just looks nicer imo, i dont think theres really a purpose

spare mirage
#

so it would be

function image(balblalbla) 
blablbalba

module.exports = { image } 
#
 

    var search = parts.slice(1).join(" "); // Slices of the command part of the array ["!image", "cute", "dog"] ---> ["cute", "dog"] ---> "cute dog"
 
    var options = {
        url: "http://results.dogpile.com/serp?qc=images&q=" + search,
        method: "GET",
        headers: {
            "Accept": "text/html",
            "User-Agent": "Chrome"
        }
    };
    request(options, function(error, response, responseBody) {
        if (error) {
        
            return;
        }
 

 
        $ = cheerio.load(responseBody); // load responseBody into cheerio (jQuery)
 
        var links = $(".image a.link");
 
       jQuery's .attr() function
       (DOM) and stores each url in an array called urls
        var urls = new Array(links.length).fill(0).map((v, i) => links.eq(i).attr("href"));
        console.log(urls);
        if (!urls.length) {
            return;
        }
 
        // Send result
        message.channel.send( urls[0] );
    });
 
} ```
this is everything I use for the image search api, how do I put this in image.js?
solemn latch
#

you can just copy paste it into image.js
and add the exports line at the bottom

#

did i just get pooped

spare mirage
#

so it would be llike this

strange trout
#

No

#

Wait, are you using the image function in multiple files?

spare mirage
#

no

solemn latch
#

then why are you passing it on

spare mirage
#

?

solemn latch
#

ima scroll back

strange trout
#

Then you don't really need to export it. Just declare the function and use it within the file

spare mirage
#

ok

solemn latch
#

for the vast majority of cases the only thing your command handler needs to send to your command is the message, and the args.

spare mirage
solemn latch
#

require, content, Discord, parts, cherrio really dont need to be sent

spare mirage
strange trout
pseudo anchor
#

Yo doesn anyone know how to make a command to grab random images by tag from imgur?

spare mirage
#

I was gonna say yes

pseudo anchor
#

drn

spare mirage
#

I know how to in js

#

youll probably have to use this

pseudo anchor
#

Yeah that's why I asked. It's something I've been trying to figure out for a while now, but your the first person I've seen make one. Sadly yours was in js instead of python so figured id see if anyone knew how to do it in the code im using xD

spare mirage
#

no mine is using a google search api

pseudo anchor
#

ooff.. yeah that's wher emy issue is. I'm trying to find a simpler way to do it since I don't have any skill with using APIs for free. Not a lot of them can be used free from what I've seen.

#

And living of SSI makes the payed ones virtually impossible for me xD

spare mirage
#

I Dont think u can do it without an api

pseudo anchor
#

aaahh.. okee. Will have to look into seeing if it is possible to get good image apis free then.

spare mirage
#

I was using the api cheerio

#

maybe python has it too

strange trout
#

You're web scraping

#

Definitely possible in Python

spare mirage
#

dont tell the google police

#

lmaoo

hazy sparrow
strange trout
#

Not anything official no. That I know of at least

#

Guide and Docs are great on their own though lilySip

hazy sparrow
#

im too dumb to understand code written , i like it automaticly writing in my pase and explaining it

#

like a video tutorial

strange trout
#

Most videos are outdated

#

The guide does a great job at explaining everything

#

Coding = a lot of reading/research

hazy sparrow
#

well, okay i guess ill stick with this

#

is there a server for discord.js?

strange trout
#

Yep

#

There's an invite in the Docs

hazy sparrow
#

ok ty

spare mirage
#

@hazy sparrow dont use videos you wont learn unnderstanding it

#

actually nvm

#

this youtuber lyoncode is kinda good at letting u understand

dusk sphinx
#

IDK which will work in command

earnest phoenix
#

Hello, I can not seem to figure out the following:
message.author.send("RichEmbed")
Send a message before the bot Dms the user.
"I have sent you a DM With an invite link"

const { Command } = require('discord.js-commando');

module.exports = class WhoMadeMeCommand extends Command {
  constructor(client) {
    super(client, {
      name: 'invite',
      aliases: ['inv', 'botinvite'],
      memberName: 'creator',
      group: 'other',
      description: "Sends a Invite link to the bot."
    });
  }

  run(message) {
    message.author.send(
      "[Click here to invite me to you're server.](https://discord.com/api/oauth2/authorize?client_id=724079715811328043&permissions=8&scope=bot)"
);
  }
};```
#

Also

#

The Click here
Dos not work on that for some reason.

summer torrent
#

because it is for embeds

earnest phoenix
#

Alright.

#

How do I make that an embed?

summer torrent
earnest phoenix
#

re

#

That is different.

#

lmfao

#

That guide is dookey.

dusk sphinx
#

My bot seems down not 24/7

summer torrent
#

where do you host it

dusk sphinx
#

My own server

#

I also has another question....
Do I need put command on server.js or readme.md

summer torrent
#

it is not for commands

dusk sphinx
#

So is there able to edit command from server.js

lusty quest
#

someone here got an idea how to remove a key with value from a Json? (json is a MongoDB return and i want to remove the _id field for displaying the content in a message)

#

tryed remove jsonfile.key but it doesnt do anything

cinder patio
#

wait what exactly are you trying to do?

lusty quest
#

remove one field from the json

cinder patio
#

from a json file or just a javascript object?

lusty quest
#
Current settings: {
  _id: 5ef9e60abfc9f06ad7aga4,
  prefix: '*',
  glyph: 'none',
  lfg_channel: '0',
  wf_channel: '0',
  playercounter_channel: '0',
  module_playercounter: true,
  module_baro: true,
  module_arbi: true,
  module_baguette: true,
  module_bird: true,
  module_cat: true,
  module_cattext: true,
  module_chuck: true,
  module_credits: true,
  module_dadjoke: true,
  module_darvo: true,
  module_discord: true,
  module_dispo: true,
  module_dog: true,
  module_donate: true,
  module_ehp: true,
  module_glyph: false,
  module_hug: true,
  module_leaderboard: true,
  module_lfg: true,
  module_meme: true,
  module_owo: true,
  module_pat: true,
  module_price: true,
  module_rfact: true,
  module_riven: true,
  module_sabatonmeme: true,
  module_sentient: true,
  module_urban: true,
  urban_nsfw: true,
  module_userinfo: true,
  module_wfmeme: true,
  module_whereis: true,
  module_wiki: true,
  module_wink: true,
  guildID: '0',
  __v: 0
}
``` i want to remove the _id field, guildID and __v
cinder patio
#

so that's a JS object?

lusty quest
#

tryed to convert the return to json with JSON.parse(JSON.stringify(jsonfile)); and then use remove.jsonfile._id on it

#

yes its an js object

cinder patio
#

but like... do you want to remove the key from the JSON file or just from the JS objet

lusty quest
#

just from the object would be enought want to display it in a command

#

doesnt want that everyone can see the ids or the Guildid

cinder patio
#
delete object.key
lusty quest
#

doesnt work

cinder patio
lusty quest
#
delete settings._id;
``` object is called settings (return from MongoDB)
cinder patio
#

should work

#

console log the object after you delete the _id

lusty quest
#
delete settings._id;
console.log(settings);
``` still contains the id
slim heart
#

so i was looking at the oauth docs because i found the prompt=none thing (love that btw)
and found this https://discord.com/developers/docs/topics/oauth2#state-and-security
I was thinking of implementing it but i wanna make sure i get it right
i could be getting the logic completely wrong so just lmk. the first thing i thought abt was creating a state when requesting /api/auth which redirects to the authorize page. so creating a token there sending it along and then checking it when it receives the /api/auth/callback?
something feels not right about this and i've a feeling its more complicated so do let me know

delicate shore
#

wtf happend

#

pls help

#

my bot is not playing songs

lusty quest
#

quota exceeded

#

=> you got rate limited and locked out the API

delicate shore
#

oh

#

now

#

what should i do

#

๐Ÿ˜ฆ

lusty quest
#

wait

delicate shore
#

๐Ÿ˜ข

cinder patio
#

Only explanation that makes sense is that the object is actually a Proxy which blocks you from using the delete operator, try

settings._id = undefined

lusty quest
#

and code the bot to not spam the API

delicate shore
#

and code the bot to not spam the API
@lusty quest how?

#

Only explanation that makes sense is that the object is actually a Proxy which blocks you from using the delete operator, try

settings._id = undefined
@cinder patio where ?

lusty quest
#

add a query for new Songs

delicate shore
#

i am not getting it

cinder patio
#

That was for Superbrain

delicate shore
#

sorry i am a newbie

#

pls Explaina bit

#

a bit*

pure lion
#

Rate limiting, it's so that the api isn't slowed down by clients

delicate shore
#

oh

#

but how to do whhat @lusty quest is saying

#

and @cinder patio where to add it?

cinder patio
#

That was not directed at you but at Superbrain

lusty quest
#

@cinder patio thx this worked

delicate shore
#

add a query for new Songs
@lusty quest ๐Ÿ˜ฆ pls help

finite bough
#

@delicate shore you can either use a database or a map to store the songs

delicate shore
#

@delicate shore you can either use a database or a map to store the songs
@finite bough in glitch how can we?

finite bough
#

same way

#

tho

#

I do not recommend making a music bot on glitch

dusk sphinx
#

Is msg.channel.send for deleting comment

restive pebble
#

let this.queue = new map()

#

Is msg.channel.send for deleting comment
@dusk sphinx no

#

it justs send the message

finite bough
#

msg.delete();

dusk sphinx
#

What about channel

restive pebble
#

what channel

#

message.channel?

dusk sphinx
#

I mean about different command

restive pebble
#

oh

dusk sphinx
#

Is [...] and <...> for command

restive pebble
#

i cannot understand

#

for what thing u talking

dusk sphinx
#

I mean is this [...] & <...> used for command

#

Has been so long haven't use

restive pebble
#

no no

delicate shore
#

let this.queue = new map()
@restive pebble this is for m?

#

me*

restive pebble
#

yes

delicate shore
#

where should i place this

restive pebble
#

u can look is mdn

finite bough
#

[] is for arrays

delicate shore
#

MDN?

restive pebble
#

this creates a map

delicate shore
#

ok

restive pebble
#

and u can acess or write it

delicate shore
#

but only this code?

finite bough
#

<> are generally used for greater than and less than signs

restive pebble
#

u must put it in ur main module

shut wolf
#

help me

restive pebble
#

ok

#

describe

delicate shore
#

mian module of musi cplay command

restive pebble
#

problem

delicate shore
#

or queue

restive pebble
#

yes

#

where u can acess them

delicate shore
#

queue?

restive pebble
#

like in my bot i defined it in index.js

shut wolf
#

how can i make reaction menu

restive pebble
#

m.react(emoji)

shut wolf
#

its shouldsend embed when reaction.

restive pebble
#

message.channel.send(embed).then(m=>m.react(emoji))

delicate shore
#

like in my bot i defined it in index.js
@restive pebble me too but in what line should i place it?

restive pebble
#

u want to make page systems?

shut wolf
#

no

#

if i react its send help in dm or here or cancl

delicate shore
restive pebble
#

dont use this.qรนeue

#

let queue=new map()

#

if i react its send help in dm or here or cancl
@shut wolf

#

ok

shut wolf
#

help me

restive pebble
#

create a reaction collector

delicate shore
shut wolf
#

and how to create

delicate shore
#

queue is already defined

restive pebble
#

yes

#

so why u adding again

delicate shore
#

ok

#

@restive pebble but it's not solving problem

#

of rate limited

#

d

#

should i change api? @restive pebble

restive pebble
#

u have rate limit error

#

why didnt u tell earlier

#

u have to change api

pure lion
#

Omj

#

Still this eezue?

#

Shaking my trombone

candid hinge
#

hey everyone, im new to making discord bots, and need to know somewhere i should upload my bot to always have it running, for a low price, thanks!

pure lion
#

Fucking autocorrect

#

Heroku

restive pebble
#

and how to create
@shut wolf message.channel.send(embed).then(m=>m.react(emoji).then(r=>r.awaitReactions()))

#

try like it

#

hey everyone, im new to making discord bots, and need to know somewhere i should upload my bot to always have it running, for a low price, thanks!
@candid hinge aws

#

u have to pay only for the databas u use

#

or services

finite bough
#

@candid hinge contabo 4$/month

earnest phoenix
#

how add my bot in this server

#

???

delicate shore
#

Ok

summer torrent
earnest phoenix
summer torrent
#

can you read the error

restive pebble
#

yes

#

u have to reload website

earnest phoenix
#

300 words

restive pebble
#

yes add 300 words

delicate shore
#

i was wathing a tuotiral

#

for stats commanfd

#

why is this error coming

restive pebble
#

ok

#

ill check

#

client not defined

delicate shore
#

yeah

#

lol

restive pebble
#

how u defined client

earnest phoenix
delicate shore
#

how u defined client
@restive pebble that is what i dunno

restive pebble
#

:/

#

@restive pebble
@earnest phoenix fix those errors

tepid canyon
#

change it to bot cos that is what youre using

delicate shore
#

const client = new Discord.Client()

restive pebble
#

uh

#

did u put it inside a contructor

earnest phoenix
#

my bot 30m later ago offline why this problem@restive pebble

restive pebble
#

first

#

u dont have 300 characters

#

2nd ur short description exceeds word limit

#

3rd ur owners are not separated by commas

earnest phoenix
#

or

delicate shore
#
if(command === "stats") {
    
    var mcount = client.users.size
    var scount = client.guilds.size
    var tcount = client.channels.filter(c => c.type === 'text').size
    var vcount = client.channels.filter(c => c.type === 'voice').size
    msg.reply(`${client.user.username} is on ${scount} servers with ${mcount} members, chatting on ${tcount} text channels, with ${vcount} voice channels!`)
    console.log();
  }```
#

what is wrong here

#

๐Ÿ˜ฆ

tepid canyon
#

change to bot not client

restive pebble
#

send ur full code

delicate shore
#

send ur full code
@restive pebble this is full

restive pebble
#

screen

#

where u defined client

delicate shore
#

that is on top

restive pebble
#

@earnest phoenix i recommend u to go to #support

delicate shore
#

@restive pebble

earnest phoenix
#

@restive pebble my bot offline before 30m why

tepid canyon
#

why do you require discord.js 2 times

delicate shore
#

why do you require discord.js 2 times
@tepid canyon wot

restive pebble
#

new Client()

#

@restive pebble my bot offline before 30m why
@earnest phoenix ur vps is down i guess

delicate shore
#

new Client()
@restive pebble what

restive pebble
#

ur code is correct

delicate shore
#

ok

restive pebble
#

yes change client to bot

delicate shore
#

so?

#

ok

restive pebble
#

client to bot

earnest phoenix
restive pebble
#

glitch apps will sleep

#

after 5 mins

#

if they dont recieve a request

delicate shore
#

lol

#

i have glitch premium

#

๐Ÿ‘

restive pebble
#

ok

earnest phoenix
#

@restive pebble solution

restive pebble
#

nice

earnest phoenix
#

???

delicate shore
#

glitch premium

restive pebble
#

either u buy glitch premium

delicate shore
#

is solution

restive pebble
#

or visit ur bot site evry 5 mins

delicate shore
#

pinging services are banned

restive pebble
#

yes

#

2 options

earnest phoenix
#

more??

restive pebble
#

no

earnest phoenix
restive pebble
#

thats why all leaving flitch

#

glitch

spare mirage
#

imagine using client instead of bot

restive pebble
#

hmmm

delicate shore
#

error

#

i used bot

earnest phoenix
#

i fucked my endex

#

brilliant

restive pebble
#

bot.channel.cache.filter

tepid canyon
#

are you using discordjs v12?

delicate shore
#
if(command === "stats") {
    
    var mcount = bot.users.size
    var scount = bot.guilds.size
    var tcount = bot.channels.filter(c => c.type === 'text').size
    var vcount = bot.channels.filter(c => c.type === 'voice').size
    msg.reply(`${bot.user.username} is on ${scount} servers with ${mcount} members, chatting on ${tcount} text channels, with ${vcount} voice channels!`)
    console.log();
  }```
#

are you using discordjs v12?
@tepid canyon ys

tepid canyon
#

then use what he said xd

delicate shore
#

wottttttttttttttt

spare mirage
#

what are u tryig to make?

tepid canyon
#

bot.channel.cache.filter

delicate shore
#

stats command

summer torrent
#

@delicate shore cache.size

restive pebble
#

channels.cache.filter

summer torrent
#

cache.filter

restive pebble
#

channels

#

channels

earnest phoenix
#

How to host yourself@restive pebble

restive pebble
#

node index.js

spare mirage
#

I dont know what command does

earnest phoenix
spare mirage
#

I always use if (message.content.startsWith(PREFIX + " command"))

restive pebble
delicate shore
#

ummmmmmmmmmmm

restive pebble
#

use construtors

earnest phoenix
#

How to host yourself@restive pebble
@earnest phoenix reply bro

restive pebble
#

node index.js

delicate shore
#

node index.js
@restive pebble what

summer torrent
#

dude just use process manager

spare mirage
#

bruh @earnest phoenix

delicate shore
#

are u saying me

#

or him

restive pebble
#

guilds.cache.size

#

pgamerx

delicate shore
#

k

earnest phoenix
#

bruh @earnest phoenix
@spare mirage yuss

spare mirage
#

hosting urself is easy...

delicate shore
#

@restive pebble what about users

earnest phoenix
#

lol

spare mirage
#

like just host on ur pc

#

:/

restive pebble
#

bot.users.cache.size

tepid canyon
#

bot.users.cache

#

yes that

earnest phoenix
#

like just host on ur pc
@spare mirage i mean 24/7 ๐Ÿ™‚

restive pebble
#

moni

earnest phoenix
#

happy yt

delicate shore
#

sorry guys i am not good at coding lol

tepid canyon
#

If you really want free 24/7 hosting your main option left is heroku

restive pebble
#

heroku which will stop after 550 hours

earnest phoenix
#

lol

restive pebble
#

atleast better than glitch

tepid canyon
#

just add a card

earnest phoenix
#

def allowed(ctx):
return ctx.author.id ==561049763286614017
I done this to make a secret command in my bot but by this all command become only for me i only want 1 command hide

restive pebble
#

5 mins lol

delicate shore
earnest phoenix
restive pebble
earnest phoenix
#

congo

#

Hm

restive pebble
#

i dont help witb python

spare mirage
#

what did u change @delicate shore

earnest phoenix
#

Sad

restive pebble
#

i mean cant

spare mirage
#

@spare mirage i mean 24/7 ๐Ÿ™‚
@earnest phoenix that costs money

delicate shore
#

i inserted cache

#

everywhere

#

how to make a rich embed

#

i use normal embed

restive pebble
#

new Discord.RichEmbed()

spare mirage
#

whats the difference?

earnest phoenix
#

@earnest phoenix that costs money
@spare mirage websites name

#

plz

summer torrent
spare mirage
#

const EMBEDNAME = new Discord.RichEmbed()

delicate shore
#
if (command === "help" || command == "cmd") {
    const helpembed = new Discord.MessageEmbed()
      .setColor("#7289DA")
      .setAuthor(bot.user.tag, bot.user.displayAvatarURL())
      .setDescription(
        `
__**Commands List (Prefix s!)**__
> \`play\` > **\`play [title/url]\`**
> \`search\` > **\`search [title]\`**
> \`skip\`, \`stop\`,  \`pause\`, \`resume\` ,\`ping\`
> \`nowplaying\`, \`queue\`, \`volume\`,\`info\``
      )
      .addField(
        "**Fun Commands**",
       `> \`tf(question)\` , \`insult\` , \`beg\` ,\`slap\``
      )
      .addField("Moderation",`> \`ban\` , \`kick\``)
      .addField("Support Server", "link")
      .setFooter("Made By PGamerX#7350");
    msg.channel.send(helpembed);```
summer torrent
#

@earnest phoenix check pinned messages

tepid canyon
#

v12 is MessageEmbed()

restive pebble
#

oh

delicate shore
#

can i change it to rich embed

restive pebble
#

i dont have much iQ

delicate shore
#

becaue i need to add more fielf

#

fields

restive pebble
#

nono

#

MessageEmbed

delicate shore
#

we cannot add more than 3 .addField in thta

#

that

restive pebble
#

wut

#

i added 10

tepid canyon
#

yes you can

restive pebble
#

plus

delicate shore
#

no you cannot

restive pebble
#

u can inline

#

yes

delicate shore
#

inline?

earnest phoenix
#

@earnest phoenix check pinned messages
@summer torrent plz give link

restive pebble
#

.addField(somedata,somedata,true)

tepid canyon
#

you can also just put everything in 1 field

delicate shore
#

we can add max 3 ^

#

only

restive pebble
#

no

#

i added 10

delicate shore
#

yes

#

wot

restive pebble
#

i can show i

#

u

summer torrent
#

we cannot add more than 3 .addField in thta
@delicate shore field limit is 25

delicate shore
#

i mean you can not do thus
.addField

#

.addField

earnest phoenix
#

@delicate shore your pupps is so cute

delicate shore
#

thanks

restive pebble
earnest phoenix
restive pebble
earnest phoenix
restive pebble
summer torrent
#

guys can you stop this

tepid canyon
#

what error does it tell you if you put more than 3 fields lol

earnest phoenix
restive pebble
#

ok @summer torrent

summer torrent
#

@earnest phoenix

earnest phoenix
#

Thc

restive pebble
#

it works

earnest phoenix
#

@summer torrent thanksweirdsip

restive pebble
earnest phoenix
#

lol

restive pebble
#

all solved

earnest phoenix
spare mirage
#

what does this mean? execute should work?

summer torrent
#

there is no command called "stats"

spare mirage
#

lemme try again

cinder patio
#

What's this hybrid of a command handler?

spare mirage
#
bot.commands = new Discord.Collection();
 
const commandFiles = fs.readdirSync('./commands/').filter(file => file.endsWith('.js'));
for(const file of commandFiles){
    const command = require(`./commands/${file}`);
 
    bot.commands.set(command.name, command);
}
frosty idol
#

tasty

summer torrent
#

what is the name of stats command

spare mirage
#

ah lol

#

my stats file was named stays

summer torrent
#

that's why

restive pebble
#

uh

tepid canyon
#

in your ss it looks like stats to me

earnest phoenix
#

my stats file was named stays
@spare mirage rip typos weirdsip

restive pebble
spare mirage
#

still doesnt work though

summer torrent
#

check for "help" too

spare mirage
#

I deleted help..

#

It had nothing in it

earnest phoenix
#

@restive pebble you dont have verified bot dev. why weirdsip

summer torrent
#

then remove that

spare mirage
#

I did

#

I didnt save

earnest phoenix
summer torrent
#

imagine not using auto-save

spare mirage
#

whats that

#

lmaooooo

#

still the same problem

summer torrent
#

did you changed name of stats

spare mirage
#

no

#

stats name is stats.js

summer torrent
#

show stats command

spare mirage
summer torrent
spare mirage
#

lol

#

name is ping

#

could that be the problem

summer torrent
#

yes

delicate shore
#

@restive pebble changing API key didn't worked

#

i am still that rate limited

summer torrent
#

also make your command handler

#

if () { } is bad idea

restive pebble
#

too many reqs

#

it wont work changing the api key

#

u can use yt-search

delicate shore
#

how

#

HOw long od i have to wait ? @restive pebble

#

to get non rate limited

spare mirage
#

fk my life

restive pebble
#

You can use 10,000 units per day.

delicate shore
#

You can use 10,000 units per day.
@restive pebble so tom it will be fine?

summer torrent
#

@delicate shore show your code

#

also which API?

delicate shore
#

YT API

#

@restive pebble how can i shift from API to YT Search

summer torrent
#

@spare mirage you're executing bot, message, args

earnest phoenix
#

what is head

spare mirage
#

yes i know

summer torrent
#

so

#

in command you're requiring Discord, bot, message, args

earnest phoenix
#

@summer torrent what is HEAD

summer torrent
#

wdym

spare mirage
#

oh ye

#

it would be nice to have like require: everything

earnest phoenix
#

wdym
@summer torrent what

summer torrent
#

what do you mean

earnest phoenix
#

htt[ sequil

restive pebble
#

it would be nice to have like require: everything
@spare mirage yes install all npm packages

earnest phoenix
restive pebble
#

and run out of storage

spare mirage
#

xD

earnest phoenix
#

joice

spare mirage
#

still would be nice

surreal notch
#

i wanted to send message to a user using his user id

restive pebble
#

user.send

#

<client>.users.cache.get(id).send(message)

#

@surreal notch

earnest phoenix
#

F

restive pebble
earnest phoenix
restive pebble
#

what lang u using?

#

js or py

earnest phoenix
#

js

restive pebble
#

go to the top

earnest phoenix
restive pebble
#

and then settings

delicate shore
#

@restive pebble what is temporary solution to rate limited in YouTube Api

restive pebble
#

then remove the python buildpack

#

and add nodejs

earnest phoenix
#

see

restive pebble
#

@restive pebble what is temporary solution to rate limited in YouTube Api
@delicate shore use ytsearch

delicate shore
#

How ?

earnest phoenix
delicate shore
#

Idk anything about it

#

Can you link me to a tutorial

restive pebble
#

it requires no key

#

no rate kimit

spare mirage
#

why do people use these sites to code on?

restive pebble
#

free

earnest phoenix
#
       
 !     ERROR: Application not supported by 'heroku/nodejs' buildpack
 !     
 !     The 'heroku/nodejs' buildpack is set on this application, but was
 !     unable to detect a Node.js codebase.
 !         
 !     A Node.js app on Heroku requires a 'package.json' at the root of
 !     the directory structure.
 !     
 !     If you are trying to deploy a Node.js application, ensure that this
 !     file is present at the top level directory. This directory has the
 !     following files:
 !     
 !     botconfig.json
 !     commands/
 !     index.js
 !     LICENSE
 !     README.md
 !         
 !     If you are trying to deploy an application written in another
 !     language, you need to change the list of buildpacks set on your
 !     Heroku app using the 'heroku buildpacks' command.
 !         
 !     For more information, refer to the following documentation:
 !     https://devcenter.heroku.com/articles/buildpacks
 !     https://devcenter.heroku.com/articles/nodejs-support#activation
       More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
 !     Push failed
restive pebble
#

i am saying

earnest phoenix
#

@restive pebble

restive pebble
#

go to settings

earnest phoenix
#

and

restive pebble
#

then scroll down

#

a bit

#

until u see buildpacks

earnest phoenix
#

bit ?

restive pebble
#

yes scroll to buildpacks

#

then remove any existing buildbacks

#

then click on add buildpacks

pure lion
#

how would i make my sticky message command work?
code:
(inside the .on message, as a prefixed command:)

          let messageStc = args.slice(1).join(' ')
          let sticc = await msg.channel.send(messageStc)
          StickyMessages.set(`Stick.${msg.channel.id}`, `${sticc.id}`)

(inside the .on, every time there's a message)

  if (StickyMessages.get(`Stick`) === msg.channel.id) {

    let stAcc = await msg.channel.messages.fetch(StickyMessages.get(`Stick.${msg.channel.id}`))

    msg.channel.send(stAcc)
  }
restive pebble
#

then node js

delicate shore
#

@restive pebble but how to configure it

#

What is code etc

#

It's completely different

#

:(

restive pebble
#

no code required

#

its same

#

read the docs

pure lion
#

boeing do you know how to help me?