#development
1 messages · Page 886 of 1
what if I like remove the navbar
but i have https://python.is-stinky.wtf/ciesfgzvgt.png
And main site buttons like report and that
ah alright
yes
I got it
literally running it in sqlite db viewer works
what does
SELECT * FROM users ORDER BY money DESC; return?
on what should I do
where the code or db viewer
I'm trying to deploy a DBL on Heroku and GitHub... It's giving me this error ---> http://codebin.herokuapp.com?s=5ea0cfdd113d6a0004000001 Anybody know what's up? I'll get the code in a second, I just have to remove the token from the repo
Check out this latest snippet on codebin.it
It looks like your project does not contain a 'stage' task,?
hi
ihave this ```js
if (member.createdAt < 500903242400000 && /* more stuff which works /*) {
embed.description =
'A member has just joined the server.\nWarning!\nThis is a account has been flagged for suspicious activity.';
}
why does it not set the description as A member has just joined the server.\n**Warning!\nThis is a account has been flagged for suspicious activity.** ?
yes
what is it
its an object
what object
its related to the issue isnt it?
yeah thats probably the problem
idk which language?
thats.... javascript
did you check here? https://discordjs.guide/popular-topics/embeds.html#embed-preview
im not using djs
ok
Ok what are you using lol
and i'm using eris
hey if anyone know quite well json pls dm me
lol
would you know how to make a top command
message.channel.createMessage({ embed });
using json ?
top for what
like i've got a json
embed: embed?
containing an array of users
looking like that :
no
if you are inputting as {embed} in createdescription
ok, then can you send you your code?
"xp":{
"ID":"xpcount"
}```
what
but course it's more long than that
3 lines of code?
send more examples
do u even kno what ur talking about
but how can i get the 1st user ?
so is it like
nini
noo
is he trolling?
not the 1st user of the array
me?
"xp":{
"ID":"420",
"ID2": "69"
}
sammy, you missing a quote
u can get object values from xp and sort it
Object.values(xp)
what will this output ?
what will Object.values(xp) output?
the values of the items in the object
i wasn't talking to you :D, its fine
cuz objects are like this
@digital ibex i need your whole code, from defining your embed, till sending your message.
no u don't
me ?
yes
i was talking to tuan again :D
"xpcount" should be a string
i cant help this guy
pls
like 69 as my xp count
thuan,
instead of "69"
it is
u don't need my whole code
why did u put it in a string then
dude read my sentence
ok,
i need your code from when you define your embed, till you send your message
@knotty steeple -> dm pls
why
i dont dm random people
there is to many ppl here
no there isnt?
let embed = {
title: 'Member Joined',
description: 'A member has just joined the server.',
fields: [
{
name: 'Member',
value: member.mention,
inline: true
},
{
name: 'Member Created At',
value: new Date(member.createdAt).toDateString(),
inline: true
}
],
color: 0x10eb23,
timestamp: new Date(),
footer: { text: `User ID: ${member.id}` },
author: { name: ` | ${guild.name}`, icon_url: member.avatarURL }
};
if (member.createdAt < 500903242400000 && ) {
embed.description =
'A member has just joined the server.\n**Warning!\nThis is a account has been flagged for suspicious activity.**';
}
client.createMessage(Guild.alchan, { embed });
};```
there
find someone else then if u dont want my help 
don't worry about string or not
thats the whole thing, even tho u don't need it but sure, ok
thats eris not djs
do u always send with createMessage on the client
d.js makes it confusing with like 50 different versions
yeah
yes, i removed that bit, and as i said, that bit isn't causing any issues
and all 12 versions are all different
ok
does the embed post at all btw?
i tried to upgrade to djs 12
but just not the description
yes it does
i downgraded 3h after
yes
xD
dont see why they needed to add in the .cache thing
did you check your member.createdAt?
its a pointless visual change
what
and such a huge breaking change since you literally need to edit like 90% of your code
member.createdat is fine, nothing wrong with that
so if you do console.log() in that if statement, something prints out right?
what
i didn't understood
how can i get the 1st user
like the one that has the biggest xp count
is there any function ?
yes
??
In these tags, the triangular ending doesn't come under .atag?
uh thx
I want to color those too
since Object.values returns an array u can do that
Anyone have any idea how I can access the tip too?
xp.sort(function (a) {
return a.value;
});```
im guessing
bruh moment
.sort automatically chooses the biggest one ?
lowest to highest
hi?
sort doesnt work for numbers by default well
just read what i linked
well, do array.reverse and a[0] would be the biggest one
list, xp, array whatever you get from your json file.
what was the problem?
h e l p
no idea, i just re wrote it
in ms?
not related to bot dev but eh
oh millisecond
yeah
86 400 000
thank u
btw
For all those people who find it more convenient to bother you with their question rather than search it for themselves.
kk
so :
const xp = require('../xp.json')
xp.sort(function (a) {
a.reverse
console.log('The forst user has :' + a[0] + 'xp')
}```
this works ?
nope lol
no it doesnt
i told u use Object.values
on xp
so it can be an array of the xp values
hey, I need h e l p
🚨 can you guys see my messages ??
yes
xp.sort(function (a) {
a.reverse
})
for(let ind in xp){
console.log(`The forestisrts user has: ${xp[ind][0]} xp`)
}```
no
no
xp isnt an array
oof
and dont spoonfeed
it is
JSON objects can be navigated this way
ok smart person
Dunno about the sort function, that came up earlier
but dont spoonfeed
(side note: best storing it in an actual db instead of a json file, they can get corrupted way easier if in a json)
fiiiiiine
yeah i know
how i get icon url of the server?
but i'm so bad using real dbs
Guild.iconURL
or iconURL is a function if u r using djs 12
nevermind, got it myself
exists member.guild.iconURL ?
ok
if u want
Yeah, I fixed it
client.on('guildMemberAdd', (member) => {
let embed = new Discord.RichEmbed()
.setTitle('Bienvenid@')
.setThumbnail(member.guild.iconURL)
.setDescription(member.user.username + ' se unio al servidor!')
.setFooter('Ahora somos ' + member.guild.users.size + ' miembros.', member.user.avatarURL)
.setColor(0xff0000)
// Enviamos el mensaje a un canal segun el ID-CANAL
let channel = client.channels.get('662679657250029621');
channel.send({ embed });
})```
11v
dont work
Provide all possible information so people know what's up. Just saying "I get an error" doesn't give us enough information on your problem.
it does
should be member.guild.members, not member.guild.users
footer
ok
Hello, I'm using discord.py and I would like to check if user voted in top.gg for my bot (or not)
I looked into dblpy's documentation, but I found nothing. Could I know what function that I should use?
Oh thank you 😄
work @quartz kindle
why this dont work?```js
client.on('guildMemberRemove', (member) => {
let embed = new Discord.RichEmbed()
.setTitle('Adios')
.setThumbnail(member.guild.iconURL)
.setDescription(member.user.username + ' se fue del servidor!')
.setFooter('Ahora somos ' + member.guild.members.size + ' miembros.', member.user.avatarURL)
.setColor(0xff0000)
// Enviamos el mensaje a un canal segun el ID-CANAL
let channel = client.channels.get('662679657250029621');
channel.send({ embed });
})```
@earnest phoenix again, please give an error message instead of jsut asking "Why doesn't this work". It's not helpful.
We can't help you if you don't help us.
glitch dont
I always wonder why people assign a variable then do an action, instead of doing the action directly
Certain cases.
People have different coding styles, it can also make the code more readable, or easier to comprehend
I see
so?
A lot of chaining can make code a bit more complicated
my code is usually as horizontal as it fits my screen
Lmao.
thats when i break it up into variables
Don't assigning channel to a var increase memo usage?
I'm personally a fan of assigning a minimal amount of variables but
Not really since it's referencing to the actual object
It doesn't duplicate the actual object
its an extra pointer
why this dont work?```js
client.on('guildMemberRemove', (member) => {let embed = new Discord.RichEmbed()
.setTitle('Adios')
.setThumbnail(member.guild.iconURL)
.setDescription(member.user.username + ' se fue del servidor!')
.setFooter('Ahora somos ' + member.guild.members.size + ' miembros.', member.user.avatarURL)
.setColor(0xff0000)
// Enviamos el mensaje a un canal segun el ID-CANAL
let channel = client.channels.get('662679657250029621');
channel.send({ embed });})```
glitch dont give me a error
@earnest phoenix cant see anything wrong there, you need to get an error, if you dont get an error figure out why you dont get an error first
Which is why when modifying an object, .geted from a collection you don't have to set it back again to make the actual change
which is all good until for some reason you have a json configuration several layers deep, and you need to pass it to your class instances as a deep copy
that always seems to hit me in the most unexpected ways lmao
It confused me at first
"wait wtf is this class settings wrong? oh... the config file 10 layers back is being modified because its a reference..."
I didnt know you had to duplicate an object by stringifying it at first and parsing it at first
Which broke my code and I had no idea why
exactly lmao
Thought it was as simple as assigning it to a variable
and then everyone says to avoid JSON.parse(JSON.stringify()) because its slow
then you start panicking
and you end up JSON-JSONing anyway
👀 I've seen deep clone libraries
But honestly minimal performance impact
Especially when most use case is with small json objects
then use .send(embed)
laughs in Collections.copy()
No
{embed} = {embed:embed}
{} basically means "an object that contains an embed attribute"
guys
So you're passing a wrapped embed
would you know how to write in q json db
fs.writeFile("../db.json", JSON.stringify(db), (err) => {
if(err) console.log(err)
});```
this don't work
Don't use json db
when i restart the processqll gone
are you using glitch?
For the sake of your memory
no i'm in my vps
is the whole file gone or just the contents?
just the content
it looks like it doesn't reqlly writes in it
like when you use .push
it's just for the process
when you write to it, it replaces the entire file with new content
¯_(ツ)_/¯
check if you're not erasing the existing content at process start
the file also gets erased if an error happens during writing
i haven't got any errors in the console
show code
everything that uses fs
it's a cmd handler
fs.readdir("./commands/", (err, files) => {
if(err) console.log(err);
let jsfile = files.filter(f => f.split(".").pop() === "js");
if(jsfile.length <= 0){
console.log("Couldn't find commands.");
return;
}
jsfile.forEach((f, i) =>{
let props = require(`./commands/${f}`);
console.log(`Command ${f} loaded!`);
var cmdammount = Math.round(cmdammount + 1)
bot.commands.set(props.help.name, props);
});
console.log(`${bot.commands.size} commande chargées au total !`)
});
fs.readdir('./events/', (err, files) => {
files = files.filter(f => f.endsWith('.js'));
files.forEach(f => {
const event = require(`./events/${f}`);
bot.on(f.split('.')[0], event.bind(null, bot));
console.log(`Event ${f} loaded !`)
delete require.cache[require.resolve(`./events/${f}`)];
});
});```
This in the index to loqd cmds + events
load
sry i'm on an azerty and i usuallyuse qwerty so a and q swap
ok no need for these i guess, just the fs that uses your json file
well none in the index
db[msg.author.id] = {
id: msg.author.id,
xp: 0,
lvl: 0,
perso:[],
arm:[],
vehic:[],
plan:[],
armes: "0",
vehicle: "0",
planetes: "0",
personnages: "0",
commonbox: "0",
rarebox: "0",
superrarebox: "0",
epicbox: "0",
mithicbox: "0",
lengendbox: "0",
secretbox: "0",
credit: "0"
}
fs.writeFile("../db.json", JSON.stringify(db), (err) => {
if(err) console.log(err)
});``` this is the start cmd
fs.writeFile doesn't seem to append
and db is db = require(json file)?
Doesn't js have a fs.appendFile()?
Any one have any client.guilds.size code i need it please?
it has, but you cant use appendFile with json
Hm
what code?
@inner glen ??
uh
like this 😁
whats your language and library?
@quartz kindle DJS and JS
bot.on("ready", () => {
bot.users.setStatus(`on ${bot.guilds.size} guilds`)
})``` for discord.js
bruh

just replace bot by cient if you use client
facepalm
well i have V12
how?
they changed everything
huh
Why did Top.gg tell me there was an invalid token, when there is not an area to put a token on?
i don't like it
thats only a problem if ur lazy to rewrite ur bot
@clear wraith try again
or refresh
but try again first
@hasty lotus by using djs 11 you're effectively installing a timed bomb on your bot
In Discord.js v 12.2.0 is there a way to check if this id xxxxxxx is a voice channel?
@heavy marsh hmm
you could try to fetch the chal in bots.channels
and then try to read property voice of the channel
Or you could retrieve the channels list and check for that ID, then get the type
Yes
const MusicChannel = message.mentions.channels.first() || message.guild.channels.cache.get(args[1]);
if(MusicChannel.type !== "voice") return
like this
yes
ook I see got it. Thank you!
@quartz kindle is it
if(MusicChannel.type !== "voice") return
or
if(MusicChannel.id.type !== "voice") return
yeah if the channel exists
yes, all channels have a .type property
oks 🙂
How is const work = new Discord.RichEmbed() not a constructor?
How is new Discord.RichEmbed() not a constructor?
how i can do a dashboard for my bot?
@clear wraith are u sure u defined Discord
@earnest phoenix html, js, css, php and lots of hatred
client.guilds.size not working why? i always get undefined
Or react native, jsf, you choose it
@inner glen dont forget cache
@lyric mountain i mean, how i conect the bot with the page
Through a shared database
And php if using raw html
There're lots of options other than manually making a site with html
You have node, react, jsf, python, etc
How is Discord.RichEmbed() in const work = new Discord.RichEmbed() not a constructor?
I even defined Discord
const Discord = require("discord.js");
Thats the error. Idk where it came from.
everything was fine, and when i go to add Discord.js as a package... I get an error.
For Glicth.com?
there isnt a glitch specific version
So new Discord.MessageEmbed()
try using that
there are a LOT of changes in discord.js v12
i recommend you read the changes guide
Uninstall it and reinstall
ok
Show code
Mods, will be a security breach having a command that allows to get information of a user such as its pfp name, date of the acount created, uk basic stuff but not only on the current guild but look for the user in all guilds the bot is in. ping me when awnser plz
what
@rare mist no, except for the last one
Getting in which servers a user is on IS a privacy issue
@lyric mountain client.on("ready", () => { client.user.setActivity(`on ${client.guilds.size} guilds`); console.log("Bot is ready") });
@inner glen you gotta get the cache
client.guilds.cache.size
@rare mist also, you can't give data about an user that's not in the server
That's against tos
@lyric mountain Thank u bud
@lyric mountain Im not telling in witch servers the user is in
im just getting basic info
is it still a privacy breach?
jeez ok, im not adding that then i dont want mods here or discord mad
Except if it's owner-only
OwO
You as owner can query info about your users
owners of bots already have all this information too anyway
Just not expose it publicly
Ohh ok
Why is preview on the website show differently to what actually is submitted different?
cause the decoder is different from what the browser generates, and the server generates.
damn that's annoying.
what part of it is different?
Is there any restrictions there like can we use javascript also or?
im not sure
@craggy cave javascript only for certified bots
yes
All this Updating stuff with Discord.js has fucked up my whole code, and now im stressed tf out...
if it's that .cache stuff just write a regex in your ide find shortcut.
This makes no sense.. well to me at least
wtf is that
eris docs are shit
d.js and eris arent completely different in ram usage its just by default d.js is bad
if u kno how 2 read docs
they're as gud as any other docs
if u kno how 2 read docs
they're as gud as any other docs
SEND MY MESSAGES DISCORD
if u kno how 2 read docs
they're as gud as any other docs
if u kno how 2 read docs
there is so much stuff that should just be there
fuck u discord
i wanna try eris out at some point, but idk when lol
fuck u discord
its perfectly fine for me
if u can read documentation properly then ur fine
its perfectly fine for me
same
its broken
I want to randomly group users on an voice channel. How can I do it?
Sample:
Vamp = E user, C user
Doc = A user
Vill = B user, D user, F user, E user
Is there anyone who can help?
im guessing you could take the current users already in the channel, then randomly spread them out.
do like users.randomize, then take the count, divide by 3, then you get 0-(count/3) as group 1
then second would be
(count/3)-((count/3)*2)
then the third would be
((count/3)*2)-count
for example
But Sample count : args[0]
what do you mean?
@turbid bough u look dm?
i can only help here atm
I threw an example in the message box, can you look?
send the example in this channel
const Discord = require('discord.js');
const path = require('path');
const fs = require('fs');
const db = require('quick.db');
exports.run = async (client = new Discord.Client, message = new Discord.Message, args) => {
if (!message.member.permissions.has('ADMINISTRATOR') )
return message.channel.send(`Bu komutu kullanmak için gerekli yetkiye sahip değilsin!`).then(msg => msg.delete(5000));
if(message.member.voiceChannel.id === '698359791751528499') {
var vk1 = message.guild.channels.get('698359785904537626');
var vk1ses = message.guild.channels.get('698359791751528499');
var oyuncular = ''
const takımlar = ['vamp', 'buyu', 'jest', 'dok', 'koy']
//1:vampir, 2:büyücü, 3:jester, 4:doktor, 5:köylü
var vampir = Number(args[0]);
var buyucu = Number(args[1]);
var jester = args[2];
var doktor = args[3];
var koylu = args[4];
console.log(vampir)
const listx = vk1ses.members;
let vamp = []
var x = listx.random(vampir)
vamp.push(x.map(e => e.user.id))
message.channel.send(vamp)
}
}
im not that good with js, so, you would split all each users into each list and then push them into that channel
The code seems kinda crazy.
hi, with eris, how can i get a members clientStatus?
like, i do Member.clientStatus and it returns undefined and idk where to go from there because ye, undefined
yes it is
docs says so too
clientStatuss type is ?object thats why, but usually, with my experience it always returns the Object i can kinda expand on, if that makes sense
yes
its Member
and ? makes it return undefined, i just need help getting the platform the members actually on
there is also the .status
oh wait, nvm
i dont know then
is the user you are viewing offline?
cause clientStatus should return undefined if so
yeah i know, so the member isnt offline?
no
ok, then i dont know. try creating an issue at github
its not a bug
it is if it isnt returning anything when it is supposed to
??
you don't really know what ur talking about 
ok, look, just beacuse it has a ? does not mean its not always supposed to be null
Wondering what's going on...
let platform = message.member.clientStatus;
platform = {web: 'web', desktop: 'desktop', mobile: 'mobile'}
if(platform === 'web') platform = 'Browser';
if(platform === 'desktop') platform = 'Desktop';
if(platform === 'mobile') platform = 'Mobile';
``` well, i just created this
and undefined
still
yeah create a github issue about it
why
i have issue with this
- create issue
its not an issue
ok
idk what you need help with then if the library isnt returning anything
thats why i moved to eris
i recommend moving to eris from djs
@digital ibex I use Eris myself but there are a lot of things I feel are just missing or implemented weirdly. The most obvious being the docs itself.
eris is better what can i say
depends on the category it's better in
and thats why i use it tbh
ok, to make sure
the member is online right?
not invisible
it might work on other users, but idk.
since discord's fucked i guess
thaun:
- the member is online, 3rd time,
- i'm literally saying the type is
?object, its obviously going to happen, i'm just stuck how to get the clientStatus - u don't even know half of the stuff u r talking about
and no
"i'm just stuck how to get the clientStatus"
you dont know how either

?object means it could be null/undefined. What exactly are you trying
yes
he trying to access it
i'm trying to get the clientStatus of a member
but everything i've tried its returning undefined
which isn't a problem with the library
can you show the code of how you're doing it? is the member not cached?
clientStatus
let platform = message.member.clientStatus;
platform = {web: 'web', desktop: 'desktop', mobile: 'mobile'}
if(platform === 'web') platform = 'Browser';
if(platform === 'desktop') platform = 'Desktop';
if(platform === 'mobile') platform = 'Mobile';
why are you re-assigning platform? Also, you're not accessing any of the properties.
You're just checking if an object is equal to a string.
thats what i thought i had to do, because nothing would get me to web, desktop or mobile
i dont understand that lol
clientStatus returns an object of { web: String, desktop: String, mobile: String }. String is either online or offline. You'd need to find the key of the object where it's online.
back to start
if thats not what ur saying?
yeah well the property is not guaranteed to exist. That's why it has ? on it. If it doesn't exist, are you sure the member is online?
cant do anything about it
if its not returning anything it does not return anything
api's fault
kinolite, im confused on how to even get to that object
for me it works, but data.client_status is from the API (Eris source code), so I'd just check if the property exists.
how do you get which object exactly? Like how to access it?
well
or could you show what Member is and what you get when you try clientStatus on it
idk how 2 access it but i'm trying to access {web: String..}
Member is message.member
what are you trying to access?
you'd loop over the object and find which one is equal to online
such as using Object.keys and then using .find
.find on an object?
thats kinda weird way to do it
you can't debug it?
For me it works on you: https://canary.discordapp.com/channels/264445053596991498/265156286406983680/702747577027657799
download the member to force the gateway to give you presence data
you could try guild.getRESTMember(id)
he is using eris
anyways, presence is gateway only
im not using REST mode on my client shit
it might be due to recent changes with intents
discord placed intents in place to fight against data scraping bots
you might need to get verified and enable those intents first
that
it's discord lul
just links an announcement
their team is trash and consisted of mostly interns and not professional devs
but no api links for what its for
and another link above that is another announcment
which is like info for non-developers
tldr intents are to stop data scraping which has been a huge issue with discord in the past, if you want to use most intents in over 100 guilds, you need to get verified
verification is done manually right now so they get to see which bots do what
I don't know if I'm the only one who feels verification being open at 75 then required at 100 is weird for bots that may be trending.
would 100 guilds count as trending?
ah well, i think it could get 25 more guilds within a week yeah
it depends on the grow rate
once all applicants have been done, its probably alot easier to do bot verification reviews alot sooner
and will take probably a few days.
and thats also why they havent made it mandatory right now.
yeah it's the grow rate I mean. Say your bot gets on trending on dbl and earns servers quickly (it does depending on how you do). Hitting the 100 mark won't be long.
you mean the trending new bot called mee6?
the EA of discord
mee6 is big meme
ok yeah it might be possible to get that many servers in short time https://img.thaun.dev/45bft.png
ah nvm, thats 2019 lol
and that was in trending
I mean the top non-auction'd bot on trending is @earnest phoenix (Profile Picture Bot) was approved yesterday and claims to have 230+ servers.
yep, it does have 243 servers as discord reports it as
approved yesterday, but was made in march 14th
but i dont know if it was mid-dev by then
Do you guys know how to make it where certain roles have access to certain emojis?
impossible
the only thing you can have closest to "emote per roles" is having a command that just responds with that picture depending on what role you have
or use global emotes, that noone has access to that server, and only the bot.
Oh oksy
ah nvm, you can modify it
Way do you mean modify
you can restrict roles to an existing emoji
So only certain roles can use it?
yes
Okay ty
someone teach me how to make custom prefixes without using json
@prime fox (impossible)
oh noes
You need to either use a json or db
Use database, load prefixes on bot startup, keep them and work with them in cache 
that does not use json
@turbid bough there's no Language that doesn't use a json or db to store data in a place
@turbid bough Your talking about the Modify Guild Emoji right,?
Okay
you dont need to use a vps just for db
Who
talking about the guy above who asked for custom prefixes without json
Oh ok
Another tip is to cache your prefixes in an array (or hashmap in java) if you're using a DB to make response time faster.
Guys, quick question
i think my EF core caches stuff already so i think im good i guess?
ef core does very small amount of caching
try {
if (message.createdTimestamp >= channel.lastspawn + (Math.round(Math.random() * 300000) + 300000)) {
const item = neko[Math.round(Math.random() * neko.length)];
const filter = response => {
return item.answers.some(answer => answer.toLowerCase() === response.content.toLowerCase());
};
message.channel.send(embedneko).then(() => {
message.channel.awaitMessages(filter, { max: 1, time: 60000, errors: ['time'] })
.then(collected => {
message.delete({ timeout: 5000 })
auth.save().catch(err = console.log(err))
message.channel.send(`${collected.first().author} caught a neko!`)
})
.catch(collected => {
message.channel.send('The neko was let loose!')
});
});
channel.lastspawn = message.createdTimestamp
channel.save().catch(err => console.log(err))
}
} catch (err) {
console.log(err);
}
```This is the code, then I want to delete the response messages and the awaited message, how can I do that?
e.g keys iirc
I want to delete the embed that will be sent after its collected the answer
hmm
hi my music bot perfect runing and console erorrs help js 1|chino-test | Could not extract html5player key: https://www.youtube.com/s/player/bfb2a3b4/player_ias.vflset/en_US/base.js
https://im.farfrom.world/nunwnrmkoq.png is this somewhat correct
how would you make a bot react with 1️⃣
@gilded gazelle react to it's own message or the user's?
I only have one shard at the moment though, is it possible for me to spawn two shards?
@gilded gazelle <message>.react('EMOJI ID OR UNICODE EMOJI')
yes
just spawn another lol
yeah but I can't see the \1️⃣
hot
plz learn how to read
why did i say hot
coz
=>
Mobile: :- EMOJI
or
Pc: /EMOJI
@gilded gazelle
To get the Unicode of the emoji
/
Wot
Yup
lol
/1️⃣
no
TRIGGERED
it only works with custom emojis
ah, alright thanks
this one is not
Yea...
Why would you try to get the Unicode of an emoji that already exists in the keyboard data or something
thanks
Np
https://im.farfrom.world/kyzptmkety.png Oookay it spat out this
number emojis are consisted of two different characters
the number + enclosed keycap
Does someone know how to make a javascript link?
what
A javascript link
Javascript:
I'm trying to implement shards, and the shard just immediately exits
for me they dont
do u use this guide https://discordjs.guide/sharding/#when-to-shard
I used that yes
Do I need to do anything else besides using a sharding file?
I'm trying to find current shard id
I mean sure I have to change a bunch of things with grabbing users and guilds for my bot but
sigh
Yeah currently it's wrong because I'm not sharding
is it supposed to return a response from all the shards?
https://im.farfrom.world/sdplxzzlre.png I'm using this code and whenever I try using it, it says that the shard closed before the client became ready
rip
try spawn 2 shards
how many shards are you trying to spawn?
Hm alright
also, i dont see autoSpawn in the documentations either
yeah.
shard.spawn(); it spawns discord recommended amount of shards
in the documentations it says it defaults to this.totalShards
hmm
though, i dont know if thats set by discord though
check official api documentation.
https://im.farfrom.world/xhqkfomtef.png f it keeps on showing this
there it says that
i just said "in the documentations"
discord.js docs
yes "in the documentations"
index.js is your main bot file right?
index.js = sharding file bot.js = bot code
Index.js is my main bot file, sharding.js is the main project file
I have it so Node starts sharding.js
It kept spamming it until I switched back to no shards and restarted Node
when the shard with ID 0 boots i have a ~75% of chance of getting this error: https://i.lumap.me/da863ywn.png
in this shard all guilds dont have bot status
why
it might be beacuse you are trying to do something while its spawning shards?
the problem is idk what
in discord.js its default docs it says its 5500ms delay each shard spawn, but im not sure about yours
oh you guys are both using eris?
I'm on DJS
I was
oh ok
but its shit
I just use v11
team v12
eris kinda has lack of tutorials so
i cant find much documentations about sharding in eris docs lol
I'm gonna try the DJS.guide snippet
is eris buildt ontop of discord.js?
no
no
eris is an entirely different wrapper
I used the snippet that DJS.guide provided
Now it's just this https://im.farfrom.world/nwcbcuqkxt.png
get rekt snekfetch
did you still have the autospawn in the config?
and the spawntimeout
cause i see you arent doing anything wrong
Let's see if this works
isn't snekfetch deprecated?
Now it's spamming that Shard 0 exited before client became ready
What the fuck am I doing wrong sadjowiegroeij
what does your bot file look like?
wait a minute, why does discord.js require token on both the bot.js and the index.js
it's supposed to be like that
I won't show that but it's based on An Idiot's Guide's guidebot so I'll give you the file for that (it has the same handler and stuff in the file so)
And yeah you need token on both
https://github.com/AnIdiotsGuide/guidebot/blob/master/index.js
https://github.com/BeanedTaco/unicord/blob/new-master/index.js
--Actually my bot's on GitHub so I'll also give you that (it's not updated to the latest stuff on my bot, and it's also on v11 so)
you have disabled express whilst trying to use sharding right?
well, since you are sharding, if you would have 3 shards, you would then open 3 express's within the same port.
unless thats how it works?
i'm dumb
wait-
My Express server is completely separate of the bot itself and it wouldn't make sense if it spawned multiple
oh yeah i searched up express keyword and they were unused anyway
oh nvm, exept that keepOnline.js script
keepOnline is required for me because of the nature of my host
