#development

1 messages ยท Page 1480 of 1

mighty quiver
#

we will keep same prefix but only respond to certain user for certain command

earnest phoenix
#

@client.check it's a decorator under commands, you would do it as ```py
@commands.check(is_owner)

mighty quiver
#

ohhh

#

but i got an error saying commands not defined

#

frick i messed up

#

i think it worked

#

tysm all of you

#

lemme try it out

earnest phoenix
# mighty quiver tysm all of you

you can also do a custom check like this, for a cleaner code, ```py
def my_custom_check():
def predicate(ctx):
return your_condition
return commands.check(predicate)

@client.command()
@my_custom_check()
async def command(ctx):

#

My bot is 3.500 server and I am sharding. My bot works very well on my own computer
but VDS does not open and gives an error. What is the problem?

#

ju

lyric mountain
#

Vds?

#

Or vps?

earnest phoenix
#

vps in its virtualized form VDS

lyric mountain
#

Ah

steady karma
#

quick question, python or node.js for discord bot development

mighty quiver
summer torrent
lyric mountain
earnest phoenix
#

hm

lyric mountain
#

Both langs have pros and cons

#

It boils down to what you can work better with

steady karma
lyric mountain
#

How can I give an example of what you're better at?

earnest phoenix
crystal wigeon
#

lol

earnest phoenix
#

is this @summer torrent

steady karma
crystal wigeon
#

python is slow

wintry stream
#

python is easier to write but has slower performance

steady karma
#

oh god ill go with js

lyric mountain
#

Python have blocking threads

#

Js has no threads at all

stuck pike
wintry stream
#

if you don't know either python or js i think python will be easier to learn

stuck pike
#

yea true

earnest phoenix
#

My bot is 3.500 server and I am sharding. My bot works very well on my own computer
but VDS does not open and gives an error. Does anyone have an idea

steady karma
#

I know js alot

lyric mountain
#

Like, it's like choosing between olive oil or soy oil

sudden geyser
lyric mountain
#

Idk, seriously

sudden geyser
#

gosh darn GIL

lyric mountain
#

It blew my mind when I discovered how threads work in python

#

Like, it makes no sense

sudden geyser
#

GIL is why Python is a safe yet slow language

#

Your only option for concurrency is processes

lyric mountain
#

Not seeing the vds issue, since it's open

tough wyvern
#

How can i cut a line of text

#

html/css

#

When i want to add a bot i get following error **
Forced themes are only enabled for creators who use custom CSS in their detailed description.**

lyric mountain
#

It's not "only enabled", but it's recommended to be used only for this case

tough wyvern
#

Ahh thank you

lyric mountain
#

Cool

#

What lang?

summer torrent
#

is this canvas

steady karma
#

what u use for lib?

#

nvm

lyric mountain
#

fillRoundRect maybe?

pale vessel
#

that's a thing?

#

i just stole a function from stack overflow and attach it to the context prototype

lyric mountain
#

Idk canvas commands, they just look similar enough to graphics2d

earnest phoenix
#

try ctx.lineCap = 'round';

#

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

#

hmm

#

dk then

blissful coral
#

Hmmmm

#

Does canvas have do csv

#

Docs*

#

If so check those

#

There is a way to round I just forgot how

lyric mountain
#

Oh no, you said "just grab"

#

They're gonna copypaste the whole stackoverflow

pale vessel
#

yeah with the html and css

#

gotta make sure it works properly

#

i'm not doing those arcTo() manually

#

god bless those people that made a function for it

tired panther
#
const currentremind = await remind.fetchremind(message.guild.id , "message");
                let content = [];            
                let g;
                let r;
              
                for(g = 0 ; g< Object.keys(currentremind).length ; g++){
                content.push("Name:" + currentremind[g].name + "\n" + "timer:" + currentremind[g].time + "\n" + "triggers on:" + currentremind[g].trigger + "\n")
  
                }
                const reactremind = await remind.fetchremind(message.guild.id , "reaction");
                
                for(r = 0 ; r< Object.keys(reactremind).length ; r++){
                  content.push("Name:" + reactremind[g].name + "\n" + "timer:" + reactremind[g].time + "\n" + "triggers on:" + reactremind[g].trigger + "\n")
    
               }
``` the first for loop works but the second one give a error `Property of Undefined by name `
#

but why?

mellow kelp
#

unless currentremind has numbers as keys, you can't just use an iterator to loop through its values

#

you'd have to do something like a for/of loop or Array.forEach

tired panther
#

both have the same object structure

mellow kelp
#

does it use numbers as keys?

pale vessel
#

wdym

tired panther
mellow kelp
#

i just want to ask that

mellow kelp
tired panther
#
 gldid: { type: String },
  channelid: {type: String},
  name: {type: String},
  time: {type: String},       //// just for Interval
  astime: {type: String},     //// 14d 22h 02m 
  remindtime: {type: String},
  option: {type: String},
  content: {type: String},
  ping: {type: String},
  trigger: {type: String}
#

thats the structure

pale vessel
#

you forgot to change it

mellow kelp
#

o

tired panther
#

I nearly wanted to kill myself

#

bc I am so dumb

pale vessel
#

happens to the best of us

#

you just want to die until you saw that one little thing you missed

upbeat prairie
#

@earnest phoenix it has a random code and it worked just fine yesterday

stuck pike
#

I have no idea abt dashboard but I have a question does the dashboard server is also hosted by the bot hosting

#

Maybe a dumb ques

upbeat prairie
#

Even if only one gif was broken, the other ones shouldnt

#

Yk what I mean

#

Fr, sigh

#

Lemme finish that horror first lol

#

Should I?

#

Mhm, I don't really see the difference yk

#

Nah, u right

#

Will try to remember it

#

Lol

#

They are lol

#

My private commands are others yk

#

Like more intimate stuff yk

#

Will do, thx boss reno

#

Time to finish that horror weird hoe, cya later

lyric mountain
#

You host it like you'd do with any other site

#

Hosting at the same vps will help reduce latency tho

lusty quest
#

same datacenter also works, sure not as fast as same machine but still faster than somewhere else

gilded olive
#

Suprised for the millions of bots out here only a few have dashboards

lusty quest
#

also some Hosting Provider give you Private Networks so you wont have to use the long way

#

Dashboards are annoying

#

Require knowledge in Frontend stuff and Oauth2

#

sure Oauth can be optional but makes it way easyer

gilded olive
#

Using python there are already some discord oauth 2 libs that make stuff so much easier

lyric mountain
#

Same machine > same datacenter > same city > same region > same country > same world

gilded olive
#

About frontend...csstricks.com

lusty quest
#

i host my next Bot on a Server that is located on the ISS so it will have wired Latency

#

in js i would catch the error that will be created by it

#

does it fire a trigger or event when it runs out?

lyric mountain
#

Doesn't node have a debug mode?

lusty quest
#

he uses py

gilded olive
#

What error

crystal wigeon
#

put your code in a try except block

#

try:
// some code
except:
// time out error thrown by discord.py
send message

gilded olive
#

except asyncio.TimeoutError: @earnest phoenix

#

Make sure to import asyncio

earnest phoenix
#

sa

#

turkyokmu

earnest phoenix
#

but it gives this error

pale vessel
#

You can do that when your client is ready

earnest phoenix
#

oh

pale vessel
#

you can just put that in your ready event/provide the presence under ClientOptions

crimson vapor
#

Yea

earnest phoenix
#

it works now, tnx

eternal osprey
#

hey does anybody know a really good and cheap vps?

lusty quest
#

you get what you pay

eternal osprey
#

i forgot the name of the vps someone sent me.

lusty quest
#

check the pins

#

but i can recomend the big 3

eternal osprey
lusty quest
#

AWS, Azure, Google Cloud, Digitalocean, Vulture,OVH

#

they are pretty decent (even tho ive had my issues with OVH)

eternal osprey
#
Lightning-1GB

1Vcore
1GB RAM
15GB SSD Storage
1Gbps Down / 100Mbps Up
Private Networking
Unmetered Bandwidth
Weekly Backups``` is this good enough for 2 bots to be hosted on?
lusty quest
#

i used to run 6 bots on a similar speced VPS

eternal osprey
#

should i just make up something?

lusty quest
#

you dont really need it usually. you can name it like you want

steady karma
#

having some issue with canvas rn

#

the attahment wont send. only the text

mellow kelp
#

i love how pastebin puts the actual code in the opengraph title KEKW

steady karma
#

lmao ikr

mellow kelp
#

hmm i dunno about that

lyric mountain
mellow kelp
#

i always send just the image without any message

steady karma
#

the background.png is there

steady karma
mellow kelp
#

aight

marble juniper
mellow kelp
#

well i think you can use channel.send({ files: [canvas.toBuffer()] }) @steady karma

lyric mountain
#

Had my issues with the cheapest plan, but that's because my server had a noisy neighbor

steady karma
#

@mellow kelp thank you now it works lol

mellow kelp
#

epik

#

no problem

lament rock
lusty quest
#

if you know what you do you can run 5k Guilds off 500mb Ram

lyric mountain
#

Meanwhile me at 1 GB usage KEKW

lament rock
#

stateless bots can run probably 10k guilds or more on heroku

steady karma
#

heroku dont works for me KEKW

lyric mountain
#

Heroku is only good for dad bots

steady karma
#

const av = await loadImage(member.user.displayAvatarURL({format: "jpg"}))

#

errors me that it isnt a function

mellow kelp
#

what isn't a function?

steady karma
#

@mellow kelp (node:464) UnhandledPromiseRejectionWarning: TypeError: member.user.displayAvatarURL is not a function

pale vessel
#

are you on discord.js v11

steady karma
#

v12

#

oh shit no

lament rock
#

might wanna check to make sure

pale vessel
#

i- oh

steady karma
#

npm installed me 11.3

lament rock
#

lol

steady karma
#

having v12.5.1 installed wont changes it

lyric mountain
#

Still, djs 11 is pog

steady karma
#

but what can i that error lol

lyric mountain
#

U sure that function exist?

steady karma
#

well it is in my code

pale vessel
#

Are you sure it actually updated

steady karma
#

Yes

molten yarrow
#

try member.displayAvatarURL()

steady karma
#

1sec

pale vessel
#

if that works you really need to work on your variable names

#

because if it's a user you call it user, not member

lament rock
#

It would say cannot read displayAvatarURL of undefined since User.user does not exist

lyric mountain
#

User.user = message.user KEKW

lament rock
#

Something to keep in mind, if you installed any file:// deps which require Discord.js, things can be fucky

pale vessel
#

try running npm ls discord.js

steady karma
#

now it doesnt fucking show the pfp

pale vessel
#

oh

#

how come it suddenly worked

lyric mountain
#

Well, djs 12 has some breaking changes if you updated

#

Just saying

#

Review ur entire code

steady karma
lament rock
#

log the url

#

might be an issue with your loadImage function

#

probably where you place it on the x and y

earnest phoenix
steady karma
#

oh no my dumbass.

wicked pivot
#

how to remove an element from a string? example: test123.js remove .js?

pale vessel
#

there's multiple ways to approach this

#

you can substring, slice, replace, split, and probably more

lament rock
#

replace is usually preferred if what you want to replace is predictable since it accepts both regular expressions and strings as what to search for

lyric mountain
#

You could also use regex with "don't match"

#

It'll stop right before .

#

And return the word

steady karma
lyric mountain
#

That's not the url, that's the image object

steady karma
#

How do i get the url then?

lament rock
#

it's the return value of User.displayAvatarURL

lusty quest
#

someone here knows a fix if dotenv wont load anything from a .env file even when its in the same directory as the main file where the config is loaded?

pliant elbow
#

@rare plume Here: ```js
.setFooter(${message.author.displayAvatarURL()} ${message.author.tag})

rare plume
#

.setFooter(message.author.tag, message.author.displayAvatarURL());

#

Do it like so ^

pliant elbow
#

hmmm ok thanks

#

Yep it worked

rare plume
#

๐Ÿ˜‰

eternal osprey
#

hey

#
 {
      
     var embed5 = new Discord.RichEmbed();
      embed5.setThumbnail("https://media.giphy.com/media/cz314BBYiCkiA/giphy.gif")
      embed5.addFields(
        { name: "**Moderation commands**", value: ```!kick``, `` !morehelp``, ``!help``, ``!lockdown``, ``!purge``, ``!tempmute``, ``!unban``, ``!warn``, ``!warnlvl```, inline: true },
        { name: "**Music commands**", value: ```!play``, ``!queue``, ``!skip``, ``!stop``, ``!resume``, ``!pause``, ``!shuffle``, ``!clear-queue``, ``!volume``, ``!filter``, ``!w-filters```, inline: true },
        { name: "**Misc commands**", value: ```!botlink``, ``!ping``, ``!serverinfo``, ``!userinfo``, ``!donate``, ``!support```, inline: true }
      )
      embed5.setDescription("**MAKE SURE THAT YOU HAVE A CHANNEL CALLED**" + " *``mod logs``* "+ "**IN YOUR SERVER!**" + "\n" + "**For more detailed help, use command !morehelp**")
      embed5.setColor("RANDOM")
      embed5.setTimestamp()
      embed5.setAuthor('AwsomeCord || Server Moderation')
      message.channel.send(embed5)
    }
  ```TypeError: "" is not a function
misty sigil
#

really

#

no db for mod log channel?

#

and a static help command?

#

and discord.js v11?

#

anyway

#

what line?

opal plank
#

Could someone give me a hand with the CSS on the top.gg page? I do already have the css ready to go, i just need some guidance on the class names and how to put the into the page itself

eternal osprey
#

@misty sigil

#

{ name: 'Moderation commands', value: !kick``, `` !morehelp``, ``!help``, ``!lockdown``, ``!purge``, ``!tempmute``, ``!unban``, ``!warn``, ``!warnlvl, inline: true },

misty sigil
#

is that line 12 of the file?

#

i need to see line 12 of the file

eternal osprey
#

that is line 12

#

@misty sigil

#

i have no clue what this error even means. Never happened to me before.

mellow kelp
#

you shouldn't use RichEmbed anymore

#

use MessageEmbed

#

(Unless you got some outdated version ig)

eternal osprey
#

and it is built the same

mellow kelp
#

o

eternal osprey
#

okay uhhm

#

so i chaned it to messaEmbed and changed the lay-out to its constructor.

#

TypeError: Cannot read property 'client' of undefined

#
const n = require("../n.json");
const Discord = require("discord.js");
const human = require('humanize');
const client = new Discord.Client();
exports.run = (client, message, args) => {

    {
      
     var embed5 = new Discord.MessageEmbed()
      .setThumbnail("https://media.giphy.com/media/cz314BBYiCkiA/giphy.gif")
      .addFields(
        { name: '**Moderation commands**', value: '``!kick``, `` !morehelp``, ``!help``, ``!lockdown``, ``!purge``, ``!tempmute``, ``!unban``, ``!warn``, ``!warnlvl``', inline: true },
        { name: '**Music commands**', value: '``!play``, ``!queue``, ``!skip``, ``!stop``, ``!resume``, ``!pause``, ``!shuffle``, ``!clear-queue``, ``!volume``, ``!filter``, ``!w-filters``', inline: true },
        { name: '**Misc commands**', value: '``!botlink``, ``!ping``, ``!serverinfo``, ``!userinfo``, ``!donate``, ``!support``', inline: true }
      )
      .setDescription("**MAKE SURE THAT YOU HAVE A CHANNEL CALLED**" + " *``mod logs``* "+ "**IN YOUR SERVER!**" + "\n" + "**For more detailed help, use command !morehelp**")
      .setColor("RANDOM")
      .setTimestamp()
      .setAuthor('AwsomeCord || Server Moderation')
      message.channel.send(embed5)
    }
  
}```
quartz kindle
#

show full error

#

and delete line 4

eternal osprey
#
 TypeError: Cannot read property 'client' of undefined
2020-12-26T20:30:30.066825+00:00 app[worker.1]:     at new MessageEmbed (/app/node_modules/discord.js/src/structures/MessageEmbed.js:13:60)
2020-12-26T20:30:30.066825+00:00 app[worker.1]:     at Object.exports.run (/app/commands/help.js:9:19)
2020-12-26T20:30:30.066826+00:00 app[worker.1]:     at Client.module.exports (/app/events/message.js:11:13)
2020-12-26T20:30:30.066826+00:00 app[worker.1]:     at Client.emit (events.js:326:22)
2020-12-26T20:30:30.066845+00:00 app[worker.1]:     at MessageCreateHandler.handle (/app/node_modules/discord.js/src/client/websocket/packets/handlers/MessageCreate.js:9:34)
2020-12-26T20:30:30.066848+00:00 app[worker.1]:     at WebSocketPacketManager.handle (/app/node_modules/discord.js/src/client/websocket/packets/WebSocketPacketManager.js:105:65)
2020-12-26T20:30:30.066848+00:00 app[worker.1]:     at WebSocketConnection.onPacket (/app/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:333:35)
2020-12-26T20:30:30.066849+00:00 app[worker.1]:     at WebSocketConnection.onMessage (/app/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:296:17)
2020-12-26T20:30:30.066851+00:00 app[worker.1]:     at WebSocket.onMessage (/app/node_modules/ws/lib/event-target.js:120:16)
2020-12-26T20:30:30.066851+00:00 app[worker.1]:     at WebSocket.emit (events.js:314:20)```
#

@quartz kindle

quartz kindle
#

whats your discord.js version?

#

and your node.js version?

eternal osprey
mellow kelp
#

probably

eternal osprey
#

yeah probably.

#

by that i actually know, v12.

mellow kelp
#

what's line 9?

misty sigil
#

try require('discord.js').version

eternal osprey
#
2020-12-26T20:54:51.843067+00:00 app[worker.1]: TypeError: Cannot read property 'client' of undefined
2020-12-26T20:54:51.843068+00:00 app[worker.1]:     at new MessageEmbed (/app/node_modules/discord.js/src/structures/MessageEmbed.js:13:60)
2020-12-26T20:54:51.843070+00:00 app[worker.1]:     at Object.exports.run (/app/commands/help.js:9:21)
2020-12-26T20:54:51.843072+00:00 app[worker.1]:     at Client.module.exports (/app/events/message.js:11:13)
2020-12-26T20:54:51.843073+00:00 app[worker.1]:     at Client.emit (events.js:326:22)
2020-12-26T20:54:51.843074+00:00 app[worker.1]:     at MessageCreateHandler.handle (/app/node_modules/discord.js/src/client/websocket/packets/handlers/MessageCreate.js:9:34)
2020-12-26T20:54:51.843074+00:00 app[worker.1]:     at WebSocketPacketManager.handle (/app/node_modules/discord.js/src/client/websocket/packets/WebSocketPacketManager.js:105:65)
2020-12-26T20:54:51.843075+00:00 app[worker.1]:     at WebSocketConnection.onPacket (/app/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:333:35)
2020-12-26T20:54:51.843075+00:00 app[worker.1]:     at WebSocketConnection.onMessage (/app/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:296:17)
2020-12-26T20:54:51.843076+00:00 app[worker.1]:     at WebSocket.onMessage (/app/node_modules/ws/lib/event-target.js:120:16)
2020-12-26T20:54:51.843076+00:00 app[worker.1]:     at WebSocket.emit (events.js:314:20)```This is the full error code.
pure lion
#

hey nerds

misty sigil
#

hey nerd

eternal osprey
#
const embed5 = new Discord.MessageEmbed()```line 9
mellow kelp
#

hmm

#

your client is logged in right?

eternal osprey
mellow kelp
#

maybe it's because you're instantiating another client at the top of the file

#

removing it maybe works

quartz kindle
#

again, whats your discord.js version and node.js version

#

show your package.json

misty sigil
#

i don't want a probably

eternal osprey
pure lion
#

so im trying to implement an asynchronous trait (with async_trait) and its erroring for some reason:

#[async_trait]
impl Sandbox for Counter {
    type Message = UserInput;

    fn new() -> Counter {
        Counter {
            value: 0,
            ..Default::default()
        }
    }

    fn title(&self) -> String {
        return String::from("Veldy weldy twatty chatty");
    }

    async fn update(&mut self, message: UserInput) -> std::result::Result<(), Box<dyn std::error::Error>> {
        match message {
            UserInput::IncreaseOnPressed => {
                let res = get("https://httpbin.org/ip")
                    .await?
                    .json::<std::collections::HashMap<String, String>>()
                    .await?;
                println!("{:?}", res);
                Ok(())
            }
            UserInput::DecreaseOnPressed => {
                let res = get("https://httpbin.org/ip")
                    .await?
                    .json::<std::collections::HashMap<String, String>>()
                    .await?;
                println!("{:?}", res);
                Ok(())
            }
        }
    }

    fn view(&mut self) -> Element<self::UserInput> {
        Counter::view(self).into()
    }
}
```and the error is ```rs
lifetime parameters or bounds on method `update` do not match the trait declaration```I'm stucked af so like glsjkgkljhfsdg
misty sigil
#

oh no

feral aspen
opal plank
#

already did, like i mentioned, its not about me NOT knowing how css works, its simply some of them not being loaded into the page @feral aspen

pure lion
#

do you mean overwriting the top.gg css?

opal plank
pure lion
#

erwin, can you send any relevant code

stable eagle
#

.setDescription(command.timeoutMSG + ` You need to wait **${this.ms(Date.now() - this.timeouts.get(`${command.name}${message.author.id}`), { long: true })}** to use the **${command.name}** command again.` || "You can't use this command, as you are on cooldown!" + ` You need to wait **${this.ms(Date.now() - this.timeouts.get(`${command.name}${message.author.id}`), { long: true })}** to use the **${command.name}** command again.`)

UnhandledPromiseRejectionWarning: Error: val is not a non-empty string or a valid number. val=null

???

opal plank
#

im still trying to fiddle with it, but its a simple <style> tag with .entity-wrapper

pure lion
#

and you get nothng?

opal plank
#

i do, but not fully

#

check this one for example

pure lion
#

what arent you getting

opal plank
#

under cell

pure lion
#

ah

opal plank
#

why is that the only one going if they are all named cell's?

quartz kindle
#

what about it is not working?

pure lion
#

its not affecting all the cells

opal plank
#

the fact that every single one of them is called cells

#

but its not applying to all of em

pure lion
#

did you check for any IDs

opal plank
#

i did, they are all the same class, not id though

#

but adding css onto a class should be absolutely fine

#

since they are all the same

pure lion
#

call them each by ID just to check

quartz kindle
#

the problem is the table or entity-wrapper?

pure lion
#

wait

#

erwin

opal plank
#

hmmmm

pure lion
#

it looks fine on my screen

opal plank
#

im hella confused

pure lion
#

ah

opal plank
#

now its fine

#

but table isnt?

#

wot

pure lion
#

css!

opal plank
#

thats the issue

#

i know how to fuck with css

pure lion
#

wait

opal plank
#

but its just acting up on its own lmao

pure lion
#

try changing the class

opal plank
quartz kindle
#

i stll dont get what the problem is lol

opal plank
#

and fucked again

pure lion
#

entity-table__cell

opal plank
#

they are all cell's

pure lion
#

im confused

#

af

opal plank
#

welcome to the club

pure lion
#

also make the text more readable

#

like white or something

opal plank
#

it is white

#

lmao

#

not only white

quartz kindle
#

you mean that this background is randomly changing?

opal plank
quartz kindle
opal plank
#

bruh whut

#

its working for you?

quartz kindle
#

yes? lol

opal plank
#

please explain

pure lion
#

yeah looks fine to me too

opal plank
#

imma restart chrome

#

one sec

pure lion
#

oh erwin

quartz kindle
#

do you have cache disabled? lol

cinder patio
#

CTRL + F5 maybe

pure lion
#

ctrl f5 is very pog

opal plank
#

it was cache

pure lion
#

pogging

opal plank
#

ugh ffs

misty sigil
#

poggingers

pure lion
#

poginga

#

pazinga

opal plank
#

papa

pure lion
#

why dont i have any sheldon emotes

#

oh well

#

time to go to a rust server

opal plank
#

i assume rust lang

misty sigil
#

same

opal plank
#

there 2 types of rust
the virgin one
the virgin'est one

misty sigil
#

which is which

opal plank
#

good question

#

you are either a developer or a pvp scrib, i'd say they pretty goddamn close to eachother

misty sigil
#

latter one is probably worse

#

because at least you can do somethin good as a dev mmLoL

gilded olive
eternal osprey
#

hey i am looking to buy a vps but what should i put here?

#

like just a random hostname?

misty sigil
#

just put like

#

anyhting

quartz kindle
#

just put mymomisfat

misty sigil
#

^ ^

opal plank
misty sigil
#

is tha' true?

opal plank
#

he said it, i assume so

misty sigil
#

welp

eternal osprey
earnest phoenix
#

I dont know what i have done wrong but custom prefixes are not working

const mongo = require('../../mongo');
const commandPrefixSchema = require('../../schemas/command-prefix-schema');
module.exports = {
    commands: ['setprefix'],
    minArgs: 1,
    maxArgs: 1,
    callback: async (message, arguments, text) => {
        await mongo().then(async mongoose => {
            try {
                const guildID = message.guild.id;
                const prefix = arguments[0];
                
                await commandPrefixSchema.findOneAndUpdate({
                    _id: guildID,
                }, {
                    _id: guildID,
                    prefix,
                }, {
                    upsert: true,
                });
                
                message.reply(`The prefix has been updated to ${prefix}`);
            }
            finally {
                mongoose.connection.close();
            }
        });
    },
    permissions: ['ADMINISTRATOR'],
    requiredRoles: [],
};
#

If I set the "useFindAndModify" to false it says that "the options [useFindAndModify] is not supported"

merry vale
#

Hello! How i can create bass booster mode for my music bot ?

earnest phoenix
#

amp up lower frequencies with whatever tool you're using

#

on ffmpeg there's directly an equalizer filter

merry vale
#
    "@discordjs/opus": "^0.3.3",
    "array-move": "^3.0.1",
    "discord.js": "^12.5.1",
    "erit-ytdl": "^0.1.2",
    "ffmpeg-static": "^4.2.3",
    "lyrics-finder": "^21.0.5",
    "simple-youtube-api": "^5.1.1",
    "soundcloud-downloader": "^0.2.1",
    "string-progressbar": "^1.0.1",
    "ytdl-core": "^4.2.1"
covert shuttle
#

Iโ€™m looking for a bot that notifies the server when a person of choice posts a new tiktok video

forest drift
#

im curious, even if its not efficient, would it be possible to stream using a bot? like is it even possible for a bot to stream?

earnest phoenix
#
client.on('message', async message => {
    if (message.content.startsWith(prefix + 'hack')) {
        var ids = ["673332321600143389"]
        if (!ids.some(ids => message.author.id == ids)) return message.channel.send('Este comando estรก en desarrollo, por el momento, sรณlo mi dueรฑo es capaz de usarlo para testearlo.');
    const args = message.content.slice(prefix.length).trim().split(/ +/g);
    let autor = message.author;
     let user = message.mentions.users.first();
     var tipo = args[2]
     async function mensajeHack(mensaje){
         await message.channel.send(mensaje).then(message => {
             message.delete({ timeout: 2000 })
         })
         
     }
     if (!user) return message.channel.send(`No, ${autor.username}, Debes mencionar a alguien.`);
     if (!tipo) return message.channel.send('We, tambiรฉn debes poner un tipo de hack, vaya animal.');
     if (tipo == 'bot') {
         if(!user.bot) return message.channel.send('Ese no es un bot animal.')
         var servers = ["14","29","58","126","364","651","894","1356","1895","4793","8558"]
         async function mensajeFinalBot(mensajeS) {
            await message.channel.send(mensajeS).then(message => setTimeout(function(){
               message.edit(`Fueron raideados **${servers[Math.floor(Math.random() * servers.length)]}** servidores con el bot **${user.tag}`);
               }, 3000));
        }
        const hackBot1 = await mensajeHack(`Extrayendo token de **${user.tag}**...`)
        const hackBot2 = await mensajeHack(`Inicializando Discord Bot Client...`)
        
     }
    }
});
#

it sends all messages at time

#

i mean the constants hackBot1 and hackBot2

forest drift
#

so then the only way would be using a selfbot which is bannable, so pretty much "impossible"

hollow sedge
#

Yeah

forest drift
#

does selfbot only refere to coding one using discord.js v11 etc, or does it also count to an external item, for example using an external item which only reads for example a phone screen and can also click on the screen?

rustic nova
#

Selfbot refers to using a non-bot account to interact with the api through code

#

For example if i would send an embed without being a bot, this would be considered selfbotting

#

automating messages is also selfbotting

rustic nova
#

Pretty much everything that cannot be done by a user and the normal discord client, this is also a reason why Discord does not allow Modified clients like betterdiscord

gilded olive
#

If they weren't so lazy to actually do some of the stuff I see betterdiscord can do maybe it wouldnt be against TOS

rustic nova
#

describe it

earnest phoenix
#

the both constants get executed at time

earnest phoenix
#

**My Code Not Working :-

client.on('message', message => {
    if(message.content.startsWith(prefix + 'mute')){
         if(message.author.hasPermission('MANAGE_ROLES')) {
                 const role = guild.roles.cache.find(role => role.name === 'Muted');
                 const member = message.mentions.members.first();
                 message.channel.send(member + 'Has Been Muted')
                     member.roles.add(role);
            } else {
                 message.channel.send("Please Mention Who To Mute")
             }     
        }
})
```**
misty sigil
#

that doesnt help

#

can i see an error?

earnest phoenix
#

wdym

misty sigil
#

what goes wrong?

mellow kelp
#

what's the problem there

#

don't just say "this doesn't work"

earnest phoenix
#

i host it on heroku i dont get errors

misty sigil
#

bro

mellow kelp
#

have you checked the output?

earnest phoenix
mellow kelp
#

or the app logs

wanton nova
#

i think its with guild.roles.cache

#

it should be message.guild.roles.cache

misty sigil
#

oh shit

#

i overlooked that

mellow kelp
#

o

#

true

#

still it would have been easier to see what the error was

wanton nova
#

everything else looks fine though

mellow kelp
#

yea

wanton nova
#

just add a if (!member) check

earnest phoenix
mellow kelp
#

is that a new error?

earnest phoenix
#

ye

mellow kelp
#

what's the error message

misty sigil
#

11 message events

mellow kelp
#

the image doesn't show the full error

wanton nova
#

wait

misty sigil
wanton nova
mellow kelp
#

yea it does

wanton nova
#

like it cuts off

mellow kelp
#

scroll up

wanton nova
#

you cant

#

its all the way up

mellow kelp
#

or

#

use the cli

wanton nova
#

or do heroku logs -a (app name)

#

ye

mellow kelp
#

heroku logs -t -a my-app

wanton nova
#

whats the -t tag?

mellow kelp
#

well -t is not necessary

misty sigil
#

i am cringing

#

so hard at the 11 message events

earnest phoenix
#

it says line 18 has error

mellow kelp
#

well that doesn't seem to be near line 18

gilded olive
#

shows lines 122 to 133

mellow kelp
gilded olive
misty sigil
#

@earnest phoenix do yourself a favour and don't use 11 message events

#

just use one

#

and else if statements at the very least

misty sigil
#

don't use one message event per command

earnest phoenix
#

i cant do that all

mellow kelp
#

create a command handler

misty sigil
#

i can do it for ~50 commands

earnest phoenix
#

im noob...

mellow kelp
#

it's not that hard to make a handler

wanton nova
#
client.on('message', message => {
if (message.content.startsWith(prefix + "ping") {
}
else if (message.content.startsWith(prefix + "mute") {
}
});
misty sigil
#

if you need a command handler

#

take a look at this

earnest phoenix
#

beginer

mellow kelp
#

well just use commando

#

i kinda hate commando but guess it's useful for beginners

wanton nova
#

i dont really like commando

#

its... weird

mellow kelp
#

yeah

earnest phoenix
misty sigil
gilded olive
#

animal bot development

#

let's goooo

earnest phoenix
#

i dont want handlers

mellow kelp
#

why?

misty sigil
#

why not

mellow kelp
#

how can you not use command handlers

misty sigil
#

it makes your code c lean

#

and pog

earnest phoenix
#

i hate handlers they are complex to use

wanton nova
#

alright lets just focus on that then

misty sigil
#

right i'm out

wanton nova
#

just change guild.roles.cache to message.guild.roles.cache

earnest phoenix
#

lol

wanton nova
#

and you should be good

mellow kelp
#

there was the listeners error too

misty sigil
#

asides from all 11 event emitters

earnest phoenix
#

@misty sigil talking about clean? my index.js has 500+ lines

mellow kelp
#

you have to reduce the event listeners of your client

misty sigil
#

just use else if i am begging you

misty sigil
mellow kelp
#

im out notlikenoot

earnest phoenix
misty sigil
#

mine has 160 lines but thats with an api, sharding utilities and all the other shit

#

i'll reduce it to fuckin 50

mellow kelp
#

sad require() noises

misty sigil
#

just watch me

mellow kelp
#

hey i just looked up and java is a lot more popular on google and javascript and python

#

look it up on google trends

misty sigil
#

just watch this

wanton nova
#

bc minecraft

earnest phoenix
#

can anyone solve my problem?

mellow kelp
wanton nova
mellow kelp
gilded olive
#

LOL

earnest phoenix
mellow kelp
#

use a command hanahdler

earnest phoenix
mellow kelp
#

well

#

learn

earnest phoenix
mellow kelp
#

how else are you gonna stop being a "noob"

gilded olive
#

"im noob" = You spoonfeed me

wanton nova
lyric mountain
#

I mean, do you even know what noob means?

mellow kelp
#

im not really sure

lyric mountain
#

Clip it

#

Don't ask me how

mellow kelp
#

i just searched it up

#

clip it

wanton nova
mellow kelp
#

it appears on the first google search result

#

"javascrip canvas round picture"

wanton nova
#

javascrip

#

yummy

mellow kelp
#

yes

lyric mountain
#

Javascrub

mellow kelp
#

i even searched with a typo

#

isnt that wonderful

earnest phoenix
mellow kelp
#

what's the error again

lyric mountain
#

Oh my, titlecase everywhere

wanton nova
#

message.member

lyric mountain
#

Panik

wanton nova
#

not message.author

#

on line 124

earnest phoenix
mellow kelp
#

and what is it not doing correctly?

wanton nova
#

or wait does that matter

mellow kelp
#

we can't read your mind

lyric mountain
#

Message has author

#

Iirc

#

It returns an user

wanton nova
#

message.author and message.member

#

ye its message.member

mellow kelp
#

oh yeah that

#

User is not the same as GuildMember

wanton nova
#

@earnest phoenix change message.author.hasPermission to message.member.hasPermission

earnest phoenix
#

my bot is spamming Hi in console and its creepy

mellow kelp
#

and that should have thrown an error regardless

wanton nova
#

wait

#

no

#

thats not how it works

#

ignore me lmfao

earnest phoenix
#

i did pateice is the Key to success just wait

mellow kelp
#

something like "User.haspermissions is not a function"

#

guess you didn't read the logs or something

earnest phoenix
#

@wanton nova yo it helped a lil

#

but

lyric mountain
earnest phoenix
#

the bot executes the command but not assigns the role

earnest phoenix
lyric mountain
#

?

mellow kelp
#

search it with ctrl+f

lyric mountain
#

The bot won't print it unless you added it

mellow kelp
#

"console.log('Hi')"

#

it takes 5 seconds

gilded olive
#

oh is that how you search in vs code

mellow kelp
#

yea

earnest phoenix
mellow kelp
#

ctrl+f

gilded olive
#

wouldve been useful like a few hours ago

mellow kelp
lyric mountain
#

5 seconds if your pc is burning some steaks

earnest phoenix
gilded olive
#

I know

lyric mountain
#

There's also a "Search everywhere" hotkey

mellow kelp
#

you know what the solution to these errors is

#

typescript

lyric mountain
#

Idk what it is in vscode

mellow kelp
#

damn

#

javascript is at the same level of google trends as php

lyric mountain
#

Lul

earnest phoenix
#

@wanton nova Thanks my code is working

lyric mountain
#

A ctrl + f fixed it?

gilded olive
#

PHP is hot trash

earnest phoenix
gilded olive
#

why'd you have to call him an idiot tho

mellow kelp
#

bruh

earnest phoenix
gilded olive
#

anyways does anyone know why visual studio is taking so long to download ๐Ÿ˜ฉ

lyric mountain
gilded olive
lyric mountain
#

I'm trying to help

mellow kelp
#

this guy says calling someone an idiot is a joke KEKW

#

check this out guys

earnest phoenix
opal plank
#

glad to see people check the channel topic

lyric mountain
#

He's still offended from when I said "free nordvpn premium lul"

misty sigil
#

160 to 55 lines

gilded olive
misty sigil
#

ez

mellow kelp
#

lul

earnest phoenix
#

lul

gilded olive
#

sad

lyric mountain
#

Like, you could download all IDEs and it'd still be half VS size

mellow kelp
#

its pretty fast tho

#

like

lyric mountain
#

Except delphi

mellow kelp
#

i used to code only with intellij

lyric mountain
#

Delphi is shit

mellow kelp
#

and i installed vscode

#

and like

#

i a m s p e e d

lyric mountain
#

Not vscode

#

Vs

mellow kelp
#

o

lyric mountain
#

Visual studio

mellow kelp
#

oh yeah

opal plank
#

two different things

lyric mountain
#

The big boye

mellow kelp
#

that one's the big boi

lyric mountain
#

Vscode is a text editor

gilded olive
#

18% rn ๐Ÿ˜ญ

mellow kelp
#

tried to boot it up once

#

crashed my laptop

opal plank
#

say that to UE4 editor

#

who would win? 16Gb of ram or one imported .uasset boi?

mellow kelp
lyric mountain
#

Ue4 will have official integration with intellij rider

gilded olive
#

I'm only using it for C# and C++ because I hear VS Code isn't all that great for those languages

misty sigil
#

the imported .uasset boi?

opal plank
#

never in your life try to import a uasset in ue4

gilded olive
#

yea

opal plank
#

that motherfucker tried to get 58GB

mellow kelp
#

o

lyric mountain
#

Use rider

opal plank
#

i saw it trying to allocate that in the console

mellow kelp
#

i could never even wish to use visual studio for anything lmao

lyric mountain
#

Or resharp

mellow kelp
#

my laptop cant even boot it up

lyric mountain
#

Actually, use resharp

opal plank
#

i should be coding

mellow kelp
#

same lmao

misty sigil
#

and 12 line index

#

wait no thats not right

opal plank
#

welp, back to the goblin code cave we go

misty sigil
#

55*

lyric mountain
#

Go erwin, your people need you

misty sigil
#

well actually 54 but i could make it more

opal plank
#

my people call me very non-streamer friendly name

#

they can fek off

mellow kelp
#

closes giant stone cave door

#

back to coding

earnest phoenix
#

my bot is printing my messages in console it s creepy

lyric mountain
#

Figure it out

#

I tried to solve that

gilded olive
#

RPG(Idle RPG) or Economy(dank member) rooThink

lyric mountain
#

For?

#

Bid wars?

gilded olive
#

anything

#

just your preference on which one is better

earnest phoenix
mellow kelp
#

figure it out

lyric mountain
#

I don't use either

mellow kelp
#

it takes two keyboard presses

lyric mountain
#

But dank is quite popular

mellow kelp
#

yea

gilded olive
#

I'm leaning to make an RPG type system

mellow kelp
#

and the guy's commit names are epic

gilded olive
#

isntead of the typical economy

earnest phoenix
#

dot poster i am

mellow kelp
#

check out the dankmemer.lol repo

lyric mountain
#

Rpg is cool, but it can easily fall into afk arena niche

#

A storytelling rpg bot would be dope

#

Like, have a campaign akin to zork or fallout

mellow kelp
#

"Long ago, two races ruled over Earth"

earnest phoenix
earnest phoenix
lyric mountain
#

Booya

mellow kelp
#

the guy's asking for suggestions

#

that's what we're talking about

earnest phoenix
mellow kelp
#

rpg is a game genre

#

bruh

earnest phoenix
#

ok??

earnest phoenix
#

anyways thnx

lyric mountain
#

He didn't answer

#

He stated

mellow kelp
earnest phoenix
earnest phoenix
lyric mountain
#

isnt this a development channel? just curious?

earnest phoenix
misty sigil
#

and 16 line index file

earnest phoenix
#

whats so fxking insulting in that?

rustic nova
#

keep the topic smh

mellow kelp
misty sigil
#

its for all development

mellow kelp
#

anways

#

yea

earnest phoenix
earnest phoenix
lyric mountain
#

Anyway

mellow kelp
#

what were we talking about before

#

oh yea the rpg thing

earnest phoenix
misty sigil
#

nah 650+ lines with 11 event listeners

#

bro

earnest phoenix
mellow kelp
#

dude, could you stop this already?

#

we're trying to have a normal development conversation

earnest phoenix
mellow kelp
#

okay

earnest phoenix
#

anyways im out

lyric mountain
#

Btw ElCholo, what do you think it's better to use in my ranked system?
A - Use players average mmr as division mmr
B - Set fixed mmr per division
C - Don't use division mmr, only player mmr

mellow kelp
#

wait whats mmr?

lyric mountain
#

Like, division mmr affect RP gains

#

Matchmaking rating

#

It's a secret score every player has depending on their performance

mellow kelp
#

oh aight

#

hmm

#

i guess A would work out

#

might wanna ask other ppl too

pure lion
#

A is probably fine

lyric mountain
#

Yeah, I've allowed ranked matches to servers I've given beta access

#

To collect info

mellow kelp
#

thats pretty cool

lyric mountain
#

Currently I use A, but looks like the first player to reach each division has somewhat a headstart

#

Because the division mmr will be same as theirs

pure lion
#

For balance maybe do B

#

But then it's up to you if you want this to be more competitive or not

lyric mountain
#

Hm, I'll have to think more about this

pure lion
#

I think A would probably be called unbalanced at a certain point

#

It is a good concept so maybe you could introduce balance

lyric mountain
#

Not at all because high mmr players rank very fast

pure lion
#

What's MMR again?

#

I really shouldn't be in this channel it's 2 am

misty sigil
#

its 2am here too mmLoL

mellow kelp
#

like a points thing

lyric mountain
#

A secret performance score to use in matchmaking

#

It'll adjust to how well you play

pure lion
#

Yeah do it per player

lyric mountain
#

It is

pure lion
#

I mean divisions or whatever the fuck

lyric mountain
#

But there's also a division mmr

pure lion
#

I don't know mannnn

lyric mountain
#

Like, eventually you'll fall in a dead zone

#

Which is a point where your division will match your ability

#

So it'll be harder to rank

#

Also called "elo hell"

#

Which is intended since it gives a greater satisfaction upon ranking up

mellow kelp
#

you mean make it smaller to fit something?

lyric mountain
#

Get the text length

#

Then define a limit

#

Like

mellow kelp
#

use ctx.measureText

#

there's an example in the discord.js guide

lyric mountain
#

Yeah, there's that too

#

I'd say to use text length as measurement

mellow kelp
#

measure the text with ctx.measureText

#

if it's longer than what you want, reduce the font size

lyric mountain
#

Yeah, measureText will prob be more accurate

mellow kelp
#

confusion

lyric mountain
#

Dude

#

Use rule of three

#

Simple interpolation

mellow kelp
#

sad while loop noises

#

im getting ronaldinho soccer 64 flashbacks KEKW

#

check the discord.js guid on canvas

lyric mountain
#

maximum text size * maximum font size / current text size

mellow kelp
#

they got a pretty good example

#

yea

lyric mountain
#

Panik

mellow kelp
#

they show a do/while loop

lyric mountain
#

I don't mean that

#

Also not pro

#

But why specifically 2.5 or 1.8?

#

Use a fixed height and width

#

And rule of three for font size

mellow kelp
#

meth

lyric mountain
#

Like, let's say the maximum text size is 400px

#

400 * maximum font size / current text size

#

And you want a maximum of 10px to be font size

#

400 * 10 / current text size

#

Then let's say your text is currently 500px wide

#

400 * 10 / 500

#

4000 / 500

#

Your font size will be 8

#

Ik

#

You use a bigger limit then

#

Also, you need to clamp it

#

Else it'll also grow the font if it's smaller than 400px

#

The cool thing is that you don't need to pass actual font size

#

You put that formulae in it

#

The code will decide the size

mellow kelp
#

the code will decide your fate

opal plank
#

SHOW ME WHAT YOU GOT

lyric mountain
#

Math.max(10, Math.min(maxWidth * maxSize / textWidth, maxSize))

#

For example

#

It'll be interpolated between 10px and maxSize

#

maxWidth = maximum available text width
maxSize = maximum font size
textWidth = current text width

#

Btw, this is an inverse rule of three, where the value is inversely proportional to the output

#

Use Math.max and Math.min

#

If you don't clamp it'll be quite wild

#

10 is quite small

#

You'll need to experiment it a bit

mellow kelp
#

yea

#

canvas is all about experimenting with stuff

lyric mountain
#

Also, consider shortening names that are way too big

#

With ...

#

Try 100

#

The formulae is, but idk if the way you're applying it is

#

Oh, wait

#

I don't think that's how u get text width

#

Length will get u the amount of characters in it

#

@mellow kelp come here dude

mellow kelp
#

im trynna edit my level card

lyric mountain
#

Oh

#

Ah, jumapa

#

Ik the issue

#

Length is right

#

Yeah, there's a reason for that

#

If you use characters u gotta set the maximum length in characters too

#

Currently it's using px

#

The first number in the formula is the maximum text size

#

Set it to something like 20

#

Or 25

#

Also, use math.max and min

#

U need to clamp it

#

Around the formulae

#

Math.max(minimum, Math.min(formulae, maximum))

#

Maximum will be the same number as the second value in the formulae

#

Minimum is whatever minimum font size u want

fierce ether
#

const find = await Queue.find({ rank: { $lt: 1 } }).sort({elo: 1}) how do i check if there is 2 items found?

lyric mountain
#

Almost

#

Instead of 20 it'll be the formula

#

800 * 40 / textsize

#

Replace that 2800

#

Set it to 20 or 25

#

2800 would be in px

#

You gotta find a smooth value in character count

#

20/25 is a safe value

#

Most discord names will be around that

#

Yes

#

Try it

#

So, below 25 characters it'll be 40px font size

#

Anything above that will reduce the size, with a minimum of 25px

#

Yeah, experiment with the maximum size

#

You'll want to fine-tune both maximum size and maximum length

#

Maximum length will define the maximum name length before the interpolation kicks in

#

And maximum size will define the starting font size

fierce ether
#
  if ( find.length === 2) {
    console.log("Two players found");
  }``` if the length is 2 it dosent acc do anything?
lyric mountain
#

Find will return u the found value

#

Not the count

fierce ether
#

how do i search for 2 items with the rank: 0?

lyric mountain
#

You could filter

#

To abbreviate?

#

Use substring

#

Then add ... to the end

fierce ether
#

so const find = await Queue.find({rank: 0}, $filter: { size: 2})

lyric mountain
#

Is that js or python?

fierce ether
#

js

lyric mountain
#

someArray.find(val => some conditional that returns true or false)

fierce ether
#

but its not an array

lyric mountain
#

It'll leave only values that equalled true

fierce ether
#
  const QueueTest = new mongoose.Schema({
        id: { type: String},
        elo: { type: Number},
        rank: { type: Number},
  })
      module.exports = mongoose.model('queue test', QueueTest );```
#

its numbers

lyric mountain
#

Pretty much all collections will work

fierce ether
#

oh so

#

const find = await Queue.find(val => rank: 0)?

lyric mountain
#

No

#

const find = await Queue.find(val => val.rank == 0)

fierce ether
#

then count will work?

lyric mountain
#

Yw

fierce ether
#

or length

lyric mountain
#

Size ig

fierce ether
#
      throw er; // Unhandled 'error' event
      ^

TypeError: Cannot read property 'rank' of null```
lyric mountain
#

Put val && val.rank == 0

#

You shouldn't have null entries tho

fierce ether
#

ReferenceError: val is not defined

#

may be an easier way to do what i want

#

im tryna put players into the db

#

and get 2 members in the rank 0

lyric mountain
#

Oh, wait

#

Mb, don't use find

#

Use filter

#

Didn't notice it

#

Ooooo wait

#

That ain't gonna work

#

Just now I noticed it's mongo

#

Sorry, you'll need to use mongo's filter which idk how to work with

rocky hearth
#

does nodejs EventEmitter also accepts numbers as an argument for emit method?
like event.emit(4);

pale vessel
#

args can be any but the name needs to be a string

rocky hearth
#

do you have used ts enums?

#

I want to know a quick way to convert the const enum keys to have the value of string version of keys like

enum EVENT {START, END, ....etc} to be
EVENT = {
START: "START",
END: "END",
....etc
}

mellow kelp
#

you can use Object.keys()

#

It'll give you an array of keys, which for some reason will include each element's value

#

So for example:

pale vessel
#

[insert example]

mellow kelp
#
enum E {
  START,
  END
}

const keys = Object.keys(E);
console.log(keys); // ['0', '1', 'START', 'END']
#

kinda surprised to see that ts allows something typescript-only to be used on runtime

fierce ether
#

can someone help with this js const find = await Queue.findOne({rank: 0}) const stats = await getUserRank(user.id) if(!find) { const queue = await Queue.create({ id: user.id, rank: stats.Rank }) i want players to only match with people in their own rank but i can only search for 0 is there a way to link if that makes sense?

#

so if there rank is 1 only match with people from one

rocky hearth
#

Anyway, using const at begin of enum, eliminates, the numbers as keys

tribal siren
#

let message = message.channel.messages.cache.get('MESSAGE_ID')

#

is it correct?

#

please no tryandsee link

mellow kelp
#

[Insert tryandsee link here]

tribal siren
#

goddamn

rocky hearth
#

u need to fetch it first

mellow kelp
#

you might also want to use messages.fetch() as a fallback

stuck pike
#

Any good dashboard totourial?

tribal siren
#

sorry we're not doing tutorials here

#

this place is ask for code help not ask for code

#

@rocky hearth so how to do it correctly?

rocky hearth
tribal siren
#

oh

#

thanks

rocky hearth
stark widget
summer torrent
#

ask their support server

stark widget
#

Their support server is ded

#

Noone answers there

summer torrent
stark widget
#

Ik but a moderator told me to ask here

rustic nova
#

They didn't expect you to ask about another bot list

stark widget
#

Oh

old cliff
#

Can someone help me ?
This is my code -> https://hastebin.com/ehosigazuy.js

I am using gifencoder and gif-frames to get frames of a gif and encode then into another gif and in between changing some things using canvas.

The gif-frames is able to get the frames and it is getting edited by canvas but the encoder is however not displaying the frames and when I log it it is just a buffer with 7 bytes of data.

https://npmjs.com/gif-frames https://npmjs.com/gifencoder

stark widget
#

Ok, sry.

fierce ether
#

const lossAmount = Math.floor(Math.random() * 15) how do i make it 5-15?

old cliff
#
let lossarr = [5,6,7,8,9,10,11,12,13,14,15];
const lossAmount = lossarr[Math.round(Math.random() * 11)];```
Something like this ? @fierce ether
atomic vault
#

how can i send private message like Clyde bot

old cliff
#

you can't

#

or just DM the person

atomic vault
#

not like that

lament rock
pale vessel
#
  • 1? wouldn't Math.ceil() work?
lament rock
#

Remind me what ceil does

pale vessel
#

opposite of floor kekw

atomic vault
#

how can i send private message like Clyde bot
?