#development

1 messages · Page 362 of 1

earnest phoenix
#
    if(message.content.startsWith("hello")) {
            message.channel.send(`Hello! Nice to meet ya :D`);        
    }
});```
#

Lmao

quiet bobcat
#

Maybe return it?

earnest phoenix
#

return;
message.channel.send

quiet bobcat
#

what

#

no

#

message.chanel.send and then return

#

or return message.channel.send

earnest phoenix
#

That doesn't help

quiet bobcat
#

What's the issue then?

final ledge
#

Check if the message author is a bot if so return

earnest phoenix
#

o it's johnwiggins

final ledge
#

Hey

earnest phoenix
#

i dont need to check it

quiet bobcat
#

🤔

final ledge
#

Yes you do

earnest phoenix
#

it does that before

final ledge
#

If you don't it will spam

#

Where

earnest phoenix
#

Nope

#

It can't

#

Hello != hello

final ledge
#

O right

#

Not toLowerCasing it

earnest phoenix
#

My guess is, multiple instances running

final ledge
#

Yeah

quiet bobcat
#

Might be

earnest phoenix
#

So its reading its own message

#

and counting it as a command

quiet bobcat
#

What, no?

earnest phoenix
#

Yeah

quiet bobcat
#

Or is it

#

idk

earnest phoenix
#

Well thats the only thing i can think of

quiet bobcat
#

Change one of them saying hi

final ledge
#

Close your console and then try it and see if it does it

earnest phoenix
#

What's the actual code?

pale light
#

maybe its running on a message event

#

and running repeatedly on its own message event

earnest phoenix
#

Loris pls

pale light
earnest phoenix
#

Wait here

#

I removed the Hello at the start and now it dont work

quiet bobcat
glossy sand
#

you mean... if (message.content.startsWith()) { ... }

#

?

final ledge
#

This truly is a good time to be alive

glossy sand
#

try using some classical debug strategies

#

stick a console.log inside your message handler and see what's going on

earnest phoenix
#

Maybe try posting the code

glossy sand
#

is there some sort of industry-standard XSS filtering lib?

velvet hound
#

ds

jagged birch
#

‘’’client.on(‘message’, message => {
if(message.content === (“hello”)) {
message.channel.send(“Howdy.”)
}
});’’’
Try something like this.. coded on my phone so may be a bit dodgy but this should be correct. You didn’t tell us the error tho? Is the bot not sending a message?

pale light
#
client.on(‘message’, message => {
      if(message.content === (“hello”)) {
          message.channel.send(“Howdy.”)
     }
});
#

formatted what @jagged birch said

jagged birch
#

ty

earnest phoenix
#

Can someone tell me how I would go about making a queue system for songs in Discord.NET?

jagged birch
#

There’s loads of YouTube tutorials out there, try having a look at some.

earnest phoenix
#

not in english with a proper queue system

inner jewel
#

you need a (suprise) queue implementation

earnest phoenix
#

Can I do changeable prefixes, custom prefixes, with sqlite? 🤔

#

Probably

#

Good enough for me

#

Depends how your bot Lang handles prefixes

#

But basically make your prefix a func that takes guild id

#

And then lookup the valid prefixes

#

👍

#

Remember to handle dms & new guilds

#

Yee

#

totally forgot that on my own bot

#

XD

#

Gg

#

Going to do testing on one of my side bots that has my music bot code on it 👍

deep parrot
#

any here has a good code for a uptime command for discord.js

bright spear
#

hmm, the status was set to streaming, but in the client it has the correct name, but it says playing

#

bots response (it was eval): ```xl
Presence {
status: 'online',
activity:
Activity {
name: 'your death by nuke',
type: 'STREAMING',
url: null,
details: null,
state: null,
applicationID: null,
timestamps: null,
party: null,
assets: null } }

#

interestingly, when you click it, it says live on twitch

winged osprey
#

@bright spear I don't know djs, but try type 1?

#

I think url can't be null either

bright spear
#

it is type one, see it said streaming

#

yeah, i'll try url

#

didnt work

#

thanks!

hidden quiver
#

i need help

bright spear
#

with?

earnest phoenix
#

Is it possible to make a variable for prefixes, and have prefixes pushed into an array or something then allow people to use that prefix even on a bot restart? Idk if that sounded like english XD

#

If I didn't want to use a db I mean

young cradle
#

So what you are trying to achieve is having an array, and new strings pushed into it to be prefixes aswell?

earnest phoenix
#

Kind of, but I need it to work even after the bot shuts off 🤔

#

Like, turn it back on, then it's still there

#

I don't think that's possible, but just a thought I guess 🤷

young cradle
#

You could have that array in a JSON and just use FileSystem to change it

earnest phoenix
#

I use Heroku, not friendly with JSON files 😛

#

Switching hosts soon

young cradle
#

Oh, Heroku

#

Well, use their built-in DB or have a way to save the array's indexes or live with it until you change hosts

earnest phoenix
#

😛 i can do all those XD

#

Idk how to use postgres, guess I'll live with it 🤷

wicked tartan
#

Strong relatable

wicked tartan
#

I'm now realizing the struggles of heroku and json

#

any reccomended free hosts that are json friendly?

#

tempted to host json somewhere else and use http requests to modify and pull from it but that is probably stupid as hell

earnest phoenix
#

....

#

You dont

#

Run it on a server if you must use a red bot clone

#

Oh right you want to invite it not make your own

#

Your own copy?

#

Or just use one that already exists?

#

We don’t accept red clones

#

So I wouldn’t bother

#

Yes a red bot clone

#

We don’t allow them

#

Make your own

frail kestrel
#

code it

earnest phoenix
#

Like actually apply some effort, learn to code the write your own bot

frail kestrel
#

coe

#

-void, 2018

#

w0t

earnest phoenix
#

Continue and imma mute you

frail kestrel
#

hey Matt

#

that's an alt of a banned user

earnest phoenix
#

@frail kestrel who?

wicked tartan
#

So anyone have any json-friendly free heroku alternatives?

frail kestrel
#

ew

#

ewewe

#

heroku

austere meadow
#

what do you mean by json-friendly

#

like you can host json on there or something

frail kestrel
#

compatible with json

#

I thonk

wicked tartan
#

you can host json on heroku but you cannot see any edits to it

frail kestrel
#

???

#

host json on heroku

#

ok

austere meadow
#

also a lot of free VPS's are pretty shit so idk many

frail kestrel
austere meadow
#

one that comes to mind is glitch but not sure if you can use json on there

frail kestrel
#

what the fuck

#

isn't that for webapps

austere meadow
#

what

frail kestrel
#

eh

austere meadow
#

?

#

no

wicked tartan
#

you can use them for worker apps too

#

usually

austere meadow
#

yeah

#

i mean obviously its not ideal

#

i would recommend buying a VPS

#

or getting a raspberry pi

frail kestrel
#

yes

wicked tartan
#

oh shit I think I might have a raspberry pi

#

that might be good

#

I have a box o' technology that I bought in bulk hence the "think" btw

#

I also wanna minimize costs on a thing that I'm not profiting from so I don't wanna pay montly for a vps

austere meadow
#

yeah true

#

how many guilds is your bot on?

wicked tartan
#

11 rn

jagged birch
#

howdy how do i add a user to a role, I'm trying to make it so if you've upvoted you will receive an Upvoter role in the support server, the bot scans through the votes and if your id is in there, you will receive the role. I've got that the scanning vote part done, just dont know how I will add a role to a user using their id

austere meadow
#

ah yeah so you'd be fine with a simple rPi or an old laptop

#

something like that

wicked tartan
#

hmm ok

austere meadow
#

@jagged birch d.js im assuming? use <Member>.addRole(<Role>)
<Role> is a role object so you can use message.guild.roles.find("name", "Upvoter") to get that

wicked tartan
#

I also have a shit laptop

#

that might be what I do

austere meadow
#

for simple bots shit laptops will work fine

wicked tartan
#

its linux tho and I'm bad at installing things on linux

#

wish me luck

austere meadow
frail kestrel
#

hi

#

ok

#

go to general if ur not talking about development

wicked tartan
#

alt acct #2?

austere meadow
#

@earnest phoenix okay can you move to general if you aren't talking about development

frail kestrel
#

yes

austere meadow
#

void beat me lmao

frail kestrel
#

@jagged birch, dbl has a /votes/ endpoint that returns a list of people that've upvoted ur bot

austere meadow
frail kestrel
#

oh

austere meadow
#

oh also @jagged birch you can use message.guild.fetchMember(<User>) to resolve a member object to apply the role
use client.fetchUser(<id>) if you need to get a user object

earnest phoenix
#

If I use a host other than heroku, would those still restart the bot to update it? I've never used anything other than heroku, so I'm wondering

austere meadow
#

afaik heroku is the only host that will restart your app after seeing changes if that's what you are talking about

earnest phoenix
#

Oh thank gos

#

God

austere meadow
#

yeah indeed

earnest phoenix
#

I'll be switching to vultr probably in the next week or 2

#

Thanks for the info

austere meadow
#

no problem :) i've heard vultrs pretty good so thats good to hear

earnest phoenix
#

👍 5 dollar plan for 1 GB of memory and I believe 2000 GB Broadband I think? Don't remember

#

1000 GB

austere meadow
#

yeah something like that
i reckon its pretty affordable

#

im thinking of switching to them sometime soon

earnest phoenix
#

Yeah it is very affordable, I gtg now. See y'all later :)

austere meadow
#

alright cya

heady zinc
#

Yeah i used to have this plan its good

vivid ice
#

Hi! how can i run a bot without use my cmd?

earnest phoenix
#

What

wicked tartan
#

I think he wants his bot to be hosted somewhere

vivid ice
#

exactly!

wicked tartan
#

does your bot work when you run it from your computer?

vivid ice
#

Yes!

#

But is a work in progres

earnest phoenix
#

If you want to host a bot 24/7 you need a server

#

I would suggest looking at vultr

vivid ice
#

Mmm how much it cost?

wicked tartan
#

there are several options, I mentioned heroku in general, that's where I'm hosting mine right now

earnest phoenix
#

Heroku is pretty shit

wicked tartan
#

vultur is like $5 heroku has free options

#

it does work for simple apps tho

earnest phoenix
#

In some cases yes

#

Heroku is designed for development not production

vivid ice
#

Mmm

#

Thanks a lot guys

#

Can i create a website with vultr?

earnest phoenix
#

If you install a web server on your vultr server yes

#

I would recommend heroku for web stuff lol

#

Or glitch

restive silo
#

ewwwwwwwwwwwwwwww

#

no

#

dont ever recommend heroku or glitch

#

its like fine if you are poor af, but if you can afford it take always an VPS

wicked tartan
#

I am poor af tho 😢

restive silo
#

rip you

vivid ice
#

I dont know about servers i started to program 2 years ago and i like servers but i run things in my computer

#

I configure my own arch :B

#

But is nice to get help sometimes, thanks!

wicked tartan
#

does glitch allow you to see updates to files? @earnest phoenix

vivid ice
#

(Now im using w10 but i miss my arch D=)

restive silo
#

glitch has a read only filesystem mioNotLikeThis

wicked tartan
#

fucc

restive silo
#

anyways if you can afford it, always take an vps

#

even an small one for 2.5$ or 3$ is fine

weak parrot
#

Or just selfhost bloblul

wicked tartan
#

I don't have a computer 😦

earnest phoenix
#

Idk how to use PUTTy or whatever it is... So it'll be weird for me

wicked tartan
#

got bot now hosted on my old laptop wew lad

north fog
#

putty is like a remote cmd

earnest phoenix
#

Hmmm. Alright

topaz fjord
#

Show code

earnest phoenix
#
client.on('message', message => {

if(message.content.startsWith(prefix + "userinfo")) {
let User = message.guild.member(message.mentions.users.first() || message.guild.members.get(arguments[0]));
    if(!User) return message.channel.send("Je ne trouve pas l'user");
    
   

    let uinfoEmbed = new Discord.RichEmbed()
    .setDescription("__UserInfo__")
    .setColor('RANDOM')
    .addField("Pseudonyme", `${User.username}`)
    .addField("#", `${User.discriminator}`)
    .addField("ID", `${User.id}`)
    .addField("Créé le", `${User.createdAt}`);

    


    message.channel.send(uinfoEmbed);

                    


}
});

austere meadow
#

your variable User is actually a Member object and you can't do <Member>.username
you need to use User.user.username

radiant basin
#

User objects don't have a user property. zoomeyes

pale light
#

Member.user.username

earnest phoenix
#

*userinfo @pale light

#

Ah

radiant basin
#

Hopefully you meant User#username.

austere meadow
#

commands dont work here

heady zinc
#

can't even read the fucking doc

earnest phoenix
#

@queen bloom : (

#

Ah ok

radiant basin
#

Member#user => User

pale light
earnest phoenix
#

@heady zinc i love you

#

Jtm

#

Bb

heady zinc
#

i'll mute you if i see anymore french zoomeyes

austere meadow
#

@radiant basin were you talking to me because if so yes i was referring to his variable User not the user object

radiant basin
#

Oh ok.

spare spruce
#

o/

#

is it imposable use Pateron/gamewisp API to setup Commands for them users only. for example !stats Name = Public command PRO: !prostats = Payed/Subscription command but as discordbot in nodejs with djs. i want check of you lot if there way i can do that not, if not is there other way i can that methered

#

i need find way raise money get VPS for mah Other bot get music going because i was using my friends mine and his VPs got shutdown becoz doesnt want get other 1 anymore so thats why i need way get funded get my own VPS

#

so im making 2nd bot do this

heady zinc
#

you somewhat can using patreon's automatic roles assignment to members of your server

spare spruce
#

yeh

#

i need way set so thy get commands of bot

#

like i showed example

#

works all servers not just 1 server get i mean

uncut slate
#

also, don't use arguments, bad practice

spare spruce
#

what i hear of my friend is i need make oAuth with info put in as json format on my site and call json format thew bot so ik way now but gonna be hard do :/

#

to me i dont like oAuth so thats only option get do

abstract mango
#

@spare spruce another way you can do it is through premium codes/etc

#

like generate a code when someone on patreon pays for it

trim steppe
potent lily
#

@earnest phoenix come talk HERE

#

So

#

Not full maj pls

radiant basin
#

Interesting development conversation.

earnest phoenix
#

Well if you want help with bot stuff you ask here bud

#

Instead of in chat

void skiff
#

Um how can i add commends to my bot?

pale light
#

commends?

quiet bobcat
#

I think he means commands

void skiff
#

Yea^

#

Oof

earnest phoenix
#

That depends highly on the library and command handler.

radiant basin
#

By writing them..?

earnest phoenix
#

Nice mention

pale light
#

stop spamming development

earnest phoenix
#

pls

pale light
#

or mute

potent lily
#

Ban hammer

earnest phoenix
#

MUTE

#

NOW

#

OR BAN

#

EITHER WAY

restive silo
#

well people dont help anyone if they spam aswell neko

quiet bobcat
#

Please just mute him

#

thanks

restive silo
#

chill whats the problem 👀

pale light
#

spamming ^ look up

restive silo
#

either way he is muted now move on

earnest phoenix
#

Captain Obvious

pale light
#

lmao

void skiff
#

K so who can help me?

pale light
#

as said above, "That depends highly on the library and command handler."

void skiff
#

What is that?

pale light
#

I think you may want to reconsider what you're asking here GWjustinBlobLenny

#

Maybe learn a language first

earnest phoenix
#

Hello

#

i want to make

#

my bot say

#

are you want edit dis

#

then user type yes

#

it will edit

#

but if user

#

typed no

#

deletes the message

#

Use a messageCollector, I believe it's called

#

It's on the docs

#

So, for my bot, I want to make a seek command, and I did guilds[message.guild.id].dispatcher.streamOptions.seek = args and it works , except it doesn't seek to that point... Any help?

earnest phoenix
#

i tried this

bot.user.setActivity(`$help | ${bot.users.size}`, {url:"https://www.twitch.tv/pardeepsingh12365", type: "STREAMING"});

showing bot.user.setActivity is not a function

#

help plz

wanton walrus
#

setPresence

earnest phoenix
#

its js

raven hawk
#

what lib

earnest phoenix
#

idk

raven hawk
#

@earnest phoenix

#

..

wanton walrus
#

bot (or client).user.setPresence({
status: "the status",
activity: {
//your options
}
})

#

Im on mobile but I think that's right <I haven't updated>

earnest phoenix
#

k thank you

earnest phoenix
#

So, I changed host, now it doesn't play music, yet I have ffmpeg-binaries and node-opus installed

topaz fjord
#

Does it give error Thonk

earnest phoenix
#

🤷 Changed host so idk lol, it's on pm2

#

Haven't used pm2 before

#

Oop

#

Got something

topaz fjord
#

You can use

earnest phoenix
#

node-opus

#

....

#

I can't install that fucking thing apparently

abstract mango
#

it can't find python

quiet bobcat
earnest phoenix
#

Wait what

#

Idk how to do what it wants honestly, never had to deal with that

abstract mango
#

node-gyp relies on python to build stuff

earnest phoenix
#

🤔

abstract mango
#

so you need to set the python in npm's config

earnest phoenix
glossy sand
#

looks like it wants py2.7 in particular too

earnest phoenix
#

But I tried changing to that and I couldn't do it

glossy sand
#

you tried changing what to what?

abstract mango
#

npm config set python python2.7

#

try this

#

then try reinstalling node-opus

earnest phoenix
#

module?

#

Do I have to npm i compiler.ast

abstract mango
#

hmmmmmm

#

no

earnest phoenix
glossy sand
#

that's a python module i would guess

abstract mango
#

yep

earnest phoenix
#

Hmmmmmmm

glossy sand
#

are you sure you're running the right python

#

it smells like python 3 to me

earnest phoenix
#

I did the config set

#

:/

abstract mango
#

:/

earnest phoenix
glossy sand
#

uhhh

#

do you even have py2 installed on your machine

earnest phoenix
#

Idk 🤔

glossy sand
#

open a terminal and check

earnest phoenix
#

I mean

#

It worked with heroku

#

But not this

#

This is also ubuntu I'm using

abstract mango
#

yeah also phanta's thing

#

apt install python

#

just in case

#

well I mean

earnest phoenix
#

@_@

abstract mango
#

it is installed

earnest phoenix
#

Would it not have gone through if I did ahve it

abstract mango
#

since it didn't throw a "executable not found" error

#

it threw a "module not found" error

glossy sand
#

it might be executing py3

abstract mango
#

npm config get python

#

what's output

earnest phoenix
#

Oh hold on

abstract mango
#

oh

#

try it again

earnest phoenix
#

2.7

abstract mango
#

try node-opus

earnest phoenix
#

Now i need make

#

🤔

#

apt install make?

abstract mango
#

apt install build-essential

earnest phoenix
glossy sand
#

there's no s on the end

earnest phoenix
#

o

abstract mango
#

ye

earnest phoenix
#

Woops

glossy sand
#

also, running as root?

#

risky

abstract mango
#

it just build-essential

earnest phoenix
#

:/

abstract mango
#

also yeah

#

running as root is a bit risky

earnest phoenix
#

🤷

abstract mango
#

but eh

#

it's your bot your machine

#

¯_(ツ)_/¯

earnest phoenix
#

It's downloading Runfree

#

Ok, so how would I also go about updating my bot with my host?

#

ITS DOWNLOADING

#

😭

pale light
#

great

earnest phoenix
#

In my files on winSCP would I just update the code in the remote transfer files?

glossy sand
#

are you just... stringing random words together

earnest phoenix
#

Lol

#

To update my bot

glossy sand
#

i legitimately have no idea what you're asking

earnest phoenix
#

Would I just update rhythm.js? or would I need to do more , or other things

glossy sand
#

well that's a question for you to answer

earnest phoenix
#

God damn, I cannot speak

glossy sand
#

since you wrote the bot

abstract mango
#

you should honestly use a version control system

earnest phoenix
#

But this is the first time using this software 😭

abstract mango
#

winscp every change is not a good way to dev

earnest phoenix
#

I always had heroku or self-host

#

🤔

#

Well, I'm new to this whole host thing 😛

abstract mango
#

you have 2 options basically

glossy sand
#

push to a vcs repo locally

#

then pull on the remote machine

earnest phoenix
#

Mhmm

abstract mango
#

github: you can have repos, public unless you pay for a plan or student pack
gitlab: free private repos, usually used by people

#

or yeah

#

the local vcs repo works as well ig

earnest phoenix
#

🤔 I'll try both

#

See which I like more

glossy sand
#

you mean like run a vcs server on the bot machine?

#

that seems like a bad idea

earnest phoenix
#

If you're talking to me, then no.

#

Brb, got work to do 😃

pulsar kestrel
#

can someone using discord.js help me out, i'm trying to use the discordbots.org api

heady zinc
#

to post server count?

pulsar kestrel
#

no, to see who has upvoted the bot and reward them

heady zinc
#

the upvotes is a GET on /api/bots/:id/votes with your bot's token as Authorization header

pulsar kestrel
#

thank you!

torpid vale
#

or use the discord-bot-list node package

heady zinc
#

i mean

#

there's really no need for a package

#

for that simple api

shrewd orbit
#

so um where do I find that section to vote on muting bots?

#

whatever I type ,help and this stuff appears:

#

,help

#

nope doesnt work here

trim plinth
#

?

shrewd orbit
#

go see testing 1 for details or here:

trim plinth
#

I'm pretty sure there is no voting place

shrewd orbit
#

whatever but like that happens when i type ,help

#

so conflicting command prefixes

umbral pelican
#

¯_(ツ)_/¯

austere meadow
#

@shrewd orbit you're in a server with ~900 bots, there's bound to be some confliction
we won't do anything about it

#

also this is the wrong place to ask really

topaz fjord
#

why derppppp ```js
function play(guild) {
const serverQueue = queue.get(guild.id)
// console.log(serverQueue.songs)

bot.player.join(guild.id, message.member.voiceChannel.id).then(player => {
  player.play(serverQueue.songs.shift().track, { region: guild.region })
  
  player.on("end", (data) => {
      // if(data.reason && data.reason === 'REPLACED') return;
      // serverQueue.songs.shift();
      console.log(serverQueue.songs)
      play(message.guild);
  });
  
  serverQueue.textChannel.send(`🎶 Now playing: **${serverQueue.songs[0].info.title}**`);
})

}
}

cerulean zinc
#

Hmm

#

Does it play atleast

topaz fjord
#

it dont playt he second song

#

only the first song in queue

cerulean zinc
#

Because you have 0 queue system

topaz fjord
#

are u high

cerulean zinc
#

Auto leave and queue

topaz fjord
cerulean zinc
#

hmm

topaz fjord
#

idk why

cerulean zinc
jagged birch
#

I'm trying to make an anti discord invite thing for my support server, which is working pretty good, the only thing is the bot doesn't just read from the support server, it reads from all servers. So posting an invite link will result in you getting banned, don't worry I disabled it quickly. If someone sends an invite link, I want the bot to ban the user, and then delete the invite link, but the deleting part isnt working also. lib=discord.js btw. This is my code:

    let guild = client.guilds.get("399121674198581248"); // support server id
    if(guild) {
      if(message.content.includes("discord.gg")) {
      if(message.author.id === "223919574536552449") { // my id
        console.log('invitelink> Developer: ban blocked.')
      } else {
        console.log('invitelink> User: banned from server.')
        var banuser = message.author.id
        guild.ban(banuser);
        message.delete(1);
      }
    }
    } else {
      return;
    }
 
});```
austere meadow
#

change if (guild) to if (message.guild.id === guild.id)
this is because guild is a non falsey value, so doing if (guild) will always return true

jagged birch
#

works. ty.

jagged birch
#

everything works except deleting the message, this is my code so far now:

    let guild = client.guilds.get("399121674198581248"); // support server id
    if(message.guild.id === guild.id) {
      if(message.content.includes("discord.gg")) {
      if(message.author.id === "223919574536552449") { // my id
        console.log('invitelink> Developer: ban blocked.')
      } else {
        console.log('invitelink> User: banned from server.')
        var banuser = message.author.id
        guild.ban(banuser);
        message.delete();
          const embed = new Discord.RichEmbed()
          .setTitle("The Ban Hammer")
          .setDescription(`**Member:** ${message.member.user.username} (${message.author.id})\n**Action:** Ban\n**Reason:** Ads [blocked by bot]`)
          .setColor(0xff0000)

          client.channels.get('399181719510450186').sendMessage({embed});
      }
    }
    } else {
      return;
    }
 
});```
young cradle
#

Any error?

jagged birch
#

nope

bright spear
#

whats wrong with this? js if(!message.member.hasPermission('MANAGE_MESSAGES')&&!message.member.id=="190916650143318016") return <blah blah>

#

for some reason its working for everyone

glossy sand
#

ok so breaking this expression down it looks like

bright spear
#

it works fine without the &&!message.member.id=="190916650143318016")

glossy sand
#

(!message.member.hasPermission('...') && ((!message.member.id) == '...'))

#

so this reads as

#

if the member does not have this permission

#

and not the member's id is this

#

but you have to recall that ! is a unary operator

#

so when you do !message.member.id, you'll always end up with the value false

#

and obviously false == '190916650143318016' is never true

bright spear
#

ohh

#

so i'll have to do message.member.id=="190916650143318016")==false

glossy sand
#

well, yes that is one possible solution

#

but there's also the != operator

#

"is not equal to"

#

also for future reference, you should always use strict-equality variants of equality operators

#

=== instead of == and !== instead of !=

bright spear
#

what's the downside of the loose versions?

glossy sand
#

well uh

#

0 == false is a true statement

#

but 0 === false is not

#

if that helps illustrate the difference

bright spear
#

oh, I see

jagged birch
#

in my code I put this, just like you said @austere meadow


}```
But I got error in console `TypeError: Cannot read property 'id' of null`, it just happened randomly.. it was working before.
austere meadow
#

did you type a message to the bot in DM's

#

you'd have to put a check like if (message.guild == null) return;

jagged birch
#

I didn't, someone else probably did though.

austere meadow
#

yeah

prime cliff
#

Yea if message.guild is null it means its a dm message

jagged birch
#

ok cool

prime cliff
#

Gotta debug your code mkay

#

:3

jagged birch
#

indeed

trim plinth
#

can anybody help me here because I wanted to do an emoji here as usually it lets you send it normally with a string but I'm slightly confused, as I think it won't display normally in a RichEmbed.

languid dragon
#

you cant do emotes in Author titles

prime cliff
#

Actually you can now

#

Oh

#

@trim plinth I think the : at the end is confusing it thats why

#

Oh nvm i think custom emotes dont work in the title

#

Not sure

trim plinth
#

Yeah thats what I thought

austere meadow
#

i think you can use emotes in the author title but it needs to be the unicode of the emoji
ie. :8ball: becomes \:8ball: \🎱

trim plinth
#

mk

#

ty c:

austere meadow
#

no problem

#

make sure you copy the unicode character not the \:8ball: part

#

that was just to show how to get it

trim plinth
#

mk

quiet bobcat
#

Is there any way to see if the first mentioned users role is higher than the author of the message?

#

Using discord.js

trim plinth
#

idk, I haven't gone that far into guildMember / User territory

#

I suggest checking the discord.js docs?

austere meadow
#

one sec

quiet bobcat
#

Checked the user type and found nothing. Can look around to see if I can find anything else

trim plinth
#

did you check guildMember as well?

quiet bobcat
#

Not there either

trim plinth
#

hm

#

idk then

austere meadow
#

message.mentions.members.filter(c => c.highestRole.comparePositionTo(message.member.highestRole) >= 0)
im really shit with filter but its something like that
you need to filter the members from the mention and compare their role positions

trim plinth
#

k

quiet bobcat
#

alright

#

I'm even worse

#

Thanks for the help @trim plinth and @austere meadow

trim plinth
#

np

#

even though I didn't really help .-."

austere meadow
#

@quiet bobcat yeah jonas just tested that code, it should work

quiet bobcat
#

I got to look into filters

austere meadow
#

if the role position is the same or higher than the message author, it will return the member that was the same or higher than the author

quiet bobcat
#

Yeah worked for me aswell

#

Thanks blobthumbsup

austere meadow
trim plinth
bright spear
#

Cool

umbral pelican
#

mmm 8 ball mmLol

bright spear
#

Hey unb

tawny lava
#

8ball best command

umbral pelican
#

me === "advaith" more like me === "nub"

bright spear
#

unb === "rude"

#

unb == nub

barren relic
#

how do i inform the moderators that i disabled the unknown command response of my bot? so that it can be unmuted

young cradle
#

Ping or DM the mod that muted it

languid dragon
#

@earnest phoenix

#

Selfbot?

tawny lava
#

Nice

#

That's more of a user bot

quiet bobcat
#

so I'm guessing

tawny lava
#

Tell him that dnd exists

#

What you're doing will get his account banned

earnest phoenix
#

help, i dont know how do embed!

quiet bobcat
#

d.js?

earnest phoenix
#

yes

quiet bobcat
#

What version?

earnest phoenix
#

0-0

#

ummmmm

#

idk

quiet bobcat
earnest phoenix
#

how do i know

#

@quiet bobcat

quiet bobcat
#

lemme check

austere meadow
#

@earnest phoenix use npm ls discord.js

quiet bobcat
#

oh yeah that's it

barren relic
#

anyone here use discord.js commando?

quiet bobcat
#

11.2.1 kk

#

You could use embed builder

#

or raw

austere meadow
#

nah i dont erick but whats the issue?

earnest phoenix
#

dont know the differance

quiet bobcat
#

ok let's go with raw because it works in v12

#

I can dm you a link

barren relic
#

tried client.user.setGame() and client.user.setActivity() but nothing work

quiet bobcat
#

client.user.setPresence({})?

barren relic
#

lemme try

white blaze
#

Isn't setPresence deprecated?

austere meadow
#

not a function in commando afaik

quiet bobcat
#

ah

#

idk then

white blaze
#

Oh commando

#

Sorry

barren relic
#

._.

white blaze
#

I don't know anything about commando

quiet bobcat
#

Same

austere meadow
#

A CommandoClient is just an extension of the base Client, so all options, properties, methods, and events on Client are also on CommandoClient.
hmm

barren relic
#

Cannot read property 'setActivity' of null

austere meadow
#

hmm

#

im really not sure then, sorry about that

#

that is strange though

#

it says that it just extends the client

#

so user should be available in that

barren relic
#

i really have no idea about this ._.

#

something weird just happen

earnest phoenix
#
bot.on("message", function(message) {
    if (message.channel.type == "dm" || message.channel.type == "group") {
        return message.reply("this command is not for dms");
    }
    const serverQueue = songQueue.get(message.guild.id);

    if (message.author.bot) return undefined;

    if (!message.content.startsWith(prefix)) return undefined;

    const args = message.content.substring(1).split(' ');
    //Get command from message
    let command = message.content.toLowerCase().split(" ")[0];
    //Remove prefix from command string
    command = command.slice(prefix.length);

    if (command === "help") {
                    message.author.send(`helpmessage`)
        }

when im using help command bot creshed
(when my bot try to send dm message)

 const serverQueue = songQueue.get(message.guild.id);

TypeError: Cannot read property 'id' of null

help me please

barren relic
#

i just typed e@eval client.user.setActivity('Playing', ['Playing']); and it work. wut

austere meadow
#

huh ok

#

@earnest phoenix you need to check if message.guild == null

earnest phoenix
#

ok bro but i want to send some meesage in dm like help it ill work after do that?

austere meadow
#

just add that to your OR statement if you want

earnest phoenix
#

k

#

so i should add it only for that message whom i want to send in dm

#

right?

austere meadow
#

what?

earnest phoenix
#

where i should add it

austere meadow
#

if (message.channel.type == "dm" || message.channel.type == "group") {
just add it here

earnest phoenix
#

i tried but after that bot spaming return message in dm

austere meadow
#

you need to ignore your own bot in that case

#

if (message.author.id === client.user.id)

earnest phoenix
#

if (message.author.bot) return undefined; this is already in

austere meadow
#

you've got it below the code that does the DM's

earnest phoenix
#

?

#

ohk

#

@austere meadow bro thank you so much 😅

austere meadow
#

no problem blobthumbsup

spare spruce
#

anyone know how i tag username

#

from this methered

#
} else if (subscribers.list.includes(newMember.id)) {
            if (!subscribers.list.includes(newMember.username)) {
                console.log( + " has lost thy ROLE!")
            }
            console.log("Subscriber been Removed!")
            changeSubStatus(newMember.id, 'remove', subscribers);
        }```
#

i made database pulling out User id so thy can access sub commands but problem is idk how tag user so i can print message on say Username is no longer a subscriber

#

problem is i have no path get tag at

quiet bobcat
#

How do I stop this from happening? js (node:8968) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.

austere meadow
#

you can use client.users.get("id") @spare spruce

#

@quiet bobcat do you know where in the code that's happening?

spare spruce
#

yeh i need as tag so i can tag like @spare spruce

quiet bobcat
#

Yeah js if(!configs[message.guild.id]) configs[message.guild.id] = { guildid: message.guild.id, guild: message.guild.name, leveling: 'off' } fs.writeFile("Storage/configs.json", JSON.stringify(configs, null, 4)) })

spare spruce
#

but problem is pulling out ids

#

not names

austere meadow
#

client.users.get("id").toString() @spare spruce

spare spruce
#

even needs get ids

austere meadow
#

that will work

#

if you replace "id" with the users id

spare spruce
#

i give try

quiet bobcat
#

nvm fixed it

austere meadow
#

@quiet bobcat fs.writeFile must be an async function
what its saying is, you need to put a .then or await on the function

#

alright

#

how'd you fix it

quiet bobcat
#

Added so it catches errors

spare spruce
austere meadow
#

using .catch?

spare spruce
#

needs be name

#

not ID

austere meadow
#

oh

#

replace .toString() with .tag then @spare spruce

spare spruce
#

Id my Array for database

quiet bobcat
#

no, just made the writeFile like this js fs.writeFile("Storage/configs.json", JSON.stringify(configs, null, 4), (err) => { if (err) console.error(err); })

austere meadow
#

ah okay

#

yeah thats a callback

quiet bobcat
#

ok

spare spruce
#

@austere meadow i wish way i can REP ya

#

😛

austere meadow
#

lmao all good

spare spruce
#

i got 1 more thign i need do is how i get print chat out with it

#

even on as bot.on guildMembersUpdate

#

do you know how im going do this print as chat not console log @austere meadow

austere meadow
#

message.channel.send?

spare spruce
#
  1. no message fuction
#

bot.on("guildMemberUpdate", (oldMember, newMember) => { and thats 2 aswell

austere meadow
#

you could do oldMember.guild.channels.get("CHANNEL ID").send("message");

spare spruce
#

config.patron_guild

#

oops

#

TypeError: Cannot read property 'send' of undefined

#

this fuction

#

.send("message");

#

hold on sec

#

got working but says name not tag and when i did this wouldnt do it

#

.send("@"+bot.users.get(newMember.id).tag+ " has lost thy ROLE!"

#

thats all shows

#

doesnt @ people

austere meadow
#

just do .send(newMember + ...) if you want to tag people

#

like mention them

quiet bobcat
#

I'm going to have to ask a question again. I keep getting this js (node:5524) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): ReferenceError: Invalid left-hand side in assignment

austere meadow
#

code please?

quiet bobcat
#
if(!args[1]) {
        return message.channel.send(`Level up messages are currently **${configs[message.guild.id].leveling}**. You can toggle them with ??config levelup on/off`)
        }
        else if(args[1].toLowerCase() = "levelup") { code here}```
austere meadow
#

cheers

#

that's not how toLowerCase works

#

oh

quiet bobcat
#

but I've used it before

austere meadow
#

nvm

quiet bobcat
#

oh ok

austere meadow
#

you've just forgotten a =

quiet bobcat
#

oh..

austere meadow
#

you're trying to set it not get it

#

lmao

quiet bobcat
#

Thanks

austere meadow
#

np blobthumbsup

spare spruce
#

@austere meadow this me done for today now gonna add commands but ty help

#

i show ya preview my code

#

TY for help doe

austere meadow
#

all good

opal thicket
#

@austere meadow plss help me ??

torpid vale
#

.

opal thicket
#

@austere meadow how i create a bot ??

austere meadow
#

you can look up tutorials online

opal thicket
#

ok thanks

spare spruce
#

yeh youtube videos lot there

austere meadow
#

soon DBL will have tutorials for you to look at on how to create bots
but you can look at things like anidiots.guide or youtube videos

spare spruce
#

about over 300 videos on youtube all depends what lib going use

torpid vale
#

If I add more commands github may stop taking all of my command files...

#

I have 30 so far...

spare spruce
#

noice

opal thicket
#

i dont look a true video...

spare spruce
#

well my 2nd bot gonna go on github but its my subscriber bot

#

with some sub commands people cant use general

earnest phoenix
#

...

neat falcon
#

On snekfetch, how do I set more than one thing? example .set('Authorization', key), but I want to be able to set more stuff.

topaz fjord
#

@neat falcon just use more .set

neat falcon
#

oh

#

ok

#

lol

topaz fjord
#

You can chain them

neat falcon
#

i thought it would screw up snek

topaz fjord
#

Like a slithery snek

neat falcon
#

ty have a snek

#

got a 400 error

topaz fjord
#

Shit code k

#

*Show

#

@neat falcon

neat falcon
#
const snekfetch = require("snekfetch")

exports.run = (client, msg, args, log) => {
snekfetch.get("https://api.weeb.sh/images/random")
    .set("Authorization", "Wolke notoken4u")
    .set("nsfw", "false")
    .set("filetype", "gif")
    .set("type", "owo")
    .then(res => {
    msg.channel.send("", { embed: new Discord.RichEmbed().setTitle("Random OwO").setColor("#DCFF00").setImage(res.body.url).setFooter("Image by weeb.sh") })
    .catch((e) => {
    log.error(e)
    msg.channel.send(":x: Looks like there was an error: " + e);
      });
    });
}```
topaz fjord
#

1 use promises pls

unique star
#

thats not how wolkes api works lol

neat falcon
#

then how to use it

unique star
#

you are setting the options as headers

neat falcon
#

a

unique star
#

they are query params

#

not headers

neat falcon
#

how do i set that

topaz fjord
#

The ?

unique star
#

/random?type=<type>&nsfw=false&filetype=gif

#

its part of the url

topaz fjord
#

But still

#

Use promises make it cleaner

unique star
#

ye

neat falcon
#

ohhhh

topaz fjord
#

And

neat falcon
#

me am smart

topaz fjord
#

Fix ur spacing

#

There are so many things that are wrong with that code

neat falcon
#

ignore the spacing 4 now

#

uwu works now ty snek

#

snek good

unique star
#

i still suggest you to return a promise rather then making it raw

topaz fjord
#
const snekfetch = require("snekfetch")

exports.run = async(client, msg, args, log) => {
const res = await snekfetch.get("https://api.weeb.sh/images/random?type=owo&nsfw=false&filetype=gif")
    .set("Authorization", "Wolke notoken4u")
const embed = new Discord.RichEmbed()
.setTitle("Random OwO")
.setColor("#DCFF00")
.setImage(res.body.url)
.setFooter("Image by weeb.sh")
    msg.channel.send({embed: embed})
}
#

Fixed...

unique star
#

that works too

topaz fjord
#

Looks better

unique star
#

ye

topaz fjord
#

@neat falcon

#

U overcomplicate stuff

queen violet
#

@radiant plover

radiant plover
#

changing it to .columns .bot-img should be sufficient given your styles come later

queen violet
#

ye works tanks

radiant plover
#

read up on css specificity cause it could break again if they update the base css and win out against your style override 😃

cerulean zinc
#

Anyone know if you can change bitrate with Lavalink?

torpid vale
#

@earnest phoenix let out = ''; bot.users.forEach(function(user){if(user.bot){out+=user.username}}); out;

#

that should ge through all bot users

earnest phoenix
#
client.on('message', message => {
if (message.content.startsWith(prefix + 'poll')) {
    let args = message.content.split(" ").slice(1).join(" ");
    if(!args) return message.channel.send("** ❌ | Merci de donner la question");
    message.delete()
    var embed = new Discord.RichEmbed();
    embed.setColor('RANDOM')
      .setDescription(args)
    message.channel.sendEmbed(
      message.react('👍')
      message.react('👎')
    );
  }
});
inner jewel
#

don't do that

earnest phoenix
#

k bro

inner jewel
#

not you

#

i meant the code above

#

this let out = ''; bot.users.forEach(function(user){if(user.bot){out+=user.username}}); out;

#

that's horrible performance and memory wise

earnest phoenix
#

ok

inner jewel
cerulean zinc
#

Anyone know if you can change bitrate with Lavalink?

tawny lava
#

Nice

unique star
#

@inner jewel Thonk

#

nvm

fleet mason
#

can someone help me?

pale light
#

what is it

fleet mason
#

iv done everything he said

#

but when i try to run "node bot.js" my bot wont go online

earnest phoenix
#

what is the error you get?

fleet mason
#

module.js:540
throw err;
^

Error: Cannot find module 'C:\Users\sande\bot.js'
at Function.Module._resolveFilename (module.js:538:15)
at Function.Module._load (module.js:468:25)
at Function.Module.runMain (module.js:684:10)
at startup (bootstrap_node.js:187:16)
at bootstrap_node.js:608:3

#

i have it on my destop

#

in a folder called bot

earnest phoenix
#

start node in that folder then...

fleet mason
#

i did and then i got nothing

earnest phoenix
#

what do you mean nothing?

fleet mason
#

i tried to put it in the c:/users/sande and it didnt work just a emty line

earnest phoenix
#

What

#

I said start node in your bot folder

fleet mason
#

how do i do that

quiet bobcat
#

cd c:/users/sande/desktop/foldername

#

node mainbotfile.js

#

@fleet mason

fleet mason
#

C:\Users\sande>cd c:/users/sande/desktop/bot

c:\Users\sande\Desktop\bot>node mainbotfile.js
module.js:540
throw err;
^

Error: Cannot find module 'c:\Users\sande\Desktop\bot\mainbotfile.js'
at Function.Module._resolveFilename (module.js:538:15)
at Function.Module._load (module.js:468:25)
at Function.Module.runMain (module.js:684:10)
at startup (bootstrap_node.js:187:16)
at bootstrap_node.js:608:3

c:\Users\sande\Desktop\bot>

#

it didnt work and when i try to do "node bot.js" it wont work

#

c:\Users\sande\Desktop\bot>node bot.js

c:\Users\sande\Desktop\bot>

#

thats what i get

earnest phoenix
#

node bot.js is correct

fleet mason
#

but then my bot wont go online

earnest phoenix
#

What's actually in your bot.js file, cause it clearly thinks it has nothing to do and so exits

fleet mason
#

var Discord = require('discord.io');
var logger = require('winston');
var auth = require('./auth.json');
// Configure logger settings
logger.remove(logger.transports.Console);
logger.add(logger.transports.Console, {
colorize: true
});
logger.level = 'debug';
// Initialize Discord Bot
var bot = new Discord.Client({
token: auth.token,
autorun: true
});
bot.on('ready', function (evt) {
logger.info('Connected');
logger.info('Logged in as: ');
logger.info(bot.username + ' - (' + bot.id + ')');
});
bot.on('message', function (user, userID, channelID, message, evt) {
// Our bot needs to know if it will execute a command
// It will listen for messages that will start with !
if (message.substring(0, 1) == '!') {
var args = message.substring(1).split(' ');
var cmd = args[0];

    args = args.splice(1);
    switch(cmd) {
        // !ping
        case 'ping':
            bot.sendMessage({
                to: channelID,
                message: 'Pong!'
            });
        break;
        // Just add any case commands if you want to..
     }
 }

});

quiet bobcat
#

you forgot to login

#

bot.login("tokenhere");

#

at the end of your code

earnest phoenix
#

nupe

quiet bobcat
#

?

earnest phoenix
#

hes got autorun set to true

fleet mason
#

hmmm

quiet bobcat
#

What

#

what does that even change? zoomeyes

earnest phoenix
quiet bobcat
#

o

#

...

fleet mason
#

so if i change it to discord.js it will work?

earnest phoenix
#

no

fleet mason
#

k

quiet bobcat
#

Nope

earnest phoenix
#

sadly idk why it isnt working

#

my advice is dont follow on online guide and expect it to just work

fleet mason
#

yea XD

earnest phoenix
#

write it yourself and understand what everything does

#

Go Discord API server and ask in the discord.io channel

fleet mason
#

yea i just wanted a litte help XD to get started

#

ok

quiet bobcat
#

How can I check if my bot can dm a user?

earnest phoenix
#

You try DM an user

#

And error catch

#

No, you let it fail fast

quiet bobcat
#

How do I catch an error from a message?

earnest phoenix
#

try except

heady zinc
#

an error from a message? which lang GWchinaSakuraThinking

earnest phoenix
#

try except

quiet bobcat
#

js and lib is d.js Paradox

carmine berry
#

add .catch(console.error) after your send message

heady zinc
#

both d.js and eris literally returns promise for sending message

#

so yeah you can just channel.send('').catch(err => { //stuff});

quiet bobcat
#

o

heady zinc
#

or use a try catch but that's kinda longer here

quiet bobcat
#

ok

earnest phoenix
#

try catch
for promises

heady zinc
#

works tho

#

just bad practice

earnest phoenix
#

It doesn't

heady zinc
#

it does

#

well its just that it might not catch the promise itself

earnest phoenix
#

fight ding ding ding

#

I should've added highlight

heady zinc
fleet mason
#

i have a question. How do i make my bot work on a server hosting like Heroku?

bright spear
#

What language?

quiet bobcat
#

I forgot to say thanks, so I´m saying it a little late. But thanks for the help @heady zinc @earnest phoenix

earnest phoenix
heady zinc
#

oh lol

#

np

hallow harness
#

@fleet mason add procfile and enable the worker dyno on heroku

fleet mason
#

ok

hallow harness
#

they usually say you need to ping to keep it alive, but that wasn't the case for me back when i used it

earnest phoenix
#

I dowload modüles but automatic delete
there is
Note:I am not speaking English

tulip wave
#

anyone know what could be the problem with nodejs

I'm currently coding a bot in js and I had to install discord.js using the npm install command but after I use it once its saying directorys are missing and the ones that it says are missing aren't in the folder where they used to be

#

I was trying to install discord.js-commando

hallow harness
#

unclear what you're asking

#

do you have a screenshot

tulip wave
#

not atm cuz I had to take a break from trying to fix this

#

it gave me a error saying that directory was not found

#

said node_module/npm/bin/"something else".js was missing

#

for the first npm install the directory is there then they disappear leaving a few random files and the discord. js files

hallow harness
#

try installing whatever it says was missing

#

or try installing with

#

npm install <module> --save

#

idk what other reason there'd be

tulip wave
#

ok

#

thx

patent reef
#

someone help me with js idk js plz

radiant basin
#

Ask your question.

patent reef
#

k

#

so using jquery ajax im trying to get server count from DBL and put it on my website

radiant basin
#

I don't use jQuery, sorry.

patent reef
#

RIP

abstract mango
#

I mean

#

you can use most request libs in the browser anyways

patent reef
#

ugh

#

i just gotta learn how to do a web dashboard with python and get over this

#

only thing im stuck on is how to make the person sign in so it knows who its talking to

hallow harness
#

oauth2 with discord api?

patent reef
#

yes ik

#

but idk how to do it with python

hallow harness
#

you could probably google oauth2 with python and follow docs/examples and replace urls/tokens/keys with discord ones

patent reef
#

ik @abstract mango did it before ill check his out i guess

abstract mango
#

I didn't

#

yet

prime cliff
#

I need help i have an image with a transparent background i change it in the discordapp bot dev page but its always showing a white background on it and the dbl website and its really annoying me >_<

earnest phoenix
#

Is it png8 encoded?

upper ember
#
let luki = require('luki.js')

luki.newRichEmbed = serverinfo
serverinfo.title("Information about " + serverName );
serverinfo.addfield("ID:" | serverId | inline );
serverinfo.addfield("Region:" | serverRegion | inline );
serverinfo.addfield("Members:" | serverMembers | inline );
serverinfo.addfield("Online Members" | serverOnMembers | inline );
serverinfo.addfield("Owner:" | serverOwner | inline );
serverinfo.addfield("Roles:" | serverRolesCount | inline );
serverinfo.addfield("Channels:" | serverChannelsCount | inline );
serverinfo.addfield("Creation Data:" | serverCreationData | inline );
serverinfo.send

how's it?

prime cliff
#

Its showing transparent on imgur and pc but when i upload it to Discord its just adding a white background

upper ember
#

this is example of serverinfo, using the lib I am coding for my bot

prime cliff
#

Not sure

frigid juniper
#

Try to put background in alpha and convert to png

uncut slate
#

what language is that supposed to be

upper ember
#

js

uncut slate
#

no

earnest phoenix
#

@prime cliff have you got photoshop?

upper ember
#

before you say this isn't working, it is

prime cliff
#

Yea i used photoshop to remove the background

frigid juniper
#

And its PNG ?

uncut slate
#

is this going to be just like the case where that guy said he didn't need parentheses around the if statements

prime cliff
#

Yea

earnest phoenix
#

@prime cliff open your png in photoshop, ensure the background is transparent, then save for web as a png

#

Ctrl alt shift w on latest

uncut slate
#

@upper ember what are you expecting that to do

upper ember
#

easier discord.js

#

lol

#
let luki = require('luki.js')

luki.newRichEmbed = serverinfo
serverinfo.title("Information about " + serverName );
serverinfo.addfield("ID:" | serverId | inline );
serverinfo.addfield("Region:" | serverRegion | inline );
serverinfo.addfield("Members:" | serverMembers | inline );
serverinfo.addfield("Online Members" | serverOnMembers | inline );
serverinfo.addfield("Owner:" | serverOwner | inline );
serverinfo.addfield("Roles:" | serverRolesCount | inline );
serverinfo.addfield("Channels:" | serverChannelsCount | inline );
serverinfo.addfield("Creation Data:" | serverCreationData | inline );
serverinfo.send

every noob can do it

uncut slate
#

do you know what | does

upper ember
#

yes I do, I changed a lot fo things, this isn't really js it's kind of js... this was really weird process to make this lib

#

and there's not a lot of options :/

earnest phoenix
#

| should act as strong concat

upper ember
#

still working on it

slow elk
#

Anyone knows a bot that searches for code blocks and then react with a wrong or good, depending on errors in the code block?

earnest phoenix
#

*strin

upper ember
#

but it's working :/

prime cliff
earnest phoenix
#

@slow elk that sounds deadly af for a bot

prime cliff
#

_>

uncut slate
#

@upper ember there is literally no way that function can accept more than 1 value

earnest phoenix
#

@prime cliff did you do save for web?

uncut slate
#

single pipes are bitwise OR's

#

you're not passing more than one value there

prime cliff
#

Where is the save for web option thonkku

earnest phoenix
#

File

slow elk
#

@earnest phoenix Nvm. Just remembered something

prime cliff
#

Ah ok nvm i found it

#

Nope save for web diddnt work

earnest phoenix
#

Get your bot to upload it via the api

prime cliff
#

Nope still coming up as a white background when i upload it with the API REE

earnest phoenix
#

Okay idfk

#

Maybe discord changed something

prime cliff
#

Literally not white background yet Discord adds a white background

#

AHHHHHH

#

Now Discord is not updating the bot image >_>

#

Discord pls >_>

grave mirage
#

How can I keep my bot online? I'm new to bot developing.

#

Please ping or DM me if you have an answer

earnest phoenix
#

Put it on a server and leave it running

hallow harness
#

@grave mirage host with VPS or something like that

trim plinth
#

Ik this is a dumb question, but how to put pm2 on your path?

uncut slate
#

depends on your OS

#

npm i -g pm2 should take care of it

trim plinth
#

oof

#

ok

#

I tried it, tried doing pm2 start [file name], still not executing the code zoomeyes

uncut slate
#

if pm2 returns anything at all, pm2 is installed to path correctly