#development

1 messages ยท Page 1039 of 1

restive pebble
#

a:somerandomanimatedemoji:id

opal plank
#

use this on the bot

clever vector
#

Ohh

opal plank
#

and it'll be converted to the id

restive pebble
#

add a for animated

opal plank
#

but using :kekw : wont

#

wont matter if it isnt animated

#

just do \ and copy it

#

it'll default to gif if its animated

restive pebble
#

ok

#

i dont use emoji tho

clever vector
#

Thanks bros

#

it work

#

even other server

opal plank
#

๐Ÿ‘

clever vector
#

my bot have rock paper scissor also

foggy scaffold
#

can I ask for support for coding in here

opal plank
#

dont ask to ask

#

just ask

foggy scaffold
#

how do I check if a json file contains someones id
i have this in a json file

    "ID": "632114178995257344"
}```
and the file is called bl.json
opal plank
#

aham

clever vector
#

Bro can u help me make commads

foggy scaffold
#

...

opal plank
#

why using property tho?

#

if you just want id, use array

foggy scaffold
#

idk how to use arrays

#

i self taught myself js

#

and never did arrays

opal plank
#
{
  ids: ['id1', 'id2']
}```
#

since you only asked how to get the property, i assume you already know how to load that json into your file

foggy scaffold
#

yes

autumn summit
#

i am urgent and need someone to help with overwrites

#

TypeError: __new__() got an unexpected keyword argument 'allow_new'

opal plank
#

then read the array prototypes

#

to see what methods it support

autumn summit
#

pls someone help

foggy scaffold
#

@opal plank yeah i still dk how

opal plank
#

you are accesing the array in your code?

foggy scaffold
#

i am trying to make a black list command

#
const commando = require('discord.js-commando');
const path = require ('path');
const {MOD_ROLE} = require("../../libs/main.js");
const db = require("quick.db");
const fs = require('fs');
const CommandoClient = require('discord.js-commando');
const client = new CommandoClient.Client({commandPrefix: '!'});

module.exports = class blacklistCommand extends commando.Command {
    constructor(client) {
        super(client, {
            name: 'blacklist',
            group: 'devs',
            aliases: ['bl'],
            memberName: 'blacklist',
            description: 'Blacklists a user from using the bot',
            argsType: 'multiple',
            argsCount: 2
     })
   }

    async run(message, args) {
      if(message.member.id == '632114178995257344'){
        let user = args.join(" ");
        client.userid = {
          ids: [user]
        }
         fs.writeFile("commands/devs/bl.json", JSON.stringify(client.userid, null, 4), err=> {
      if (err) throw err;
        message.channel.send("good")
      });
      }
    }
  };
#

thats the entirety of what i have so far

opal plank
#

ignore that whole thing, lets get one thing a time

#

first you want to see if an id is in the array, correct?

foggy scaffold
#

i want to see if it is in the json file

opal plank
#

indeed, for that case arrays would probably be the best

foggy scaffold
#

ok

#

so

#

what do i do

opal plank
#
{
  ids: ['id1', 'id2']
}```
#

imagine you have this

foggy scaffold
#

ye

#

in the json file?

opal plank
#

indeed

foggy scaffold
#

ok

opal plank
#

once you load the json, you'd need to access id property of it

#

json are loaded like objects onto your code

#

you know how to access it?

foggy scaffold
#

i was using fs.readFile

opal plank
#

yes, that reads the file

#

after that

#

what do you do?

foggy scaffold
#

idk

opal plank
#

you get the 'ids' property inside of it

foggy scaffold
#

how

opal plank
foggy scaffold
#

can u give me an example of what this would look like

opal plank
#

you already know how to access properties inside objects

#

you've been using it thus far

#

message object contains channel property

foggy scaffold
#

would it be like

opal plank
#

how do you access channel of message then?

foggy scaffold
#

fs.readFile(bl.json, ids

opal plank
#

no

foggy scaffold
#

rip

opal plank
#

check the example i sent with message

#

lemme give you an example in practice

#

l.eval console.log(message)

#

oh, right, this bot isnt ehre

#

n.eval console.log(message)

#

see message up there?

foggy scaffold
#

ye

opal plank
#

see type ?

foggy scaffold
#

ye

opal plank
#

to access it, you need to do message => channel => type

foggy scaffold
#

message.channel.type

opal plank
#

correct

#

message is an object

#

when you load your json file, its also an object

earnest phoenix
#

h

opal plank
#

how do you get ids from it?

foggy scaffold
#

bl.json.ids

opal plank
#

correct

#

now that will return the array

#
{
  ids: ['id1', 'id2']
}```
foggy scaffold
#

now how do i check if it contains

opal plank
#

in this example, would be ['id1', 'id2']

#

check this

foggy scaffold
#

well i need it to go through the whole listt to see if any of it contains the id

opal plank
#

not really, there are methods to find a specific element of an array

#

check the first example from the link

foggy scaffold
#

if(fs.readFile("commands/devs/bl.json.ids").find(message.author.id)){message.channel.send("You are blacklisted!")}

#

like this?

opal plank
#

correct

#

wasnt that hard, was it?

foggy scaffold
#

i got an error

opal plank
#

prob in fsread

foggy scaffold
#

Error: ENOENT: no such file or directory, open 'commands/devs/bl.json.ids'

opal plank
#

yup

#

thats fs

#

because your path is incorrect

#

try with ./commands/....

#

./ is parent directory

restive pebble
#

../

#

help me

foggy scaffold
#

@opal plank

restive pebble
#

nulll moment

#

u mad

#

anyone can kill ur project

opal plank
#

you should not use glitch

#

at ALL

foggy scaffold
#

why

opal plank
#

glitch aggresively puts down bots

#

heroku and glitch arent platforms for bot hosting

foggy scaffold
#

wdym

opal plank
#

to put it in simple terms, move it to somewhere else before you get into issues

foggy scaffold
#

i have hosted my bot here before

#

my old bot

#

which was in 700 servers

#

never had any issues

opal plank
#

their platforms are for webservers websites and other services, its not for bot hosting, they aggresively try to remove bots from their platform

#

also both heroku and glitch put your bot into stasis when its idle, which makes people use uptimers

foggy scaffold
#

not anymore

#

glitch changed

#

u can pay for full uptime

#

which i did

#

and they allow bot hosting

opal plank
#

if you are paying for it why not use a vpn instead?

foggy scaffold
#

vps?

opal plank
#

which is meant for that kind of job

#

yeah

foggy scaffold
#

i am just using this so I can get the bot started up

#

once i gett it to be a lil bit bigger i switch to vps

opal plank
#

well its up to you, i highly discourage people from using heroku or glitch when it comes to bot hosting

#

they aggressively remove bots from their websites

foggy scaffold
#

r u sure it wouldnt be like this

#

if(fs.readFile("commands/devs/bl.json").ids.find(message.author.id)){message.channel.send("You are blacklisted!")}

opal plank
#

use parent dir

#

./

foggy scaffold
#

where

#

bbefore commands?

opal plank
#

before commands

#

just a wild guess

#

usually commands are one dir after where your index is

foggy scaffold
#

TypeError: path must be a string or Buffer

#

if(fs.readFile("./commands/devs/bl.json".ids).find(message.author.id)){message.channel.send("You are blacklisted!")}

opal plank
#

fs.readFile("./commands/devs/bl.json")

#

ids is outside

#

not inside

foggy scaffold
#

o

#

like that

opal plank
#

indeed

foggy scaffold
#

TypeError: Cannot read property 'ids' of undefined

opal plank
#

try this

foggy scaffold
#

also is the inside of the json file supposed to look like this

#

{
"ids": [
"632114178995257344"
]
}

opal plank
#
fs.readFile('./commands/devs/bl.json', 'utf8', (err, jsonString) => {
if(err) console.log(err); 
const s = JSON.parse(jsonString);
if(s.ids.find('id')) message.channel.send('your message')
});
foggy scaffold
#

error

opal plank
#

path again?

foggy scaffold
#

TypeError: id is not a function
at Array.find (native)

#

if(s.ids.find('id')) IT is this

opal plank
#

not id

foggy scaffold
#

this id

opal plank
#

you PUT the id

foggy scaffold
#

i did that too

opal plank
#

the one you want to search

foggy scaffold
#

still said not a function

opal plank
#

huh

#

do this after const s

#

console.log(s);

#

show me what it returns

foggy scaffold
#

{ ids: [ '632114178995257344' ] }

opal plank
#

hmmm maybe contains() might be better

#
fs.readFile('./commands/devs/bl.json', 'utf8', (err, jsonString) => {
if(err) console.log(err); 
const s = JSON.parse(jsonString);
if(s.ids.includes('id')) message.channel.send('your message')
});
raw ravine
#

Can anyone tell me the whole procedure of hosting JDA bot on heroku or anywhere?

opal plank
#

you shouldnt use heroku

foggy scaffold
#

@opal plank works

opal plank
#

there we go

#

includes is better than find if i recall

raw ravine
#

so where should i host for free and get it up 24/7 up?

opal plank
delicate shore
#

hey

#

how to add cooldown

#

to my meme command

#

people are using it like anything

#

is there any way i can add cooldown per user

opal plank
dusk sphinx
#

Is there other website for coding a bot beside glitch

opal plank
#

use a proper app for coding, then deploy bot in a hosting website

#

VSC, atom, Vim

raw ravine
#

what should be my JDA Procfile content... after worker:

opal plank
#

your what?

#

@raw ravine you really shouldnt use heroku

raw ravine
#

ok

#

google f1 micro requires credit card info

#

and i can't provide that shit

opal plank
#

danhosting aparently is a thing, also aws

#

or you can host it yourself

raw ravine
#

ok

#

๐Ÿ‘ @opal plank

lusty quest
#

aws needs a creditcard too

opal plank
#

any device can run bots nowadays

raw ravine
#

@lusty quest yes

foggy scaffold
#

@opal plank i have a raspberry pi should i try n host on it

lusty quest
#

if you have a Raspberry you can host it on there

opal plank
#

absolutely

lusty quest
#

but for larger bots you probably want more bandwith

opal plank
#

raspberry pi's are a really good alternative

lusty quest
#

in any case better than glitch or heroku

foggy scaffold
#

when my bot gets verified i will probably switch to raspberry

#

i just dont feel like setting it all up lol

opal plank
#

its a one time thing, shouldnt be that bad

foggy scaffold
#

i know but i havent used my pi in a long time

lusty quest
#

linux makes it easy to get a production enviroment running

opal plank
#

im even thinking about setting up a command to create commands so i do it remotely

#

so i wont have to touch the raspberry pi at all

foggy scaffold
#

i created the command with the command -Thanos

opal plank
#

indeed

#

though syntax might be an issue, so i'll just deploy it from VSC onto it

#

maybe a git pull

#

decisions

foggy scaffold
#

wouldnt i have to install all dependencies ontto my pi

opal plank
#

yes indeed

foggy scaffold
#

and last time i tried i couldnt get node.js to install properly on it

opal plank
#

this should give a rough overview on it

#

the whole point of the command to make commands is to not need to ssh onto it

#

deploy commands on the go

foggy scaffold
#

u could do it from ur phone that way too

lusty quest
#

i think a git pull would be nice, you can update the repo without being bound to any location

opal plank
#

indeed thats what i was thinking

foggy scaffold
#

fuckit imma try n do my raspberry pi rn

opal plank
#

do a small script to fs the whole commands, then restart it

delicate shore
#

ok

#

i bought google vps

#

now how to host my bot

#

over it

#

pls someone help me

#

๐Ÿฅบ

restive pebble
#

docs

delicate shore
#

๐Ÿ˜ญ

#

@restive pebble link

ornate needle
#

@delicate shore which os?

restive pebble
#

anyone knows how to warn in node js

ornate needle
#

@delicate shore and which library r u using?

delicate shore
#

js

#

discord js

#

v12

#

@ornate needle

restive pebble
#

null moment

ornate needle
#

@delicate shore
Hosting a bot is easy. You just have to have a basic knowledge of linux. For this tutorial lets use Ubuntu. Begin by connecting.

  1. SSH into your VPS
  2. Make sure you have root permissions
  3. Install nodejs
    4.One nodejs is installed pull your repo or wherever else your code is stored
  4. Use cd <folder where your bot stored> to enter the folder
  5. Install your requirements.
    7.You should have requirements installed .
  6. To exit use screen ls to get a list of screens
    10> Exit by using screen -Xs [screen_id] quit

This is how I did. You may use tmux or systemmd as well.
https://www.youtube.com/watch?v=_OZVJpLHUaI

Version Management is key when it comes to efficient project and code management. For this purpose, most programmers use Git, so in this Git Tutorial for Beginners, we'll have a look at the Git basics and and learn what repositories, branches and commits are. So let's get star...

โ–ถ Play video
restive pebble
#

simply console log?

ornate needle
#

For hosting?

#

Yes

restive pebble
#

no

#

i want to warn i think console.log is better

ornate needle
#

Not an js user

#

Sorry

restive pebble
#

kk

ornate needle
#

:/

restive pebble
#

ts tho

#

well same nvm

delicate shore
#

omg

#

@ornate needle thanks

#

i dare you to do d!help right here and set your status to online

#

d!help

#

ok

#

oof

coarse hearth
#
const { MessageEmbed, ReactionCollector } = require('discord.js')


module.exports = {
    name: "b!verify",
    run : async (client, message, reaction, user) => {
        const reactmessage = await message.channel.send('React with ๐Ÿ‘Œ to get your role!');
        await reactmessage.react('๐Ÿ‘Œ');

        const filter = (reaction, user) => reaction.emoji.name === '๐Ÿ‘Œ' && !user.bot;
        const collector = reactmessage.createReactionCollector(filter, { time: 15000 });

        collector.on('collect', async reaction => {
            const user = reaction.users.cache.last();
            const guild = reaction.message.guild;
            const member = guild.member(user) || await guild.fetchMember(user);
            member.roles.add('73059468924741');

        }
        )}
    
}

how do i make this be unlimited, can be used many times

#

the reaction

restive pebble
#

remove time lol

foggy scaffold
#

@opal plank how do i upload my bot to my pi now that I am ssh'd into it

solemn latch
#

Sftp is a good way to move files around

foggy scaffold
#

do i need a start.bat thing in my bot or anything

delicate shore
#

how to do custom prefix

#

perf serverv?

#

serverv

foggy scaffold
#

make the prefix a variable

solemn latch
#

@delicate shore did the guide you where linked not work?

restive pebble
#

how to make a nice table

#

in md

delicate shore
#

which

restive pebble
#

well nvm

delicate shore
#

of google cloud? @solemn latch

#

i haven't tested yet

#

but

#

first

#

i wanna know about cusotm

#

custom

#

prefix

#

any guide?

#

or something

restive pebble
#

docs

solemn latch
restive pebble
#

woo can u help

#

me

solemn latch
#

Kinda depends on what databases you already use @delicate shore ideally you'd use one db

delicate shore
#

any youtube video ?

#

yea

#

any yt video ?

#

docs destroy my brain

solemn latch
#

You can research videos on google

restive pebble
#

in .md files

solemn latch
#

I dont know much about markdown

#

Tbh

restive pebble
#

okk

solemn latch
restive pebble
#

thx

solemn latch
#

I need to read this too

#

But its 2am. So tomorrow

restive pebble
#

lol

earnest phoenix
#

Help me make a mod bot

#

someone?

#

Like DM and tell me each step

scenic kelp
#

That's just spoonfeeding. That's not what this channel is here for.

lusty quest
#

@coarse hearth look into the ReactionAdd event

coarse hearth
#

i fixed

#

tqtqtqtqt

lusty quest
#

if you use reactioncollector it will end after some time (its limited) if you use the even with enabling partials it will work even if the bot restarts

lusty spade
#

is there any way to have or function in .endsWith()?? i tried a few ways but it doesn't work

if(!time.endsWith('s' | 'm' | 'h' | 'd')

if(!time.endsWith('s', 'm', 'h', 'd')

if(!time.endsWith('s' || 'm' || 'h' || 'd')
steel heath
#

you can use regex I guess

cinder patio
#

Then you can't use endsWith tho

delicate shore
#

hey

#

my code for custom prefix

#

but it is not wokring

#

no error

#

it says successfully seted

#

but

#

it doens't wokr with it

#

work

cinder patio
#

Are you using quick.db?

delicate shore
#

yes

#

no

cinder patio
#

console.log PREFIX right after you check if it's null

#

and see what you get

delicate shore
#

yes

#

const db = require("quick.db")

#

ok

cinder patio
#

actually, you can console log it before too, because PREFIX could be undefiend, and you are strictly checking if it's null

delicate shore
#

oh

#

should i do

#

if(!PREFIX)

#

?

cinder patio
#

yep

delicate shore
#

ok

#

lemme try

lusty quest
#

quick.db is somehow a troublemaker, every time someone uses it and has low knowledge about it he ends here asking bcs stuff doesnt work

delicate shore
#

@cinder patio i found

#

the probelm

#

but not the sol

#

even if i change the prefix

#

it's logging the same prefix

#

s!
s!
s!
s!
s!

#

this is what it logs^

cinder patio
#

Even if you do !PREFIX?

delicate shore
#

yes

cinder patio
#

I found the problem

dusk sphinx
#

Is there better website or app for coding and command

cinder patio
#

in your setprefix function, you set the key as PREFIX_GUILDID

#

But you get it as prefix_GUILDID

delicate shore
#

no @cinder patio

#
x
x
s!
x
x
s!```
#

this is what its logging

#

it's changing it back to s!

#

s!seprefix

#

s!setprefix

#

the problem is

#

if i run a command

#

it resets the prefix

lusty quest
#

did you set somehow a default Config?

#

maybe it overwrites your edited config

delicate shore
#

no

#

i have a env

#

no config

lusty quest
#

but you need to define default settings for a guild, otherwise the bot will not work

delicate shore
#

i have

#

the DPREFIX

#

is defined as s!

#

in the env

cinder patio
#

Shouldn't args[0] be your prefix?

delicate shore
#

no

cinder patio
#

and not args[1]?

delicate shore
#

i tried

#

i logged

#

args[1]

#

is correct

#

i checked by logging

#

@cinder patio i think i found the error

#

no

restive pebble
#

Hmmm

surreal notch
#
  if (message.content.startsWith(`${prefix}botinfo`)) {
    const help = new Discord.MessageEmbed()
      .setFooter(
        `Requested by ${message.author.username}`
      )
      
      .setTimestamp()
 
    .setAuthor("Information:")
      .setColor("#FF4500")
   
.addFields(
        { name: 'Servers:', value: client.guilds.cache.size + " guilds" ,inline: true},
        { name: 'Users:', value: client.users.cache.size +  " users",inline: true},
        { name: 'Channels:', value: client.channels.cache.size + " channels", inline: true },
        { name: 'Node Version:', value: '12.16.2', inline: true },
{ name: 'Library:', value: 'Discord.js', inline: true },
{ name: 'Library Version:', value: '12.2.0', inline: true },
    )
      
    message.channel.send(help);
  }
});```
when i use -botinfo the bot spams this
#

many times

errant hornet
delicate shore
#

it work

#

worked

#

i need one more help

surreal notch
#

type

#

in

#

one

#

sentece

delicate shore
#

how can i make a command in which if bot get's pinged

#

it replies with it's prefix

#

in the specififc servevr

#

serverv

#

i use quick.db

#

@cinder patio

honest perch
#

Get the servers prefix and reply with it

delicate shore
#

how

#

lie

#

liek

honest perch
#

Read quick db docs

delicate shore
#

hm

restive furnace
#

db.set, db.get

#

that can't be so hard

#

to use

earnest phoenix
#

quick.db is somehow a troublemaker, every time someone uses it and has low knowledge about it he ends here asking bcs stuff doesnt work
@lusty quest me uses it because i gave up on SQL so i'm the reverse

#

WHAT EVEN IS THE BINDINGS FILE THAT I KEEP REINSTALLING BUT DOESN'T WORK

/rbd/pnpm-volume/a942381f-ffd2-4139-a741-0fafbfe74da9/node_modules/.registry.npmjs.org/bindings/1.5.0/node_modules/bindings/bindings.js:135
  throw err;
  ^
Error: Could not locate the bindings file.
restive pebble
#

Ik glitch

earnest phoenix
#

glitch is my hosting provider

surreal notch
#

anyone pls

#

help

restive pebble
#

This is a native issue to glitch

#

It won't work

surreal notch
restive pebble
#

That's why I left glitch

pure lion
#

so uh about mongodb atlas, which provider is best?

surreal notch
#

||buy a good vps||

restive pebble
#

@surreal notch u should also do if(message.author.bot)return

earnest phoenix
#

That's why I left glitch
@restive pebble but can you fix it?

surreal notch
#

OkK

restive pebble
#

No

surreal notch
#

but how to do that

earnest phoenix
#

bruh

#

moment

surreal notch
#

ok

#

maybe i got it

earnest phoenix
#

intensifies

pure lion
#

Also hey Boeing

restive pebble
#

Hmmm

#

Hi

pure lion
#

How is you?

restive pebble
#

Good lol

#

Wbu

surreal notch
#

@restive pebble it is still spamming

pure lion
#

so uh about mongodb atlas, which provider is best?
And how is the fuck I do this

restive pebble
#

Ok wait

pure lion
#

I'm alright, I started re coding alebot

restive pebble
#

What is it spamming

#

The embed?

surreal notch
#

Yes

restive pebble
#

Botinfo one?

errant hornet
#

What?

surreal notch
restive pebble
#

@surreal notch return message.channel.send(help)

earnest phoenix
#

maybe you are caling it inside the embed

#

smh

#

idk

restive pebble
#

What?
@errant hornet object

#

Access like an object

errant hornet
#

Clarify

restive pebble
#

It's an object

errant hornet
#

Show me an example code

restive pebble
#

owner.userId

errant hornet
#

I did that and it didn't work.

restive pebble
#

owner[userId]

#

Since it's a string

surreal notch
#

@restive pebble ok

earnest phoenix
#

help
why does my bot keep showing errors after i updated it to v12.2.0 discord.js
they aren't discord API errors, they are errors with node.js and npm
help

errant hornet
#

Ok

surreal notch
#

But why my other embeds are not spamming?@restive pebble

restive pebble
#

The main error is glitch

#

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

earnest phoenix
#

i can't keep my pc on 24/7

restive pebble
#

It becmes a loop I think

surreal notch
#

@earnest phoenix use a vps

earnest phoenix
#

But why my other embeds are not spamming?@restive pebble
@surreal notch then use those methods ๐Ÿคฃ KEKW

surreal notch
earnest phoenix
#

the emoji name... bruh moment

#

excusemewtf

#

how can i make this send images?

    if(message.author.id === bot.user.id){
    return}
        if(message.channel.id == botconfig.CHANNELID){
          let tmp = message.content
            message.delete()
        message.channel.send(tmp)
    }
});```
#

what are you trying to do

restive pebble
#

Message#MessageAttachment

#

Or Embed#setImage

earnest phoenix
#

a darknet bot

#

WTF

surreal notch
#

@restive pebble still spamming

#

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

earnest phoenix
#

so

#

what help you need

#

why do we turn this channel into stackoverflow KEKW

surreal notch
#

lol

wraith flicker
#

Anyone got a good music bot replacement for Erela.js? thing always breaks for me, never loading the first track until it leaves and rejoins.

restive pebble
#

Erela is gay

wraith flicker
#

honestly yeah

restive pebble
#

Auric was also saying

surreal notch
#

@restive pebble noreply

#

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

restive pebble
#

U can take a look at mine it uses discord ytdl core

earnest phoenix
#

when you fix your error but node restarts and brings it back again

wraith flicker
#

oh alright

pure lion
#

Which is the best provider for mongodb

wraith flicker
#

you open sourcing the code?

pure lion
#

Hhhhhh

restive pebble
#

It is

slender thistle
#

define "best"

restive pebble
#

Open

wraith flicker
#

ah nice

pure lion
#

Fastest, most reliable

#

Either works

wraith flicker
#

yeah if you could send that link to me that would be great

restive pebble
wraith flicker
#

thanks man

pure lion
#

Music boat

wraith flicker
restive pebble
#

Ok

#

I don't want to reveal my main bot so

pure lion
#

Flexboa-

earnest phoenix
#

lol

restive pebble
#

Only the music module

pure lion
#

Does it have SoundCloud?

#

Head my shake

restive pebble
#

It has some features like nightcore effect

pure lion
#

Oh

wraith flicker
#

ohhh nice

#

ill def take a look at this

#

thanks again

pure lion
#

So I'll ask again, does anyone know which mongodb provider is most reliable

#

I don't wanna go with the "shit" one

surreal notch
#

@restive pebble it is still spamingggg

earnest phoenix
restive pebble
#

Idk

pure lion
#

a

restive pebble
#

Does it spam like infinite times?

surreal notch
#

maybe 6-7 times

restive pebble
#

Hmmmm

surreal notch
#

sometime less sometime large

pure lion
#

Close vsc and reopen it

#

You may have a minor case of 7 processes

restive pebble
#

Yeah mutiple bots lol

#

What is erela

#

ok I'll see myself

surreal notch
#

help me also

earnest phoenix
#

FIXED BINDINGS FILE

restive pebble
#

Ik how

earnest phoenix
#

@restive pebble so maybe glitch is good

restive pebble
#

U switched workspace

earnest phoenix
#

i did npm i node-gyp -g and then did npm i discord.js

restive pebble
#

I bet it will come again

#

Very soon

marble juniper
#

What is erela
@restive pebble lets you do music stuff with discord.js which uses lavalink

surreal notch
#

boeing

#

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

restive pebble
#

Okk

marble juniper
#

and you need to run a lavalink.jar in a second terminal

#

which sucks

restive pebble
#

Keep calm and use ffmpeg

#

x)

marble juniper
#

lol no

#

that shit was hell for me

#

and broke every 10 seconds

restive pebble
#

Hmmm

civic saddle
#

fh;

#

ุจุงูƒ

#

ุงู„ุณู„ุงู… ุนู„ูŠูƒู…

marble juniper
#

just use this to run lavalink (in a second file not your main file plz)

require('shelljs').exec('java - jar Lavalink.jar')
#

lol

restive pebble
#

Lol

#

Tho ffmpeg is crystal clear

#

It eats ram but gives worth

#

It's bass is like super hot

#

Minimal disortion

marble juniper
#

well im fine with lavalink

restive pebble
#

Hmmmm

marble juniper
#

cuz it does sound good

restive pebble
#

Idk how to use lavalink

pure lion
#

Ffmpeg sexyyyy ngl

restive pebble
#

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

marble juniper
#

use erela.js

#

and try for urself

#

they have a docs

restive pebble
#

Link pls

marble juniper
#

and if you are too fucking lazy just copy paste thier code

#

idk

restive pebble
#

I cannot find it

marble juniper
#

wait

restive pebble
#

Npm?

marble juniper
#

the docs say everything you need

#

you should give it a try lol

restive pebble
#

K thx bro

restive furnace
#

just go to lavalink github page, and then theres for many languages wrappers and yeah (bad english yes)

delicate shore
#

@pure lion

#

Your bot ?

#

Got deleted ?

#

Wtf

pure lion
#

I deleted it x)

delicate shore
#

Brvh

#

Why

pure lion
#

Slow

delicate shore
#

Brvh

#

Smh

#

You got an email

pure lion
#

I did?

#

When?

delicate shore
#

I am asking

pure lion
#

Nope

delicate shore
#

Ok

earnest phoenix
#

Does anyone know how i can make graphs for my discord bot

lusty quest
#

canvas

earnest phoenix
#

Is there any example you can link?

autumn aspen
#

Guys can this kick command work in VSC v12.2.0

lusty quest
slender thistle
#

VSC is a text editor

#

Your library is discord.js

autumn aspen
#

bot.on(const sim = require("string-similarity");
module.exports = {
name: "kick",
description: "kicks a member",
execute(message, args) {
if (!message.member.roles.cache.has("730187390328504381"))
//Do they have the role?
return message.channel.send(
"You do not have the permissions to run this command!"
);
if (args.length == 0 || args[0].length == 0) {
//If no args were provided
return message.channel.send("You have to specify an user to kick!");
}
const member = message.guild.members.cache.get(
(args[0].search(/<?@?!?([0-9]+)>?/gm) == -1 //Is there a mention in the first argument?
? undefined
: args[0].replace(/<?@?!?([0-9]+)>?/gm, "$1").toString()) || //If so then return the id
message.guild.members.cache.find(
//Or else then look for the best match
member =>
member.user.username ==
sim.findBestMatch(
args[0],
message.guild.members.cache.map(member => member.user.username)
).bestMatch.target
).user.id
);
if (!member) {
return message.channel.send(
"You have to mention an user in this server to kick!"
);
}
if (member.user.id == message.author.id) {
return message.channel.send("Why would you want to kick yourself?");
}
let reason = args; // Get the reason
reason.shift();
member
.kick(
reason.length == 0
? "You were kicked from Server Staff Support server."
: reason.join(" ")
)
.then(() => {
return message.channel.send(Sucessfully kicked ${member}!);
})
.catch(Error => {
message.reply("I was unable to kick that member");
return console.log(Error);
});
}
};

#

Does it wokr?

earnest phoenix
#

I meant chart example

#

@autumn aspen try it

slender thistle
#

bot.on(const sim = require("string-similarity");
already no

autumn aspen
#

Ok

#

bot.on(const sim = require("string-similarity");
already no
@slender thistle lol

#

Knew it

#

But if I delete it then the bot.on?

#

@slender thistle

autumn aspen
#

lol

slender thistle
#

Probably

autumn aspen
#

Oh ok

#

thx\

#

Bc I got the real one

earnest phoenix
winter basalt
#

try putting an image

pale vessel
#

it's message content

cobalt spruce
#

guys

#

should i make the report command as a embed?

coarse hearth
#

@earnest phoenix

#

what do u mean?

earnest phoenix
#

What to do?

#

From this YT

#

video

#

@pale vessel can u help?

pale vessel
#

sorry no

earnest phoenix
#

๐Ÿ˜ฆ

autumn aspen
#

RIP

earnest phoenix
#

@restive pebble

#

Can u help me?

restive pebble
#

Are u compiling tsc

#

?

#

I also encounter that while compiling

#

Vsc dosent have admin perms

#

SOLUTION:

#

Open normal cmd

#

And run

#

@earnest phoenix

earnest phoenix
#

@restive pebble Can I DM?

restive pebble
#

Why lol

#

I am a noob first of all

earnest phoenix
#

Bruhh

restive pebble
#

U have git bash?

earnest phoenix
#

HUH

restive pebble
#

Normally run cmd prompt

earnest phoenix
restive pebble
#

Use bash then

earnest phoenix
#

what is bash?

restive pebble
#

Run with admin perms

earnest phoenix
#

k

restive pebble
#

And that powershell

earnest phoenix
#

Use which now?

#

Powershell or CMD?

restive pebble
#

Cmd with admin

lusty quest
#

start either PS or CMD as administrator

earnest phoenix
#

K

#

With CMD how to got to a drive?

restive pebble
#

cd

#

I told

#

Cmd

#

Command Prompt

earnest phoenix
lusty quest
#

it works with PS if you know how

earnest phoenix
#

Doesnt stay in 1 location

#

@restive pebble

cobalt spruce
earnest phoenix
#

cd D:

restive pebble
#

cd /way/to/ur/file

earnest phoenix
#

cd/D:/Bot/ModBot

cobalt spruce
#

cd D:/Bot/ModBot

restive pebble
#

Yea

earnest phoenix
cobalt spruce
#

@restive pebble bro take alook at the shit i posted

restive pebble
#

Simply right click

#

And copy adress as text

cobalt spruce
#

no

earnest phoenix
restive pebble
#

Idk why they removed open cmd. Here

cobalt spruce
#

@earnest phoenix ima show u

earnest phoenix
#

@cobalt spruce

#

K

cobalt spruce
#

go to the file u waint

#

want

restive pebble
#

@earnest phoenix I get the same error when compiling typescript

earnest phoenix
#

K

restive pebble
#

I use git bash

#

And it's fine

strong tundra
#

don't use cd

restive pebble
#

Powershell is gay

strong tundra
#

just put D:/

cobalt spruce
#

@earnest phoenix

earnest phoenix
#

where on here would i put
if (message.author.bot) return

const Discord = require("discord.js");
exports.run = async (client, message, args) => {
const responses = [
"&{{weaponname}}value | &sb"
];
message.channel.send(responses[~~(Math.random() * responses.length)])
}

exports.data = {
"name": "hsb",
"category": "Fun", // used for help command i made - can be removed.
"usage": "question", // used for help command i made - can be removed.
"description": "Sends a help script", // used for help command i made - can be removed.
"aliases": ["q"] // other ways to run the command (i.e ;leaderboard or ;lb ect...)
};

restive pebble
#

Nice trick dude

cobalt spruce
#

@restive pebble see

#

ez

#

ife hax

restive pebble
#

Yass

earnest phoenix
#

@cobalt spruce Thnx

restive pebble
#

Lol

cobalt spruce
#

@earnest phoenix np

lusty quest
#

i think he needs Admin permissions.

cobalt spruce
#

look at this shot

lusty quest
#

otherwise the shell in VSC should work too

restive pebble
#

Idk about permissions

cobalt spruce
#

WAT DA FUC i do

restive pebble
#

Sorry

earnest phoenix
#

where on here would i put
if (message.author.bot) return

const Discord = require("discord.js");
exports.run = async (client, message, args) => {
const responses = [
"
&{{weaponname}}value | &sb
"
];
message.channel.send(responses[~~(Math.random() * responses.length)])
}

exports.data = {
"name": "hsb",
"category": "Fun", // used for help command i made - can be removed.
"usage": "question", // used for help command i made - can be removed.
"description": "Sends a help script", // used for help command i made - can be removed.
"aliases": ["q"] // other ways to run the command (i.e ;leaderboard or ;lb ect...)
};

restive pebble
#

Superbrain8 vsc uses powershell

lusty quest
#

i know

restive pebble
#

It messes with compiling

lusty quest
#

lol no i have no issues

#

you just need to make a change

restive pebble
#

My typescript compile also dosent work

earnest phoenix
#

GUYS

lusty quest
#

you have to allow running scripts

#

then its fine

earnest phoenix
#

help

restive pebble
#

Inside message

#

Event

earnest phoenix
#

?

restive pebble
#

Enjoy then

lusty quest
#

@cobalt spruce you dont send a array or collection for the permission override

earnest phoenix
#

where on here would i put
if (message.author.bot) return

const Discord = require("discord.js");
exports.run = async (client, message, args) => {
const responses = [
"
&{{weaponname}}value | &sb
"
];
message.channel.send(responses[~~(Math.random() * responses.length)])
}

exports.data = {
"name": "hsb",
"category": "Fun", // used for help command i made - can be removed.
"usage": "question", // used for help command i made - can be removed.
"description": "Sends a help script", // used for help command i made - can be removed.
"aliases": ["q"] // other ways to run the command (i.e ;leaderboard or ;lb ect...)
};

lusty quest
#

@earnest phoenix did you use a command handler?

earnest phoenix
#

nope

lusty quest
#

then this will not work

earnest phoenix
#

actually

lusty quest
#

copy/paste is not a way to code a bot

earnest phoenix
#

i dont copy and paste

lusty quest
#

the exports will override the export of a other command in the same file. this is why a command handler that uses a file for each command

earnest phoenix
#

hold on

lusty quest
#

otherwise use it in a client.on("message") event

restive pebble
#

Dude enable scripts

#

@earnest phoenix

earnest phoenix
#

How?

restive pebble
#

Run powershell as admin

lusty quest
#

try to run it in ps it will throw a error with instructions

earnest phoenix
#

I did

restive pebble
#

Set-ExecutionPolicy RemoteSigned

earnest phoenix
#

What to do with that?

restive pebble
#

Paste it lol

earnest phoenix
#

In?

restive pebble
#

Powershell

#

Running with admin perms

earnest phoenix
restive pebble
#

That's not powershell

earnest phoenix
lusty quest
#

there are litteraly instructions in how to

restive pebble
#

I mean type A

#

And enter

earnest phoenix
cobalt spruce
#

@earnest phoenix ez

#

go to VC

#

go to view

#

terminal

earnest phoenix
#

VC =?

restive pebble
#

It won't worl bruh

cobalt spruce
#

or Ctrl + รน

earnest phoenix
#

What is VC?

cobalt spruce
#

@earnest phoenix visual code

restive pebble
#

That worked for me

earnest phoenix
#

k

restive pebble
#

Visual studio dosent have admin perms

#

It won't work

cobalt spruce
#

@restive pebble it has

restive pebble
#

No

earnest phoenix
restive pebble
#

Set-ExecutionPolicy RemoteSigned

#

Try this

#

There

earnest phoenix
restive pebble
#

See

#

It doesn't have

earnest phoenix
#

@cobalt spruce Now what?

#

๐Ÿ˜ฆ

restive pebble
#

Go to powershell and try again

#

As admin

earnest phoenix
#

I want the code to work in VS

#

1:38

#

that part

restive pebble
#

Bruh

earnest phoenix
#

Never mind

restive pebble
#

U have to do it from powershell

earnest phoenix
#

It worked with CMD

#

CMD worked

restive pebble
#

Since vsc also runs with powershell

cobalt spruce
#

@earnest phoenix wat cha wana do in the cmd

earnest phoenix
#

HUH?

#

cha wana/

#

?

clever vector
#

Yo guys

earnest phoenix
#

It worked

clever vector
#

can you help me make a setActivity code

earnest phoenix
#

IDK how

clever vector
#

That can count online people in other server

restive pebble
#

client.user.setActivity()

#

Client.guilds.cache.size

clever vector
#

make full please

restive pebble
#

No

earnest phoenix
#

LOL

restive pebble
#

Docs

#

What is nodemon

#

Set-ExecutionPolicy Unrestricted

#

This would worked

#

It worked for me

earnest phoenix
#

It auto starts when I have made anychanges to the file

restive pebble
#

Oh

#

K

earnest phoenix
#

I dont need to off and On it again and again

restive pebble
#

Sounds good

clever vector
#
bot.on("ready",() => {
  console.log("Bot is online");
  bot.user.setActivity("with " + bot.guilds.cache.size + ' server(s) || Type ' + bot.prefix + 'help');
  setInterval(() => {
    bot.user.setActivity("with " + bot.guilds.cache.size + ' server(s) || Type ' + bot.prefix + 'help');
  },60000)
});
#

This is my bot that count srver

#

server*

#

not member

#

@restive pebble

restive pebble
#

Epic

clever vector
#

Bro

#

how to count other people online

calm saddle
#

what?

#

wtfym

clever vector
#

I want my bot to count other server online members

#

example

#

You added my bot to another server that u owned

#

so

#

it will count total my server and u together

#

Like u 100 me 100 = 200

restive pebble
#

this.guild.members.cache.size

pure lion
#

Can someone help me wurhe smeksmes

#

Fuck I'm so tired

#

Mongodb/mongoose

#

Help

#

More info coming soonโ„ข๏ธ

restive pebble
#

Sorry

#

Bro

#

I'm 14 and still learning

#

Idk sql

pure lion
#

It's nosql

restive pebble
#

I have to learn sql

pure lion
#

Same

#

But for now how the fuck do I make a connection

restive pebble
#

but me learning TS

pure lion
#

OH SHIT NVM IT WORKS

#

:D

clever vector
#

No not work

restive pebble
#

Websocket

pure lion
#

Nasjejdiwjd

#

It's fine

#

Localhost is good

restive pebble
#

Socket.on

pure lion
#

And sexy

#

No errors

#

๐Ÿ˜ฉ

restive pebble
#

K

#

this.guild was an example

#

U need to replace it

pure lion
#

It's gotta be message.guild

#

This is just aaaaaa thing that tells the client where the guild is, as a placeholder for your collection

restive pebble
#

yes

earnest phoenix
restive pebble
#

Feed him

pure lion
#

What does reduce do agaianddjs

restive pebble
#

Bro

pure lion
#

Ew goitch

restive pebble
#

U ran out of the 500 hours limit

earnest phoenix
#

tf

restive pebble
#

Heroku

earnest phoenix
#

no heroku

#

glitch is shit

pure lion
#

Oh rhshrsh horkekrk

restive pebble
#

It is

pure lion
#

Okay good clever

restive pebble
#

Heroku

earnest phoenix
#

how can i revive poor deku bot

pure lion
#

Spspsssp I don't know these things

restive pebble
#

U ran out of 550 hours limit

pure lion
#

Pay?

restive pebble
#

U need to wait for next month

earnest phoenix
#

WTF

restive pebble
#

1st of august

earnest phoenix
#

SHIT

pure lion
#

๐Ÿ˜ข

earnest phoenix
#

MY BOT

#

WHY

pure lion
#

Derku

#

Can you help me with mongoose

restive pebble
#

@pure lion u deleted bot?

earnest phoenix
#

i dont use it

pure lion
#

@restive pebble off of top yeah

short siren
#

Heroku limits you to a certain amount of hours a month in hope you'll pay them

restive pebble
#

Error is not enough

earnest phoenix
#

Heroku limits you to a certain amount of hours a month in hope you'll pay them
@short siren WHY

#

MY BOT

#

WHY ๐Ÿ˜ฆ

restive pebble
#

Spoonfeed coming

pure lion
#

Jsjsjssjsjsjsjs

restive pebble
#

Complete spoonfeed

quartz kindle
#

should have read the heroku terms of sevice lol

restive pebble
#

Lol

short siren
#

I've just said "in hope you'll pay"

restive pebble
#

And I'm sure u are running more than 1 app

earnest phoenix
#

WTH?

#

what to do?

pure lion
#

let spoonfeed = await spoon.spoonFeed(userResolvable)

restive pebble
#

Parameters are bad

#

Read docs

earnest phoenix
#

u talking to me?

restive pebble
#

Yes

earnest phoenix
#

K

restive pebble
#

U using ffmpeg?

quartz kindle
#

you passed a wrong variable to an event listener

restive pebble
#

Oh lol

earnest phoenix
#

uhh my bot is working again tf

restive pebble
#

It will go down

#

No worries

earnest phoenix
#

๐Ÿ˜ญ

restive pebble
#

Use alt account then

#

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

short siren
#

If your desperate get a github student account

restive pebble
#

Yea

earnest phoenix
#

?

restive pebble
#

That's for american

earnest phoenix
#

whats that

restive pebble
#

.edu

short siren
#

You get loads of free stuff including credit

restive pebble
#

Emails

quartz kindle
#

doesnt heroku give you 1000 hours if you verify your account?

pure lion
#

"that's for American"

short siren
#

No I'm in UK

restive pebble
#

Credit card

#

Yes tim

pure lion
#

UK squad

restive pebble
#

U have to verify card

#

Credit only

quartz kindle
#

so ask for someone to lend you a credit card to verify

#

they wont charge

pure lion
#

Btw Tim djs light is really good, thank you :)

quartz kindle
#

:3

restive pebble
#

Yes lol

pure lion
#

It's just so.. light

#

:D

restive pebble
#

It reduced my ram to 50%

#

Thx

#

So derku

#

I can give a nice option

#

Either make an alt

#

Or steal card

#

Ur choice