#development

1 messages ยท Page 765 of 1

twin pendant
#

Oh, the <@id> stopped working for me, might have to double check

lilac wharf
#

@earnest phoenix @earnest phoenix (that's using both <@> <@!>)

supple raven
#

isn't there a thing where you can do ```java
event.getAuthor().getAsMention()

#

but thats for jda, im not sure if thats in discord.js

valid frigate
#

ok right can anyone explain why <@ and <@! is inconsistent

lilac wharf
#

Pretty sure it's something like this for DJS @outer niche

_client.on('message', message => {
  if (message.isMemberMentioned(_client.user)) {}
});```
outer niche
#

I am the python

hoary elm
#

I have a question for somebody.

My bot has a meme command which finds and sends the memes via a Reddit/subreddit link

Every now and then my bot will throw this error

UnhandledPromiseRejectionWarning: HTTPError: Response code 429 (Too Many Requests) I am trying to get the bot the throw that error in a message instead of in the console so that when it happens and the meme doesn't send people know why and not think the bot is broken when in all reality the website is really just receiving to many requests.

lilac wharf
#

D.JS right?

hoary elm
#

Mhm

lilac wharf
#

okay on the catch (I assume you're doing a try catch with an error logging)

replace console.log(error) with message.channel.send('give us some time to get our memes sorted out');

sudden geyser
#

you can just handle the error through whatever way you're supposed to (e.g. callback or promise) and use the .message property on the error

valid frigate
#

add a cooldown to your bot

#

eg 1 meme maybe every 10 seconds or so

hoary elm
#

There is a default cooldown of 10s

valid frigate
#

check reddit's api ratelimits

outer niche
#

How can I convert this to work with @


wooden lance
#

as in the prefix just being @?

outer niche
#

Like @bot

valid frigate
#

if your meme command is being used simultaneously by a lot of users, it will give that error often

wooden lance
#

thonk

#

what language?

hoary elm
#

Yeah I figured @valid frigate thanks for your help anyways ๐Ÿ˜

outer niche
#

Python

valid frigate
#

oh ok no problem man

wooden lance
#

e cant help u there. im terrible at python lol sorry

outer niche
#

Lol

hoary elm
#

Lol python ๐Ÿคฎ

lilac wharf
#

@hoary elm which sub-reddit are you using if you don't mind me asking

wooden lance
#

i like js

hoary elm
#

@lilac wharf umm Reddit .com/r/memes

lilac wharf
#

Don't use reddit's api to get it rather the json to prevent issues like that

hoary elm
#

Oh the full setup is like this got('https://www.reddit.com/r/memes/random/.json').then(response => { let content = JSON.parse(response.body); let permalink = content[0].data.children[0].data.permalink; let memeUrl = `https://reddit.com${permalink}`;

#

@lilac wharf

lilac wharf
#

Oh you're not limiting the query that's why I believe...

split hazel
#

You can always consider caching alot of memes and make the cache expire every once a while and get the memes from api again and update cache

hoary elm
#

Hmm okay thanks for your suggestions lady's and gents ๐Ÿ˜

supple raven
#

wait just asking, can i do the same thing with java?

lilac wharf
#

I'd suggest something like this:

const sf = require('snekfetch');
const { body } = await snekfetch.get('https://www.reddit.com/r/memes.json?sort=top&t=week').query({ limit: 800 });

const allowed = message.channel.nsfw ? body.data.children : body.data.children.filter(post => !post.data.over_18);
if (!allowed.length) return message.channel.send(`sorry but it seems like we're out of memes`);

const randomInteger = Math.floor(Math.random() * allowed.length);

let memeEmbed = new discord.RichEmbed()
.setAuthor(`Memes Example`)
.setImage(allowed[randomInteger].data.url)
.setTimestamp()
.setColor('#3e3a11');

message.channel.send(memeEmbed);```
#

@hoary elm

#

Despacito unfortunately I'm not able to answer that question with 100% certainty but to the best that I know I don't believe so since java doesn't have the same availabilities as javascript does with packages such as snekfetch etc...

supple raven
#

Thanks anyways!

hoary elm
#

Yeah no I don't believe it would be the same

#

Im sure it's possible but not the same setup

#

And thanks @lilac wharf

split hazel
#

you can always base the code when writing a java version

outer niche
#

Would this work
Bot(command_prefix=commands.when_mentioned_or('!')

sudden geyser
#

try it out and see (but fix the missing ')' first)

outer niche
#

So that

warm marsh
#

Missing ")"

outer niche
#

bot=commands.Bot(command_prefix=commands.when_mentioned_or('!'))

#

That

warm marsh
#

Yea

outer niche
#

Ok

#

Thx

shadow copper
#

How do I make my bot send a message in a channel that it just created?
message.guild.createChannel('๐ŸŽ‰party๐ŸŽ‰', { type: 'text' })

west raptor
#

Guild#createChannel() returns a promise of a Channel (CategoryChannel, TextChannel, VoiceChannel)

#

So you could await it for use the .then() method @shadow copper

shadow copper
#

Okay. Thank you!

zealous veldt
#

@ะฟะฐั€ะธะผัะบ#2150 this channel is English only

plucky briar
#

Hey so im trying to get my Bot auth on a pop up but when i click it it says "UNKNOWN_ERROR"

earnest phoenix
#

10/10 lots of information

plucky briar
#

ooh nm i had a space after the ? in the url ๐Ÿคฆโ€โ™‚๏ธ

#

but now, how do i close it after it being added?

glad charm
#

We have no idea what you're on about, how about explaining what you're trying to have it do, give a small example and then an error message if there is any.

plucky briar
#

oh ye pardon me, so if you press a button on my website you get a pop up to add the bot, once you added it it will close the pop up by itself.

#

i've done the first pop up that you can add it but it wouldn't close on its own

glad charm
#

Are you using redirect uris?

plucky briar
#

yes, but i asked that yesterday here but it didn't work

green kestrel
#

is there a way to force a field in an embed to align left or right?

#

i highlighted how the uptime field seems to have alignment centre, colspan 2

#

i could put an empty field after the uptime field, which might 'force' it... but it seems like a hacky solution

quartz kindle
#

i dont think there's anything you can do about that

warm marsh
#

You could add an empty field in between those two all though the spacing might still be broken.

restive furnace
#

just use \n so you can decide where you can put the info

warm marsh
#

That's fine until the data changes into something longer then everything breaks again.

green kestrel
#

lol... this should be funny. im letting sporks consume an encyclopaedia of world history and greys anatomy.

lusty quest
#

what are you using for the graph?

green kestrel
#

php pchart, @lusty quest

lusty quest
#

thx

green kestrel
#

on an unrelated note

#

i just found a crashbug in my bot, oops

#

it had been bombing out about twice a day for about 3 or 4 days, but nobody had noticed as it instantly comes back again

#
                /**
                 * Escape all parameters properly
                 */
                for (unsigned int i = 0; i < parameters.size(); ++i) {
                        char out[parameters[i].length() + 1];
                        mysql_real_escape_string(&connection, out, parameters[i].c_str(), parameters[i].length());
                        parameters[i] = out;
                }

that char out[] is too small to hold an escaped version of the parameter if any characters are escaped
it needs to be [parameters[i].length() * 2 + 1]
to accommodate for the worst case scenario of every character being escaped with a leading "\", plus the null terminator
i hate C.

blissful scaffold
#

Automatically restarting bots are the best ^^

#

As long as they don't get stuck in a crash loop

green kestrel
#

lol yeah you have to take precautions

#

i have a 30 second delay on it

#

which in theory makes it impossible to send enough IDENTIFY in a day to get the key revoked

blissful scaffold
#

My bot tries to restart 3 times before giving up and then trying again after an hour

green kestrel
#

if it was stuck in a real loop though, reconnecting over and over i'd notice it within a couple of hours

#

thats a good plan

blissful scaffold
#

My bot also sends me a dm when it restarts

green kestrel
#

i have mine set up to do more than that, but it had broken

#

heres my restart script

#
# run gdb in batch mode to generate mail the stack trace of the latest crash to the error_recipeint from config.json
/usr/bin/gdb -batch -ex "set pagination off" -ex "set height 0" -ex "set width 0" -ex "bt full" ./bot `ls -Art *core* | tail -n 1` | grep -v ^"No stack."$ | mutt -s "Sporks Bot rebooted, stack trace and log attached" -a log/aegis.log -- `/usr/bin/jq -r '.error_recipient' ../config.json`
#

basically, every time it restarts, get a stack trace from the last core dump, email it off to me using mutt with the last 5mb of log file attached

#

but the mutt command was broken, so i wasnt being emailed

blissful scaffold
#

My restart script also checks every 10 minutes if I pushed a new jar file to the server and restarts the bot when there is a new version of the bot

green kestrel
#

ah

#

thats a good idea too

#

i decided to go with a modular approach so i just issue a command to unload the module i want to upgrade, recompile it, and issue another command to reload it

blissful scaffold
#

I thought about doing it that way too, but restarting is quick enough and I am lazy xD

green kestrel
#

currently teaching my bot fiction

#

its just eaten two encyclopaedias and greys anatomy

earnest phoenix
#

๐Ÿ˜ณ

green kestrel
#

i found a language parser so im using public domain works from project gutenberg as seed material for the chat bot

#

๐Ÿ˜„

earnest phoenix
#

give it as many romance novels as you possibly can

green kestrel
#

haha, theres jane austin on there

#

right now its eating huckleberry fin and frankenstein

warm marsh
#

You're using machine learning in a bot?

green kestrel
#

not exactly, i wouldnt be so bold as call it that

#

its a simple pattern analysis that identifies sentences that declare a statement

#

so any "a is b", "b are c", "n was m" etc

earnest phoenix
#

there's a word/phrase for that kind of thing but I don't remember what it is

green kestrel
#

it generally learns from discord chats, but i decided to feed it fiction

#

๐Ÿ˜„

#

if you do remember let me know, because i dont know it lol

#

@warm marsh its basically designed to learn transparently, so you can tell how it learned things. cleverbot doesnt learn, but can say lots of things. other bots (not seen any yet but im sure they exist) may learn but not transparently

earnest phoenix
#

cleverbot learns doesn't it

warm marsh
#

Fair. My heads in the clouds so don't understand.

#

I'll look back after will probably understand or at least be able to look it up.

green kestrel
#

@earnest phoenix not directly no

#

i think they seed it from logs

#

so that they can vet and curate what it has in it

#

you cant go "cleverbot remember i am a banana" and have it remember that, it can establish sessions though im told

vague chasm
mossy vine
#

5xx means it isnt your fault

west spoke
#

^

#

I would send dblfaq but mods dont like it

empty owl
#
  let updatelogMessages = bot.channels.get('652683584733184000').fetchMessages()
  console.log(typeof updateLogMessages)
  let map = updatelogMessages.map(message => message.content)
  console.log(updatelogMessages)
  let updatelogArray = map.join("\n")
    let uLembed = new Discord.RichEmbed()
      .addField("Update Log", updatelogArray)
    message.channel.send({embed: uLembed})
      ``` map isnโ€™t a function, discord.js both console logs return undefined
surreal wagon
#

.fetchMessages() is an asynchrous method so you should use await or .then

empty owl
#

wdym

#

so it takes time

#

?

west spoke
#

no

#

await means it is on another thread

#

I believe

empty owl
#

Doesnโ€™t it mean it waits for it

#

or something

west spoke
#

no

surreal wagon
#

.fetchMessages() return a promise

empty owl
#

Oh

surreal wagon
#

Make thus

#

This

#
bot.channels.get('652683584733184000').fetchMessages().then(updatelogMessages => {
  let map = updatelogMessages.map(message => message.content)
  let updatelogArray = map.join("\n")
  let uLembed = new Discord.RichEmbed()
    .addField("Update Log", updatelogArray)
  message.channel.send({ embed: uLembed })
})```
empty owl
#

yea ok thanks

#

So like the .edit thing

west spoke
#

Yeah

#

Wrong channel

surreal wagon
#

Ok

earnest phoenix
#

I have some problems with this code : ```js
try {
var response = await msg.channel.awaitMessages(msg2 => msg2.content > 0 && msg2.content < 11, {
maxMatches: 1,
time: 10000,
errors: ['time']
});
} catch (err) {
console.error(err);
return msg.channel.send('No or invalid value entered, cancelling video selection.');
}

#

if I put a video link he sais me handleVideo is not definied(line 62)

sudden geyser
#

well you're comparing a string to an integer as a start apparently js finds that okay

earnest phoenix
#

and for handleVideo is not definied?
I see a lot of people uses it likle me and works, but why it happens to me?

late hill
#

jesus

#

you would have changed the string to an int

#

if needed

#

not change both of them to a string

sudden geyser
#

I think you're looking for max instead of maxMatches on master

late hill
#

what do you mean with it logging message properties

#

and this

if I put a video link he sais me handleVideo is not definied(line 62)

#

handleVideo indeed isn't defined in any of the code you provided

warm marsh
#

Anyone know brian?

unkempt ivy
#

who's brian

earnest phoenix
#

which brian

frozen cedar
#

Does anyone know joe

slate wave
frozen cedar
solemn fern
#

What is the primary language that you program your bots in?

earnest phoenix
#

english

solemn fern
#

lol

earnest phoenix
#

whatever language you know best

#

see if it has a library

#

most commonly seen are js and python

#

maybe java is 3rd idk

solemn fern
#

I was trying to decide if I wanted to learn a new programming language specific for this task. I have done some programming in C++, but wasn't sure that would cut it.

slate wave
#

Thats an interesting dilemma

solemn fern
#

Hence why I asked

late hill
#

It's your choice, are you good at C++, can you find a library that seems simple to you to use.
Do you want it to be easy? Do you want to improve your C++ skills? Do you want to learn a new language?

solemn fern
#

Always down to learn a new language. Always want to improve the skills I have. Easy isn't always better, but does make the frustration levels less. I am not sure about the library section of it.

broken jay
#

Anyone know library for C++ that have something like JS's Eris register_command? or something, just I need lib that have good in-build commands and args handling.

mossy vine
#

if you are using C++ you might as well just write your own mmLol

solemn fern
#

I did think about that

broken jay
#

I'm pretty new in C++...

solemn fern
#

@broken jay I am not an expert by any means, but I will probably be building one if you want to co-op on it.

broken jay
#

Maybe, but I try first 100% complete Codecademy C++ course...

slender thistle
#

Documentation

mossy vine
#

you use it with a discord bot the same way you would otherwise

#

mess around with the mongo shell before implementing it in your code

#

just like a bot, it wont

blissful scaffold
#

the machine that is hosting your database/bot needs to be on all the time

unique nimbus
#

It is recommended to get a VPS

mossy vine
#

however you can use mongodb atlas

unique nimbus
#

yeet

mossy vine
#

"free"

amber fractal
#

Its tryable for free.

unique nimbus
#

limited time most likely

#

idk tho

#

or limits

mossy vine
#

i think its only storage limitations

#

512mb

earnest phoenix
#

can someone help me

#

With?

#

What code do you work with

#

i got MEE6 but how do i make a leveling system

#

Are you making a bot or need help with their website

#

l 0 l

#

I O I

#

when you dont know what the person is saying Are you making a bot or need help with their website
l 0 l

#

Are you creating a bot with code

#

Like mee6

#

yes

#

Ok so you want help with leveling

#

when people are too smart n u dont know what they are saying oldEyes waitWhat oof weirdsip

#

yes

#

Quick question

#

What code do you use

#

Python, javascript?

#

java

#

K I'm 0% of a help then

#

I use python

#

kek

#

i'll get python

#

TELL ME

#

no

#

wait

unique nimbus
#

Wait are you asking for MEE6 support?

earnest phoenix
#

ask this man

#

yes

unique nimbus
earnest phoenix
#

wait

#

ima go on youtube i dont get a fucking thing u guy's say

unique nimbus
#

what

#

You are asking for help for MEE6 correct?

slender thistle
#

This server is for top.gg, you should contact MEE6 support on the server sent above

earnest phoenix
#

yes'sz

#

yt SUCKS

#

its not help

unique nimbus
#

YouTube can help

#

It is not for everyone though

earnest phoenix
#

you want to code a command to make a potato emoji

#

well no

#

you gotta subscribe

#

like

#

jump out a f-13

grim aspen
#

wait

slender thistle
#

YT is generally not a good idea for Discord API stuff

earnest phoenix
#

yes

mossy vine
#

im sorry, what the fuck do yall not understand about i got MEE6 but how do i make a leveling system

grim aspen
#

@earnest phoenix we aren't allowed to spoonfeed, but you should probably rely on a certain type of database to store users with variables

#

well you know

#

wait

earnest phoenix
#

You should probably learn java or a type of code before you jump to making a discord bot levelling system

grim aspen
#

are you asking for help with how to enable level up messages with mee6 or are you trying to code a similar system yourself?

earnest phoenix
#

He is trying to make a levelling system

#

i asked

earnest phoenix
#

with code

#

he doesn't know

#

LOL

mossy vine
#

@earnest phoenix you would be perfect as tech support cuz youre just as clueless as one

earnest phoenix
#

thanks

#

i take that so close to my heart

#

I'll remember that for 2 fortnights

#

youtube is the best

#

i got it

#

ez

slender thistle
#

did you read what I said about YT

earnest phoenix
#

no

#

but it actually worked

#

damn yt is amazing

slender thistle
#

๐Ÿค”

tiny viper
#

hey any prefix ideas that aren't stupid

slender thistle
#

w/e

earnest phoenix
#

it worked tho thts all i care

#

BTW we aint supposed to talk here

slender thistle
#

<botname><some_character>

tiny viper
#

i said 'that aren't stupid'

slender thistle
#

Play around, get some prefixes as options and ask people

tiny viper
#

I meant ones that you don't have to break a hand to type

mossy vine
#

a

#

no need to break a hand

#

isnt widely used

#

arguably not stupid

tiny viper
#

maybe

slender thistle
#

stupid is somewhat subjective

tiny viper
#

but will mess up command names

#

ahelp

#

akick

#

ainfo

#

ainvite

#

anyone using ] as prefix?

mossy vine
#

yes

#

but "you gotta break a hand to type" that

hoary elm
#

if you want something simple you could always set up aliases @tiny viper

mossy vine
#

wrong guy to ping

hoary elm
#

Oof sorry

#

๐Ÿคฆ๐Ÿปโ€โ™‚๏ธ

#

Just noticed that

tiny viper
#

hmm

hoary elm
#

Aliases help make commands shorter so a alias for the help command would be "h"

slender thistle
#

ah being prefix + alias for help command

#

sounds interesting

tiny viper
#

but you could just say ah in conversation

#

obvs could change the key...

#

but still problems like

#

o info

#

would become oi

#

o kick would be ok

#

and you could kick someone lol

slender thistle
#

tbh mention prefix and something like %

hoary elm
#

Lol see it would make it interesting but I see what you mean about could be problematic

#

I honestly usually use mention prefix or something simple like / to avoid people typing in chat triggering the bot.

tiny viper
#

% is used

#

by AppBot

hoary elm
#

So you want something unique?

tiny viper
#

something to avoid getting 'common prefix' on this server anyway

hoary elm
#

So what about like "`"

#

Or "*"

tiny viper
#

maybe

mossy vine
#
  • is common
tiny viper
#

preferrably something that doesn't need shift

hoary elm
#

Really? Never seen it ๐Ÿค”

tiny viper
#

so maybe [ or ]

mossy vine
#

ล doesnt need shift mmLol

#

neither does รŸ

hoary elm
#

Now that's unique

tiny viper
#

maybe welsh LL

broken jay
#

Is there any amount limits when uploading img to Discord (attachment)? Like X times per X minute.

tiny viper
#

i should discriminate on anyone not using en_GB keyboard layout

#

im totally not nationalist

#

๐Ÿ‡ฌ๐Ÿ‡ง

slender thistle
#

@broken jay you send messages, so by defdault 5/5s but again, ratelimits are not static

tiny viper
#

someone join my amazing radio

broken jay
#

Ok thx

blissful scaffold
#

If all bots use a prefix then the best thing would be to not use a prefix at all thinksmart

quartz kindle
#

just use mention as the only prefix

ruby talon
#

Or mention as second prefix & a customizable prefix ยฏ_(ใƒ„)_/ยฏ

copper cradle
#

yea don't join his amazing radio

empty owl
#

hey

#

?eval message.channel.send(bot.channels.get("652683584733184000").lastMessage.content)

#

why does taht work once

#

then never agin

#

this is my code btw

  let content = bot.channels.get('652683584733184000').lastMessage.content
  let embed = new Discord.RichEmbed()
    .addField("Change Log", content)
  message.channel.send(embed)
#

it used to do promise pending but idk now

#

or does it need to cached messages or somethign

quartz kindle
#

lastMessage will only have a message if its in the cache

empty owl
#

oh

quartz kindle
#

else it returns null

empty owl
#

cached means basically after restart

quartz kindle
#

cached means the bot received a message from that channel and saved it in the cache

empty owl
#

oh ko

#

thanks

summer torrent
#

use fetchMessages

#

for this

empty owl
#

ok

empty owl
#

hey all, im doing stuff with regex

   
 let regex = /@someone/gi;
   
   let finalMessage = message.content.replace(regex, `<@${person}>`);

   

   
   
if (message.content.includes(`${pPrefix}someone`)) {
 
 var replace = `${pPrefix}someone`;
var re = new RegExp(replace, "g");
  finalMessage = message.content.replace(re, `<@${person}>`);
}```
    
SyntaxError: Invalid regular expression: /?someone/: Nothing to repeat
the normal prefix is ?
i did a \ before but it still doesnt seem to work
sudden geyser
#

you need to escape the question mark as it makes the point optional.

empty owl
#

how would u do that

sudden geyser
#

with a backslash. You said you did, but I doubt it was correct: /\?someone/yourflags

empty owl
#

oh

#

but im doing it like this

#

var replace = ${pPrefix}someone;

#

so do i just put a \ infront of ${pPrefix}

#

@sudden geyser

sudden geyser
#

Try escaping it twice (using two \\), that may pose a problem for different prefixes.

empty owl
#

ok thanks

#

wdym for different prefixes

sudden geyser
#

like the length or whatever the prefix may be

empty owl
#

oh okay thanks

oak minnow
#

im trying 2 make a bug report command something like -bug bot this is the bug. So something like bot is the location and this is the bug is the reason. Im making an embed so it has a field were it only states the bug and then another field for the reason. I am not able 2 have it show only 1 word is pretty much my problem. Code >>https://hastebin.com/sacolideji.js

valid frigate
#

can you rephrase your problem

oak minnow
#

oh ya

valid frigate
#

sorry it was kind of confusing

oak minnow
#

pretty much im trying 2 have the bot say the first word in the command in 1 field in the embed, then the rest of the words in another field

#

if that makes any more scence

valid frigate
#

oh yeah

#

so the first field should be the location

#

and the second, description of the bug?

oak minnow
#

yes

#

thats a much better explination

valid frigate
#

mhm

oak minnow
#

something like this happens

valid frigate
#

ah

oak minnow
#

ya

valid frigate
#

so you're having a problem with field 2

#

mk

oak minnow
#

correct

valid frigate
#

well

#

i notice in line 20 you're using words.slice(0).join(' ') which seems unncessary

#

since words is already an array, you can just get the first word by using words[0]

oak minnow
#

ok.

valid frigate
#

so in your if comparison, you could replace if (!location) to if (!words[0])

#

or if (words.length == 0)

oak minnow
#

ok. thanks!

outer niche
#

is thar not a module named Bot

earnest phoenix
#

I may be braindead but waitWhat

slender thistle
#

Same

solemn fern
#

what kind of project would you think this classifies as?

outer niche
#

1ModuleNotFoundError: No module named 'Bot'

slender thistle
#

Show the line where your code is erroring out

fleet chasm
#

did you mean to install a bot library @outer niche?

slender thistle
#

Let's not confuse them

fleet chasm
#

im just confused on whats happening, so ill leave it alone

slender thistle
#

They most likely want the Bot class provided by discord.py commands extension

#

I doubt there's a Bot library that they would need

outer niche
slender thistle
#

How do you think you use Bot if it's a class under the commands module you're importing

outer niche
slender thistle
#

how the fuck

#

Do you understand how import works

outer niche
#

eeeee not rilly

fleet glen
#

Nice

slender thistle
#

Why don't you take a step back and get used to basic Python stuff first

#

just an idea

outer niche
slender thistle
#

Are you trying to instantiate Bot anywhere in that file

wicked pivot
#
bot.on('messageReactionAdd', (reaction, user) => {
                    let server = message.guild
                    if(reaction.emoji.name === "โœ…" && user.id !== bot.user.id){
                        console.log('marche')
                        reaction.remove() \\ <<<< here
                    }else if(reaction.emoji.name === "โŒ" && user.id !== bot.user.id){
                        let channelserver = server.channels.find(c => c.name == message.author.id && c.type == "text")
                        channelserver.send("Channel fermer").then(c => {
                            channelserver.overwritePermissions(message.author, {
                                SEND_MESSAGES: false,
                                READ_MESSAGES: false
                            })
                        })
                    }
                })```is there any way to remove all the reactions?
stable horizon
#

Ngl that hurt my eyes

slender thistle
#

I had an internal existential crisis just by looking at that, dw

atomic shuttle
#

Error

sudden geyser
#

@wicked pivot are you on stable or master, and are you trying to remove every reaction off the message, all reactions for an emoji, or a single reaction

wicked pivot
#

all reaction the message

#

@sudden geyser

sudden geyser
#

check out the docs for <MessageReaction>.message, there's something about clearing all reactions depending on your version: https://discord.js.org/#/docs/main/master/class/MessageReaction?scrollTo=message

minor kelp
#

Why am i getting: dbl.errors.Unauthorized: Unauthorized (status code: 401)
I have my token where it says to be

slender thistle
minor kelp
#

Alright!

#

Thanks

slender thistle
#

๐Ÿ‘

minor kelp
#

Why was it causing that?

#

got it

slender thistle
#

I don't know the cause for that but it seems to be API-side

minor kelp
#

Weird.

#

If it's needed

#

This is the full Traceback

#
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x04FCC8B0>
Task exception was never retrieved
future: <Task finished name='Task-1' coro=<DBLClient._auto_post() done, defined at C:\Users\azerb\AppData\Local\Programs\Python\Python38-32\lib\site-packages\dbl\client.py:84> exception=Unauthorized('Unauthorized (status code: 401)')>
Traceback (most recent call last):
  File "C:\Users\azerb\AppData\Local\Programs\Python\Python38-32\lib\site-packages\dbl\client.py", line 87, in _auto_post
    await self.post_guild_count()
  File "C:\Users\azerb\AppData\Local\Programs\Python\Python38-32\lib\site-packages\dbl\client.py", line 130, in post_guild_count
    await self.http.post_guild_count(self.bot_id, self.guild_count(), shard_count, shard_no)
  File "C:\Users\azerb\AppData\Local\Programs\Python\Python38-32\lib\site-packages\dbl\http.py", line 169, in post_guild_count
    await self.request('POST', '/bots/{}/stats'.format(bot_id), json=payload)
  File "C:\Users\azerb\AppData\Local\Programs\Python\Python38-32\lib\site-packages\dbl\http.py", line 141, in request
    raise errors.Unauthorized(resp, data)
dbl.errors.Unauthorized: Unauthorized (status code: 401)
slender thistle
#

I highly doubt the issue is in the code if regenerating the token does the trick ๐Ÿคทโ€โ™‚๏ธ but thanks nonetheless

minor kelp
#

Didn't work btw

#

I don't know what's causing this.

slender thistle
#

Could you send me the full code in DMs if possible?

minor kelp
#

Sure

golden condor
#

Can someone help me out?

#

I am tryna create a music bot

lilac wharf
#

In what language Cxllm?

golden condor
#

discord.js

lilac wharf
#

Okay before I actually get into this I have another question...

Do you actually know how to code in javascript & discord.js or are you expecting to be fed the code?

golden condor
#

I actually know how to code

#

I coded 3 bots so i think i know

#

I just don't know which dependencies to use

#

I've heard lavalink is quite good, but i can't get it to work

#

I've tried ffmpeg

#

And lots of others

vital lark
#

you know lavalink requires JDK 11 to be installed

golden condor
#

JDK 11?

vital lark
#

Java Development Kit

golden condor
#

Probably the issue then

#

I got no idea how to use lavalink

#

i know how to use discord.js obviously, just never used lavalink

vital lark
#

well

lilac wharf
#

Take a read through that.

vital lark
#

it requires the server to be running

golden condor
#

The what

vital lark
#

the lavalink server

golden condor
#

My brain

vital lark
golden condor
#

How do I get a lavalink password?

vital lark
#

you make your own

#

it can be anything you set

golden condor
#

I am very confused

vital lark
#

what are you confused on?

#

I'll help you towards the right direction

golden condor
#

Everything

vital lark
#

tell me exactly

golden condor
#

Maybe not eveyrthing

#

How do I install it?

vital lark
#

you'll need to install JDK on your machine

golden condor
vital lark
#

just Google jdk install and it should redirect you to Oracle's page to install

golden condor
#

It installed without it

vital lark
#

well

#

it won't work without the server running

lilac wharf
#

That's the NPM edition of it

#

You'll need the JDA version to run the server then the JS package version to work with javascript.

vital lark
#

you don't need the JDA version

viral spade
#

Hello,
please can someone point me the way, how do i distribute my bot?

The bot is running in a container already, and i think i should learn kubernetes for distributing it, but how do i tell the sharding manager what node to start what shards on? Also, should i make 1 shard per container or 1 container with a sharding manager?

Help is much appreciated if anyone has knowledge on this!

vital lark
golden condor
#

@viral spade I use heroku to host my bots

vital lark
#

it's literally an http server running locally emitting events with a websocket

golden condor
#

My mind is aaaaaaaaaaaaaaa

vital lark
#

which the lavalink package does automatically

golden condor
#

Holy crap this is so confusing

vital lark
#

when the server is running

viral spade
#

@golden condor but they run on one flexible virtual machine i guess?

golden condor
#

Nope

#

Upload all your files to github

#

For the bot

viral spade
#

nah man is not public

golden condor
#

You can make it private on github]

lusty quest
#

usually sftp should work too

golden condor
#

It's the best hosting option for free

lusty quest
#

nothing is free. Free hosters like to make a copy of the files on the server and maybe use them on theyre own

vital lark
#

eh not really

#

plus I don't think you can run Lavalink on Heroku

golden condor
#

It is literally just an online terminal that auto runs node index.js for you

vital lark
#

well

#

it'll cancel after a certain time

#

iirc

golden condor
#

Nope

#

It automatically runs it

#

And when you make a change to your file, it notices and restarts

lusty quest
#

running the bot on a Raspberry would be better than any free host in my opinion

vital lark
#

that's running it

viral spade
#

my bot needs 10 gigs of memory for 10k servers so i wont use heroku xD

golden condor
#

Shards

#

Your bot isn't in 10k servers is it?

viral spade
#

its 8k

#

a statistics bot, so lots of data

lilac wharf
vital lark
#

seems like 1gb per shard

golden condor
#

Oh

#

Use shards

viral spade
#

i have 8 shards

golden condor
#

You might wanna invest in private servers for that

#

vps

viral spade
#

on one pc, i would like to separate it on 2 pcs

vital lark
#

discord requires you to shard at 2.5k guilds

#

Linck, I don't have any Docker/K8s experience so I can't help you

golden condor
#

Yeah, same here

#

I host on heroku so

lusty quest
#

i know a little bit docker but dont found out how to run shards on different Containers without having a new Instance running

viral spade
#

but still on heroku, if you lets your bots run on different virtual machines, you would have to have some kind of orchestration, no?

vital lark
#

never used it

#

so I have no idea

viral spade
#

ah thats too bad, i guess you would have to be able to tell the sharding manager what exact shard its to start

golden condor
#

Heroku is a great starting out option

viral spade
#

but its terrible for teh rest

golden condor
#

Just not for a bot like yours

#

I have been waiting for ages to be reviewed

viral spade
#

its cheap at the beginning and very expensive as you go on

golden condor
#

expensive?

#

It's free

viral spade
#

so its nioce to try things out but not if you already need 10gigs of memory

lusty quest
#

for me it took almost 2 weeks to get approved

golden condor
#

I've been waiting about 1 week

viral spade
#

i am approved and used it

lilac wharf
#

The basic plan would more than likely be free but if you need more and more stuff like ram the cost will be more is what Linck01 was saying.

golden condor
#

Does ffmpeg actually work?

lilac wharf
#

Yes.

#

And my bot only took 8 days to be approved.

viral spade
#

@golden condor did you see a dyno with 1gb costs 50$

golden condor
#

@viral spade my bot uses hardly any ram so

lilac wharf
#

What the hell, Those pricings on Heroku are a scam.

viral spade
#

yes, 1gb ram for 50$. while for a vps with 50$ you get like 30gigs

lilac wharf
golden condor
#

I haven't really got another solution as I don't have much money

viral spade
#

lel

#

host on your pc man

lusty quest
#

currently i use Digital ocean, its good performancewise later i may can make a deal in the company i start this year

viral spade
#

digitalocean very nice

#

5$ and you go a long way

lusty quest
#

yep

lilac wharf
#

I'd suggest GalaxyGate primarily or others such as DigitalOcean & OVH if you are looking for hosting to pay for.

golden condor
#

Well, you get 600 hours of free dyno hosting so

lusty quest
#

and if the promo is still active you get 2 months for free

lilac wharf
#

600 hours is only 25 days...

golden condor
#

Well, what other options do I have?

lusty quest
#

there is still the alternative with Google that allows you to host a VPS for free (only in the US and its a really really bad vps)

golden condor
#

I am in the UK

lilac wharf
#

A: Hosting from your own PC
B: Online hosting from Digital Ocean, OVH, GalaxyGate, VPSServer, AWS.

golden condor
#

Are any of those free tho?

lusty quest
#

you barely notice it if the server is in the US. or get something like a Old Pc or Raspberry 4

lilac wharf
#

Yeah, A is the free one.

viral spade
#

your own pc is free

golden condor
#

Well I can't really keep my pc on 24/7

#

I do have a raspberry pi

lusty quest
#

get a Nas

lilac wharf
#

Well, The power going into it isn't free but yeah...

viral spade
#

if you live int he cold it goes into heating ๐Ÿ˜‰

lusty quest
#

hosting on a raspberry can work too if you dont get to many servers on it

golden condor
#

What about glitch?

lilac wharf
#

No

golden condor
#

Zeitnow?

#

I got no better options really

lilac wharf
#

We've given you options you just haven't chosen them.

lusty quest
#

what raspberry did you got?

golden condor
#

3

#

@้…’ใ€‚#0001 i don't have funding

viral spade
#

honestly get digitalocean 5$ per month. you can scale it up enough to hold very long for a reasonable price.

golden condor
#

I have no money

lilac wharf
lusty quest
#

you either need money or an existing machine in your house that you can run 24/7 everything else will be really annoying after you need some more power

viral spade
#

in the end, paying the 5$ per month, however you make it, will save you time

golden condor
#

Oh

#

Shit sorry

#

Uptime robot

#

?

lilac wharf
#

Uptime Robot isn't a hosting...

golden condor
#

No

#

There is a solution, using uptime robot

lusty quest
#

you can use free hosting services but with the risk that they will : steal your files, shut it down for no reason, it will have terrible performance or it will have a terrible uptime

round sky
#

just selfhost lmao

#

free hosting is garbage

lilac wharf
#

That's what we've been trying to say

golden condor
#

I can't

lilac wharf
#

Why not?

golden condor
#

I can't keep my pc on 24/7

round sky
#

Why

lusty quest
#

i have here a raspberry now running for almost 2 years. it draws less power than a TV in standby

lilac wharf
#

I do it all the time and I'm not even running a bot on this pc.

golden condor
#

I am 13 almost 14

round sky
#

My PC has been on for 3000 hours+

lilac wharf
golden condor
#

My parents won't let me keep my main pc on

round sky
#

then turn off the screen

lilac wharf
#

main pc?

round sky
#

they will never know

lilac wharf
#

so keep the secondary one on.

golden condor
#

?

#

I can try with my raspberry pi

round sky
#

are you stupid

#

if you had a pi

#

just use that

viral spade
#

so you cant talk to them and explain them that youre working on an it project blabla so they might accept it?

round sky
#

itโ€™s literally the size of a credit card so you can put it virtually anywhere

#

and once itโ€™s setup you can just unplug your monitor / keyboard and ssh into it from your main computer

golden condor
#

what does ssh main

lusty quest
#

or have parents with the knowledge about PCs like a donkey. You can tell them you need it to keep the internet running

lilac wharf
#

wtf...

round sky
#

@golden condor i donโ€™t think youโ€™re ready to make a bot

lilac wharf
#

Agreed.

golden condor
#

Bruh

lusty quest
#

basic knowledge about servers is needed

golden condor
#

I already have made a bot

lusty quest
#

you still have to know how to get it online

round sky
#

Then learn basic knowledge about setting up ssh on your rasPi

#

then continue

golden condor
#

I already do

lilac wharf
#

You don't even understand simple terminology that is required to run an application on a server (such as a raspberry pi)

round sky
#

@golden condor can i ask how you made your bot

#

what language

lilac wharf
#

It's in D.JS

round sky
#

and or library

golden condor
#

I clicked a bunch of random keys and it worked

#

Obviously

round sky
#

Ok

#

have you ever ssh'ed into a server

golden condor
round sky
#

i didnโ€™t ask to see it

golden condor
#

ssh'ed is that where you can remotly control it?

lilac wharf
#

You don't even know what ssh'd is...

round sky
#

I wouldnโ€™t say remotely control it

golden condor
#

I have done it befor

#

But forgot how to

round sky
#

well @lilac wharf when i first started server side applications i didnโ€™t really know what ssh was i just did it

#

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

lilac wharf
#

It's where you can access the server remotely without needing to be on-site to access locally.

golden condor
#

Yeah

round sky
#

@golden condor do you have your raspberry pi nearby ?

golden condor
#

Yes

round sky
#

Is it powered on / connected to monitor and keyboard

golden condor
#

No

round sky
#

plug it into everything

golden condor
#

I don't think I have the software installed anymore

round sky
#

then open chrome on your main computer or whatever browser you use

#

then download that

#

once thatโ€™s done downloading go to youtube

#

and type "How to setup ssh on raspberry pi"

golden condor
#

Hold uo

#

I need to eject the sd card from my phone

round sky
#

wot

#

why would you-

#

nvm

#

continue

lusty quest
golden condor
#

I used that sd card for my phone (before now, that's why I got it)

#

I just never use it

#

So

#

I am gonna use that

round sky
#

Donโ€™t raspberryPis use micro-SD though?

#

or am i stupid

lilac wharf
#

No I think they do use micro-sd's.

#

but I could be wrong...

round sky
#

Idk iโ€™ve never owned one personally

lusty quest
#

they use Micro SD

lilac wharf
#

Thought so...

lusty quest
#

but dont use cheap ones they wont survive a year

golden condor
#

Yeah I meant micro sd

#

My phone doesn't fit an sd

round sky
#

Canโ€™t you just use a USB to boot on raspberry PI?

lilac wharf
#

I'd hope not, have you seen the size of sd cards...

golden condor
#

Yeah

round sky
#

Idk

lusty quest
#

if you change the boot interface maybe

round sky
#

either way

#

Once you get that OS installed and setup ssh on your pi and youโ€™re still having trouble. feel free to come back

golden condor
#

I am just gonna format the sd card

lusty quest
#

make sure to use a ARM compatible OS

round sky
#

doesnโ€™t rasPI have an OS

lilac wharf
#

yes...

round sky
golden condor
#

well my house just starting leaking

#

That's epic

lilac wharf
#

Okay...?

round sky
#

Ok

#

iโ€™m gonna say this bluntly

lilac wharf
#

Not really our concern...

round sky
#

we donโ€™t care if your house is leaking

lusty quest
#

there are mutiple OS that supports ARM not only Rasberian

golden condor
#

Ik that

lilac wharf
#

Don't take this like we're jerks but we just don't really care...

round sky
#

this is a development channel, not a social channel

winter basalt
#

^

golden condor
#

Yeah well I can't do stuff if I need to go help out]

lilac wharf
#

okay see you later then.

golden condor
#

I am back now

round sky
#

what the hell

#

am i allowed to swear here?

golden condor
#

I did and it was fine

lilac wharf
#

Don't believe cursing is against the rules.

round sky
#

yeah just looked and iโ€™m safe ablobsweats

#

Anyways, once you get that OS installed search on youtube "setup ssh on ubuntu server" (if you go with ubuntu)

golden condor
#

I found I pretty good solution

#

Now

marble juniper
#

ok so I have a code which converts the url you submit to the api to an image and then write's it into the database

#

it makes an id and pushes the id for the image into a json file

#
fs.writeFile("./sonic_ids.json", JSON.stringify(idObject, null, 4), (err) => {
    if (err) {  console.error(err);  return; };
     console.log("The Sonic Images ID File has been updated");
#

everything worked

#

but it doesn't update the json file

#

the json file stays the same

#

nothing gets added

#

before I do fs.writeFile it pushes an id

#

then I write the file

#

idk where the problem is

#

and I noticed it also doesn't log that the file has been updated

round sky
#

I really donโ€™t suggest storing data like that in a json file in the first place

marble juniper
#

its not about how I store it its about why it doesn't work

round sky
#

After a while of a lot of writing the json file will collapse on itself and cause eternal hell in your server

#

i never could get writeFile to work

#

stack overflow it

marble juniper
#

k

#

then I will use a different storing method

knotty steeple
#

get a cdn

#

first of all

round sky
#

You could even use a simple database to do all of the storing

knotty steeple
#

sqlite works

marble juniper
#

I don't think I can use a cdn for glitch

#

im a cancer dev

knotty steeple
#

an image api needs a cdn

#

to be optimal

marble juniper
#

you can't do that on glitch sorry

glacial mango
#

This says I mention 1 member but I mention twice?

const abc = '@Evo#4850 @Evo#4850'
msg.mentions.users.size```
round sky
#

@glacial mango that is how that is supposed to work

glacial mango
#

Then how do I get the amount of mentions?

knotty steeple
#

thats because its the same user

round sky
#

@glacial mango i assume you have an arguments variable

glacial mango
#

Can I get 3 if I do @glacial mango @glacial mango @glacial mango

round sky
#

why would you get 3

knotty steeple
#

it has to be a different user

glacial mango
#

Because there are 3 mentions

round sky
#

yes

#

but that isnt how collections work

earnest phoenix
#

there are 3 mentions but 1 user

#

look at your code

glacial mango
#

Can I get the amount of mentions and not of users?

earnest phoenix
#

regex match the message content yourself

glacial mango
#

I don't understand how to use that

earnest phoenix
#

nice

golden condor
#

I FOUND A REALLY GOOD HOSTING SOLUTION

#

Glitch

prime cliff
#

good LULW

golden condor
#

And ping is basically nothing

earnest phoenix
#

are you in the right headspace to receive information that could possibly hurt you?

small prairie
#

is There a way to find channel in a particular category or i just have to filter it through the full server?

#

d.js

golden condor
#

@earnest phoenix yes ok

small prairie
#

Lol Glitch

earnest phoenix
#

free hosting isn't and will never be good, no one will let you use their resources 24/7 for free, don't be a cheapskater because renting a vps costs a few bucks a month

golden condor
#

I am 13, got no virtual money so

earnest phoenix
#

and

marble juniper
#

im 13 too and use the vps from someone else cuz he gave me a place in his vps

#

for free

golden condor
#

Your lucky then

marble juniper
#

maybe you can ask him

golden condor
#

Who?

#

he is?

marble juniper
#

@sterile minnow this guy

sterile minnow
#

Hmm?

marble juniper
#

Tayron can you give Cxllm maybe a space in your vps or something

#

anything is better than glitch seriously

sterile minnow
#

we're in DM

#

PM*

marble juniper
#

k

#

well anyways I was here cuz I have problems with my storing

#

and wanted to get suggestions what I should use for a database

#

mongo db is cancer for me

earnest phoenix
#

small scale or big scale?

marble juniper
#

its just for id's

#

image id's

earnest phoenix
#

ah

#

sqlite is enough

marble juniper
#

k

#

currently I do it in a json file which is cancer ik

earnest phoenix
#

since it's local you can move it around

marble juniper
#

sure

golden condor
#

@marble juniper should I trust him

#

The vps guy

marble juniper
#

@golden condor sure Im also hosting my bot on his vps you can trust him

golden condor
#

Does he update the bot every time you do?

marble juniper
#

once you save your code the bot restarts automatically

#

it you make a file

#

or change a file and so on

golden condor
#

Not happy with the status

marble juniper
#

status what

golden condor
#

@marble juniper I don't host by glitch btw, my code is on there but uptimerobot keeps it up

marble juniper
#

k

golden condor
#

So it isn't bad

earnest phoenix
#

it is lol

golden condor
#

No

#

It's uptimerobot

#

Not glitch

#

I have my ways

earnest phoenix
#

which are bad

#

also i was saying glitch is bad

#

the uptimerobot is a nice utility, that breaks glitch's TOS lol

golden condor
#

How?

#

I can use repl then

tidal kindle
#

Help

golden condor
#

Ok didn't know that

tidal kindle
#

How I add me bot

golden condor
#

To what?

#

Dm me

#

@earnest phoenix how is it against their TOS?

lilac wharf
#

@tidal kindle do you mean add the bot to the top.gg list?

golden condor
#

I am helping dw

lilac wharf
golden condor
#

K

knotty steeple
#

wrong channel

#

and

#

can u be patient

#

it takes like 1-2 weeks for ur bot to get approved

glacial mango
#

Is it possible to check if a string has ||spoilers|| ? I'm using js

earnest phoenix
#

mdn, String.includes()

#

?

#

or you could make custom regex

west raptor
#

String.includes() is not reliable

#

@glacial mango you're gonna want to make or find a regex for it

glacial mango
#

How do I make it?

west raptor
earnest phoenix
#

Is it css?

#

edit the site classes

#

yeah

#

alright

young forge
#

Can someone guide me on how to do this?

#

but I don't know where to put it

honest karma
#

I have no idea what you're trying to do but if you're checking if the user is a bot owner then?

mossy vine
#

but I don't know where to put it

young forge
#

I don't want to expose the code

mossy vine
#

put it at the beginning of your command

young forge
#

I'm doing the Config File

honest karma
#

then require it

young forge
#

Like at the top?

mossy vine
#

ah you are following that guide

young forge
#

I don't know what that means.

#

Yeah, I'm using that guide

mossy vine
#
if (message.content.startsWith(prefix + 'ping') {
  if(message.author.id !== config.ownerID) return; // if anyone except you (or the configurated bot owner) tries to run the command, nothing will  happen
  message.channel.send("pong!")
}```
young forge
#

Do I have to put it after every command?

mossy vine
#

if you want the command to only be usable by you, yes

honest karma
#

nno

#

whoops

mossy vine
#

if it isnt there, anyone will be able to use it

young forge
#

Okay

#

How do I make it so that if I use a command the bot will say the word "Yes." and if anyone else says it the bot says "No."?

honest karma
#
if(blah blah blah){
  return message.channel.send("yes");
}
else{
  return message.channel.send("no");
}
mossy vine
#
if (/*some magic to check if the command has been executed*/) {
  if (message.author.id === config.ownerID) {
    //this code block will execute if you ran the command
    message.channel.send("Yes.")
  } else {
    //this code block will execute if someone else ran the command
    message.channel.send("No.")
  }
}```
young forge
#

Okay

flat pelican
#

@honest karma indents pepehands

young forge
#

I'm using a MacBook Air

#

and I don't know what I'm doing wrong

honest karma
#

It's early in the morning

young forge
#

but after I did "node mybot.js"

#

it responded with this

flat pelican
#

ew

mossy vine
#

your token in client.login() is wrong

quartz kindle
#

Incorrect login details were provided.

young forge
#

Okay

#

how do i fix that?

flat pelican
#

Go to your dev portal

quartz kindle
#

put the right token in

flat pelican
#

Select your app

young forge
#

It is the right token

flat pelican
#

On the left, you have "Bot"

#

Click on it and reveal your bot token

#

and then, put it in your code

#

You are probably using the client secret

mossy vine
#

ive been making bots for like 2 years and i still sometimes use the client secret instead of bot token

flat pelican
#

mistakes happen

#

I did it several times

young forge
#

I didn't

quartz kindle
#

i sometimes make a copy of the main file for some reason, then i make changes to the wrong file and wonder why my changes dont work

young forge
#

Weird

#

the token somehow changed

quartz kindle
#

its normal for it to change

flat pelican
#

Not really

quartz kindle
#

a part of it is based on the current timestamp

young forge
#

Why does it change though

#

I didn't regenerate a new one

flat pelican
#

The token shouldn't change once you generated it

young forge
#

Unless I regenerate a new one

flat pelican
#

at least, shouldn't change randomly

#

or if you regenerate it

#

yes

uneven wyvern
#

Anyone knows how I can the Percent of the Online Users in a Guild?

mossy vine
#

it resets if you for example post it on github

flat pelican
#

^

mossy vine
#

@uneven wyvern get total users and online users and do a percentage calculation

uneven wyvern
#

how?

flat pelican
#

Check your mails - sometimes Discord mails you

#

@uneven wyvern it's maths

modest maple
#

@uneven wyvern with basic maths

uneven wyvern
#

with what method I mean

mossy vine
uneven wyvern
#

Math.<method>()

quartz kindle
#

the token does change, even if you dont regenerate it

#

because its encoded using the current timestamp the moment you open the page

flat pelican
#

๐Ÿค”

modest maple
#

@uneven wyvern no like with actually naths

#

Like you do in school

quartz kindle
#

its not the token itself that changes, only the token wrapper/encoder

flat pelican
#

yes

modest maple
#

Like basic percentage calculations from high school

topaz fjord
#

((amount of online users) / (amount of users)) * 100

#

that's basically it

quartz kindle
#

but if you go to your page and click copy token, then refresh the page and copy it again, it will be different

topaz fjord
#

that's the type of math

#

not Math.xyz

quartz kindle
#

the part after the dot will

modest maple
uneven wyvern
#

oh, ok ty @topaz fjord

topaz fjord
#

@modest maple no code = no spoonfeed

glacial mango
#

Is it possible to get the amount of emojis in a message? in JavaScript

uneven wyvern
#

ok now next question, how to round a number? I only know Math.floor(Math.round()) @topaz fjord

topaz fjord
#

Math.round(x)

mossy vine
#

you legit typed it in that message

topaz fjord
#

where x is the number

mossy vine
#

also why are you flooring a rounded number

topaz fjord
#

rounds up or down based on what the value is

#

flooring a rounded number does nothing

uneven wyvern
#

oh that's simple

golden condor
#

@earnest phoenix I read through the whole TOS of glitch, there is nothing saying I can't do what I am doing

#

Btw, that profile pic is very epic

#

?help

#

Frick sorry wrong channel

glacial mango
#

What does it mean if an emoji is managed by an external service?

restive furnace
#

@golden condor making discord bot in glitch, is allowed, but not worth of it. (if you talking about this)

golden condor
#

? @restive furnace

#

Not worth of it?

restive furnace
#

@ cry I read through the whole TOS of glitch, there is nothing saying I can't do what I am doing

#

yes

#

better to get vps or smh

golden condor
#

I mentioned before, I don't have the money too

restive furnace
#

heroku? its better place than glitch and free

golden condor
#

I used to use heroku

lofty vine
#

supp?

golden condor
#

Only 550 hours a month

lofty vine
#

yea thats 22.91 days

golden condor
#

Exactly

restive furnace
#

You can verify it w ur cc

golden condor
#

Glitch with uptimerobot is free