#development

1 messages · Page 853 of 1

mossy vine
#

in v12 iirc yes

knotty steeple
#

idk msg.client looks weird

mossy vine
#

client.channels.cache.get

digital canopy
#

i got it on heroku

knotty steeple
#

what library are you using

mossy vine
knotty steeple
#

yee

copper cradle
#

sammy: asks for lib
white name: heroku

mossy vine
#

i asked for lib but ok

mystic violet
#

How would I set platform in discord.js like @cedar kite

#

(on mobile)

#

Im gessuing Presence

#

.clientStatus?

knotty steeple
#

wtf you can do that?

mystic violet
#

@red hollow You're a legend Im quite stumped lol

knotty steeple
#

yep

#

but idk about setting it

#

stupido question

#

how do i get shard id

delicate zephyr
#

you cant easily, you basically just have to use fetchClientValues

red hollow
#

on d.js sharding manager?

knotty steeple
#

internal sharding

delicate zephyr
#

and then each object in the array is the shards in order

red hollow
#

or shardID

delicate zephyr
#

that works for guild

knotty steeple
#

hmm

#

wait

red hollow
#

idk i use shardingmanager

knotty steeple
#

msg.guild.shard.id works

delicate zephyr
#

yea

knotty steeple
#

im messing with shard stuff

delicate zephyr
#

yea

knotty steeple
delicate zephyr
#

there is no easy way to get the shard idea from client anymore

#

its stupid

#

which is why im making my own lib

twin iron
#

speaking of sharding

#

do you know why i cant use it ?

#

i get (node:15046) UnhandledPromiseRejectionWarning: Error: Shard 0's Client took too long to become ready. error

#

with all shards

#

with every tokens i try

red hollow
#

change timeout

knotty steeple
#

if i make it spawn 2 shards the 2nd one always takes a while to connect

quartz kindle
#

discord only allows 1 connection per 5 seconds

red hollow
#

it can be caused by server not being available too @twin iron

twin iron
#

i have a poop connection so i understand why now

#

@red hollow thanks for the reply

knotty steeple
#

and thats why bots with lots of shards take forever to boot up

twin iron
#

and how i change it ? x)

quartz kindle
#

yeah it sucks

knotty steeple
#

interesting

#

ws is .5

copper cradle
#

@twin iron get a better connection if your problem is bad connection

red hollow
#

nah

#

he can fix it by adjusting/disabling timeout

twin iron
#

@copper cradle i cant get better connection sadly

#

but for my vps is not a problem

copper cradle
#

well

twin iron
#

i just want to try start it on my pc

#

but idk how to change the timeout

quartz kindle
#

client.ws.ping = average from all shards

red hollow
#

wait really

quartz kindle
#

so if the sum of the shard pings is uneven you get .5

red hollow
#

i thought client.ws.ping == client.ping (like avg for current shard)

knotty steeple
#

hm

quartz kindle
#

im talking about internal sharding

red hollow
#

oh

knotty steeple
#

how can i get for the specific shard then

#

yeet

#

wait i got it

#

lul

quartz kindle
#

client.ws.shards = collection of shards

knotty steeple
#

i did msg.guild.shard.ping

quartz kindle
#

then idk

#

lmao

knotty steeple
#

and if i wanted from any shard

#

use client.ws.shard

#

and get it

summer torrent
amber fractal
#

Well what command did you do

summer torrent
#

this is remote development extension

amber fractal
#

ah no idea what that is. Sorry

oblique kettle
zenith terrace
#

error is right there

oblique kettle
#

I get such a mistake in glitch suddenly

#

Error ; const Discord = require('discord.js');

zenith terrace
#

You dont have the package installed

oblique kettle
#

Module loaded

#

11.4.2 release

summer torrent
#

11.4.2 is old

oblique kettle
#

module.js:550
throw err;
^

#

12.1.1 Release

#

how can i handle this problem

quartz kindle
#

run enable pnpm

#

in your glitch console

earnest phoenix
#

So i have a command that pulls and fetches random memes from subreddits... And it works fine but when i do it to fetch (other stuff) commands that can only be used in nsfw channels from their own subreddits...
It hits me up with this...
What's the issue here?

#

404 not found

elder vine
#

It didn't find the page, it seems like.

earnest phoenix
#

Hmm but the all the subreddits and and pages i stored are completely correct tho...

elder vine
#

Maybe it makes a prompt which disallows for it to find what you're looking for? because it's nsfw

earnest phoenix
#

debug

summer torrent
earnest phoenix
#

step through your code, log at every closure, inspect your variables; debug - find where the issue is occuring

#

we can't magically know

#

Hmm... It's suspicious when it works fine for memes but for nsfw stuff that can only be used in nsfw channels...

#

Welp... Wanna see the code anyways?

#

it wouldn't really be of use

#

Hmm...

#

the most i can tell you from your code is around where the error is happening

#

It happens because it can't find the page i stored it... But why when the pages are correct and i can access from a browser...

#

Welp time to figure out what's wrong...

quartz kindle
#

add a catch to the html request and log the exact url being requested

earnest phoenix
#

K lemme try that

#

@quartz kindle also... I can show you the code if you want...

quartz kindle
#

that url gives me 404

earnest phoenix
#

@quartz kindle all of them gives me 404

quartz kindle
#

i mean, in the browser

#

you said they work in your browser

earnest phoenix
#

Oh you mean those links? @quartz kindle
You mean the subreddits or the json file paths or something?

#

No luck

#

Idk like how the meme ones works flawlessly but these... They don't work no matter what...

quartz kindle
#

are you intentionally fetching subreddit urls from imgur?

earnest phoenix
#

Hmm idk... Lemme show you something real quick...

quartz kindle
#

that doesnt sound valid, but idk how imgur works with their urls

earnest phoenix
quartz kindle
#

whats randomPuppy?

earnest phoenix
#

It's a module that fetches random images from the stored subreddits...

#

@quartz kindle it's actually called random-puppy but i did:
const randomPuppy = require('random-puppy');

quartz kindle
#

i looked at the source code and made some tests

#

looks like the nsfw subreddits are blocked by imgur

#

so nothing you can do about it

earnest phoenix
#

Hmm... That would make sense

#

But hmm... Then no luck on fetching and pulling nsfw random images...
Welp rip...

quartz kindle
#

use a different api

earnest phoenix
#

Hmm... I might try... But anyways... Thx for the help... @quartz kindle

unborn fulcrum
small plume
#

@unborn fulcrum could just send the client.users.get twice then return

#

over returning on that line

earnest phoenix
#

So in the footer i set my bot to show the time when the command was used...
But shouldn't the time should be as same as my time in top left?
(Footer time in the bottom right)

#
var time = today.getHours();
var timeM = today.getMinutes();```
And the code that was used in the footer was this:
```Today at ${time + ":" + timeM}```
crimson vapor
#

instead, do .setTimestamp because that will change every minute and day where a text based one will not

earnest phoenix
#

@crimson vapor what should be inside the .setTimestamp()?

crimson vapor
#

well you can use a date or just leave it blank

earnest phoenix
#

Hmm... K lemme try that real quick...

summer torrent
#

how can I set probability for random items? for example: green - 49 %, black 49 %, white - 1%

earnest phoenix
#

and the leftover 1% is the chance of getting swallowed by thanos

#

the easiest dirty way would be to fill your array with the n amount of items that matches the probability

crimson vapor
#

yeah

#

that would work with the 99

#

if you did floor

earnest phoenix
#

3:36 am brain no work help
if (collected.first().content === channel.type('text')) {

grizzled raven
#

ok so

#

i am trying to make it so that users can

#

aaaa i'm not even motivated to explain my problem nevermind

earnest phoenix
#

Will i able to host my bot on ipv6 vps

fleet chasm
#

hoister what is problem

grizzled raven
#

for a feature that has to keep track of users that has reacted to reactions, do you think its better to have the users in a collection, or

#

hhhh nevermind im just getting frustrated lol

earnest phoenix
#

Someone pls help

copper cradle
#

...

#

do you even know what ipv6 is?

sudden geyser
#

@earnest phoenix channel.type is not a function

earnest phoenix
#

@copper cradle im new to vps

sudden geyser
#

channel.type is a string

fleet chasm
#

oh and hoister id recommend you remove the channel.type since you dont need it

#

it creates (or is) a collector in only that channel

crimson vapor
#

LOL

fleet chasm
#

whoops

#

it is bad

wide ridge
#

is it possible to send Embedded messages across shard?

grizzled raven
#

broadcastEval i guess

wide ridge
#

yeah I figured it out

visual sandal
#

I am having a small problem starting up my bot...
I get this error

2020-04-04T03:31:23.428788+00:00 app[worker.1]: internal/modules/cjs/loader.js:985
2020-04-04T03:31:23.428822+00:00 app[worker.1]: throw err;
2020-04-04T03:31:23.428822+00:00 app[worker.1]: ^
2020-04-04T03:31:23.428823+00:00 app[worker.1]:
2020-04-04T03:31:23.428823+00:00 app[worker.1]: Error: Cannot find module './BitField'
2020-04-04T03:31:23.428823+00:00 app[worker.1]: Require stack:
2020-04-04T03:31:23.428824+00:00 app[worker.1]: - /app/node_modules/discord.js/src/util/Permissions.js
2020-04-04T03:31:23.428824+00:00 app[worker.1]: - /app/node_modules/discord.js/src/client/Client.js
2020-04-04T03:31:23.428825+00:00 app[worker.1]: - /app/node_modules/discord.js/src/index.js
2020-04-04T03:31:23.428825+00:00 app[worker.1]: - /app/jonin.js

I've already reinstalled my node_modules, and i am on discord.js v11.6.2, I want to stay on v11 until i can fully convert my code to v12

high bough
#

Can anyone give me a suggestion on setting up Google Cloud

#

??

past trail
#

I probably am an idiot for asking this, but are there any good databases to use with Python?

undone carbon
#

Hi can someone help me with meta tags please

#

I'm trying to do the thumbnail part like in the above link

ember atlas
#

@undone carbon code?

undone carbon
pallid marsh
#

yo

#
<% if(guilds.length == 0){ %>
    <h2>No Servers to show.</h2>
<% } %>
<% else{ %>
<% guilds.forEach(function(guild){ %>
    <h2><%= guild.name %> </h2> <img src="<%= guild.icon  %>">
<% }) %>
<% } %>```
Error is `SyntaxError: Unexpected token else in D:\Moto Moto\Web Dashboard\views\profile.ejs while compiling ejs`
ejs, any idea why its not working?
grand oyster
#

How do you guys handle 502? Should I just ignore it?

2020/04/03 07:25:59 Reason:  Exceeded Max retries HTTP 502 Bad Gateway, 

<html><head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>502 Server Error</title>
</head>
<body text=#000000 bgcolor=#ffffff>
<h1>Error: Server Error</h1>
<h2>The server encountered a temporary error and could not complete your request.<p>Please try again in 30 seconds.</h2>
<h2></h2>
</body></html>
robust moth
sudden geyser
#

toString the number it with the value of 16.

#

You can also just do <MessageEmbed>.hexColor

high bough
lament meteor
#

wow

tight plinth
#

lol

earnest phoenix
#

is it possible to get info about what timezone a given user is in?

tight plinth
#

maybe google can

earnest phoenix
#

Can you elaborate

high bough
#

How to make an eval command?

#

Like, seriously.

pale vessel
fleet chasm
pale vessel
#

no

#

that's too basic

high bough
#

Hey! @pale vessel I'm not an idiot!

pale vessel
#

we need output

fleet chasm
#

darn it

#

i forgot

mossy vine
#

@high bough noone said you are?

fleet chasm
high bough
#

Would this work?

module.exports = {
  name: "eval", //command name
  async execute(client, message, args, Discord, config, eco, leveling, db, avatarURL, footer, clientname, NL3Embed, DevEmbed) {
    ///Command Starts Here
    function clean(text) {
      if (typeof text === "string")
        return text
          .replace(/`/g, "`" + String.fromCharCode(8203))
          .replace(/@/g, "@" + String.fromCharCode(8203));
      else return text;
    }
    if (message.author.id !== config.ownerID) return;
    try {
      const code = args.join(" ");
      let evaled = eval(message.content);

      if (typeof evaled !== "string") evaled = require("util").inspect(evaled);

      message.channel.send(clean(evaled), { code: "xl" });
    } catch (err) {
      message.channel.send(`\`ERROR\` \`\`\`xl\n${clean(err)}\n\`\`\``);
    }
  }
};

fleet chasm
#

try it and see

mossy vine
earnest phoenix
#

WTF

dusky marsh
#

🤔

high bough
#

Yeah, well, sorry?

pale vessel
#

make an object and destructure it

#

that's what i do

#

const { embed } = require("functions.js")

#

that is a mess

dusky marsh
#

i just attach certain things to my client

pale vessel
#

that's good too but i hate putting client.<function>

#

i used to do that

fleet chasm
twin iron
#

-bots

gilded plankBOT
fleet chasm
#

sir

pseudo whale
#

<Client>.ping was removed in v12

twilit rapids
#

You can check the API Latency with <Client>.ws.ping

robust moth
#

@twilit rapids done

earnest phoenix
#

how to make bot leave voicechannel if no one on vc except the client on voiceStateUpdate

#

😅

#

i am not able to do it

tight plinth
#

Language?

earnest phoenix
#

discord.js

tight plinth
#

Version?

earnest phoenix
#

v12

tight plinth
#

Ok

lofty jolt
#

Hi all, I have a really quick question about the practicality of idea I have, would it be possible for a bot to look at the membership of a voice channel and put that into a array. I believe I'd have to hardcode the name of the channel into the bot but i'm fine with that. Was thinking about using Discord.js but open to suggestions if there's a easier way.

earnest phoenix
#

Hey

ctx.arc(520, 960, 100, 0, Math.PI * 2, true);```
#

what 100 and 0 are ?

#

3rd and 4th values

hollow granite
earnest phoenix
#

same

#

its the image radious

#

i got it but i have another problem now

#

how to make bot leave voicechannel if no one on vc except the client on voiceStateUpdate
on discord.js v12 pls help

#

i got a picture which is 1040, 1920 and i created the canvas but the picture is sideways

lofty jolt
#

Hi all, I have a really quick question about the practicality of idea I have, would it be possible for a bot to look at the membership of a voice channel and put that into a array. I believe I'd have to hardcode the name of the channel into the bot but i'm fine with that. Was thinking about using Discord.js but open to suggestions if there's a easier way.
@lofty jolt nvm found the .members property that's what I was looking for

earnest phoenix
#

anyone know why the canvas is sideways?

hollow granite
#

how to make bot leave voicechannel if no one on vc except the client on voiceStateUpdate
on discord.js v12 pls help
@earnest phoenix

what if you use the old state from the voiceStateUpdate event. then from it, u can access the voice channel, then check the members and see if the bot is the only one left

earnest phoenix
#
client.on("voiceStateUpdate", async(oldState, newState) => {
    if(!oldState.channel || !newState.channel) {
      return;
    } 

    let Before = oldState.channel.members.filter(r => { return r.user !== client.user});
    let Now = newState.channel.members.filter(r => r.user !== client.user.id);

    if(newState.channel.members.has(`${client.user.id}`)) {
    setTimeout(async() => {
      if(Before.size < Now.size) {
        const player = await client.music.players.get(newState.guild.id);
        if(!player) return;
        if(!player.playing) return;
        player.textChannel.send(`The queue has been cleared and leaving channel due to no one listening.`);
        client.music.players.destroy(message.guild.id)
      }
    }, 1000);
    } 

  });
#

will this work?

hollow granite
#

try it and see

pallid marsh
#

hey, does any1 knows how can i toggle on a checkbox by default in html?

<input type="checkbox" value="On"/>
``` and its still off. any idea why?
compact tundra
#

@earnest phoenix some file types don’t hold orientation data so for that file type you could just rotate the canvas

glad charm
#

@pallid marsh

<input type="checkbox" value="On" checked/>```
pallid marsh
#

ok

earnest phoenix
#

@compact tundra how do i rotate?

compact tundra
#

ctx.rotate(angle * Math.PI / 180);

#

this will rotate a virtual drawing canvas

earnest phoenix
#

angle is not defined

compact tundra
#

so after that rotate back

earnest phoenix
#

maybe background?

#

its the name of the canvas

compact tundra
#

bro angle is angle you’re rotating the canvas by

earnest phoenix
#

but its not defined

#

wdym

compact tundra
#
ctx.rotate(20 * Math.PI / 180);

earnest phoenix
#

ctx.drawImage(background, 0, 0, canvas.width, canvas.height);
ctx.rotate(angle * Math.PI / 180);

#

i will use 20 then

compact tundra
#

please google search it

#

you’ll have to rotate before you draw

earnest phoenix
#

isnt the canvas supposed to be the size i used?

#

1040 1920

#

oh got it

#

it s 1920 1040

fringe bane
#

Generally for discord bot websites, is bootstrap used?

#

I don't mean DBL, I mean like websites which you can use to control bots

#

ie. the UI of the bot

narrow abyss
#

heyo, if any sysadmins here can find me where I can get nginx ngx_mail_auth_http_module.so it would be greatly appreciated

earnest phoenix
#

So i have a serverinfo command but if you see the verification lvl...
How can i change the names of the verification lvls:

NONE
LOW
MEDIUM
HIGH
VERY_HIGH
To something else?

fleet chasm
#

you'd need to check what it is like

if(verification === "NONE") {
  verstring = "No verification";
}```
spiral mural
#

Hi

pallid marsh
#

yo, if i make my invite link like that: https://discordapp.com/oauth2/authorize?client_id=691584715513266256&permissions=473033847&redirect_uri=https://motomoto.fun/thanks&response_type=code&scope=bot
with the response type, but i just redirect to a page without a code after adding the bot, is it ok? cuz without the response type its not redirecting. is it ok?

Discord

Discord is the easiest way to communicate over voice, video, and text. Chat, hang out, and stay close with your friends and communities.

spiral mural
#

Hi

#

What is this ?

pallid marsh
#

what?

#

wdym what is this

spiral mural
#

Is this your bot invite

pallid marsh
#

yes but like i just asked something i dont wanna advertise my bot lol

#

just asking a question

#

any one knows if its ok?

tight plinth
#

@pallid marsh as u want

#

its ok

pallid marsh
#

ok

spiral mural
#

How to add my bot to Discord Bot List

#

?

tight plinth
#

if it doesnt redirect to nsfw or illegal

pallid marsh
#

no its just a thanks for adding the bot

tight plinth
#

its fine then

pallid marsh
#

ok

spiral mural
#

Thanks

tight plinth
#

^oof

earnest phoenix
#

oh well

#

2020-04-04 02:55:28.970+0000 INFO org.javacord.core.util.gateway.DiscordWebSocketAdapter Websocket closed with reason 'Discord commanded a reconnect (Received opcode 7)' and code COMMANDED_RECONNECT (4999) by client! {shard=0}

#

the new stuff with the opcode eh?

prime cliff
earnest phoenix
#

i'm like "why is my bot going offline everytime" angeryBOYE

#

then i remembered the opcode stuff

nocturne grove
#

Hey. I've got a question about Discord JS. As others (and I) have experienced, the guildDelete (and directly after that the guildCreate) events sometimes got emitted randomly. Someone suggested to make a data file with all guild id's in it, because the event itself is not fully trustworthy. So now, I have a piece of code that's checking joined and left guilds each two seconds. But does anyone of you know if something like this solves the bug too? (I can't check it, as the bug is very random.)

client.on('guildCreate', function(guild) {
  // if the bot is already longer than 1 sec in the guild (it's a fake guildCreate), return
  if (Date.now() - guild.joinedTimestamp > 1000) return;
  // ...
});

client.on('guildDelete', function(guild) {
  // if the guild is still available for the client, return
  if (client.guilds.get(guild.id)) return;
  // ...
});```
Would this work? I suspect the last one doesn't.
robust moth
small plume
#

youre also not checking if oldChannel = newChannel

earnest phoenix
#

Hello does anyone know how I can run a nodeJS file using nodeJS but without using "require()"? The file I want to run has module.exports but I want to just run the entire file regardless of those

dire abyss
#

right so i got this error and i'm not sure why as i didnt touch the code to this bot for a very long time and it was working fine?

small plume
#

ETIMEDOUT literally means that the node script timed out while waiting for a response. Maybe you should just handle that case and retry.

#

Thats what the error means

dire abyss
#

wdym

#

this is odd since this has never happened

#

so why happen now

#

so suddenly

#

did i do something incorrect

small plume
#

Pretty much is asking for a request to the IP and was not receiving one

dire abyss
#

interesting

#

so i have to just retry did you say?

small plume
#

well try and diagnose where the error is coming from

dire abyss
#

i cant do that since it literally is coming from nowhere

earnest phoenix
#

bump because I still can't figure it out and every google search just comes up with how to run a nodeJS file in batch

#

Hello does anyone know how I can run a nodeJS file using nodeJS but without using "require()"? The file I want to run has module.exports but I want to just run the entire file regardless of those

#

you use require.

#

require('myfile.js')

#

just don't assign it to a variable

#

@earnest phoenix ^

#

if it has module.exports though then it just returns those

#

what about them?

#

it still runs everything

#

can't get module.exports without running the whole file thinkingblackguya

#

so

pale vessel
#

i don't get it what is it for

#

what doesn't require have

earnest phoenix
#

doing ```js
variable = require('path')

**won't** run the file, 
but
```js
require('path')

will run the whole thing?

pale vessel
#

it won't

earnest phoenix
#

because you can only run a whole javascript file if you aren't using module.exports

pale vessel
#

both won't

#

btw, wdym by "run"?

earnest phoenix
#

execute all of it

#

line 1 to the end

pale vessel
#

require does that

nocturne grove
#

why not just placing it between module.exports things and execute() {}?

#

then you have line 3 to the end

cinder patio
#

If you want to do it without require, you can use the exec function in the child-process module

#

it will run in a separate process tho, not sure if you want that

earnest phoenix
#

yeah

#

I have an idea

#

thanks anyway

quartz kindle
#

i mean, you can also eval(fs.readFileSync(file))

#

lmao

nocturne grove
pale vessel
#

try if (!guild) return;

nocturne grove
#

Do you really think that will work? If it emits the event, I guess the guild is defined then

earnest phoenix
#

Just try.

nocturne grove
#

lol. You didn't even read what I said, did you? 😂

elder vine
#

Well you can't really know until you wait and see tho, Menno.

tight plinth
#

of

nocturne grove
#

but I'm hoping to see if someone of you already tried it, or had another way

#

because I can't afford latency for that, but it shouldn't contain bugs too

elder vine
#

Hm

nocturne grove
#

It seems to work if I am emitting the events by myself, but I don't know what that bug exactly does

visual sandal
tight plinth
#

@visual sandal show code

nocturne grove
#

But did you install that module too? (or is it a node module)

tight plinth
#

jonin.js

#

whats dat

prime cliff
#

Error: Cannot find module './BitField'

visual sandal
#

that's the index.js

#

I've installed all the node mudules

tight plinth
#

show code

#

where u do require('./BitField')

visual sandal
#

of what? It doesn't show a source error in my code

#

it's part of the disocrd.js, so multiple files

tight plinth
#

no

#

wait

#

upgrade to v12

prime cliff
#

./ means the project root though

tight plinth
#

best solution is to update

prime cliff
#

So why are you trying to load that in the project root shouldn't that already be loaded with your lib?

visual sandal
#

yea, const Discord = require("discord.js");

prime cliff
#

What are your other requires? also maybe try uninstall and reinstall discord.js with node package manager

visual sandal
#

Most of my files have this

const config = require(`../config.json`);
const Discord = require(`discord.js`);
const send = require(`../send.js`);
dire abyss
#

what about the files that need other modules, i assume you require them at the top too?

#

there is no better way to do that tbf

visual sandal
#

yea

earnest phoenix
#

@azure star prefix it doesn't work but only here prefix: prefix?

elder vine
#

?

earnest phoenix
#

can someone help me?

#

??

#

just state your question

#

it dont say nothing

#

aight not my language pogey

#

now work

#

i fix it

#

❤️

#

thanks

#

how can i use canvas with a gif?

late plank
#

yo

#

is there a new way for a bot to react with emojis from a different server

elder vine
#

What do you mean?

earnest phoenix
#

like i have a gif

#

i can that canvas procces it?

#

i want to do this

#

but with the logos

#

i do the logos

#

but idk how do it animated

#

anyone?

late plank
#

historically I've always done

client.emojis.get(botconfig.loading_emote);

but with recent discord-js changes (I'm now on version 12.x) they're requesting that we use

client.emojis.cache.get(botconfig.loading_emote);

which just returns undefined

#

I've found nothing helpful online about it yet

#

using the emoji id directly gives DiscordAPIError: Unknown Emoji

earnest phoenix
#

what is the emoji

late plank
earnest phoenix
#

you use <a:504515210455941120> ?

#

or you use :emojiname: ?

late plank
#

as the api suggests, I'm literally just calling message.react('504515210455941120')

earnest phoenix
#

prob with <a:504515210455941120>

#

@late plank

#

one moment

#

im stupid

#

:emoji_45:

#

<:emojiname:emojID>

#

use it

#

replace emojiname to the emoji name

#

and emoji id replace it for the emoji id

#

and try it

#

but idk how do it animated
? can someone help me

late plank
#

@earnest phoenix yeah... that didn't do much

#

DiscordAPIError: Invalid Form Body emoji_id: Value "504515210455941120>" is not snowflake

earnest phoenix
#

what you put?

late plank
#

:compiler_loading:

#

discord makes it impossible to type exactly because they suck at formatting

earnest phoenix
#

@late plank are you trying to react with an emoji using the bot from a different server?
Like is your bot on that server?

late plank
#

@earnest phoenix thanks for making me realize

#

the beta version of my bot isnt in the server that has this emote

#

Stupidity +2

#

thanks

earnest phoenix
#

Hmm... Np

#

Lmao

late plank
#

I was losing faith in discord.js there for a minute

earnest phoenix
#

btw quick lifehack

#

Yea... Always keep that in mind that your bot can't react with the stored emoji if the bot isn't in that server...

#

use a \ infront of an custom emoji to get its mentiontag

#

made my life so much easier

#

@earnest phoenix you can use :- before a custom emoji to do it too...

#

:-pogey

#

nope

#

Huh?

#

: -pogey

#

They need to be close :- not : -

#

:-pogey

#

there

#

doesnt work

#

welp for android only then

#

\ is for pc

#

I think it's only Visible on mobile lmao

#

And yea

placid prairie
#

Boooooo

sick cloud
#

how do you convert a json object into a string that can be sent by post request
jquery at the moment just refuses to add the array containing a json string

earnest phoenix
#

can someone help me?

#
    const embed111 = new RichEmbed()
        .setColor(`#5780cd`)
        .setAuthor(`Uhh, that Hurt`)
        .setTimestamp()
        .setThumbnail(attachment)

    message.channel.send(embed111)```
#

idk what is wrong

sick cloud
#

scroll up and show the error

earnest phoenix
sick cloud
#

not helpful

earnest phoenix
sick cloud
#

no it isn't

#

how about you stop console logging the canvas buffer

earnest phoenix
#

ok

#

@sick cloud

#

but when i remove .setThumbnail(attachment) it work (but without the attachment) and when i do that it send it like a message and not like a embed it work

#

but i want it like a embed

sick cloud
#

because you can't set an embeds thumbnail as an attachment because its not a url

#

you can use attachfile though iirc

earnest phoenix
#

ok

sick cloud
#

should help you

#

.attachFiles([AttachmentObject]) possibly

earnest phoenix
#

thanks

#

its strange

#

sooo strange

sick cloud
#

show the new code

earnest phoenix
#
    const embed111 = new RichEmbed()
        .setColor(`#5780cd`)
        .setAuthor(`Uhh, that Hurt`)
        .setTimestamp()
        .attachFiles([attachment]);

    message.channel.send(embed111)```
#

isnt there a thing called setimage?

#

instead of attachfiles?

#

yep

#

but it was for links

#

welp, i have to js experience, only a little bit

#

ok

#

anyone?

spice pier
#

You should be setting the thumbnail

#

Discord allows you to use attachment://filename in embeds

prime cliff
#

Wait what

pale vessel
#

needs to be attached first

spice pier
pale vessel
#

yeah, it works

earnest phoenix
#

?

spice pier
#

Embed#setImage('...')

earnest phoenix
#

ok

#

and i prob with welcome-image.png

#

@spice pier

spice pier
#

the name of the attachment, not the name of your const...

#

like the filename

earnest phoenix
#

i do it

#

i put welcome-image.png

#

and dont work

wheat jolt
#

so I have a decoded dxt5 image buffer (decoded with dxt-js) and I'm trying to encode the buffer into a .png file. I tried many packages but no luck
Does someone know a package which can help me?

earnest phoenix
#

@spice pier

prime cliff
#

Embeds only use image urls not attachment://

spice pier
#

Send a new snippet of your current code

raven urchin
spice pier
#

You're missing a comma

raven urchin
#

No i had everything right. But kept showing an error

wheat jolt
#

You're missing a comma

prime cliff
wheat jolt
#

add that comma and show the error

raven urchin
#

Still an error. Even though I put my token in.

wheat jolt
#

@prime cliff it works with those attachment urls too

prime cliff
#

Not attachment://

wheat jolt
#

.-.

prime cliff
#

You need to actually use the attachment url

spice pier
#

No

wheat jolt
#

.-.

earnest phoenix
#
    const embed111 = new RichEmbed()
        .setColor(`#5780cd`)
        .setAuthor(`Uhh, that Hurt`)
        .setTimestamp()
        .setImage('attachment://welcome-image.png');

    message.channel.send(embed111)
            return;
    }```
spice pier
wheat jolt
#

Builderb, have you even tried it, so you're sure it doesn't work?

earnest phoenix
#

?

spice pier
#

You aren't even sending the picture to discord

prime cliff
#

^

spice pier
#

how do you want them to display it

earnest phoenix
#

into the embed

prime cliff
#

Also those are the Discord docs not lib docs

spice pier
#

You are sending no images

wheat jolt
#

.-.

spice pier
#

They can't display something they dont have

earnest phoenix
#

and what i do?

wheat jolt
#

you add the attachment to message.channel.send's options

earnest phoenix
#

@raven urchin are you actually getting an error?

#

it was strange

spice pier
#

Embed#attachFiles([...])

wheat jolt
#

message.channel.send(embed111, {files:[attachment111]})

spice pier
#

or that^

prime cliff
#

That's for the actual message not embeds

#

Embeds can't have attachments only image urls

earnest phoenix
#

@wheat jolt if i do it it looks like this

spice pier
#

then its what alexander sent

earnest phoenix
#

i will prob it

#

and see how is it

raven urchin
#

@earnest phoenix Yeah.

wheat jolt
#

K i went too far

spice pier
#

Now you're missing a bracket

earnest phoenix
#

@raven urchin hmm forgot a } maybe?

#

?

raven urchin
#

Nope I have it in, still an error

tight plinth
#

@raven urchin forgot } at the very end

prime cliff
#

You can't use attachment:// in that

earnest phoenix
#

@raven urchin hmm that's strange...
It shouldn't give an error at all...

pale vessel
#
    const embed111 = new RichEmbed()
        .setColor(`#5780cd`)
        .setAuthor(`Uhh, that Hurt`)
        .setTimestamp()
        .setImage('attachment://welcome-image.png');

    message.channel.send(embed111)
            return;
    }```

@earnest phoenix you didn't attach the file

earnest phoenix
#

i attach it

#

const attachment111 = new Discord.Attachment(canvas.toBuffer(), 'welcome-image.png');

spice pier
#

You didnt...

tight plinth
#
{
  "token": "",
  "prefix": ""
}```@raven urchin
pale vessel
#

no. you need to use attachFiles()

prime cliff
#

You need to send it as an attachment not in an embed

earnest phoenix
#

but i want the image inside the embed

#

@raven urchin wait... What does the error say?

prime cliff
#

You need to use image urls for that

#

You can't canvas them onto the embed

pale vessel
#

yes you can

earnest phoenix
#

how?

raven urchin
#

Now it's working for some reason. @earnest phoenix

spice pier
#

By using attachment://filename.png

pale vessel
#

yes

spice pier
earnest phoenix
#

@raven urchin hmm... Did you forgot the comma at the first?

#

@earnest phoenix Read the Discordjs someone sent earlier

raven urchin
#

@earnest phoenix nope

earnest phoenix
#

Hmm @raven urchin that's a miracle or magic or something...
But it works then GG

#

i read all

pale vessel
#

that only happens to me when I put the wrong file extension

raven urchin
#

I'ma see if it comes online..

earnest phoenix
#

K try

#

i think it was correct

prime cliff
#

Wait you can actually

pale vessel
#

ye

tight plinth
#

I cant figure how I can get boosters list of a server

pale vessel
#

i used it with my qr buffer

tight plinth
#

(member list)

prime cliff
#

thonK i've never seen anyone do that at all, attachments are normally seperate from embeds hmm

#

Intresting

earnest phoenix
spice pier
#

@tight plinth You can check if the member has a non-null premium_since value

tight plinth
#

hmmm ok

misty river
#

Anyone had experience with mongoose/mongodb?

earnest phoenix
#

@pale vessel @spice pier how i can do it?

pale vessel
#

nice two pings man

earnest phoenix
#

sorry

pale vessel
#

i can't really help

earnest phoenix
#

anyone know?

misty river
#

aa i forgot the names of things

#

i cant sorry :1

slender thistle
#

@tight plinth which lib

tight plinth
#

js

#

just figured how to do

slender thistle
#

There may be a special property for Guild to get the boosters

misty river
#

is there a way in mongodb to add new things from a schema to an existing document

slender thistle
#

apparently not, disregard my words

spice pier
#
     const embed111 = new RichEmbed()
         .setColor(`#5780cd`)
         .setAuthor(`Uhh, that Hurt`)
         .setTimestamp()
         .setImage('attachment://welcome-image.png');
 
     message.channel.send({ files: [attachment111],embed: embed111})
             return;
     }```
   did you try this?
earnest phoenix
#

yep

spice pier
#

Try it again then

#

because this should work

pale vessel
#

try attachFiles({ name: "welcome-image.png", attachment: attachment111 })

earnest phoenix
#

now work

pale vessel
#

to the embed object

earnest phoenix
#

Thanks

#

❤️

pale vessel
#

well that's fine ig

earnest phoenix
#

thanks

raven urchin
#

@earnest phoenix it's not turning on, do I use the terminal to set it on?

earnest phoenix
#

Wdym to use the terminal? @raven urchin

pale vessel
#

glitch terminal

raven urchin
#

Like I put the token in and everything but doesn't turn on

pale vessel
#

i mean you can try

earnest phoenix
#

Hmm... That's extremely strange...
What do you type to get the bot online? @raven urchin

#

i can do a gif with canvas?

#

with avatars?

raven urchin
#

I don't know what to type in the terminal, still kinda learning

pale vessel
#

probably not grayald but you can grab a static version of their avatar

earnest phoenix
#

Hmm... Idk if you should use node or not... I'm confused about the glitch website's terminal... @raven urchin

#

static version?

spice pier
#

1st frame

raven urchin
#

It's basically the same thing for discord.js

#

But I don't know what to type in for it to turn on

pale vessel
#

can we see the package.json

earnest phoenix
#

@raven urchin ik... But type node ....
What happens?

raven urchin
#

In the console/terminal it just shows black and then I type it doesn't show anything

earnest phoenix
#

Hmm screenshot? @raven urchin

#

and how @fair grail do this?

raven urchin
earnest phoenix
#

What the... What kind of terminal is that?

raven urchin
#

I don't know.

earnest phoenix
#

:/

#

Hmm so... Did you write your codes in files and save it inside a folder in your phone? @raven urchin

raven urchin
#

It's all on glitch. But I don't know why it just doesn't appear online

earnest phoenix
#

Welp... Then rip... You need to rewrite them maybe and save it inside a folder then use the app called Termux and install nodejs and discord.js and stuff to get started with... Rip @raven urchin

raven urchin
#

Rip, thank you for your help though

earnest phoenix
#

Np

quartz kindle
#

@earnest phoenix canvas does not support animated gifs

earnest phoenix
#

I feel you bro... Gl on it @raven urchin

quartz kindle
#

you need other libraries for that

earnest phoenix
#

Would this code work?

#

and how i can do it?

quartz kindle
#

@raven urchin you're using glitch right? show your glitch files

earnest phoenix
#

For Discord Ranking for ROBLOX.

#

what libraries need?

elder vine
quartz kindle
#

look for gif generation libraries

earnest phoenix
#

@quartz kindle he is saying the glitch's terminal is not working... Scroll up

raven urchin
#

@quartz kindle ok

quartz kindle
#

yeah but glitch doesnt require the terminal to start a process

#

its autorun by package.json

earnest phoenix
#

Hmm... Nice but he says none of them is working... Let's see where this goes...

raven urchin
earnest phoenix
raven urchin
quartz kindle
sick cloud
#

how about you don't code on a phone using a web platform lol

quartz kindle
#

do you have an index.js file?

raven urchin
#

Yep

earnest phoenix
quartz kindle
#

where is it? i dont see it

elder vine
earnest phoenix
#

@sick cloud kinda...
Termux is better to code on than using a website to do so on a phone...

#

@raven urchin wait a second...
Why is your index.js is named index.json?

raven urchin
earnest phoenix
#

Hmm

quartz kindle
#

your previous picture said index.json

#

not index.js

raven urchin
#

I changed it

earnest phoenix
#

K now try then @raven urchin

raven urchin
#

Still not coming online.

quartz kindle
#

check the logs

raven urchin
finite bough
#
Error: Could not locate the bindings file. Tried:
 → /rbd/pnpm-volume/034599ea-c1c3-422b-9783-c3b2bb2163b1/node_modules/.registry.npmjs.org/node-opus/0.3.3/node_modules/node-opus/build/node-opus.node
 → /rbd/pnpm-volume/034599ea-c1c3-422b-9783-c3b2bb2163b1/node_modules/.registry.npmjs.org/node-opus/0.3.3/node_modules/node-opus/build/Debug/node-opus.node
 → /rbd/pnpm-volume/034599ea-c1c3-422b-9783-c3b2bb2163b1/node_modules/.registry.npmjs.org/node-opus/0.3.3/node_modules/node-opus/build/Release/node-opus.node
 → /rbd/pnpm-volume/034599ea-c1c3-422b-9783-c3b2bb2163b1/node_modules/.registry.npmjs.org/node-opus/0.3.3/node_modules/node-opus/out/Debug/node-opus.node
 → /rbd/pnpm-volume/034599ea-c1c3-422b-9783-c3b2bb2163b1/node_modules/.registry.npmjs.org/node-opus/0.3.3/node_modules/node-opus/Debug/node-opus.node
 → /rbd/pnpm-volume/034599ea-c1c3-422b-9783-c3b2bb2163b1/node_modules/.registry.npmjs.org/node-opus/0.3.3/node_modules/node-opus/out/Release/node-opus.node
 → /rbd/pnpm-volume/034599ea-c1c3-422b-9783-c3b2bb2163b1/node_modules/.registry.npmjs.org/node-opus/0.3.3/node_modules/node-opus/Release/node-opus.node
 → /rbd/pnpm-volume/034599ea-c1c3-422b-9783-c3b2bb2163b1/node_modules/.registry.npmjs.org/node-opus/0.3.3/node_modules/node-opus/build/default/node-opus.node
 → /rbd/pnpm-volume/034599ea-c1c3-422b-9783-c3b2bb2163b1/node_modules/.registry.npmjs.org/node-opus/0.3.3/node_modules/node-opus/compiled/12.0.0/linux/x64/node-opus.node
    at bindings (/rbd/pnpm-volume/034599ea-c1c3-422b-9783-c3b2bb2163b1/node_modules/.registry.npmjs.org/bindings/1.2.1/node_modules/bindings/bindings.js:88:9)
#

^??

earnest phoenix
#

[Confused screaming]

quartz kindle
#

@finite bough run enable-pnpm in your glitch console

#

@raven urchin add "scripts": { "start": "node index.js" } to your package.json

raven urchin
#

Which part?

spice pier
#

wdym which part?

finite bough
#

in package.json

earnest phoenix
#

@raven urchin in bottom part of package.json

#

(before the })

raven urchin
#

Like this?

tight plinth
#

ye

earnest phoenix
#

Yea but where did that 2 } go under there? @raven urchin

tight plinth
#

try it and see

#

@earnest phoenix at the left

earnest phoenix
#

Oh i see

raven urchin
#

@earnest phoenix yeah it's there

tight plinth
#

else he will get errors

earnest phoenix
#

K try

raven urchin
#

Now I'm checking my logs it just says Resolving: total 132, reused 132, downloaded 0

earnest phoenix
#

Screenshot?

tight plinth
#

wait

#

thats npm output

#

try to edit smth in index.js and see

earnest phoenix
#

@raven urchin wait... Edit:
"node index.js"
To
"node ."

copper cradle
#

@raven urchin in json the order doesn't matter

raven urchin
#

K

tight plinth
#

@earnest phoenix both works

earnest phoenix
#

Hmm ik

#

how can i store the unique object returned from a settimeout as a string?

raven urchin
earnest phoenix
tight plinth
#

should work

earnest phoenix
#

@raven urchin is the bot online?

raven urchin
#

No :/

spice pier
#

Its not a dependency...

raven urchin
spice pier
#

bring it outside of dependencies

raven urchin
#

Bring what out of dependencies?

spice pier
#

It should be its own field just like author or license

earnest phoenix
#

@spice pier you mean to the very bottom or something?

spice pier
#

the scripts field

earnest phoenix
#

Hmm

spice pier
#

it doesnt need to be at the bottom

earnest phoenix
#

Ik

spice pier
#

it needs to be in the root of the object

earnest phoenix
#

just tried the pm2 on my stick can i fix that with the pm2 start stick then i can see the console?

raven urchin
#

So where would dependencies go?

spice pier
#

put the scripts thingy out side of dependencies

earnest phoenix
#

@raven urchin dependencies are in the middle...

spice pier
#

scripts shouldn't be in the dependencies object

raven urchin
#

Yes, but how do I put the scripts part outside of dependencies

spice pier
#

by putting it outside of it...

earnest phoenix
#

@spice pier so he should create a new class for it?
Like "scripts": {

#

That's confusing...

spice pier
#

they aren't called classes

earnest phoenix
#

Oh i forgot...

spice pier
#
{
  "dependencies"" {
    ...
  },
  "scripts": { "start": "node index.js" }
}```
earnest phoenix
#

just tried the pm2 on my stick can i fix that with the pm2 start stick then i can see the console?

spice pier
#

thats how it should be

earnest phoenix
#

@spice pier hmm that should work...

#

@raven urchin try that as @spice pier said...

spice pier
#

This is how it is atm

{
  "dependencies"" {
    ...
    "scripts": { "start": "node index.js" }
  }
}```
raven urchin
#

Ok

tight plinth
#

@spice pier u forgot a coma

#
{
  "dependencies"" {
    ...
  },
  "scripts": { 
"start": "node index.js" 
}
}
spice pier
#

Its not meant to be used

#

I was just demonstrating

tight plinth
#

still

pale vessel
#

then you should've pointed that "..." on the middle of the file

raven urchin
#

I'm so confused, where do I put that part.

spice pier
earnest phoenix
#
"scripts": {
"start": "node index.js"
}```
 @raven urchin
raven urchin
#

Also says the error in index.js

mossy vine
#

congrats you managed to show nothing relevant

earnest phoenix
#

@raven urchin hmm... What's the actual error? Scroll up in the logs...

copper cradle
#

@raven urchin learn to read errors

sudden geyser
#

can you show us the actual package.json file (the entire thing)? What is the error message?

#

also don't code on mobile

earnest phoenix
#

@sudden geyser keep that in mind that coding on mobile isn't so bad and not everyone has a desktop, pc or laptop...

#

(but coding on mobile is harder than expected... Cuz i code on mobile)

split hazel
#

Is there a way to merge pm2 error & normal logs together when doing pm2 logs ID

#

it's a nightmare debugging anything

quartz kindle
#

what i did was set both log files to the same file

#

but thats only for future logging, idk for past logging

#

you can probably do something with grep

split hazel
#

ah i thought of that but wasn't sure

#

and that's fine, thanks

mystic violet
#

Would this work for the guildMemberRemove event?

#
const hoursJoined = new Date().getTime() - member.joinedAt.getTime()```
#

To see how long they were in the server they just left

earnest phoenix
mystic violet
#

I did lol

#

it gave me 8194748

#

not sure why

earnest phoenix
#

it's the amount of milliseconds

mystic violet
#

oh smh

#

I forgot to divide

earnest phoenix
#

How can i strech it over the painting

copper cradle
#

yes

earnest phoenix
#

yes

slender wagon
#

is it ok if u use different host for the same bot

#

hosts*

earnest phoenix
#

how to send dm? in discordjs

#

user.send()

#

("HEY")

#

?

copper cradle
#

what are you using to do that?

earnest phoenix
#

canvas

copper cradle
#

lemme test something

earnest phoenix
#

btw how can i know what cords is the painting block thing

#

i cant calculate that

copper cradle
#

I'm not sure

earnest phoenix
#

thx that works @earnest phoenix

copper cradle
#

try to change it's width and height values lol

earnest phoenix
#

it will stay same place but widther

#

or higher

#

i need the painting cords

copper cradle
#

ik

earnest phoenix
#

of the painting block

#

how can i get it

copper cradle
#

I said that bc you wanted to stretch it

#

console.log the image and see its properties

earnest phoenix
#

then what

copper cradle
#

...

#

just do it

#

you'll see

earnest phoenix
#

183x183

#

this is the image itself (pfp)

copper cradle
#

not that

#

in your code

earnest phoenix
#

so

copper cradle
#

you have an image object somewhere

earnest phoenix
#

[Image:183x183 complete]

copper cradle
#

console.log that image

earnest phoenix
#

yeah here

copper cradle
#

show

earnest phoenix
#
[Image:183x183 complete]```
#

This is the result

copper cradle
#

hmm

earnest phoenix
#

do you mean the background ?

copper cradle
#

no

earnest phoenix
#

i only got avatar and background

#

thats it

copper cradle
#

are you using the dom canvas or the npm module

earnest phoenix
#

just canvas?

#

npm

copper cradle
#

ah

#

lemme see something

earnest phoenix
#

ok

copper cradle
#

ok, so, I can't find anhthing bc I'm blind af

#

meybe tim will be able to help

earnest phoenix
#

lmao

#

i tried he wont respond rn

copper cradle
#

just let him get online

#

afaik he always checks this channel

earnest phoenix
#

yeah ok

true ravine
#

How do I "mention" a channel from it's ID in djs v12 - before I just used the channel object but that isn't a thing anymore

earnest phoenix
#

anyone know a module that makes settimeout returns numerical id's instead of objects?

pale vessel
#

you can use the object

earnest phoenix
#

i need to store it in json

#

but the object is circular

pale vessel
#

just needs to be inside a ``

#

@true ravine

true ravine
#

Really? Okay thank you

#

I think I might have explain it wrong

zenith terrace
#

im slacking today

#

wrong channel

#

xD

true ravine
#

oof lol

earnest phoenix
#

@true ravine what are you trying to do ?

zenith terrace
#

@true ravine also what is it you want or is it fixed

mystic violet
#
(node:19788) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'joinCount' of null
    at C:\Users\jnsho\Desktop\Flexilink Discord Bot\Flexilink\src\commands\find.js:30:16
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:19788) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 181)```
#

No idea why this is happening tbh

earnest phoenix
#

have you tried reading the error

elder vine
#

Please provide code, so that we can help.

earnest phoenix
crimson vapor
#

talk to me when you get to 300

zenith terrace
#

When you never hear from LoseJoe again

earnest phoenix
earnest phoenix
#

Is someone able to get in vc to help me out?

#

Testing 2

#

what is an acceptable rate of activity changing?

#

and @earnest phoenix by checking if the bot joined a new server

grizzled raven
#

😎

finite bough
#

@earnest phoenix using guildCreate event

true ravine
#

@true ravine what are you trying to do ?
Don't worry I worked it out

finite bough
#

@earnest phoenix u buffer the song before playing it right?

earnest phoenix
#

while playing it

#

the song starts buffering and playing at the same time

#

the buffering overtakes the speed and completes first

finite bough
#

hmm so u like save it?

#

i mean

earnest phoenix
#

what do you mean by save

#

it's entirely all in memory

#

@finite bough so this?

message.channel.send("blabla")
``` ?
finite bough
#

yea

#

@earnest phoenix mhm

#

wait

#

message.channel not defined

spare goblet
#

@earnest phoenix you didn't close your brackets :')

earnest phoenix
#

oh yea lmao

spare goblet
#

and message ain't defined

earnest phoenix
#

i forgot to put that part

spare goblet
#

So channel ain't defined either

finite bough
#

i said that ;w;

spare goblet
#

blobopenmouth oop

finite bough
#

bulli

#

@earnest phoenix can u tell me how u do it

#

i can figure out a way to buffer out the song

earnest phoenix
#

i'm using c#

#

i don't know how to implement it in other languages

finite bough
#

well any other idea how i can reduce the latency of vids

earnest phoenix
#

@finite bough so how can i define it?

finite bough
#

either by choosing a random channel [bad idea]

#

or finding a channel by its name content [which is also a bad idea]

earnest phoenix
#

is it possible to make it send in the channel it was invited to?

spare goblet
#

Hate bots that do that

#

Bots don't get added to specific channels

finite bough
#

^

spare goblet
#

So you can try using the first channel that's in the cache ig

#

Like
guild.channels.cache.first() or some crap

finite bough
#

^

modest maple
#

yeah its annoying when bots do that

finite bough
#

^

modest maple
#

just like reee

finite bough
#

lmao

#

there is 90% chance that the message will be deleted anyways xD

spare goblet
#

I know some bots just grab #general channels and do it

modest maple
#

"Ive added you to try your commands and see how they go and to keep you or not, dont freaking start messaging my channels telling me what i know you can do"

finite bough
#

ya like channel.name.toLowerCase().includes('general')

golden condor
#

How do I see the amount of things in a Collection

finite bough
#

length

pale vessel
#

limit

finite bough
#

nvm me

pale vessel
#

oh nm

finite bough
#

LOL

pale vessel
#

that's for fetch or something

earnest phoenix
#

isn't it length

#

collections are an extension of maps

#

nevermind

#

it's size

finite bough
#

yea

#

checked that

#

didnt try it so not sure

golden condor
#

I tried that

#

I am trying to see how many aliases there are

#

with

#

Discord.Collection()

#

Like

finite bough
#

i mean define it a value and aliases.size? no?

pale vessel
#

aren't your aliases an array

spare goblet
#

Your commands is a collection, but your ALIASES is an array. So you should be fetching the command from the collection then checking command.aliases.length most likely

Honestly depends on what your collection looks like

earnest phoenix
finite bough
#

@earnest phoenix u have to get used to getting the cods

#

there are many apps that get the cods for u

earnest phoenix
#

really, example?

finite bough
#

i kinda use photoshop so idk xD

earnest phoenix
#

i tried i cant find anything

#

haha

#

I also got photoshop

finite bough
#

do it

earnest phoenix
#

how can i see cords? is it visible or should i use a setting?

finite bough
#

check at the borders

earnest phoenix
#

i dont see it?

#

help me music bot not working js if (command === 'play') { const voiceChannel = msg.member.voiceChannel; if (!voiceChannel) return msg.channel.send('I\'m sorry but you need to be in a voice channel to play music!'); const permissions = voiceChannel.permissionsFor(msg.client.user); if (!permissions.has('CONNECT')) { return msg.channel.send('I cannot connect to your voice channel, make sure I have the proper permissions!'); } if (!permissions.has('SPEAK')) { return msg.channel.send('I cannot speak in this voice channel, make sure I have the proper permissions!'); }