#development

1 messages · Page 610 of 1

pallid zinc
#

.setImage({url: 'url of image'})

#

If you want image

earnest phoenix
#

its a canvas sueur

pallid zinc
#

I don't know what a canvas is

earnest phoenix
#
let canvas = new Canvas(50, 50)
    .setColor('#AEFD54')
    .setTextFont('28px Impact')
    .addText('Hi', 10, 10)
    .toBuffer();





 const embed = new Discord.RichEmbed()
 .setColor('#ce5016')
 .setImage(canvas)
 .setTimestamp()


message.channel.send({ embed });```
#

that

pallid zinc
#

Ok

#

I thought you want to do painting

earnest phoenix
#

i can send canvas in a channel

#

but not in a embed

#

well yes use common sense, the image asks for a url

ruby dust
#

normally uploading files and include image in an embed are completely different things

#

since an attachment is kinda it's own embed already

pallid zinc
#

Hmm

ruby dust
#

you can kinda get the idea of "embedding" an image from an external source just by knowing that it's an "embed object"

indigo crane
#

Nekos.life api endpoint isnt good because of the minors/lolis, anyone know of other api endpoints i could use instead? As it stands all commands that use the nekos.life endpoints have been removed

#

I know I can pull images from subreddits and I do, but it seems slow to reply.

amber fractal
#

You could not have nsfw commands 🤷

unique nimbus
#

I mean nsfw commands shouldn't be used but a lot of people wants it

indigo crane
#

^

unique nimbus
#

I would add nsfw however I believe bots shouldn't require nsfw to grow

#

oof

amber fractal
#

I just despise them

mossy vine
#

why are you defining a client tho

indigo crane
#

i jsut copy paste the same thing from all the commands for new commands

peak quail
#

:/

idle basalt
#

you can use nekos.life non-nsfw as long as you dont make calls to the nsfw endpoints

indigo crane
#

Yeah I used it a couple times for non-nsfw commands

opaque eagle
#

Why would u define the client in the command file... it gets passed in through the function.

#

And still, this client would be separate from the client in your main file, so one would not know what the other does

carmine echo
#

Am I allowed to collect user data? Like the messages that trigger the bot and server joins?

#

Should that be specified in the bot's ToS?

slender thistle
#

Using commands most likely, server joins I really doubt

amber fractal
#

I have many pictures of this

earnest phoenix
#

sa

scarlet phoenix
#

I remember back in the day when all end user data stored by 3rd party apps had to be encrypted. One of the least enforced rules I have ever seen.

#

Now its just "reccomended"

amber fractal
#

No, it's required

quartz kindle
#

User IDs and such are protected by default as they do not contain user identifiable information outside of the discord ecosystem

#

Ie, nobody can track someone or get their email addresses from user ids

amber fractal
#

Other things though

quartz kindle
#

Logging command messages should be perfectly fine as well

#

Many people do that for debugging purposes

#

Whats not fine is logging messages that have nothing to do with the bot

#

I used to do that lmao

mossy vine
#

can you have a class without a constructor in javascript?

#

i want to have a class that can have properties and functions, but dont necessarily need the constructor

inner jewel
#

class C {}

mossy vine
#

ah so it just works without that

indigo crane
#

erm you can track find someone by there discord id, theres site that send you there user info but other that you cant do much lol

#

or jsut use <@ID> to get a mention of them on pc which you can then add them from lol

inner jewel
#

only works if the user is cached

#

on your client

indigo crane
#

use that to search for there id then lol

inner jewel
#

any bot can fetch that info

#

¯_(ツ)_/¯

amber fractal
#

That doesn't do much

inner jewel
#

and discord has taken down similar things before (although for tracking which guilds someone is in, which also abused selfbots)

scarlet phoenix
#

Ah I misread that, the updated the wording a while ago and I thought they stopped requiring it, just instead suggesting it.

#

So now real question, how many people actually use an encrypted db or datastore? I have my whole db encrypted, but I feel like thats not too popular.

quartz kindle
#

I have json files lmao

#

But im moving to sqlite eventually

earnest phoenix
#

.

carmine echo
#

json?

amber fractal
#

Ye, Tim known for his json mmLol

opaque eagle
#

Can't believe a certified dev would use json as a db

amber fractal
#

I mean

#

no one would even know if he didnt say it whenever he was asked

opaque eagle
#

yeah

spring ember
#

json files as a db is just waiting for db corruption

scarlet phoenix
#

I mean mongo is just glorified json (I know not really), but cmon. I feel like there is little excuse to not use a decent persistence method

carmine echo
#

My friend prefers json over sqlite because apparently sqlite gets corrupted all the time

#

unlike json

dusky marsh
#

What

carmine echo
#

exactly

dusky marsh
#

That's 200iq for sure, the next Einstein

scarlet phoenix
#

The amount of time you would invest to make a transaction system for using json in a transactional thread-safe way would be way too much. I see no real reason to not switch to a decent rdb or nosql db/ds.

opaque eagle
#

Postgres ftw, although a good free nosql db like firestore also works well

scarlet phoenix
#

I havent tried postgres yet. I just have been stubbornly on the mysql train for a while.

spring ember
#

firestore is for apps

#

oh wait it isn't

#

uwu

carmine echo
#

I am a horrible web dev and i need help

#

how do I make 2 divs have the same height

vague coral
#

Div1.height = div2.height

carmine echo
#

uhh I'll try this, but I'm looking for a css solution

vague coral
#

Make them use the same class?

carmine echo
#

They do, but it's all responsive

vague coral
#

Put them in a container div and make them height 100%?

carmine echo
#

yea I tried that but it's either my horrible css skills or the framework doing it's thing

#

https://antiowo.xyz/

vague coral
#

Flex is the new hot isn't it

#

I like the way you think

#

Which framework are you using?

carmine echo
#

materialize, bad I know

#

the issue is, it looks fine on my monitor, but it looks bad on higher res screens

#

and on tablets

#

just

#

The divs are in a container, I've tried making the height 100%, inherit and aaa it's just not working

spring ember
#
event.JDA.getGuildCache.stream.filter(g => (g.getMemberCache.stream.filter(m => m.getUser.isBot).count.asInstanceOf[Double] / g.getMemberCache.size.asInstanceOf[Double]) > 90/100).count()
carmine echo
#

maybe I shouldn't be using materialize

spring ember
#

so this doesn't actually return the guilds with 90% bots

#

and I don't know why

vague coral
#

Wrap it up with a Collectors to List?

#

@spring ember doesn't count() just count the elements in a stream?

spring ember
#

yes

vague coral
#

collect(Collectors.toList()) returns the elements in a list

spring ember
#

that was not my issue

vague coral
#

Well okay then

scarlet phoenix
#

Is it because you are using the guild cache? I have a feeling the cache wont contain all guilds.

vague coral
#

I'm not familiar with jda but could it be that m is already a member and doesn't need a call to getuser?

#

What object is stored in the member cache if not members?

spring ember
#

the issue was I didn't convert 90 and 100 to double

#

by doing 90.0

carmine echo
#

why even do 90/100 and not 0.9

spring ember
#

so it was all the guilds with basically any ratio

#

I dunno

vague coral
#

At least we sorted it all out

scarlet phoenix
#

On a side note, when dealing with larger bots try to avoid using the guild cache when you want to iterate through all guilds. Looking at my bot with ~6700 guilds it is a far cry from a complete list.

spring ember
#

Well I was just going to check the amount of bot farms

#

Fetching the guilds will take unnecessary time and resources

earnest phoenix
#

yo

#

I'm trying to modify this modmail bot

#

I'm trying to understand it

#

Can somebody tell me where it actually interprets the message?

scarlet phoenix
#

I am not a js person or eris either but a quick look seems to be here.

#

and there are 2 more listeners on lines 66 and 142

#

Why they have 3 listeners, the world may never know

wooden lance
#

Anyone know how I can make a command that check the bot's ping? (discord.js)

scarlet phoenix
wooden lance
#

Thanks

grim aspen
oblique dock
#

Anyone know how to change a nickname when I assign a role? New nickname should be [nickname] [role].

earnest phoenix
#

which library

chilly sequoia
#

lets try starting with what language your bots in,

oblique dock
#

dyno

amber fractal
#

wait

#

what?

chilly sequoia
#

custom commands

grim aspen
#

i think he means like which library you're using

#

not the bo-

#

wait

#

dyno

amber fractal
#

context

earnest phoenix
#

this isn't dyno support, go to their server for that

amber fractal
#

We aren't the dyno support sevrer

oblique dock
#

ok, ty

chilly sequoia
#

well then lol guessing i dont post github repo to Dyno Custom Commands?

#

would be helpful for the guy

#

he gone man, went woosh

earnest phoenix
#

@Fritz#0001

west spoke
#

They left xd

wooden lance
#

xD

pliant needle
#

Oh, note to anyone else who also runs a modular bot: disable normies from being able to use these commands.

Would hate for someone to run an unload command for a core feature and thus it suddenly stops working xD

dusky marsh
#

We been knew dawg, we been knew.

pliant needle
#

Except mayhap not the newbz

Then again, they most likely wouldn't have a modular bot

ruby dust
#

disable the command disabler

hushed berry
#

@spring ember just for reference, it was returning all guilds because 90/100 evaluates to 0 cos of integer division

ruby dust
#

Let's say that I want to randomize one of user inputted submissions, and they all have a number of specific upvotes and downvotes, how would I use this voting system to improve the chance of a more upvoted submission to be randomized? Or more specifically, with sqlite?

earnest phoenix
#

i mean

#

the best way to keep people form misusing your bot

#

is by deleting the whole thing

#

so do that instead

idle basalt
#

deive, simple answer: put x number of the same element into the array based on the votes and then pick a random element

#

if youre handling lots of input, this is pretty inefficient but youd have to write a far more sophisticated weighting algorithm to fix that. you can google various options

west spoke
#

Random integers?

idle basalt
#

?

#

he wants random with weights

#

at least thats how i understood it

heavy spade
#

i am getting a error can someon hlp

#

so i have defined user for kick but i try to make a const for ban to defin user and it comes up with a error saying its already defined but then when i try to use the ban command it says user isnt defined

#

anyone lol

#

anyone know what to do????

#

DM me if you can help me because i might be gone in a minute

#

does like anyone know??

earnest phoenix
#

its defined in code as a variable

#

during runtime its value is undefined because it cant find the user

heavy spade
#

It had the error in the terminal

#

Hmm

#

Could I define it with a var instead of a const then call on the var for kick and ban? Message me I gota go to bed

soft eagle
#

is this right if (message.guild.channel.id !== reportschannel)

#

nvm figured it out

heavy spade
#

Lol

dull bobcat
#

@heavy spade define user

heavy spade
#

?

#

Lol

dull bobcat
#

You defined member not user

heavy spade
#

I have to define user to call on it

#

Fuck I am confusing

dull bobcat
#

You haven’t defined it tho

#

Show me where u defined it

heavy spade
#

O I can define member

dull bobcat
#

That’s already what you did

heavy spade
#

Yes

#

I need to call on user to though

dull bobcat
#

Yes, show me the code where you defined user

heavy spade
#

It’s in kick command and I don’t have my laptop

#

It’s fucking 3am lol

dull bobcat
#

Well seems like u haven’t defined user or else you wouldn’t get that error

heavy spade
#

I have defined it for kick command

#

But for the ban command

#

I had it and it said that it was already defined so then I took it out

#

Then said it wasn’t

dull bobcat
#

Dude then you have to require the file where it’s defined or make it global variable

heavy spade
#

I might make it into a var

dull bobcat
#

Don’t use var use let

heavy spade
#

Ok

#

I am tired as fuck

#

Thx mate

#

Gn

#

I will get back to you tomorrow and send you it

earnest phoenix
#

Can someone give me a suggestion on how should I make a person obtain something when it spawns?

lament meteor
#

what do u mean

earnest phoenix
#

like pokecord’s pokemon spawn

#

im making something like that but i dont want to copy pokecord by making peopel guess it’s name

indigo crane
#

my ban command wont work and i dont know why...~

#
const Discord = require("discord.js"); 
exports.run = async (client, message, args) => {
  if(!message.member.hasPermission("BAN_MEMBERS")) return message.channel.send("You don't have permisson")

  let logs = message.guild.channels.find("name", "logs");
  if(!logs) return message.channel.send("Could not find a logs channel.");

  let user = message.mentions.users.first();
  if(!user) return message.reply("Please mention a user");

  let reason = args.join(" ");
  if(!reason) reason = "No reason given";

  message.guild.member(user).ban(reason);

  let logsEmbed = new Discord.RichEmbed() 
  .setTitle("User Banned")
  .setFooter("User Ban Logs")
  .setColor("#ff0000")
  .setTimestamp()
  .addField("Banned User:", `${user}, ID: ${user.id}`)
  .addField("Reason:", reason)
  .addField("Moderator:", `${message.author}, ID: ${message.author.id}`)
  .addField("Time:", message.createdAt)
  .addField("Channel:", message.channel)

  logs.send(logsEmbed);
}

module.exports.config = {
  name: "ban",
  category: "admin",
  description: "ban someone",
  usage: "ban",
  aliases: ["banhammer"]
};```
#

error is that args.join is not a function but i dont understand >~<

earnest phoenix
#

@earnest phoenix .abduct Pokémon

#

ok thanks for the suggestion

lament meteor
#

@indigo crane check if the user is banable. also if it gives any error send it here

indigo crane
#

@lament meteor majority of my caommands stopped working all with the same error that ars.join is not a fucntion, but iv used that for a while now

lament meteor
#

is args a array?

dull bobcat
#

@indigo crane how did you define args

pallid zinc
#

Npm install --save args

#

@lament meteor nope it's argument

lament meteor
#

what argument?

pallid zinc
#

Args = argument

#

In java, python

slender thistle
#

Where is the args variable coming from

pallid zinc
#

What you mean

grim aspen
#

@dull bobcat which library are you using

earnest phoenix
trim saddle
#

javascript i guess

earnest phoenix
#

thx

#

I choose user data or public data?

#

@trim saddle

trim saddle
#

i've never registered for a youtube api key

earnest phoenix
#

OK

trim saddle
#

figure out which one is for your usage

earnest phoenix
#

ok

#

I just put the API, but when I made the play command with the link of my music, the bot joins the vocal and leaves immediately saying "the music is finished."

#

If someone know what it is:/

mossy vine
#

its your code

molten yarrow
#

@indigo crane try this let reason = args.slice(1).join(' '); if(!reason) reason = "No reason provided";

#

And u can use

      .catch(error => message.reply(`Sorry ${message.author} I couldn't ban because of : ${error}`));
    message.reply(`${member.user.tag} has been banned by ${message.author.tag} because: ${reason}`);``` 
For the ban
amber fractal
fiery stream
#

@kind wyvern ayy

kind wyvern
#

Hey bro

fiery stream
#

Kidha

kind wyvern
#

Kya? @fiery stream

#

What

fiery stream
#

How are you

kind wyvern
#

U indian?

#

Talk*

fiery stream
#

Thats how u install py @kind wyvern ^^^

kind wyvern
#

Still not recognizing

fiery stream
#

Uhh oh

kind wyvern
#

Ive named the variable in PC settings as PYTHON.exe and add the file path

fiery stream
#

Maybe pip’s servers are down

kind wyvern
#

Should I rename path variable name?

fiery stream
#

Nah

kind wyvern
#

Vs code is recongnising PY BUT

fiery stream
#

Install python in vs code

kind wyvern
#

Done

#

Btw how?

#

In vs code at left bottom it's coming py3.6.5

slender thistle
#

Google, please

kind wyvern
#

Bro I am asking him not u so

fiery stream
#

There should be option on left side

kind wyvern
#

Better come dm bro @fiery stream

slender thistle
#

That's pretty cocky for someone who can't add python to PATH

kind wyvern
#

I've done it

slender thistle
#

Welp, I wonder why your OS cmd doesn't recognize pip at this point

fiery stream
#

Chill @slender thistle

slender thistle
#

I'm literally calm

earnest phoenix
#

how do you even manage to run a bot like thatlol

fiery stream
#

I aint a python expert

#

And my bot runs on node

#

Not python so yea

#

And i wasnt getting the problem

earnest phoenix
#

not you, the other person

fiery stream
#

Ohhk

quartz kindle
#

people forget than they need to restart their computers to apply PATH changes on windows

fiery stream
#

I think thats the problem he had

#

He didnt restart

slender thistle
#

Doesn't it also say that when installing Python to PATH

fiery stream
#

Yea

#

Theres option on second tab

#

After it opens up

#

What

grim aspen
slender thistle
#

Is that a request for spoonfeed I see

fiery stream
#

😆

latent valve
#

@slender thistle thanks man 😉

slender thistle
#

No problem I guess

fiery stream
#

😂

#

This is kinda wierd

slender thistle
#

Sure is

fiery stream
#

Btw what code library are u dev of

slender thistle
#

dblpy

fiery stream
#

Ohh

sinful lotus
#

is it possible to use a placeholder to specify the default value in create table statement in sql ?

west spoke
#

Ehhhhh

lethal sun
#
Err:2 http://security.ubuntu.com/ubuntu bionic-security InRelease       
  Could not resolve 'security.ubuntu.com'
Err:3 http://ppa.launchpad.net/webupd8team/java/ubuntu bionic InRelease 
  Could not resolve 'ppa.launchpad.net'
Err:4 https://deb.nodesource.com/node_11.x bionic InRelease
  Could not resolve 'deb.nodesource.com'
Err:5 http://archive.ubuntu.com/ubuntu bionic InRelease
  Could not resolve 'archive.ubuntu.com'
Err:6 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
  Could not resolve 'archive.ubuntu.com'
Err:7 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
  Could not resolve 'archive.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic/InRelease  Could not resolve 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease  Could not resolve 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-backports/InRelease  Could not resolve 'archive.ubuntu.com'
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease  Could not resolve 'security.ubuntu.com'
W: Failed to fetch https://deb.nodesource.com/node_11.x/dists/bionic/InRelease  Could not resolve 'deb.nodesource.com'
W: Failed to fetch https://download.sublimetext.com/apt/stable/InRelease  Could not resolve 'download.sublimetext.com'
W: Failed to fetch http://ppa.launchpad.net/webupd8team/java/ubuntu/dists/bionic/InRelease  Could not resolve 'ppa.launchpad.net'
W: Some index files failed to download. They have been ignored, or old ones used instead.```
#

Did sudo apt-get update.

earnest phoenix
#

im in desperate need of some help if possible

#

if you could possibly help can you dm or pin me thanks

dusky marsh
#

Just ask your question

#

Saying you need help doesn't help you at all

late hill
#

@sinful lotus weEeBB

sinful lotus
#

smh Im asking a question

scarlet phoenix
#

@sinful lotus you can use the DEFAULT syntax like you have

sinful lotus
#

Thonk I'll try again tommorow

#

weird

scarlet phoenix
#

You need SET DEFAULT

sinful lotus
#

oh instead of default only?

scarlet phoenix
#

Unless its null, in that case you could do DEFAULT NULL

#

For example SET DEFAULT '-y'

#

yeah

sinful lotus
#

for the other statements it worked fine without set

#

or I only neeed that on ?

scarlet phoenix
#

Whoops my bad, I was looking at old docs, mysql 5.7 right?

sinful lotus
#

its mariadb

scarlet phoenix
#

Ok. I think you need ' around the ? on the prefix line

sinful lotus
#

using that made the prefix ?

scarlet phoenix
#

Do you not want that?

sinful lotus
#

and not actually the one on the config file I have set

#

its just so that I can change the prefix when switching between prod and beta code

#

without messing with sql syntax there

scarlet phoenix
#

Ok, in that case I would not set a default in prefix then.

#

You could put a {} there then format the string with the thing in the config file if you want that to be the default

sinful lotus
#

yeah I do have that on the config file already, just that ? stuff on create table is where the things got a bit annoying

oblique dock
#

is there a way to give bot access to multiple channels at same time without individually adding them to each channel?

scarlet phoenix
#

Give them a role that has access to those channels? Other than that I cant think of much.

oblique dock
#

say i have 50 channels already made and want to add bot to all 50.

#

no role currently has access to those 50.

dusky marsh
#

Make the bot admin

sinful lotus
#

ask the server owner to give your bot acceess

scarlet phoenix
#

Thats very dangerous if you are not familiar with the bot

#

To the admin thing

dusky marsh
#

It's dangerous, but itd work

scarlet phoenix
#

true

sinful lotus
#

yeah but I dont recommend that

#

like your bot is only music and it needs admin

#

omega lol

west spoke
#

xd

#

Mine only needs kick/ban to run those two commands

#

I dont have any other ones xd

hushed berry
#

@sinful lotus lmao my music bot's invite has admin

sinful lotus
#

lmfao nice perms

hushed berry
#

only cos we used to get absolutely swamped with idiots that were like "your bot doesnt work" and then we'd take a look and they had some ridiculous permission setup

dull bobcat
#

@grim aspen Why did you ping me?

earnest phoenix
#

Who can make me npm install and give me the files?

dull bobcat
#

@earnest phoenix Wtf why dont you?

#

You dont even need to do npm install

earnest phoenix
#

So just npm install I'm on the phone. Or npm install eris ?

dull bobcat
#

What are you on about?

earnest phoenix
#

A mail bot. When you MP the bot, its sends a message to a staff and it must respond (kind of ticket but in private message)

#

And I code everything on the phone:)

dull bobcat
#

Are you insane lmfao

#

Why do you code it on your phone?

earnest phoenix
#

It's a challenge

#

That a buddy gave me

dull bobcat
#

Anyways, you don't need to run "npm install" to make a bot

earnest phoenix
#

No, it is to install a package that gives Eris

#

and when we do NPM install its gives the package, at least, it gives full package of which Eris

dull bobcat
#

Uh why would you want Eris?

#

You gonna make a discord bot? Then make one yourself

earnest phoenix
#

For the system in MP to work, the logs and many other things.

#

I already have a discord bot personally. The mail bot is the v2

dull bobcat
#

yeah good luck, but coding on your phone is just generally a stupid idea

earnest phoenix
#

maybe

exotic badger
#

its a terrible idea

dull bobcat
#

^

earnest phoenix
#

But it's also simple You know

dull bobcat
#

No it's not

#

How are you gonna run the bot on your phone?

#

You need access to a computer that has NodeJS installed

#

And if you have then why not code on your computer

#

Doesn't matter if its a challenge

#

Helping you with this would be a pain in the ass for us too, I cant imagine how annoying it would be to you

#

So, just stop

#

Or get your packages yourself

#

or good luck making someone else install packages for you and then send it to you

idle basalt
#

fym you dont need npm install to make a bot 🤔 nobody writes things with zero dependencies

#

you want him to query the api himself with nodes http module? thats arguably worse than coding on a phone

scarlet phoenix
#

I mean if you used kotlin or java you could run a bot on an android phone pretty trivially. But why, god why, would you ever want to do that?

idle basalt
#

you can code on your phone through one of those online ides

west spoke
#

Yeh

#

or get a server viewer and host it on there. I haven't tried it but I will later

scarlet phoenix
#

I thought he meant run the bot on the phones hardware. Coding from a phone is also trivial, all you need is a text editor, although the experience would suck really badly

slender thistle
#

Not recommended way: visiting the link
Recommended way: none

#

Any request contains an IP

fiery birch
#

Don't send that here please thanks

late mauve
#

Guys how to change domain DNS on cloudflare?

unique nimbus
#

o

dull bobcat
#

@fiery birch If you read carefully i cencored out the full link lmfao

#

God and you a mod too

fiery birch
#

Yea with a spoiler

dull bobcat
#

No

fiery birch
#

And some hyphens or whatever shit

#

Regardless, I care not to take dumb risks

#

Shrug

dull bobcat
#

Shrug what

slender thistle
#

It's still the same website, so I doubt that changes much

fiery birch
#

Fair

slender thistle
#

Especially if it's a grabify link

dull bobcat
#

No you need the tracking code which is set as the ID when changing domain

#

And i changed the ID to "NOT_GONNA_SHOW_THE_ID"

fiery birch
#

We take no risks, ty

slender thistle
#

But if I click on that regardless of ID, it still tracks my IP, does it not

dull bobcat
#

The link is not real lmfao all i asked for was a fkn tip lol

fiery birch
#

Stop posting pics with the url

#

Next one is a mute

dull bobcat
#

The URL is fucking fake how braindead are you?

slender thistle
#

Welp, whatever

mossy vine
#

moot

fiery birch
#

Uh I wanna ban

mossy vine
#

just mute

fiery birch
#

@mossy vine @mossy vine vote

mossy vine
#

you tagged me twice

#

i vote yes lmao

slender thistle
fiery birch
#

Shit that's not shiv

dull bobcat
#

mute me then

mossy vine
#

correct

#

i am not shiv

dull bobcat
#

braindead idiot

mossy vine
#

he left lmaooooo

fiery birch
#

Who took my ban

slender thistle
#

Welp, guess that's a ban

#

They left

fiery birch
#

oh

slender thistle
#

10/10 reasons plz do it again sometime Kappa

fiery birch
waxen yarrow
#

hey, i seem to remember some bot has an embed visualiser?

#

what's the command again

#

just to see what fields are what etc.

grim aspen
#

like for a bot to send an embed

#

?

waxen yarrow
#

no like
it uses every single location in the embed possible

#

and shows what is what

#

you know what nvm

opaque eagle
#

Also why u steal Moose’s name

west spoke
#

waitwhydidyoudeleteit

#

Anyways. If I were to add a search option for posts, and I want it to search through a specific area.
Ex: neko-bot.net/posts/
How would I go about doing that
(Html)

heavy spade
west spoke
#

What I've gotten so far led me to something like this:

#

neko-bot.net/posts/post?=10

#

But what I'm wanting is it to also have a .png at the end.

#

So like this

#

neko-bot.net/posts/post15.png

opaque eagle
#

In the serenity docs, where can I find the properties of a message?

spring ember
opaque eagle
#

ty

idle basalt
#

neko, just concatenate .png to the end of your string...? im not sure what youre trying to do

#

basically every language supports something like this: yourPostName + ".png"

west spoke
#

Html surprisingly doesnt

idle basalt
#

wat

west spoke
#

I tried it

#

It will complete the url in the bar like this

#

neko-bot.net/posts/post?10

#

Wont even include the .png

idle basalt
#

if youre editing the html dynamically with js you can change everything about the element

west spoke
#

Possibly. I'll look into it.

dusky bear
#

Anyone use Jimp

quartz kindle
#

jimp is slow

shy rose
#

Jimp is less pain than getting cario to compile

#

Still slow though by comparable standards with others

quartz kindle
#

i never had any problem compiling it

#

also, sharp doesnt require it afaik, and its tens of times faster

dusky bear
#

I was looking at my options since canvas was giving me trouble

opaque eagle
#

How would I add a role to a member in serenity?

bright spear
opaque eagle
#

Man how do u ppl find this

#

I browsed the docs so long and couldn't find anything

#

Welp I clicked onto the member property from the Message model, so it showed PartialMember instead of Member... that's prob why

bright spear
#

tf its not hard

opaque eagle
#

O-O

#

u blew my mind for real, no joke

#

Wish that site had a dark mode

heavy spade
#

so the !ban works but not the !kick how can I make it so user is defined for boh !ban and kick

bright spear
opaque eagle
#

Wdym by not approved?

bright spear
#

@heavy spade you dont have the let user = code for kick

opaque eagle
#

I found it on the Discord API server

bright spear
heavy spade
#

fuck

#

i do for !ban but when i put it in !kick it says its already defined

#

but when i take it out it says its not defined

bright spear
#

well kick comes before ban

#

so you can put it in kick but not ban ig

#

but its better to put each command in a separate file and use a framework/command handler

heavy spade
#

i can put it in kick but then ban doesn't work

#

hmm

#

true

#

could i make a new folder and put the command in it with !ban then have !kick in the main file

#

just to make sure I did everything right

#

@bright spear ?

bright spear
#

you would need to export it and require it in the main file

heavy spade
#

how would i do that

#

i am kinda new to coding lol

#

@bright spear sorry for ping

bright spear
#

google it

heavy spade
#

ok

opaque eagle
west spoke
#

Anyways. @idle basalt ty I got it working.

worthy iron
west spoke
#

Betteethanicando

idle basalt
#

play around with the options until you get something youre looking for and then youll know what to change in your code

abstract quarry
#

how do I set up localhost

#

so I dont have to run my HTML code and reload the webpage

spring ember
#

What

#

localhost is your domain from your pc

#

You don't run html code you run a server that serves it

abstract quarry
#

how

#

So I don't have to run my code and reload the page

#

localhost does it automaticly

spring ember
#

Run a web server on your pc

abstract quarry
#

Is that free?

spring ember
#

Yes

#

On your pc

abstract quarry
#

Ok

ruby dust
#

You'd still have to be refreshing the page, it's just how the web pages work

spring ember
#

But to make that accessible you need to port forward

#

Yeah also that

#

There is no hot reload

abstract quarry
#

ok

#

I will do it the old way

mossy vine
#

@abstract quarry if you just want to view static html pages you can run python -m http.server

opal stag
#

i have a bot

#

y dont i have the rank

#

my bot is called Google Chrome

#

and its prefix is chrome!.

slender thistle
opal stag
#

o.k

#

hreu

earnest phoenix
#

Hello. In JDA I wanna check if an argument in a command is a user's mention, how can I do?

#

compare the arg to user's mention (<@id> & <@!id>)

#

no actually

#

i juste wanna know if it's a mention, not know if it's a mention of a specific user.

#

i guess use regex for that? or do substrings to extract the id and check if it's valid

#

we can do something like that: User metion = JDA.getUser(string); and check if it return null ?

#

well, no

#

Oof

opal stag
#

who uses javascript here?

earnest phoenix
#

getUser asks for an id

opal stag
#

i do

earnest phoenix
#

not a mention

#

I have a problem with my music bot, I make the command play with a link and it tells me its in the console. log:
Could not extract html5player key: https://www.youtube.com/yts/jsbin/player_ias-vflXZ59b4/fr_FR/base.js

mossy vine
#

you could just use existing solutions

earnest phoenix
#

I would like to know what the solutions are. rire

opal stag
#

@charred wolf hi

mossy vine
#

ytdl-core, lavalink, etc

earnest phoenix
#

I'm on Android, it's for her?

opal stag
#

jcehvci

mossy vine
#

oh are you trying to code on a phone?

earnest phoenix
#

🙏

#

Yes, it's pretty simple

#

But if not on computer, its working?

opal stag
#

i am waiting for my rank. (bot developer (not certified))

mossy vine
#

here is a great guide on how to code on mobile. https://cyber28.xyz/codeonmobile

earnest phoenix
#

@mossy vine i know

mossy vine
#

@opal stag you need to submit a bot to the website (discordbots.org) and wait up to a week for it to be accepted

opal stag
#

ok

earnest phoenix
#

But if I run from my computer, will it work? @mossy vine

opal stag
#

i submiteed

#

before

mossy vine
#

@earnest phoenix most likely not

earnest phoenix
#

Why ?

mossy vine
#

arent you the guy that cant use packages?

earnest phoenix
#

Yes, how do you know?

mossy vine
#

i remember you talking about it here. just stop coding on a phone and use packages

#

you most likely wont be able to extract audio just with the youtube api

#

most likely

earnest phoenix
#

Here are the packages written in the hand and what I also have:

var Discord = require("discord.js");
var fs = require('fs');
var ytdl = require('ytdl-core');
var https = require('https');

var musicStream = null;
var dispatcher = null;
var globalVolume = 0.2;

var text_channel = "573123191162273815";
var voice_channel = "573123090066702336";

var bot = new Discord.Client();
const token = "MY TOKEN";

var queue = [];
var now = null;```
#

So how to get user with a string ?

mossy vine
#

oh you are using ytdl-core

#

then why do you need the api Thonk

earnest phoenix
#

I have one but I do not know how to introduce it.

mossy vine
#

what

#

read the docs jeez

earnest phoenix
#

I know how to introduce it but here
var key = "API KEY"
It agrees, but in the rest of the coding.. I do not know. and I read the doc

#

Otherwise I pass the coding xD?

#

@earnest phoenix JDA-Utilities has a regex for checking if a mention is a user mention iirc

#

public final static Pattern USER_MENTION = Pattern.compile("<@!?(\\d{17,20})>"); // $1 -> ID

code snippet from it

#

I found this @earnest phoenix

#

event.getMessage().getMentionedUsers()

#

But how to get the location of the mention ?

#

i guess use message content.indexOf(first user out of the mentioned users collection.getAsMention())

unreal rampart
#

i recently noticed there is a new feature that can disconnect people from voice channels, how can i make my bot do this, if it is in the api already

earnest phoenix
#

it probably isnt implemented in wrappers yet but i'll get the endpoint thats used

#

PATCH https://discordapp.com/api/v6/guilds/:guild id/members/:member id

body payload:

{
channel_id: null
}
pallid zinc
#

Can anyone explain me how youtube notification works ? (discord.js)

earnest phoenix
#

like the actual youtube notifications on the website?

pallid zinc
#

Nope on discord

#

Youtube-watch

mossy vine
#

???

grim aspen
#

the only way i can explain it, it recieves the notification via the api link or package

mossy vine
#

its literally open source

pallid zinc
#

Yup I know

earnest phoenix
#

i did something like that embed.setAuthor(":white_check_mark:") but reaction won't appear

#

Someone know why?

mossy vine
#

\✅

#

try pasting that

pallid zinc
#

You just have to add that emojis

#

embed.setAuthor("![tickYes](https://cdn.discordapp.com/emojis/315009125694177281.webp?size=128 "tickYes") ")

cerulean jacinth
#

queen sentinel
#

did you just

pallid zinc
#

What I just

opal stag
#

can i get help with getting my bot 24/7

#

?

pallid zinc
#

How can I check my command

#
const YouTubeWatch = require('youtube-watch')
const client = new Discord.Client()

const yw = new YouTubeWatch({
    secretKey: 
    hubCallback: 'http://your-ip-or-domain/',
    hubPort: 9001,
});
 
yw.on('start', () => {
    let channels = ['https://www.youtube.com/user/ROCKSTARvvk',
                    'UCGY2w6hIZWwyxasBUN7wbaQ'];
 
    yw.watch(channels);
});
 
yw.on('notified', video => {
    console.log(`${video.author} just uploaded a new video titled: ${video.title}`);
  client.channel.get(547065494507749396).send(`${video.author} Just uploaded a video ${video.title}`)
});```
opal stag
#

test what it does

pallid zinc
#

I want to check my command

opal stag
#
const Discord = require('discord.js');
const { prefix, token } = require('./chromebotconfig.json');
const client = new Discord.Client();
#

that is my first 3 lines

pallid zinc
#

Lol

#

Delete it dump

#

You revealed you token

opal stag
#

ok

#

but dont use it

idle basalt
opal stag
#
{
    "prefix": "chrome!",
    "token": "my token"
}
idle basalt
#

refresh your token

pallid zinc
#

Refresh it

opal stag
#

ok

pallid zinc
#

Nope

mossy vine
idle basalt
#

it takes 5 second and with the number of bots here i wouldnt be surprised if someone has the message logged

pallid zinc
#

Revealed bro

idle basalt
#

lol nothing is safe

opal stag
#

its changed

pallid zinc
#

Ok

#

Better

opal stag
#

NIhINOIYHOm.BUYNAGNU-TngjyGYu.NYIytjvbuNFRjs.UYUGNhudeu is not my token

mossy vine
#

ok

earnest phoenix
#

Its called how the coding which, when the bot joins a server, it sends a private message to the founder of this server by telling him things?

knotty steeple
#

what

earnest phoenix
#

When an administrator invites my bot, I wish it sends a private message to the founder of the server where the BOT was added by telling him some information

mossy vine
#

get the owner user object then send a dm to it

earnest phoenix
#

Okay, but what's his name?

mossy vine
#

read the docs

earnest phoenix
#

ok x')

knotty steeple
mossy vine
#

is there any way to make new Array(5) be a fixed size of 5 instead of dynamically making it bigger?

#

or would i be better off using loops to fill it instead of .fill()?

inner jewel
#

wdym?

mossy vine
#

wait ill get a g i f

#

quality is shit but you get the point

#
let arr = new Array(10)
arr.fill(' ')```
#

the array changes size dynamically

#

but i want a fixed size of 10

amber fractal
#

I dont know if you can have a fixed array size in js

mossy vine
#

i think you can if you dont use the method im using

#

okay uh

#

Object.seal(arr) basically works

#

but i still need to manually check for range issues

#

i guess thats better than nothing

inner jewel
#

afaik a proxy could simulate an array

#

and add range checks/fixed size

earnest phoenix
#

Its works ?

bot.on('guildJoin', guild => {
	let addembed = new Discord.RichEmbed()
	.setColor("GREEN")
	.setTitle("**__Merci de m'avoir ajouté dans ton serveur !__**")
	.addField("💼 • Mon prefix :", "`t/` (Changeable)")
	.addField("✨ • Ma page d'aide :", "t/aide")
	.setFooter("Encore merci de m'avoir ajouté dans ton serveur !")
	message.owner.send(addembed)
} ```
knotty steeple
#

try it

smoky spire
#

it won't

#

guildJoin isn't a valid event

#

It's guildCreate

earnest phoenix
#

What do I put instead?

#

That's when my bot joins a server

idle basalt
#

he just told you

knotty steeple
#

and message isnt defined

earnest phoenix
#

I put guildCreate?

smoky spire
#

yes

earnest phoenix
#

I set it how message?

idle basalt
#

message.owner.send() makes absolutely no sense either

knotty steeple
#

thats what i said

earnest phoenix
#

me ? @knotty steeple

knotty steeple
#

me what

idle basalt
#

client.fetchUser(guild.ownerID).then(user => user.send())

earnest phoenix
#

You said what it says, you talk about me?

#

I put what of the shot x ')

knotty steeple
#

@idle basalt you dont have to do that but ok

#

also no spoonfeeds

#

its 1 snippet but who cares

idle basalt
#

yes you do. guild.owner is not always cached

#

and helping this guy is impossible its 100x easier to just give him code

earnest phoenix
#

So what do I put instead?

idle basalt
#

i just told you...

knotty steeple
#

and "just give him the code" is just breaking a rule

unique nimbus
#

rtfd

knotty steeple
#

i agree

idle basalt
#

thanks minimod ill keep it in mind, but he clearly cant even use spoonfed code so

earnest phoenix
#

I put what the blow xD

idle basalt
#

go tell him to learn js and probably join a french server while hes at it

knotty steeple
#

ok

unique nimbus
#

Wait what the original prroblem

knotty steeple
#

scroll up

#

smh

unique nimbus
#

okay

earnest phoenix
#

Its works ?

	let addembed = new Discord.RichEmbed()
	.setColor("GREEN")
	.setTitle("**__Merci de m'avoir ajouté dans ton serveur !__**")
	.addField("💼 • Mon prefix :", "`t/` (Changeable)")
	.addField("✨ • Ma page d'aide :", "t/aide")
	.setFooter("Encore merci de m'avoir ajouté dans ton serveur !")
	message.owner.send(addembed)
} ```
unique nimbus
#

lets google

idle basalt
#

he wants to send the owner a message when they add his bot

#

which is annoying in the first place

unique nimbus
#

this is discord.js

#

yes?

idle basalt
#

no, that wont work

earnest phoenix
#

yes

idle basalt
#

we just told you that, then told you exactly how to fix it, and then you reposted the same question

#

with no changes made to your code

earnest phoenix
#

@idle basalt I put the question to Onii

unique nimbus
#

Okay I used google

earnest phoenix
#

okey

unique nimbus
#

// This event triggers when the bot joins a guild.

earnest phoenix
#

and ?

unique nimbus
#

thats what you want yes

earnest phoenix
#

That's what I wanted Yes

unique nimbus
#

read

earnest phoenix
#

but, the message owner send, it is correct?

unique nimbus
#

I don't even use js

#

I just went to docs and google

earnest phoenix
#

All right.

#

Thank you

knotty steeple
#

ok

#

pls read the docs

idle basalt
#

message.owner.send is entirely wrong

knotty steeple
#

its guildCreate

#

someone already told you that

#

and

#

both of us said thats incorrect

unique nimbus
#

guildCreate

#

its in the github page

#

¯_(ツ)_/¯

idle basalt
#

the event is guildCreate not guildJoin, message is undefined, and message doesnt have an owner

earnest phoenix
#

@idle basalt I know!

unique nimbus
#

Read the docs

earnest phoenix
#

I understood Roo

#

@idle basalt owner is the founder of a server where the bot is add

idle basalt
#

actually right now its undefined

#

because message is undefined

lofty hamlet
#

Hi :

#

My code don't work wtf

#

I don't understand why

knotty steeple
lofty hamlet
#

Lmao

#

@knotty steeple

lament kettle
#

at the very least tell us whats not working lmao

lofty hamlet
#

If i don't mention a user it's okay error else return message.channel.send("Vous devez mentionner un membre !") is okay but if i mention nothing is happening

lament kettle
#

You already set up 4 different console logs, how far does it get?

#

Passage 1 / 2 / 3 /4 ?

lofty hamlet
#

None of passage

#

@lament kettle

west spoke
#
document.getElementById('searchform').onsubmit = function() {

	
	var img = document.createElement("img");
	img.src = 'http://neko-bot.net/posts/post' + document.getElementById('test').value + ".png";
	
	var src = document.getElementById("postimg");

	src.appendChild(img);
	document.getElementById('downloadpost').onclick = function() {
		
		window.location = 'http://neko-bot.net/posts/post' + document.getElementById('test').value + ".png";
		
	}
    return false;


}
#

I'm wanting it (since it displays a image) to check if there is a image present, and then deleting it. Is there a way to easily do that?

#

Because the user can spam [enter] and it will duplicate the image.

lament kettle
#

@lofty hamlet if you mention someone it should at least get to passage 2. I wasn't sure what was wrong with that line of code, so I tested it locally. It works for me

 if (msg.mentions.users.first()) console.log("mentioned");

properly console logs "mentioned"

lofty hamlet
#

Hum yes but with me is not work wtf @lament kettle

#

🤔

lament kettle
#

@west spoke the easiest way is to set src.innerHTML = ""; before appending the image, it would wipe everything inside the postimg element before appending the new img

west spoke
#

Kthx

late hill
#

jesus.

vague chasm
#

hey

late hill
#
var embed = new Discord.RichEmbed()
                            .setColor('FF0000')
                            .addField(`__Ajout coeur de :__ **${user.username}**`)
                        message.channel.send(embed);```
#

I'd guess that's an issue @lofty hamlet

lofty hamlet
#

?

vague chasm
#

can client.users.get be used to get the bots that client knows of?

lofty hamlet
#

Hum

late hill
#

Fields have a name and a value

west spoke
#

Thank you @lament kettle it worked.

#

I've been working at it for a bit. Never thought of setting the innerhtml to blank

lofty hamlet
#

Uh ok

late hill
#

But that should show as an error

lofty hamlet
#

mY BAD

late hill
#

The fact it doesn't means you probably have more issues

vague chasm
#

can client.users.get be used to get the bots that client knows of?

#

or only users

lofty hamlet
#

I have no error i go test with this

late hill
#

As long as they are cached @vague chasm

mossy vine
#

bots are technically users too

vague chasm
#

can I use client.users.fetch('bot id')?

west spoke
#

Most likely

lofty hamlet
#

@late hill no work and no error

#

Wtf

west spoke
#

Since a bot ID and a user ID can be used in the same way(s)

lament kettle
#

@lofty hamlet your code isn't even reaching the point of sending the embed so of course you wouldn't see that error yet

vague chasm
#

and for checking bot status is this ok?

if (client.users.get('some bot id').user.status === 'online') ```
lofty hamlet
#

But why

vague chasm
#

???

lofty hamlet
#

My code is correct

late hill
#

It's difficult to help you when your code looks like that Nebulus

#

Like

#

You randomly use ;'s

#

They aren't necessary but either use them all the time, or use them never

#

You're still using var instead of let/const for whatever reason

scarlet phoenix
#

If the code doesnt work, I would put a large doubt on it being 100% correct

lofty hamlet
#

🤔

lament kettle
#

oof i think he got embarrassed cause he just deleted his code snippet

late hill
#

Just try to clean it up

scarlet phoenix
#

I mean, theres no reason to be embarresed. People here may be harsh but are honestly trying to help you make the best bot possible.

lofty hamlet
#

I'm okay 😉

#

I prefer that people be tough and improve myself

quartz kindle
#

@vague chasm users.get() is already a user

vague chasm
#

so just users.get('id').status?

quartz kindle
#

status is not a property of users

#

(assuming you're using v11)

lofty hamlet
#

No error

lament kettle
#

@lofty hamlet why are you defining an empty let user just to assign message.mentions.users.first() to it later? Why not just const mentionedUser = message.mentions.users.first() and then you can do if (mentionedUser) right away.

lofty hamlet
#

It's just very strange

mossy vine
#

wait till the code runs

#

vscode doesnt pick up all errors by default

#

it shouldnt

#

its a fucking editor

lofty hamlet
#

?

lament kettle
#

Try to run the command and then look in the console for errors

lofty hamlet
#

No error

lament kettle
#

just because there's no syntax errors doesn't mean there aren't any problems

lofty hamlet
#

I have just no error dude

mossy vine
#

run the fucking code and the command

#

then you will have plenty of them :)

quartz kindle
#

what happens when you run it?

lofty hamlet
#

I do not have any I know what I say

late hill
#

Those console logs you had before

mossy vine
#

does the command work?

late hill
#

Never showed right?

lofty hamlet
#

If i don't mention a user it's okay error else return message.channel.send("Vous devez mentionner un membre !") is okay but if i mention nothing is happening

vague chasm
#

should be .presence.status? ohh k

mossy vine
#

@vague chasm whats your code,

vague chasm
#

nvm I got it

mossy vine
#

lol ok

late hill
#

What is Dresseurs like?

#

An array of objects?

lofty hamlet
#

Yes

quartz kindle
#

you said you had console.logs before

#

where did you put them?

lofty hamlet
#

I have exactly the same code or almost on another command and it works

quartz kindle
#

if you mention yourself, does the "tu aimes ton profil" work?

lofty hamlet
#

No

#

It's very strange wtf

late hill
#

Maybe your msg includes the mention

#

Which causes that command not to do anything when you actually mention someone

quartz kindle
lofty hamlet
#

If i mention a personn not work but if i mention nothing it's write message.channel.send("Tu aimes ton profil ? Tant mieux")

#

Wtf

late hill
#

What is msg

lofty hamlet
#

I have exactly the same code or almost on another command and it works

late hill
#

..

#

Show where you define msg..

lofty hamlet
#

No msg work

late hill
#

Show it anyway

lament kettle
#

@lofty hamlet did you write this code yourself

#

or did u get it from somewhere else

lofty hamlet
#

Yourself

quartz kindle
#

console.log(user)

lofty hamlet
#

unedfined 😮

#

Is this

#

But i mention a personn

lament kettle
#

it's undefined yet it's not sending you the "vous devez mentionner un membre" message?

lofty hamlet
#

Yes

quartz kindle
#

console.log(message.content,message.mentions)

lofty hamlet
#

If i mention personn mention console.LOG not work

fleet horizon
#

A server I moderate wants to use a new role on join system and needs to give everyone in the server a role. I've written a quick bot to do this but I don't know how many seconds I need to leave in between each role addition for the bot to not be rate limited, cause at this scale that would probably end in the bot being banned. Anyone got any clue of a safe amount of time?

lofty hamlet
#

But if i not mention hum it write a line in my console

#

I come back i go eat if you find a solution mp me i read after

quartz kindle
#

where did you put the console.log?

lofty hamlet
lament kettle
#

@fleet horizon are you using discord.js? If so you don’t need to worry about rate limits. They handle it for you

#

Idk about other packages tho

fleet horizon
late hill
#

please please please show defining msg

#

If it's just message.content

#

That's your problem

lament kettle
#

How is that the problem

quartz kindle
#

put the console.log before fonction.channellogs

late hill
#

Because OwO @late hill !== OwO

lament kettle
#

Lmfao ur right

#

If thats the problem im gonna laugh out loud

slender thistle
#

@fleet horizon once per 2 seconds

#

Sounds fine if you wanna go safe

#

PATCH Member ratelimit is 10/10s

fleet horizon
#

Alright, thanks

#

I'll just do one every 2 seconds then

lofty hamlet
#

@late hill what ?

lament kettle
#

@lofty hamlet in your code msg == "OwO"

#

what is msg?

#

msg = message.content?

unique nimbus
#

wait how many times can I change the bots play status per minute

lofty hamlet
#

Euh dude ?

mossy vine
#

stop right there

sudden geyser
#

Onii 5 times i believe

unique nimbus
#

okay thx

bitter sundial
#

@lofty hamlet I would suggest seeking professional help asap

patent epoch
#

how can i add a code ?

#

or how can i code it

opaque eagle
#

what language?

buoyant wagon
#

add a code to what

scarlet phoenix
#

@patent epoch
Do you know any programming languages? If so, look for a library to build upon in that language. If no, I would highly suggest learning at the very least some basics before undertaking a bot. Bots are far from trivial.
Some good languages for beginners are Python or javascript.

dusky bear
#
opaque eagle
#

Well they never said they used JavaScript...

grizzled spruce
#

Ok people so I’m trash at this and

#

How do I get my server count on the bot site?

#

It says I gotta have a webhoook

#

How do I set that up?

#

I use discord.js

idle basalt
#

use the api

earnest phoenix
#
    Static.push(message.guild.emojis.map(a => a).filter(a => a.animated == false))

    Static.map(a => `<:${a.name}:${a.id}>`)
let staticdisplay = Static.join( )```
**How to randomly select 10 emojis** 😦 tried so hard but failed
#

or is their a better way?

buoyant wagon
#

what language

earnest phoenix
#

discord.js

buoyant wagon
#

i think there is an easier way

earnest phoenix
#

ooh

#

do you know how?

buoyant wagon
#

do the emojis have to be different

earnest phoenix
#

yep

buoyant wagon
#

ok

#

does that work

earnest phoenix
#

What do u mean

#

the one i posted

buoyant wagon
#

yes

earnest phoenix
#

yep

buoyant wagon
#

and what if the guild has less than 10

earnest phoenix
#

but it gives the whole list of emojsi

#

emojis*

sinful lotus
#

a sec

earnest phoenix
#

well it will just post the amount it has

buoyant wagon
#

i have an easier way which is longer but its longer so

#

maybe not easier

earnest phoenix
#

...

sinful lotus
#
const emojis = []
const mapped = message.guild.emojis.map(x => x.toString())
for (let x = 0; x <= 10; x++) {
  const item = Math.floor(Math.random() * mapped.length)
  emojis.push(mapped[item])
  emojis.splice(item, 1)
}
console.log(emojis)
buoyant wagon
#

thats more like what i did

sinful lotus
#

yeah I dont see any prooblems there

#

loop 10 times
push a random entry
remove that entry from the mapped emojis so that you wont get duplicates

hushed berry
#

emojis.sort(() => 0.5 - Math.random()).slice(0, 10); 👌

buoyant wagon
#

oof

sinful lotus
#

thats more shortcut way

#

lmfao

hushed berry
#

yeah

sinful lotus
#

js hax ways

earnest phoenix
#

thanks!

#

let me try..

hushed berry
#

dont actually use that btw

#

its not efficient at all

inner jewel
#

don't use random data for sorting

hushed berry
#

lul

inner jewel
#

it might backfire

#

a lot

earnest phoenix
#

yep understood

#

but still thanks

#

😃

sinful lotus
#

you can try the longer way like I did

#

your choice

solemn kayak
#

could someone help me with something

#

with this

scarlet phoenix
#

Im not sure what that is exactly

#

Its something on the site

solemn kayak
#

yes

scarlet phoenix
#

Is it the guild count?

solemn kayak
#

i think so im not fully sure

scarlet phoenix
#

link to bot page?

solemn kayak
earnest phoenix
#

@amber fractal meet me in falador

scarlet phoenix
#

I dont see the N/A anywhere. I am guessing it is the guild count. If you dont already post that you can learn how to in #topgg-api