#development

1 messages · Page 552 of 1

keen drift
#

You got any practical solutions to uh, horizontal caching

drowsy lily
#

wtf is horizontal caching

keen drift
#

caching across machines

drowsy lily
#

uh

#

hazelcast

keen drift
#

that would make it practical for me to retrieve in case I want to build an API

drowsy lily
#

retrieve what?

keen drift
#

Any cached data

drowsy lily
#

why horizontal tho

keen drift
#

hm? Am I suppose to put it on a single machine

drowsy lily
#

why not

keen drift
#

what if I want to do multiple machines for cost effectiveness

drowsy lily
#

i dont care about cost effectiveness

keen drift
inner jewel
#

sharing cache is just effort

keen drift
#

you rich people

inner jewel
#

you could just fetch from each instance the needed data

keen drift
#

Then that'd be back to the rabbitmq/nats route

drowsy lily
#

unless youre telling me youre moving around thousand of dollars per month in servercosts, optimizing server costs is not worth the time thinking baout it

violet dagger
#

i be flossinn

inner jewel
#

nothing wrong with rmq/nats

keen drift
#

I only have like $100 to work with

inner jewel
#

100 usd is a lot of money

#

for a bot

drowsy lily
#

^

#

buy a single fat server

violet dagger
#

can you like, give me that lol

inner jewel
#

you can easily handle 100-150k guilds with that

keen drift
#

I can get more juice if I buy another machine

violet dagger
#

Yeah, buy your own server

drowsy lily
#

im handling 130k guilds with like 20 bucks per month

inner jewel
#

one of the bots i develop runs 300k guilds with 160/month

violet dagger
#

“one of the”

inner jewel
#

and we use just a bit above half the resources

drowsy lily
#

using JDA

inner jewel
#

yes i develop multiple bots

violet dagger
#

-bots @inner jewel noembed

gilded plankBOT
#

Natan#1337's dblMod dblCertified bots:
@pallid bramble @molten wren dblCertified

violet dagger
#

oh ok

inner jewel
#

those are the public ones

#

there are more for testing stuff and proof of concepts

drowsy lily
#

i love manta robot

violet dagger
#

oh ok

inner jewel
#

speaking of proof of concepts i sent you one fishy

violet dagger
#

-bots @drowsy lily noembed

gilded plankBOT
#

Napster#0001's dblCertified bots:
@stuck osprey dblCertified @rotund bloom dblCertified

knotty steeple
#

wrong place ok

drowsy lily
#

smh no fredboat

violet dagger
#

Oh aki is og

keen drift
#

So, say I resolve to the hazelcast method, what's an ideal way to invalidate cache, if the ws goes unavailable, and a channel is removed

#

Do I just purge all the cache associated with that shard when ws comes back online

violet dagger
#

I think that was like one of the first bots i ever used properly

drowsy lily
#

the ideal is to not go distributed unless you absolutely have to

inner jewel
#

i just purge all cache for the shard when session is oofed

#

if it's resumable no need to purge

#

also ^ what napster said

#

it's way easier to keep just your lib's cache and when needed fetch info from it and send where it's needed

keen drift
#

Where does Fredboat store its cache

bright spear
#

Is a fredboat dev here?

keen drift
#

¯_(ツ)_/¯

inner jewel
#

on mantaro we use only JDA's cache

earnest phoenix
#

tf is mantaro

inner jewel
#

and that's enough for a lot of growth

drowsy lily
#

distributed is

  • more expensive
  • requires skill and knowledge and time to set up
  • makes simple code complicated
  • is less supported by libraries
  • has less users and therefore less docs and questions asked/answers answered about
  • costs you a constant amout of time to maintain and evolve that could be invested in features

for the benefits of

  • scaling a shitbot that will most likely never need it
earnest phoenix
#

sounds like a linux os

bright spear
#

A music bot

inner jewel
#

with 100 usd you can literally throw 100 shards in a single process and get away with it

knotty steeple
#

a multipurpose bot*

earnest phoenix
#
  • requires skill and knowledge and time to set up
  • makes simple code complicated
    ...
  • has less users and therefore less docs and questions asked/answers answered about
  • costs you a constant amout of time to maintain and evolve that could be invested in features

being committed and having motivation can solve those

keen drift
#

Well, I have most of my structure planned out, except for the cache layer

#

And I like the idea to keep ws layer separate, so I can apply restarts w/o restarting the ws

earnest phoenix
#

Depends if the programmer really cares what he or she is doing

drowsy lily
#

being committed and having motivation can solve those

youre still a single person and the day has only 24 hours

inner jewel
#

everyone i know who did a distributed cache just gave up

#

it's not worth the effort

#

and now besides the bot you have to maintain all the extra stuff

keen drift
#

Better if I deal with it now then when I need to in college

drowsy lily
#

i think fredboat was running on like a single server with a millions guilds or more

#
  • lavalink nodes but those dont count
keen drift
#

wonder how dyno does it Thonkang

drowsy lily
#

runs on 3 dedis afaik

inner jewel
#

keeping the cache in a single process is already a pain, share it between multiple and you got a never ending headache

drowsy lily
#

why

#

the cache even if kept in a single process is unreliable

#

making it distributed is therefore not exactly a huge issue from that point of view

#

it is unreliable because any decision you do based on it's content can be wrong because discord might not have sent you an event or is just about to send it

keen drift
drowsy lily
#

so making a cache distributed and a little more eventually consistent than it already is shouldnt have a huge impact on your code which should be assuming that the cache is somewhat unreliable in the first place

keen drift
#

gonna ask around more I guess

drowsy lily
#

why bother ppl with it instead of building a prototype and seeing for yourself whether you like that way of building a discord bot or not

earnest phoenix
#

Because people are lazy

#

and ignorant

keen drift
#

Well I'm in the middle of building a prototype

#

But I'm not sure how I would approach that specific part

#

Natan showed a sc of you mentioning it, so I thought you had some experience, figure I might ask

#

I'll ask around other devs

silver lintel
#

on github, how do you keep the token private?

inner jewel
#

by not adding it to github

soft plaza
#

you dont upload it in the first place

amber fractal
#

^

silver lintel
#

oh ll

#

lol

soft plaza
#

add your config file to gitignore

prime cliff
#

Or better yet dont bundle the config file with your bot files aomegaLUL

dapper bear
#

hey im wanting to create a level system that saves the info to mongodb can anyone help me please

dapper bear
#

i already have a basic level system but it saves it to a json file

sturdy delta
#

how do I completely reset everything to do with node and Visual Studio Code

mental solstice
#

uninstall and reinstall?

#

@dapper bear what library are you using

dapper bear
#

@mental solstice node js

mental solstice
#

u have Mongodb installed and running already? I recently just started messing with it.. but it's pretty easy

dapper bear
#

yes i have it installed and running

dull idol
#

@dusky hawk

#

You can host it on Glitch and Heroku.

#

Totally free and good for newbie.

dusky hawk
#

Yep i know

#

I did try it and i followed every step right

#

I can't find the key though

dull idol
dusky hawk
#

Um. Still didn't get that

dull idol
#

If you still can't get it, maybe read it again.

#

I know, you used Scanning reading method

dusky hawk
#

Shit, you're somewhat right

dull idol
#

Can i set music bitrate into 128?

#

Is it increases more usages or something?

keen drift
#

well, it's sending more bits per rate

#

sooooo

dull idol
#

is it gonna more lag, Fishy?

keen drift
#

well, if it's doing more, what you think Thonkang

sturdy delta
#

does anyone know how i can FULLY reset Visual Studio Code, delete all the windows-build-tools and node.js

mossy vine
#

@sturdy delta reinstall windows

lament meteor
#

put ur computer in water

blazing star
#

use the mrclean magic eraser

dull idol
#

delete system32 on cmd prompt

blazing star
#

don’t preserve your root folder

smoky mica
#

buy a new pc

blazing star
#

throw your pc in the ocean

earnest phoenix
#

Any one here can help me pls

lament meteor
#

sure

dark yacht
#

Error: Could not locate the bindings file. Tried:

→ /rbd/pnpm-volume/a101ff8b-4edd-4948-9858-57b6130fa91f/node_modules/.registry.npmjs.org/node-opus/0.3.1/node_modules/node-opus/build/Debug/node-opus.node
→ /rbd/pnpm-volume/a101ff8b-4edd-4948-9858-57b6130fa91f/node_modules/.registry.npmjs.org/node-opus/0.3.1/node_modules/node-opus/build/Release/node-opus.node
→ /rbd/pnpm-volume/a101ff8b-4edd-4948-9858-57b6130fa91f/node_modules/.registry.npmjs.org/node-opus/0.3.1/node_modules/node-opus/out/Debug/node-opus.node
→ /rbd/pnpm-volume/a101ff8b-4edd-4948-9858-57b6130fa91f/node_modules/.registry.npmjs.org/node-opus/0.3.1/node_modules/node-opus/Debug/node-opus.node
→ /rbd/pnpm-volume/a101ff8b-4edd-4948-9858-57b6130fa91f/node_modules/.registry.npmjs.org/node-opus/0.3.1/node_modules/node-opus/out/Release/node-opus.node
→ /rbd/pnpm-volume/a101ff8b-4edd-4948-9858-57b6130fa91f/node_modules/.registry.npmjs.org/node-opus/0.3.1/node_modules/node-opus/Release/node-opus.node
→ /rbd/pnpm-volume/a101ff8b-4edd-4948-9858-57b6130fa91f/node_modules/.registry.npmjs.org/node-opus/0.3.1/node_modules/node-opus/build/default/node-opus.node
→ /rbd/pnpm-volume/a101ff8b-4edd-4948-9858-57b6130fa91f/node_modules/.registry.npmjs.org/node-opus/0.3.1/node_modules/node-opus/compiled/8.14.0/linux/x64/node-opus.node```
#

excuse me what the fuck

prisma sedge
#

Are you on glitch?

dark yacht
#

yes

#

yesterday everything worked

#

can someone help me?

quartz kindle
#

did you update node or did node update itself or did the OS update itself?

#

if so, you need to rebuild the package

dark yacht
#

thanks

late nova
#

hey guys

#

can i get some help with webhooks and voting?

dapper bear
#

hey i want to add who each user was invited by to my welcome message my code is written in js any help would be greatly appreciated

indigo notch
#

Which lib

dapper bear
#

discord js

#

i already have the welcome message set up i just want to know how to add who each user was invited by too it

indigo notch
#

Djs is shite with that sort of things

inner jewel
#

there's no accurate way of knowing that

#

without tracking all invites

indigo notch
#

Ut if you really want it, fetch invites and check which one changed is the best way

dapper bear
#
// welcome member message module
bot.on('guildMemberAdd', member => {
  let channel = member.guild.channels.find('name', 'welcome');
  let memberavatar = member.user.avatarURL
      if (!channel) return;
      let embed = new Discord.RichEmbed()
      .setColor('RANDOM')
      .setThumbnail(memberavatar)
      .addField(':bust_in_silhouette: | name : ', `${member}`)
      .addField(':microphone2: | Welcome!', `Welcome to the server, ${member}`)
      .addField(':id: | User :', "**[" + `${member.id}` + "]**")
      .addField(':family_mwgb: | Your are the newest member', `${member.guild.memberCount}`)
      .addField("Name", `<@` + `${member.id}` + `>`, true)
      .addField('Server', `${member.guild.name}`, true )
      .setFooter(`**${member.guild.name}**`)
      .setTimestamp()

      channel.sendEmbed(embed);
});

bot.on('guildMemberAdd', member => {

  console.log(`${member}`, "has joined" + `${member.guild.name}`)

});
indigo notch
#

Spaghetti code is all i can say

dapper bear
#

it works though 😄

quartz kindle
#

why two event listeners lul

smoky mica
#

@dapper bear yo how did you do that text format, i used to do it i forgot xD

fervent oyster
#

@dapper bear you missed a ' in the code

dapper bear
#

one leaves a message in the console log i check it alot to make sure no problems

frozen tiger
#

Hello guys, I need some help with Bootstrap 4. Can someone help me or is this off-topic ?

fervent oyster
dapper bear
#

@fervent oyster where abouts? my text editor didnt flag any errors?

smoky mica
#

Does it show the color?

fervent oyster
#
console.log('triangles')
smoky mica
#

Just tried it

fervent oyster
#

hang on broomez, im opening mine

smoky mica
#

Didnt know you can put js and py, the code lang

#

lmao

fervent oyster
#

idk then, but thats the way you do it

dapper bear
#

@smoky mica yes its set as random

smoky mica
#

thanks

frozen tiger
#

someone can help me ?

dapper bear
#

@fervent oyster okay thanks

smoky mica
#

I don't really use bootstrap 4 or wtv so um yeah 🙄

frozen tiger
#

well, if you don't use bootstrap that much, you'll not be able to help me..

smoky mica
#

correct

#

XD

frozen tiger
#

I mean, my demand is veeery specific

fervent oyster
#

@dapper bear your syntax is all good, markdown syntax highlighting needs some work done on it

#

my mistake

dapper bear
#

ahh okay its my first time coding a bot so im still learning myself 😃

fervent oyster
#

@late nova ok, you want to make a webhook for votes, what language do you use

late nova
fervent oyster
#

ahh ok

late nova
#

if you want to come in more than welcome

dapper bear
#

how would i add who invited the user to the welcome message?

frozen tiger
#

you could try to get the invite used and then get the invite creator

earnest phoenix
#

there is no reliable way of getting who invited who

im currently building an asp.net core website which is basically an invite tracker. it has its own invites, basically it creates a new invite, makes the user login with oauth2 with the guilds.join scope, if they accept the invite, add them to the guild. that way you can track who invited who, uses, etc., it might be an overkill but as of right now having your own middleware for it is the only reliable way

dapper bear
#

i just want a basic invite tracker 😅

amber fractal
#

To track who creates invites?

dapper bear
#

no to say who invited a user when they join

bright spear
#

@dapper bear you can't see that directly, you'll need to track the count of each invite and see which one increased when they join

#

So you'll need to store it in a db

amber fractal
#

I think he wants to have the user input it manually

#

Like a referral system in games

celest bloom
#

Am I allowed to set the display property of the donate button to none on my bots page?

earnest phoenix
#

If someone is very good at html, css, js please write to me privately have few questions

stray charm
#

@earnest phoenix or just write the questions here? thonk

earnest phoenix
#

how does a switchTo work? with HTML & JS

knotty steeple
#

use google

#

or the docs

earnest phoenix
#

do you think I would not have done that? I'm asking for a van here

night imp
#

Iirc (really not sure) it sends a request to the browser to change the window

limber swan
#

Someone uses roblox-js ?
Because when i get online the bot, ut fails to log in. (It has everything that it should and the pass and username are correct)

knotty steeple
#

its depreciated

#

more of

#

no longer maintained

#

so you shouldnt use it

limber swan
#

Oof

#

Then what i should ise

#

Use

knotty steeple
#

idk

#

make it urself

#

or dont make a roblox bot OMEGALUL

limber swan
#

Oof

vernal rivet
#

If u don't see a package for the thing you want, then you will have to make it, if you cant do that, then your better off making it do something else

limber swan
#

noblox.js?

vernal rivet
#

For anything

obtuse wind
#

What do I do if my bot's console keeps saying "msg.edit is not a function"

mossy vine
#

What is msg defined as?

obtuse wind
#

message

mossy vine
#

I mean

#

Where and how

obtuse wind
#

bot.user.lastMessageID

#

and on my bot console (it lets me type in it and run commands via console as needed / wanted)

#

but if I do "msg.edit(test edit/some message) .then(msg => console.log(Successfully Edited Message, ${msg}) .catch(console.error);" it wont let me successfully run

stray wasp
#

anyone know if webhooks can use emotes?

bright spear
#

@stray wasp they can use all emotes in the server include animated emotes, but they cant use emotes from other servers

stray wasp
#

alright thanks

crude portal
#

Guys what is a shard

bright spear
#

@crude portal big bots are split into multiple shards, each shard has its own connection to the Discord API. depending on your lib and the sharding type it may make one process per shard

crude portal
#

Ohh ok cheers

bright spear
#

each shard can only be on 2500 servers so u need to set it up before you reach that

#

yw

crude portal
#

I don't need to worry about that just yet

#

Thanks though

bright spear
#

yw

crude portal
#

So if I use discord.js I don't need to require the api and I don't need .postStats right

keen drift
#

?

crude portal
keen drift
#

Yeah if you pass the client in

crude portal
#

K great thanks

dull idol
#

@crude portal Sharding is the method by which a bot's code is "split" into multiple instances of itself. When a bot is sharded, each shard handles only a certain percentage of all the guilds the bot is on.

#

Don't use this method too early.

#

You can use this when your bot has 2k / 2,5k servers.

amber fractal
#

I do it with 67, but only one instance is spawned mmLol

#

Ooh wait Im at 70 now

dull idol
#

Using shards can decreases your bot performance.

amber fractal
#

I havent had any issues

crude portal
#

Thank you!

dull idol
#

Especially, music.

#

Sharded bots often gain very marginal performance increase and might even use more memory due to using more node processes.

crude portal
#

Yeah I certainly don't need to worry about any time soon

dull idol
#

Glad you know it <3

inner jewel
#

if you have an unified cache sharding has pretty much no overhead

#

besides synchronization for the cache

keen drift
dusky marsh
#
try{
  message.guild.members.array().forEach(member => {
    member.send('string')})
  }catch(err){
    console.log(err)
  }

Anyone have any clue as to why evaling this could have possibly escaped just the message server, and dm'd in every server that the bot is in?

bright spear
#

wdym dmed in every server

#

dms arent related to servers

dusky marsh
#

bro what, no, i did an eval command, it was supposed to dm people in the server i did the eval in, instead it dm'd in every server she is in

earnest phoenix
#

Yeah, it should have only DM'd the one sever yet it DM'd all the bots users.

bright spear
#

hm that shouldnt have happened

#

and i didnt get a dm

dusky marsh
#

Sounds like a discord.js error to me

#

yuh they kicked me bot before it went too far

earnest phoenix
#

Same no dm

white fern
#

I have a question

dusky marsh
#

Ask it

amber fractal
#

I didnt get a dm either

violet jetty
#

Same here

lament meteor
#

you are sending stuff to the res twice

lusty dew
#

Hm?

#

@lament meteor Wdym?

#

I am not allowed to use res.send twice?

lament meteor
#

u have res.send('some stuff') and res.sendFile(idk what)

#

u can't use res.send twice cause it is a website

lusty dew
#

Ok

#

How am I to fix that

#

res.redirect?

#

instead

blazing star
#

it’s is why you call return

#

just do return res.send("something")

lament meteor
#

@blazing star the issue is he/she put res.sendFile on the bottom

blazing star
#

return would block that

#

iirc

lusty dew
#

Nope

#

same error

blazing star
#

wait

#

move the send file line in the insert user callback function

#

try that

lusty dew
#

mk

#

Mk

#

No errors

#

but it doesn't do exctly what I wanted

blazing star
#

what does it do

lusty dew
#

Changes the tab

#

and puts that

blazing star
#

the username exists smh

lusty dew
#

I know it does

blazing star
#

oh wait

#

nvm

lusty dew
#

I am testing to see if it works

blazing star
#

try a different username then

lusty dew
#

No no no

#

You're not getting what I am saying

#

I am testing to see if that part works

blazing star
lusty dew
#

I don't want it to change the tab

#

I want it to send username already exists

blazing star
#

ok

#

it did tho

lusty dew
#

by the username input box

blazing star
#

what

lusty dew
#

RRight beside this

blazing star
#

oh

lusty dew
blazing star
#

i see what u mean

lusty dew
#

yea

blazing star
#

well

#

what I did was I didn’t use a form. I used a button that when pressed it made a post request to the specific route, and it handled errors and such

lusty dew
#

Eh I am using bulmas form thing

#

I like the way I do it

#

So

blazing star
#

there is probably some other way but that’s the way I do it

lusty dew
#

Ok

blazing star
#

gl tho

lusty dew
#

How could I make an alert box

#

I tried

#

alert

#

and window.alert

#

but none of those want to work

lament meteor
#

u do it in a html script tag

#

and do alert('text')

lusty dew
#

Oh ok

fervent delta
#

@bright condor

#
   var callback = function(stackframes) {
    var stringifiedStack = stackframes.map(function(sf) {
        return sf.toString();
    }).join('\n');
    console.log(stringifiedStack);
};
 
var errback = function(err) { console.log(err.message); };
  
require('stacktrace-js').fromError(err).then(callback).catch(errback);```
#

I use this for getting to the exact line of error

#

works like magic

bright condor
#

ahh i see

#

oh cool

fervent delta
#

you could put this in the catch(err)

bright condor
#

will do

#

thanks man

fervent delta
#

welcome!

#

if you need me dm me

#

i gtg now!

#

👋

bright condor
#

have a good one

fervent delta
#

thnks

smoky mica
#

how to list all the names of the roles in a server

steel heath
#

JS?

#

if sojs message.guild.roles.map(r => `${r.name}`).join(", "); // Change ', ' if you want to add anything else at the end of each role name.

smoky mica
#

thank you!

#

btw how to separate them in lines?

lethal sun
#

.join("\n");

smoky mica
#

like this

violet dagger
#

yeah that

smoky mica
#

oh thanks.

lethal sun
#

no problem!

smoky mica
#

is it something like member.guild.user.roles to display 0/1/2 members|
sorry if this sounds dumb XD

lethal sun
#

Can someone help me?

I am getting this error: SyntaxError: Unexpected end of JSON input

This is my code: ```
module.exports.run = async (client, msg, args) => {
let prefixes = JSON.parse(fs.readFileSync("./prefixes.json", "utf8"));

prefixes[msg.guild.id] = { 
	prefix: args[0] 
}; 

fs.writeFile("./prefixes.json", JSON.stringify(prefixes), (err) => { 
	if (err) console.log(err) 
});

}```

dull idol
#

I have a problem.

#

I type lofi play neotic

#

Then, join the voice channel. And play the radio normally.

#

5 or 10 seconds, it leave itself

#

And, i tried 3 - 5 times.

smoky mica
#

Code?

#

What language?

dull idol
#

Discord.js: 11.4.2

#

Node.js: 10.15.0

#

ytdl-core: 0.29.0

smoky mica
#

What's the code..

#

And vanished I don't really know about that, sorry

knotty steeple
#

dont use json as a db OMEGALUL

dull idol
#
const Discord = require("discord.js")
const ytdl = require('ytdl-core')

exports.run = async (lofi, message, args) => {
  /* Unknown Message */
  if (message.channel.type == "dm") return message.channel.send("unknown error: launched in dm.")

  if (!message.member.voiceChannel) return message.channel.send("unknown error: join the voice channel.")
  if (!args[0]) return message.channel.send("unknown error: choose the streamer. `instead of 'lofi help play'`")
  const permissions = message.member.voiceChannel.permissionsFor(lofi.user);
  if (!permissions.has('CONNECT')) return message.channel.send("unknown permissions: connect.")
  if (!permissions.has('SPEAK')) return message.channel.send("unknown permissions: speak.")
  
    if (args[0] == "neotic") {
      await message.member.voiceChannel.leave()
      await message.member.voiceChannel.join()
        .then(connection => {
        
        const embed = new Discord.RichEmbed()
        .setDescription(`played: [this lofi](https://www.youtube.com/watch?v=fxn8p26WTR4) \npeople: [neotic] \nrequest: [${message.author}]`)
        .setImage(`https://i.ytimg.com/vi/fxn8p26WTR4/maxresdefault.jpg?width=1280&height=720`)
        .setColor("RANDOM")
        message.channel.send(embed);
        
        const stream = ytdl('https://www.youtube.com/watch?v=fxn8p26WTR4', { quality: "highestaudio" });
            const dispatcher = connection.playStream(stream);
        
        dispatcher.on('end', () => message.member.voiceChannel.leave());
            dispatcher.on('error', e => message.channel.send(`${e}`));;
            dispatcher.setVolume(1);
            dispatcher.setBitrate(96)
        })
        .catch(console.log);
      }
    
    if (args[0] == "chillhop") {
      await message.member.voiceChannel.leave()

      await message.member.voiceChannel.join()
        .then(connection => { ...```
lethal sun
#

@knotty steeple just using it for prefixes

dull idol
#

@lethal sun Use quick.db and it's simple.

knotty steeple
#

no

#

dont fucking

#

use it

smoky mica
#

quick.db sucks

lethal sun
#

🤔

smoky mica
#

fuck that

knotty steeple
#

idc if its only prefixes

dull idol
#

@lethal sun Oh that error, put { } in your json, like prefixes.json

knotty steeple
#

use a database

dull idol
#

No. Put that { } on your prefixes.json or something

smoky mica
#

samurai do you recommend mongoose?

earnest phoenix
#

Yo. My bot has been running for the past 3 months but it randomly shut down. Now my token is invalid and generating a new one doesn't work either. Any ideason why this is happening?

knotty steeple
#

i dont like mongodb

dull idol
#

@earnest phoenix Any error? Check your console log.

lethal sun
#

mongodb isn't good

smoky mica
#

What are some good dbs?

#

Okay

dull idol
#

quick.db, sqlite.

earnest phoenix
#

Just invalid token @dull idol

dull idol
#

or... enmap.

knotty steeple
#

ok u

#

stop

smoky mica
#

@earnest phoenix try to make a new bot and put that token

earnest phoenix
#

Yep that works

knotty steeple
#

quick.db is just a wrapper

dull idol
#

@earnest phoenix Try to regen your Client secret and your token too.

smoky mica
#

I don't get how generating new token doesn't work tho

knotty steeple
#

enmap isnt a database

smoky mica
#

yeah

earnest phoenix
#

Will try

dull idol
#

Or, you put your token in the wrong way

earnest phoenix
#

Thnx

smoky mica
#

Welcome!

dull idol
#

@knotty steeple then? use sqlite.

smoky mica
#

its "token": "token"

earnest phoenix
#

Im aware

#

Other bots work fine with the same code

smoky mica
#

Oh

quartz kindle
#

sqlite is probably the best solution for small bots

smoky mica
#

Just delete and make new one

dull idol
#

Tim's right

knotty steeple
#

i used sqlite

#

now i use mysql mmLol

smoky mica
#

whats the best db xD

quartz kindle
#

im gonna switch my bot to sqlite and use redis on my api

violet dagger
#

when you delete mysql, does it become nosql?

quartz kindle
#

wat

smoky mica
#

lmao wot

quartz kindle
#

there is no best db, it all depends on your needs and design

knotty steeple
#

there is no best db

#

tim pls

quartz kindle
#

sqlite is the best light weight sql rdbms

#

it doesnt keep a server running, doesnt eat ram

#

and its pretty fast

dull idol
#

depends your vps

quartz kindle
#

if your bot gets big though, you'll need a database server that accepts multiple connections

dull idol
#

if my bot gets big, i will shard them

quartz kindle
#

mysql and postgre are the most used full scale rdbms servers

dull idol
#

nah, jk. i need shard + new vps

earnest phoenix
#

Yep refreshed the client secret too, no success. it's still invalid 😦

quartz kindle
#

mongodb is a document-based database, it has a completely different structure

knotty steeple
#

client secret isnt needed if you are making a bot

earnest phoenix
#

Hmm

dull idol
#

@earnest phoenix where the hell you hosting on?

#

and where the hell your token on?

earnest phoenix
#

My other bots work fine. My bot just shut down yesterday

lethal sun
#

@dull idol { } didn't work

earnest phoenix
#

Is it possible that Discord just locks bots or something?

dull idol
#

@earnest phoenix as your bot not abusing the API.

quartz kindle
#

@lethal sun copy the contents of your json file and paste them in an online json linter

earnest phoenix
#

Any way to get it unlocked though @dull idol

quartz kindle
#

like this

#

it will tell you if your json file is valid

dull idol
#

@earnest phoenix Is your bot abusing the API?

earnest phoenix
#

Really doubt it but it's worth a shot

dull idol
#

Ok, here.

#

Try to make another bot. Create it one.

#

And, grab the token on your new bot.

#

Then, you paste in your config.json or process.env (idk)

#

Try it.

#

If the new bot is online, maybe your one bot is locked.

#

@earnest phoenix

earnest phoenix
#

yep that worked lol. it started fine

dull idol
#

@earnest phoenix in the new bot?

earnest phoenix
#

yeah

dull idol
#

Okay. Repeat my sentences, Maybe.

#

There's no way to unlocked your bot.

lethal sun
#

didn't work.

this is my json right now:

{
	"493347937649295371": {
		"prefix": "!"
	}
}```
quartz kindle
#

did it say your json is valid?

earnest phoenix
#

so i'm just low key fucked right now

dull idol
#

i dont need like that.

lethal sun
#

it said it's valid, yeah @quartz kindle

dull idol
#

me:

{
    "493347937649295371": "!"
}```
#

Simple. But working.

knotty steeple
#

you know what isnt working

quartz kindle
#

try changing "utf8" to "utf-8"

dull idol
#

^

#

@royal zodiac is messed up.

quartz kindle
#

you're messed up :^)

dull idol
#

:^)

earnest phoenix
#

yeah p sure my bot is locked

lethal sun
#

still same error @quartz kindle

quartz kindle
#

do console.log(fs.readFileSync("./prefixes.json", "utf-8"))

lethal sun
#

doesn't log anything @quartz kindle

dull idol
#

F.

lethal sun
#

.-.

quartz kindle
#

then your json file is empty or in the wrong folder

earnest phoenix
#

Is there a support chat for discord? i want to contact them about my locked bot

dull idol
#

maybe no

#

its kinda private

earnest phoenix
#

I really need it unlocked though

lethal sun
#

contact their support

smoky mica
#

how can i list the names of the guilds my bot is in?

#

@ me back pls ty

coral trellis
#

@smoky mica language?

smoky mica
#

discord.js

coral trellis
smoky mica
#

ty <3

earnest phoenix
#
                      ^

ReferenceError: RichEmbed is not defined
    at Client.client.on.msg (C:\Users\NOEL-TPC\Desktop\TestDiscordBot\bot.js:78:
23)
    at Client.emit (events.js:188:13)
    at MessageCreateHandler.handle (C:\Users\NOEL-TPC\Desktop\TestDiscordBot\nod
e_modules\discord.js\src\client\websocket\packets\handlers\MessageCreate.js:9:34
)
    at WebSocketPacketManager.handle (C:\Users\NOEL-TPC\Desktop\TestDiscordBot\n
ode_modules\discord.js\src\client\websocket\packets\WebSocketPacketManager.js:10
3:65)
    at WebSocketConnection.onPacket (C:\Users\NOEL-TPC\Desktop\TestDiscordBot\no
de_modules\discord.js\src\client\websocket\WebSocketConnection.js:333:35)
    at WebSocketConnection.onMessage (C:\Users\NOEL-TPC\Desktop\TestDiscordBot\n
ode_modules\discord.js\src\client\websocket\WebSocketConnection.js:296:17)
    at WebSocket.onMessage (C:\Users\NOEL-TPC\Desktop\TestDiscordBot\node_module
s\ws\lib\event-target.js:120:16)
    at WebSocket.emit (events.js:188:13)
    at Receiver._receiver.onmessage (C:\Users\NOEL-TPC\Desktop\TestDiscordBot\no
de_modules\ws\lib\websocket.js:137:47)
    at Receiver.dataMessage (C:\Users\NOEL-TPC\Desktop\TestDiscordBot\node_modul
es\ws\lib\receiver.js:409:14)```
#

why?

#
          var embed = new RichEmbed()
            .setTitle('New Update!')
            .setThumbnail("")
            .setImage("https://i.imgur.com/ukLE8HE.jpg")
            .setDescription('Update')
            .addField("New LoginScreen Design", "a better look", true)
            .setFooter('all new Updates')
            .setURL("https://i.imgur.com/ukLE8HE.jpg") // onli graphics
            .setColor(0x27ae60)
            .setTimestamp()
          msg.channel.send(embed);
          ping.sendconsole();
          msg.delete();
          break;```
fierce thorn
#

const { RichEmbed } = require('discord.js');

dull idol
#

^

lethal sun
#

How to go back a directory in node.js?

I know it's a dumb question

coral trellis
#

const yes = require("./../")

#

./ = Finds the directory you are in and then ../ goes back one

lethal sun
#

so if I want to access a file that isn't in a folder that I am currently in, I do "../prefixes.json"?

coral trellis
#

const yes = require("./../prefix.json")

lethal sun
#

Error: ENOENT: no such file or directory, open './../prefixes.json'

#

@coral trellis

coral trellis
#

Send me a screenshot of your files

#

So I can get a layout of where the prefixes.json file is

lethal sun
#
main
|-> index.js
|-> prefixes.json
|-> commands -> command.js```
#

main is the folder where index.js and prefixes.json files are

#

and the commands folder is in the main folder and contains the commands for the bot

#

so I need to go from the command file back to the main folder and define the prefixes.json file

coral trellis
#

'./../../prefixes.json'

#

Do that

fierce thorn
#

'../prefixes.json'

lethal sun
#

nope @coral trellis and nope @fierce thorn

coral trellis
#

So you are in /commands/command correct?

lethal sun
#

my command is called prefix so the command file is called prefix.js

#

command/prefix.js

coral trellis
#

./../../prefix.json

#

That should work

dull idol
#

when i start to ran the command @royal zodiac

#

lofi play neotic

#

play then leave

#

without any reasons and errors

modest spear
#

/ skip

lethal sun
#

this is what I am trying to do

JSON.parse(fs.readFileSync('./../../prefix.json', "utf-8"))```
 @coral trellis
late hill
#

You can just require json files

lethal sun
#

let prx = JSON.parse(fs.readFileSync('./../../prefix.json', "utf-8")) @late hill

#

that's what I want to do ^

late hill
#

Try just let prx = require('../../prefix')

lethal sun
#

but I want to parse it with fs

inner jewel
#

won't that cause the require cache to mess it?

lethal sun
#

^

late hill
#

Does it?

#

I always use it like that so

#

Don't know in what way it would mess up

inner jewel
#
> fs.writeFileSync("data.json", JSON.stringify({a: 1}))
undefined
> require("./data.json")
{ a: 1 }
> fs.writeFileSync("data.json", JSON.stringify({a: 2}))
undefined
> require("./data.json")
{ a: 1 }```
#
> delete require.cache[require.resolve("./data.json")]
true
> require("./data.json")
{ a: 2 }```
late hill
#

Oh if you write to it

#

Use a database like a sane person

lethal sun
#

I want to parse it, change the content of the json file and then write it

inner jewel
#

although using json as data storage is a bad idea

late hill
#

I only use json for configs so just requiring it works fine

#

Configs that can't be edited*

#

Unless changing the actual file

lethal sun
#

so, if I don't want to use json, what database should I use then?

#

except sqlite

late hill
#

Mongo !!!

lethal sun
#

no

#

not mongo pls

late hill
#

quikdb

lethal sun
#

sure

#

will check out quikdb

#

thanks

inner jewel
#

quick.db is just an sqlite wrapper

topaz fjord
#

It's just for people who are legit too lazy to learn sqlite

#

And sqlite is easy

#

@lethal sun why not mongo

#

mongo is good

late hill
#

He probably already tried it

#

But it didn't work just like sqlite

#

So he gave up

topaz fjord
#

but like it isn't even hard to set up

late hill
#

xd

rocky dagger
#

How do you create folders on GitHub???

sick cloud
#

use git and push a file in the folder

smoky mica
#

I want to split the fields/lines like that

#

I tried the code below but it doesn't work, what am i doing wrong?

.addField("Owner", message.guild.owner, true)
.addField("Region", message.guild.region, true)
late hill
#

What is your result

smoky mica
#

Just adds a new field

late hill
#

Under it?

smoky mica
#

yeah

late hill
#

Perhaps it didn't fit on screen?

smoky mica
#

Nope

late hill
smoky mica
#

It should for some AT LEAST

late hill
#

If you only have 2 fields and set them both to inline they should be next to eachother

smoky mica
#

I actually like 5 - 7 fields where i put true for all

late hill
#

And they are all displaying under eachother?

smoky mica
#

Yep

late hill
#

Show the result pepeW

#

If there's alot of text used in the field

#

It also won't be able to put another one next to it

smoky mica
late hill
#

hm

smoky mica
#

Yeah i know that

late hill
#

I'd guess the "Created on" is too big

#

Remove that one for a sec

#

And see what happens

smoky mica
#

Okay commented it out

#

Ah i gtg rn

#

I'll see about this later

#

Cya

late hill
#

👋

smoky mica
#

👋

rocky dagger
#

This doesn't work, can any1 tell me why css jsfile.forEach((f, i) =>{ let props = require(`./commands/${f}`); console.log(`${f} loaded!`); bot.commands.set(props.help.name, props); });

topaz fjord
#

What's the error

rocky dagger
#

TypeError: Cannot read property 'name' of undefined

rocky dagger
#

It's working now

smoky mica
#

@rocky dagger great job leaking your token lol

#

reset it

mossy vine
#

okay yeah thats a phishing link or some shit

#

and you just post it in a public channel

#

👏👏

pale marsh
#

@loud salmon we got a dumdum in here. I guess you'd wanna remove the github link?

loud salmon
#

@rocky dagger 👏 dont 👏 leak 👏 your 👏 token 👏

mossy vine
#

wait so since he got the dm with the known shady link from his bot ~20 minutes before he posted this repo, does that mean that the guy doing this is in this channel? or was it possibly a github token scraper?

inner jewel
#

probably a scraper

#

tokenboi likes scraping

rocky dagger
#

my bot is not on this server

#

and what is a scrapper?

inner jewel
#

that scrapper is someone looking for bot tokens on github and abusing those tokens

rocky dagger
#

Then i am not a scrapper

smoky mica
#

Madmadz be honest you copied all the code from TSC right? XD

rocky dagger
#

It's my own token and it doesn't work anymore

#

yes

#

ecsept 2 lines

amber fractal
smoky mica
#

Let me give you a tip, stop copying I mean you can copy some stuff here and there but try to learn stuff mainly

rocky dagger
#

Its my first bot ok?

inner jewel
#

i recommend you learn the language and create the bot yourself

smoky mica
#

Everyone has their first bot lol

inner jewel
#

also most tutorials are horrible

smoky mica
#

I started coding on 25 december

inner jewel
#

and get outdated pretty quickly

smoky mica
#

Agreed

#

I learnt so much from the time I started coding cause I tried experimenting and tried to make the smallest things as good as they can be

rocky dagger
#

🤦

#

but what was that bitly link?

earnest phoenix
#

any one know?
parse error: Invalid numeric literal at line 1, column 7

inner jewel
#

you have an invalid numeric literal at line 1, column 7

earnest phoenix
#

But where?

#

index.js?

inner jewel
#

at line 1, column 7

earnest phoenix
#

File?

#

Index.js

#

?

sick cloud
#

it'll tell you

inner jewel
#

how would i know

#

what you sent doesn't mention any files

earnest phoenix
#

this is the error

#

IDK

amber fractal
#

Send the surrounding text

earnest phoenix
#

there is the surrounding text?

sick cloud
#

glitch

topaz fjord
#

I don't see any code

#

So we can't help

earnest phoenix
#

nevermind

amber fractal
#

Well did you use a number as a key in a json file?

earnest phoenix
#

this is in package.json

lusty hinge
#

I’ve been searching all morning and can not find an answer: Can you begin using API features with a server after it’s established and it has users?

earnest phoenix
#

Someone knows why my bot responds to any prefix?

#

(discord.js)

inner jewel
#

because you didn't do the prefix check properly

earnest phoenix
#

how can i do that

sick cloud
#

learn js

earnest phoenix
#

i know js

inner jewel
#

maybe check if the content (hint hint) starts with the prefix

earnest phoenix
#

but that i dont know

#

XD

inner jewel
#

that's basic js

#

you should learn the language properly

earnest phoenix
#

KK

dusky marsh
#

Might be a dumb question, gonna ask nonetheless, how do I get a custom page on the DBL site, just use HTML in the field it gives you?

#

Ping me when answer ^

inner jewel
#

yes

#

html, css, js if you are cert

dusky marsh
#

Mm, how does one go about getting cert?

#

I haven't really touched the site yet, sorry if these are stupid questions.

quartz kindle
#

you fill up a form on the website

dusky marsh
#

Ah, alright, thank you, gonna take a look at that.

quartz kindle
dusky marsh
#

Thank you, appreciate it 👍🏼

loud cairn
#

i am a bot developer

raven bronze
#

Hey, so my RRS feed isn't working. Heres my code:

function rssFetch(channel, url, displayName) {
  (async () => {

    let feed = await parser.parseURL(url);
    console.log("Fetching from " + feed.title);

    let updatefile = JSON.parse(fs.readFileSync("./updates.json", "utf8"))

    feed.items.forEach(item => {
      let update = new Discord.RichEmbed()
      .setColor("#2d87d3")
      .setAuthor(item.title + " | " + displayName)
      .setDescription(item.content)
      .setTimestamp()
      .setFooter("Posted by " + item.dc)


      if(!updatefile[item.link]){
        updatefile[item.link] = {
          read: "true"
        };

        channel.send(update)

        fs.writeFile("./updates.json", JSON.stringify(updatefile), (err) => {
          if(err) {
            console.log(err);
          }
        })
      } else {
        return;
      }
    });

  })();
}``` I get no errors in console
#

and heres the rrs request function code thing

#
bot.on("ready", async () => {
  console.log(`${bot.user.username} is now online!`)
  bot.user.setActivity(`to the forums!`, {type: `LISTENING`});
  rssFetch(bot.channels.get('533506639756656650'), "http://minefracture.com/forums/global-updates/index.rss", "Global")
  rssFetch(bot.channels.get('533506639756656650'), "http://minefracture.com/forums/discord-updates/index.rss", "Discord")
  rssFetch(bot.channels.get('533506639756656650'), "http://minefracture.com/forums/hub-updates/index.rss", "Hub")
  rssFetch(bot.channels.get('533506639756656650'), "http://minefracture.com/forums/forum-updates/index.rss", "Forums")
});```
#

I've tried removing the async as well as simplifying the code

#

I've also rmoved the embed, and use console.log

#

[ this is discord.js btw]

#

This is not an error with my code! It may be with discord, still, i do need help.

#

Why isn't discord developer or any of my bots logging in?

mossy vine
#

possibly

amber fractal
#

You answered your own question

earnest phoenix
#

What happen?

amber fractal
#

Discord did a discord

earnest phoenix
#

I cant connect dev

raven bronze
#

Apparently, the Discord API is currently offline. While some bots are still online, they may have not been restarted.

earnest phoenix
#

Ok

raven bronze
#

*My new question is, how do I get my bot online, if the api is offline thinkibrrbghsfd

inner jewel
#

discord is taking a shit, you need to wait until it fixes

raven bronze
#

Time to binge Tasty and Food Network......

vernal rivet
#

is that why bots can't connect at the moment?

raven bronze
#

Apparently

vernal rivet
#

ri[

earnest phoenix
#

any services like uptime robot? Thonk

vernal rivet
#

rip*

raven bronze
#

It's a problem with Discord, not glitch or uptimerobot.

#

It's time to wait.

earnest phoenix
#

its so laggy jesus h christ

vernal rivet
#

yee\

#

its probably a connection issue

raven bronze
#

API is still offline :/

vernal rivet
#

yes, but at least they found the problem

visual zenith
#

rip most of the bots that are effected

gleaming glen
#

i still could not find a way to get a specific shard's ping

#

can someone help maybe mmlol

still gyro
#

which language?

gleaming glen
#

discord.js with commando

vernal rivet
#

might want to wait to do that if your bot is online, once its taken offline its offline till discord fixes the problem

raven bronze
#

^

gleaming glen
#

my bots seem to work normally

raven bronze
#

Mine's still broken.

vernal rivet
#

its works when its online, but if you take it offline it doesn't connect to discord, because the api response time is too high for the bot to connect, it has to be around 100 -200ms for a bot to connect with no problems, right now its around 216 which is still high, but at 12:10 it was 700ms

raven bronze
#

o-o

vernal rivet
#

yea, earlier it was over 5,000ms

#

around 9,000ms

inner jewel
#

it doesn't have to be low for bots to connect

#

the issue is that it's throwing errors

near lintel
#

lol

vernal rivet
#

well now its fine

raven bronze
#

help pls thx

(node:79149) UnhandledPromiseRejectionWarning: Error: connect ETIMEDOUT 192.185.20.112:80
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1113:14)
(node:79149) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 914)
mossy vine
#

it timed out

#

and you also didnt catch an error

raven bronze
#

...adn how can i fix that?

#

it worked for a minute and then stopped working

bright spear
#

@raven bronze it's an issue with the site you are trying to make a request to

raven bronze
#

oh

#

well it's my site

#

@bright spear i use xenforo, how can i make it work?

#

oh

#

i think i broke my website....

#

UHHHHMMMMMM

#

UHHHHHHHHMMSMSMMSMSS

#

@bright spear is it possible to break a website?

bright spear
#

Stop spamming

raven bronze
#

srry

#

I'm just worried........

#

Oh i fixed it

void mantle
#

Any errors?

#

And what language

warm marsh
#

How many fields can an embed have?

inner jewel
#

25

warm marsh
#

ah shit

#

ok

#

thanks

ruby dust
#

Seems kind of a lot tbh, IDK why you are disappointed of this number

amber fractal
#

Not to mention you can really make it more by adding a pages system. Hitting 25 is a bit excessive imo

dull idol
#

Is there any to play a radio without ytdl?

#

like using FFMPEG?

#

node.js: 10.15.0 - discord.js: 11.4.2

red hollow
#

@dull idol lavalink

#

best option

dull idol
#

@red hollow is it working on with node?

earnest phoenix
#

Hey I'm thinking to post guilds count on dbl so I add it in main file or in ready event
Is there any docs

#

nvm

#

got it

fresh pewter
#

does anyone know how to setup live count?

gilded blaze
#

Set an interval to request the stats from the API then use something like jquery to update the text

dull idol
#

I really need this.

#

:)

earnest phoenix
#

Error: Shard 0's process exited before its Client became ready.

#

what's this

gilded blaze
#

Some fatal error probs occurred on start up

dull idol
#

guys, how to solve this shit.

#

play the radio > join the vc > leave

#

node: 10.x
discord.js: 11.4.2
ytdl-core: 0.29.0

lament meteor
#

what have u done?

dull idol
#

is it because the length of the video cant handle the bot to play or somewhat?

earnest phoenix
#

If it's leaving right after, no. If its leaving mid stream then thats one of the many possibilities. If there's an error, there's something you need to fix.

dull idol
#

@earnest phoenix no error.

earnest phoenix
#

Is it leaving as soon as it joins the vc or mid way?

dull idol
#

@earnest phoenix yes, as it joins the v

#

vc

earnest phoenix
#

If you're using ytdl to stream a youtube video it's probably due to a restriction from youtube itself.

dull idol
#

yeah. in my opinion is like that too.

earnest phoenix
#

Thus, it just can't stream it. That or ytdl needs an update.

dull idol
#

my ytdl-core is latest.

earnest phoenix
#

No I mean the package itself. YouTube updates its stuff all the time, so it breaks every now and then. If its not streaming other videos then thats why. But my musicbot seems to be fine, so its just a restriction.

dull idol
#

@earnest phoenix yeah, but..

waxen blaze
#

Guys, how can my bot get unmuted? I added if(message.author.bot) return; already

zealous veldt
#

Tell a mod @waxen blaze

waxen blaze
#

ok

clear moth
#

hai i need help
since yesterday's discord API problems, my bot refuses the commands
its running, no error

void gale
#

In need of some helpers who script js I am a beginner

indigo field
#

same

waxen blaze
#

Why .svg doesn't work, when I'm using .setImage() in RichEmbed?

fierce thorn
#

.svg is banned on discord i think cause someone can make svg which will crash all clients xd

sick cloud
#

discord doesnt support svg at all

#

@fierce thorn false

waxen blaze
#

mhm, thx

modest sorrel
#

yet their emojis are in .svg

#

😮

sick cloud
#

thats twemoji

#

they get parsed

quartz kindle
#

has anyone experienced certain guilds stop sending events for no reason?

#

for example, my bot stopped responding in a specific guild, but worked normally in dms and in other guilds

#

its not sharded

#

and restarting it fixes the problem

fierce thorn
#

Wtf?

quartz kindle
#

and the logs show that there is nothing coming from that guild... it simply stops sending message events

bright spear
#

The discord outage maybe?

quartz kindle
#

probably

#

it has happened other times before

#

usually after being online for a long time (~10+ days)

sturdy delta
#

I’m trying to make my bot log who votes for my bot in a certain channel. This is used so I can reward those people 😉. Someone from an alternate server said this would work but didn’t explain it a lot:
const DBL = require('dblapi.js');
const dbl = new DBL(yourDBLTokenHere, { webhookPort: 5000, webhookAuth: 'password' }); .

#

anyone help?

soft plaza
#

That's to attach it to an existing server

#

Personally it didn't work for me

dull idol
#

ok im here xiggy

coral trellis
#

@dull idol

.atag:after {
    display: none:
}```
dull idol
#

lemme try

#

ok it's worked. Thanks bloblul

coral trellis
#

👍

earnest phoenix
#

@mellow reef

#

/giphy ,m

dull idol
#

wrong channel sir

rain rivet
mental solstice
#

too many requests sent?

slender thistle
#

The only things I can think of are:

  1. You doing some weird stuff
  2. Someone spamming commands
  3. Your bot reconnecting to Discord after the last outage
red hollow
#

@dull idol yep, lavalink supports

dull idol
#

@red hollow but its heavy.

#

I cant take it.

red hollow
#

how heavy

#

wot

quartz kindle
#

isnt lavalink supposed to be light on resources?

#

hence why people use it

red hollow
#

^

#

ffmpeg takes many, lavalink is light

mental solstice
#

@earnest phoenix you'll need a database, and decide what you want to reward them with

dull idol
#

hmm

#

@quartz kindle i mean like

#

floating

sick cloud
#

use css animations @dull idol

#

google it

dull idol
#

i've been. but.

#

It won't floating.

quartz kindle
dull idol
#

yes i use that

#

but, it won't floating

quartz kindle
dull idol
#

im gonna put that on <style> ?

#

or put on .bot-img img { .. ?

quartz kindle
#

you declare keyframes independently

#

example

#

@keyframes animationname {
    //what the animation does
}

css selectors {
    animation: animationname duration repeattimes otheroptions
}```
dull idol
#

@quartz kindle Working. but how i can remove this annoying border.

quartz kindle
#

you probably have a border somewhere

sick cloud
#

border:none

quartz kindle
#

inspect it and its parents until you find it

dull idol
#

@sick cloud not working

sick cloud
#

okay

dull idol
#

...

night imp
#

@dull idol this is a shadow

#

Iirc

rocky dagger
quartz kindle
#

what do you mean

#

you dont need to do anything with package.json

#

its just a control file for npm

rocky dagger
#

I am using this line in my botconfig.jscss "author": "Madmadz16",

quartz kindle
#

just write it in your botconfig, no need to require package

mossy vine
#

uh

#

afaik you can import it as a regular json file

#

const packageFile = require('./package.json')

quartz kindle
#

hes already doing that

#

but not actually using it for anything

rocky dagger
#

Error: Cannot find module './package.json'

#

But then I get that error

quartz kindle
#

idk, but its way easier to just not use package.json

#

you dont need it

#

just let it be there, no need to require it

faint wyvern
#

Hi All!!!

mossy vine
#

@rocky dagger can you send your file tree or whatever its called

rocky dagger
mossy vine
#

huh, i guess you cant use pakckage then

quartz kindle
#

as i said, you dont need it

#

just remove it

#

lol

#

from your code, not from your folders

slate kayak
bright spear
#

Looks like you're using let somewhere where you can't use let

wide ruin
#

(node:4614) UnhandledPromiseRejectionWarning: Error: Incorrect login details were provided.

#

the details are correct

zealous veldt
#

That means your token is incorrect

#

that error doesn't happen unless it's not correct

wide ruin
#

ill regen but i definitely did it right

amber fractal
#

probably didnt copy the entire thing.

void gale
amber fractal
#

node index.js

#

try that

pale marsh
#

And press enter

amber fractal
#

Lol

#

That too

pale marsh
#

He doesn't seem to be doing that lol

void gale
#

it eroded 🤦

pale marsh
#

What error did you get?

void gale
#

SyntaxError: Unexpected identifier

mossy vine
#

then its most likely an error with your code

void gale
#

lemme restart my terminal

amber fractal
#

That wont help

#

The error wont go away by restarting it

void gale
#

No but if I go over my code again

#

Okay, so when I put node . its supposed to bring up "Testing" to make sure the console responds

pale marsh
#

Okay and?

amber fractal
#

If you got unexpected identifier, the error is iin your code

void gale
amber fractal
#

You didnt hit enter

void gale
#

look

#

thats how mafia works

pale marsh
#

You're writing this in index.js right?

void gale
#

mhm

pale marsh
#

Try node index.js instead

void gale
pale marsh
#

Did you save the file?

void gale
#

of course

pale marsh
#

Take a screenshot of the whole screen

void gale
pale marsh
#

Get me a screenshot of index.js

void gale
#

(just changed to pacage.jsn

pale marsh
#

And you have definitely not saved index.js smh

void gale
amber fractal
#

ctrl s

zealous veldt
#

ctrl s

pale marsh
#

Hit Ctrl+S

#

God

#

Then try node index.js again

void gale
#

forgot to save project,jsn

amber fractal
#

..?

late hill
#

Don't code when you're stoned 👏

void gale
#

who are you working with

#

thats it

#

covering my face cam

late hill
#

Does it work now

#

And node . should work if your package.json is set up correctly

void gale
#

ye

pale marsh
#

Looks like it should be

void gale
#

et

lyric talon
#

Guys, could you help me ?
I'm trying to create an interative help system that when someone reacts with a specifc emoji (located at a list of specifics emojis), my bot send another message with something.
I'm doing something wrong that i don't know what is this.

pale marsh
#

You're checking the message itself. Check its reactions instead

void gale
#

(node:6392) UnhandledPromiseRejectionWarning: Error: Incorrect login details were provided.
at WebSocketConnection.client.ws.connection.once.event (C:\Users\adamv\OneDrive\Documents\HelpfulBot\node_modules\discord.js\src\client\ClientManager.js:48:41)
at Object.onceWrapper (events.js:276:13)
at WebSocketConnection.emit (events.js:188:13)
at WebSocketConnection.onClose (C:\Users\adamv\OneDrive\Documents\HelpfulBot\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:390:10)
at WebSocket.onClose (C:\Users\adamv\OneDrive\Documents\HelpfulBot\node_modules\ws\lib\event-target.js:124:16)
at WebSocket.emit (events.js:188:13)
at _receiver.cleanup (C:\Users\adamv\OneDrive\Documents\HelpfulBot\node_modules\ws\lib\websocket.js:220:12)
at Receiver.cleanup (C:\Users\adamv\OneDrive\Documents\HelpfulBot\node_modules\ws\lib\receiver.js:535:15)
at WebSocket.finalize (C:\Users\adamv\OneDrive\Documents\HelpfulBot\node_modules\ws\lib\websocket.js:206:20)
at TLSSocket.emit (events.js:193:15)
(node:6392) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:6392) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

#

i got this error

#

i hate my life

pale marsh
#

Check your token

void gale
#

I just did I

pale marsh
#

It's your token

void gale
#

okay i just had to regenerate

#

ooof

pale marsh
#

Copy it precisely

void gale
#

yea i even made it visible to make sure sd

lyric talon
#

Kef

inner jewel
#
@client.event
async def on_message(message):
    if message.content.startswith('$thumb'):
        channel = message.channel
        await channel.send('Send me that 👍 reaction, mate')

        def check(reaction, user):
            return user == message.author and str(reaction.emoji) == '👍'

        try:
            reaction, user = await client.wait_for('reaction_add', timeout=60.0, check=check)
        except asyncio.TimeoutError:
            await channel.send('👎')
        else:
            await channel.send('👍')```
#

reaction in list -> str(reaction.emoji) in list

lyric talon
#

Yes, i did that

#

But still doesn't work

#

I'm really angry GWqlabsHyperRage