#development

1 messages · Page 1187 of 1

unreal tapir
#

jk

#

what do i host onn

opal plank
#

selfhost, vps, or some free host that isnt heroku or glitch

sudden geyser
opal plank
#

oh i think it worked

#

it compiled!

unreal tapir
#

link?

#

wosdh

opal plank
#

link to what?

solemn leaf
#
                const invited = invites.array().filter(o => o.inviter.id === message.guild.members[i].id);
                message.channel.send(invited)

why does this say it is sending a empty message

opal plank
#

likely cuz its empty

#

¯_(ツ)_/¯

#

log invited before sending it and double check

solemn leaf
#

@opal plank

#

Cannot read property 'id' of undefined

opal plank
#

theres your error then

#

¯_(ツ)_/¯

solemn leaf
#
 message.guild.fetchInvites()
        .then
        (invites => {
            if (args[0] === "leaderboard") {
                const invited = invites.array().filter(o => o.inviter.id === message.guild.members[i].id);

but what do I do

opal plank
#

actually

#

what is your o?

#

also wrap your invites in parenthesis

solemn leaf
#

?

opal plank
#

warp invites in parenthesis

#

iirc parameters need parenthesis

solemn leaf
#

"invites"

opal plank
#

what?

solemn leaf
#

what is a parenthesis

#

lmao

opal plank
#

()

solemn leaf
#

oh

opal plank
#

" is quotation mark

solemn leaf
#

oh

#

lmao

opal plank
#

that wont fix the issue but its good practice not to do that

solemn leaf
#

okay

opal plank
#

check what your o is returning

solemn leaf
#

how

#

console.log(o)

#

?

opal plank
#

that works

#

or step debug

#

which is 100000000x better

solemn leaf
#

o isnt defined

opal plank
#

remember when i told you to wrap invites in parenthesis?

#

guess what?

#

o also isnt wrapped in parenthesis

#

¯_(ツ)_/¯

solemn leaf
#

ok

opal plank
#

now try logging o

#

if that still is undefined that means you have no invites fetched

#

do a check if its nullish

solemn leaf
#

undefined

earnest phoenix
#

how can i retrieve the date of a deleted message?

#

like now Date()

solemn leaf
#

you cant

#

it would break discord tos

indigo flax
#

i need help

earnest phoenix
#

i'm doing the snipe command.

indigo flax
#

whats the discord.js eval to delete a message

#

heres the messageID

solemn leaf
#

@opal plank actually I did it in a different server and it didnt log anything

earnest phoenix
#

How do I get the date of the deleted message?

indigo flax
#

746115866340360196

solemn leaf
#

@earnest phoenix that is prob breaking tos

indigo flax
#

no its not

#

Dank Memer has it

#

pls snipe thingy or something

opal plank
#

it isnt breaking tos

#

caching isnt against tos

indigo flax
#

^

earnest phoenix
#

yeah

opal plank
#

STORING it on the other hand will get you in poor situations

solemn leaf
#

ah ok

opal plank
#

first you'd need encryption

indigo flax
#

Not Erwin do u use discord.js

opal plank
#

then you gotta add a non-collect policy

#

i do

indigo flax
#

idc which version

earnest phoenix
#

i tried something like this: moment(new Date().toLocaleString("tr-TR")).fromNow())

opal plank
#

erm

indigo flax
#

Sorry to ask but do u know the eval to

opal plank
#

lemme check

indigo flax
#

delete

#

a message

opal plank
#

yeah of course

indigo flax
#

using messageID

opal plank
#

eval is code

#

you'd need to have it cached or at least know the channel id

solemn leaf
#

erwin

#

can you helpop

opal plank
#

thats one big commit

indigo flax
#

do u know how?

opal plank
#

of course

#

i told u how

#

you'd need to have it cached or at least know the channel id

#

is any of those true?

indigo flax
#

746115866340360196

opal plank
#

why u giving me an id?

solemn leaf
#

yeah

#

I think a token would be nicer lmao

opal plank
#

im hoping you dont expect me to grab it for you @indigo flax

indigo flax
#

Oh

#

i was hoping for the eval thing

opal plank
#

i cant spoonfeed code

#

i can send you the docs though

indigo flax
#

@opal plank DMChannel.messages.fetch()

opal plank
#

you'd need more options ontop of that

#

without query it'd default to 100 iirc

#

also idk which type of channel you trying to pull from

indigo flax
#

;eval client.messages.cache.get('ID').delete()

opal plank
violet haven
#

username: 'NUAGE',
discriminator: '7052',
avatar: '202704889c8194aacf38e0ad22a3d12d',
flags: UserFlags { bitfield: 256 },

#

what's on flags?

#

what do i have to understand?

sudden geyser
#

flags are like badges

modest crane
opal plank
#

you need to resolve your promise first

#

that snippet wont work btw

#

¯_(ツ)_/¯

#

crossing my fingers that this works

wooden ember
#

how would I get an accurate user count for my bot as apparently bot.users.cache.size isnt good enough

opal plank
#

how accurate we talking here?

#

without marging of error or a good aprox?

#

a good aprox would be looping the membercount of each guild

#

an accurate count would be fetching member list from each guild and mapping each user, then getting its size

wooden ember
#

I mean I dont cair about a user being counted twice if they are in more than one server that the bot is in i just whanna stop this

earnest flare
#

For a bot to show as online on the website does it need to be apart of this server?

opal plank
#

then do what i said

#

loop your guilds and sum the memberCount

winter basalt
#

@earnest flare yes

earnest flare
#

Ok thanks

wooden ember
#

what do you mean loop the guilds?

faint prism
#

I mean I dont cair about a user being counted twice if they are in more than one server that the bot is in i just whanna stop this
@wooden ember that's a cool cli

opal plank
#

literally loop your guilds cache @wooden ember

wooden ember
#

its like 2 in the morning I ahave no clue that that means

#

also thx auger

opal plank
#

you likely have your guilds cached

#

just reduce them or loop with a sum

wooden ember
#

ah yeah im just using bot.users.cache.size as the var

opal plank
#

just use guids instead

#

and loop thru their values

wooden ember
#

as in add all the guild.memberCount up from all the servers

opal plank
#

yeah

#

for that you need to iterate thru all the guilds you have cached

#

hence why i said, loop them

#

or reduce them

#

either is fine

wooden ember
#

ah nice but then id have to do that in all the places I needed that value tho

#

cuz atm its use in like 3 places

opal plank
#

you dont

wooden ember
#

oh yeah I expect I can just export it

opal plank
#

indeed

wooden ember
#

ah nice

opal plank
#

or attach it somewhere handy

karmic compass
#

just a random question, but how do i make a command prompt type script in python?
example of what i'm talking about:
if i did test after doing py -3 file.py, it would respond with "hi", and i could do that as many times as i wanted

supple sail
#

anyone can help?

(node:3240) UnhandledPromiseRejectionWarning: #<Collection>
(node:3240) 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 termina
te the node process on unhandled promise rejection, use the CLI flag `--unhandle
d-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejectio
ns_mode). (rejection id: 1)
(node:3240) [DEP0018] DeprecationWarning: Unhandled promise rejections are depre
cated. In the future, promise rejections that are not handled will terminate the
 Node.js process with a non-zero exit code.
#

(Not giving any line number.)

opal plank
#

is that not cut out?

supple sail
#

Full.

opal plank
#

where did u add that command?

supple sail
#

In main file.

opal plank
#

do a massive try {} catch(e) {console.log(e)} on where you think that might be

supple sail
#

Okay.

opal plank
#

preferably you'd step debug it

supple sail
#

I don't know debugging.

opal plank
#

you should

#

its unvaluable tool

supple sail
#

Source?

opal plank
gleaming niche
#

how do you add a loop command for a public music bot

#

specifically my music bot

#

with python

violet haven
#

exemple

#

excuse me wtf

quartz kindle
#

wut

modest crane
violet haven
#

ah?

#

but how do i show the flag with the bot?

quartz kindle
violet haven
#

hu?

quartz kindle
#

user.flags.toArray()

violet haven
#

ok

split hazel
#

I still wonder why discord hasn't made nitro or boost badge a flag

violet haven
#

now i want to show the flag but just house balance is shown off

ionic dawn
opal plank
#

i think you can get nitro on gateway @split hazel

#

isnt subcription/subsriber a thing?

#

or was, at least

split hazel
#

you can only get it if you self bot (use user token to access endpoints not available to bots) or check for things like discriminator or animated pfp

opal plank
#

premium something i think

#

ngl would be really handy if you could use some normal users endpoints with bots

#

like connected accounts

#

would make auth much easier since you just have to check which account the user is connected to

#

without forcing the user to auth thru your app/bot

#

shit like searching for messages would be nice too

drifting wedge
#

whats the event for role added:

#

like when a role is added to a user

opal plank
#

im still waiting for rich presence for bots too

split hazel
#

assuming you're using discord.js, guildMemberUpdate

#

though that triggers on member updates, like avatars, usernames, nicknames, etc

opal plank
#

it provides new/old member iirc

#

you'd have to compare

split hazel
#

you can compare both role stores and see which ones have been added

drifting wedge
#

@split hazel using python

split hazel
earnest phoenix
#

How would I make the response an embed

opal plank
#

i'd recommend sending a payload directly

#

though you could use d.js's embed builder

#

but there isnt a reason to

sudden geyser
void pine
#

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

split hazel
#

seriously why

#

did you have to send that in 50% of the channels

solemn leaf
#
    let prefix = await db.get(`prefix_${message.guild.id}`)
    if (!prefix) prefix = config.prefix
    if (prefix != db.get(`prefix_${message.guild.id}`)) return;
    let messageArray = message.content.split(" ")
    let cmd = messageArray[0]
    let args = messageArray.slice(1);

can someone help me when I test if the prefix is the prefix it bugs and allows all prefixes

split hazel
#

at the end you should check if the message starts with the prefix

#

if not return

solemn leaf
#

@split hazel

#
    let commandfile = bot.commands.get(cmd.slice(prefix.length));
    if (commandfile != db.get(`prefix_${message.guild.id}`)) return;
drifting wedge
#

how can i make it like if command not found say command not found?

earnest phoenix
#

Hi

#

So I just checked my SSH and there seems to be something that caught my eye

#

(node:15534) UnhandledPromiseRejectionWarning: DiscordAPIError: Missing Access
at RequestHandler.execute (/root/bot3/node_modules/discord.js/src/rest/RequestHandler.js:170:25)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:15534) 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(). (rejection id: 1)
(node:15534) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

#

I have no idea what this means lol

sudden geyser
#

It means you tried to do something you don't have access to do, such as trying to get info on a guild you aren't part of

earnest phoenix
#

Oh

#

Oof

#

Thanks

#

What about the depreciation warning?

faint prism
#

Sounds like they're removing error handling for the unhandled promise error in a future version. You may want to upgrade for that one

#

Lol, which apparently will actually cause the process determinate

#

What an awful thing to deprecate

sudden geyser
#

That deprecation warning happens when a promise throws and it isn't handled (e.g. .catch()). The description is good enough to explain it.

earnest phoenix
#

Thanks

sudden geyser
#

Auger they're actually hosting a poll on the Node.js website to ask for feedback about it

#

oh I don't think it's there anymore

#

it was there yesterday I think

#

But it's been a warning for a while

#

At least from Node 8

zenith knoll
#

User aborted a request?

#

wtf

grand finch
#

What method in discord.js lets me send a message to a channel by id (or {Channel} class instance)?

#

The channel class doesn't have a method for sending

thick gull
#

get it from the cache

#

and then .send

grand finch
#

.send on what

thick gull
#

<client>.channels.cache.get().send

grand finch
#

What type is client.channels.cache.get(...)

#

or what is it an instance of

thick gull
#

i geniunely cant remember

earnest phoenix
#

Check docs

thick gull
#

lmao

grand finch
#

It appears to be of type {Channel} extends {Base}, is {Base} where send exists?

earnest phoenix
#

No

grand finch
#

Well client.channels.cache.get() doesn't have a send method according to the docs

earnest phoenix
#

Bit it will send TextChannel, VoiceChannel, and brah brah brah i think

#

Return*

opal plank
#

it'll return it

#

it does

thick gull
#
        const filter = (collected) => {
            true
        };
        let optionMessage = message.channel.send('Chose')
        console.log('Creating await.')
        message.channel.awaitMessages(filter)
            .then(collected => {
                console.log(`collected`)
            })
            .catch(e => {
                console.log('caught!')
                console.log(e)
            });

is there a reason why it's not even collecting anything/logging pass the first one

#

i've been tinkering with this

#

for a while now can't figure it out

grand finch
#

filter always returns true (I don't know the context of your code)

earnest phoenix
#

Thats the point lmao

opal plank
#

my brain malfuctioning

#

is there a reduce() for maps() ?

grand finch
#

you can create an array from one and then reduce

opal plank
#

hmmm

#

could do arrayfrom

grand finch
#

well if you wanted the keys, values, or entries you can create an array from the map

opal plank
#

yeah im aware

grand finch
#

then use Array.prototype.reduce

opal plank
#

i just dont wanna use for or set another variable

grand finch
#

use for or set
hmm?

opal plank
#

use for or declare

vernal forge
#

i want to make my bot change the color of the members name but how do i do it?

grand finch
#

What language are we talking about?

opal plank
#

js

grand finch
#

Node.js?

opal plank
#

well, ts technically

sand skiff
#

hi
i need help
who can help me
i have 3 different things
to code on
the basic for mac- terminal
Visual Studio Code
Python

#

on terminal, i use node and nvp or what ever its called

opal plank
grand finch
#

By not wanting to use for, you mean you don't want to iterate over the array you make from the map?

opal plank
#

i mean its a map

grand finch
#

Maps aren't arrays, if you want to iterate most efficiently use the map iterator

opal plank
#

i could for it and solve the issue

vernal forge
#

can anyone help with how make a bot with the commands to change the name color of the member by chosing a color they like

opal plank
#

and i could deconstruct it aswell

grand finch
#

I don't understand why those are relevant

#

You wanted to use reduce

#

Do you understand why reduce exists?

opal plank
#

reduce passes an aggragator

#

which i could very well do with another type of iterator

sand skiff
#

hi
i need help
who can help me
i have 3 different things
to code on
the basic for mac- terminal
Visual Studio Code
Python
on terminal, i use node and nvp or what ever its called

#

pleaseeee

grand finch
#

@sand skiff there's no question in your message

opal plank
sand skiff
#

who can help me

#

bc

opal plank
#

the heck did u link me ecma pdf for?

sand skiff
#

i dont know how to use any of these

grand finch
#

@opal plank because it describes what reduce does and how it should be implemented (and Node.js is an ECMA compatible language)

opal plank
#

i literally posted above that i knew what it was

grand finch
#

But you also described that you don't want to iterate

#

So who can help you?

#

!xy

opal plank
#

i meant that as i dont want to use extra variables

#

or iterate myself

grand finch
#

So don't

sand skiff
#

please

grand finch
#

myself
reduce, forEach, for (... in) ... what is "myself" and what is not?

sand skiff
#

@grand finch

#

what do you use

opal plank
#

cuz efficiency

sand skiff
#

to develop your bot

opal plank
#

and im bored

grand finch
#

@sand skiff to code in? I use vi in a terminal

sand skiff
#

or @opal plank

#

@sand skiff to code in? I use vi in a terminal
@grand finch vi?

#

on mac?

opal plank
#

i use Ts not python

grand finch
#

@sand skiff it's platform independent but you can use any text editor, vscode, sublime text, vi, emacs

#

@sand skiff what language do you want to use?

sand skiff
#

english

#

look

grand finch
#

I can't figure out where in the docs that a {Channel} is an instance (potentially?) of {TextChannel} (which has a send method

sand skiff
#

i have mac

grand finch
#

@sand skiff I mean node.js, python, c++ etc?

#

Your bot needs to be executed by some language runtime/compiled etc

sand skiff
#

the first is called terminal

grand finch
#

Yes I am familiar

sand skiff
#

can you help with python?

#

or any

#

pls

grand finch
#

No I don't know python, refuse to learn slow languages

sand skiff
#

ok

#

what about

#

terminal or

#

visual studio code

grand finch
#

Terminal is a software that provides a standard input and output for you to interact with your command-line programs on your system - it is not a language per se

#

I would reccomend you begin in VSCode

faint prism
#

You need to use VIM to be a real coder mmLol

grand finch
faint prism
#

Haha

grand finch
#

@sand skiff can I reccomend you google how to start a node.js project in VSCode? You mentioned you have npm, did you install it with nvm?

#

what do you get on your terminal if you run node --version ?

#

And are you familiar with git

#

You probably want to manage your code each time you save/update it

sand skiff
#

im not familiar with git

opal plank
#
const a = new Map();


//case each
let int = 0;
a.forEach((c) => {int + c})
return int

// for
let int = 0;
for(let c of a) { int  + c};
return int

//reduce
return Array.from(a.values()).reduce((c,d) => c + d);

// descons
return [...b].reduce((c,d) => {c+d})

//got tired of writing the rest
#

@grand finch

#

this is what i mean

#

trying to declare as least variables and use the smallest amount of stuff to accomplish the same goal

grand finch
#

@sand skiff well luckily vscode can do the git stuff for you

sand skiff
#
v12.18.3
#

ok

#

wait

grand finch
#

nice, it's the latest

sand skiff
#

how do i run a code on uh

opal plank
#

no?

sand skiff
#

vsc

opal plank
#

latest node version is 14.6.0

#

without going on nightly builds

grand finch
#

v12.18.3 (Latest LTS: Erbium)

sand skiff
#
6.14.6```
grand finch
#

@sand skiff when you begin a discord bot project your project will want to use discord.js which is a package available through npm

#

So you're going to want to add discord.js to your dependencies in VSCode for a new node.js project'

opal plank
#

oh shit

#

they added 14.8

grand finch
#

this will allow you to run npm install on your project and have discord.js downloaded automatically

sand skiff
#

im confused

#

wait

#

one sec

#

also

#

if i leave screenshare im afk

grand finch
#

@sand skiff it's going to be a bit of a learning curve probably - be prepared 🙂

sand skiff
#

join general

#

shoot

#

i cant stream

#

uh

#

then where

thick gull
#

I figured it lmaoo

#

it’s required that you add the max parameter

#

even though they say it’s optional

#

😔

grand finch
#

@sand skiff do you know how to use the terminal to move through your file system, make folders etc?

#

Also check you have git installed git --version

sand skiff
#

ok

#

and no i dont

#

know

#

how to

grand finch
#

it has a lot of commands you can run, pressing tab initiates auto-complete on a command so you can type stuff like mkd<tab> and it will auto complete to mkdir - if you press tab twice it wwill show you all the autocomplete options

sand skiff
#

ok its downloading

grand finch
#

are you installing it with brew?

sand skiff
#

no

#

after it said its not found

#

it promted me to install

grand finch
#

oh interesting

sand skiff
#

afk

#

?afk

#

uh

#

?afk .

#

oof

grand finch
#

try /afk?

#

don't know if its a command or not /tableflip

earnest phoenix
#

(╯°□°)╯︵ ┻━┻

grand finch
#

┬─┬ ノ( ゜-゜ノ)

earnest phoenix
#

Lol Nice

#

(╯°□°)╯︵ ┻━┻

sand skiff
#

/afk

#

nope

#

but anyway

#

im back

#

(╯°□°)╯︵ ┻━┻

#

so

#

how do i get started

#
git version 2.5.4 (Apple Git-61)```
#

k

grand finch
#

wait a sec

sand skiff
#

do i enter it all at once?

#
cd ~/git
git init
touch ./index.js
npm install discord.js --save```
grand finch
#
mkdir ~/git
mkdir ~/git/my-project-name
cd ~/git/my-project-name
git init
touch ./index.js
npm install discord.js --save
solemn leaf
#
const nodes = [{
    host: "localhost",
    port: 2333,
    password: "youshallnotpass",
}]

Node error: connect ECONNREFUSED 127.0.0.1:2333

sand skiff
#

do i put it in all at once or one by one line

grand finch
#

this will make a folder git in your home directory, and in git it will make my-project-name folder, initialise an empty repository and install discord.js for you

#

all at once, because it has new lines each will execute one at a time

#

the last line won't execute until you press enter

sand skiff
#

ok i put it in all at once

#
Susantas-iMac:~ SiaYT$ mkdir ~/git/my-project-name
Susantas-iMac:~ SiaYT$ cd ~/git/my-project-name
Susantas-iMac:my-project-name SiaYT$ git init
Initialized empty Git repository in /Users/SiaYT/git/my-project-name/.git/
Susantas-iMac:my-project-name SiaYT$ touch ./index.js
Susantas-iMac:my-project-name SiaYT$ npm install discord.js --save
npm WARN saveError ENOENT: no such file or directory, open '/Users/SiaYT/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/Users/SiaYT/package.json'
npm WARN SiaYT No description
npm WARN SiaYT No repository field.
npm WARN SiaYT No README data
npm WARN SiaYT No license field.

+ discord.js@12.3.1
added 14 packages from 17 contributors, removed 14 packages, updated 1 package and audited 15 packages in 3.029s
found 0 vulnerabilities

Susantas-iMac:my-project-name SiaYT$ ```
grand finch
#

type ls -arctl ~/git/my-project-name

sand skiff
#
total 0
drwxr-xr-x   3 SiaYT  staff  102 Aug 25 22:30 ..
-rw-r--r--   1 SiaYT  staff    0 Aug 25 22:30 index.js
drwxr-xr-x  10 SiaYT  staff  340 Aug 25 22:30 .git
drwxr-xr-x   4 SiaYT  staff  136 Aug 25 22:30 .```
grand finch
#

I don't think your shell navigated to the directory, what about pwd

sand skiff
#

?

#

what?

grand finch
#

run that (pwd)

sand skiff
#

whats that

grand finch
#

echoes the path to the directory you're in

sand skiff
#

uh

#

how do i run that

grand finch
#

just type it and press enter

#

same as the other commands

sand skiff
#

Susantas-iMac:my-project-name SiaYT$ pwd
/Users/SiaYT/git/my-project-name

grand finch
#

weird

#

your npm behaves differently to mine

sand skiff
#

sorry i feel lazy to put these "`"

grand finch
#

okay in that directory run npm init

#

and follow the instructions

#

if it asks for things you don't know about just press enter

sand skiff
#

omg lol

#

oops

#

ok

grand finch
#

😮

sand skiff
#

imagine the parents' face

grand finch
#

I mean I don't really have time to read silly stuff like that

sand skiff
#
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible defaults.

See `npm help init` for definitive documentation on these fields
and exactly what they do.

Use `npm install <pkg>` afterwards to install a package and
save it as a dependency in the package.json file.

Press ^C at any time to quit.
package name: (my-project-name) 
version: (1.0.0) 
grand finch
#

yeah just press enter and enter a description if you want etc

#

main will be index.js, this is what you want

sand skiff
#

so

#

im like

#

very

#

very

#

unfamiliar

#

with code

#

o-o

grand finch
#

this command npm init is creating a file for you called package.json

#

which is metadata required to create a node.js module

sand skiff
#

wait

#

yk this is all in terminal right?

grand finch
#

next you'll run npm install discord.js --save and it will download and install discord.js into that folder, and save it as a dependency into package.json

#

yes

sand skiff
#

ok

#
Invalid version: "npm init"
version: (1.0.0) npm install discord.js --save
Invalid version: "npm install discord.js --save"
version: (1.0.0) ```
#

i tried two times

#

two diff

grand finch
#

no you're still in npm init

#

you haven't finished it

thick gull
#

unfamiliar
with code
you should probably get a base on js before coding a bot otherwise you'll struggle

sand skiff
#

new window req?

grand finch
#

no sia, just you didn't follow the instructions

sand skiff
#

oh

grand finch
#

version: (1.0.0) is asking you to provide a version, by default it will be 1.0.0 whjich is fine

#

just press enter

#

next it will ask description, just press enter until it is finished

sand skiff
#

entry point: (index.js)

#

?

grand finch
#

yes

sand skiff
#

wut is this

grand finch
#

this is the file that gets run if you run the program using npm

#

which is what we made earlier when you ran touch ./index.js

sand skiff
#

so i just press enter for everything

grand finch
#

it is where your code will go

#

yes

sand skiff
#

ok

#

About to write to /Users/SiaYT/git/my-project-name/package.json:

{
"name": "my-project-name",
"version": "1.0.0",
"description": "nothing",
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"author": "",
"license": "ISC"
}

Is this OK? (yes)

grand finch
#

looks good

sand skiff
#

ok

grand finch
#

did you get your prompt up again?

#

the colorful txt with your username etc?

sand skiff
#
   │                                                                │
   │      New patch version of npm available! 6.14.6 → 6.14.8       │
   │   Changelog: https://github.com/npm/cli/releases/tag/v6.14.8   │
   │               Run npm install -g npm to update!                │
   │                                                                │
   ╰────────────────────────────────────────────────────────────────╯

Susantas-iMac:my-project-name SiaYT$ 
#

yes

grand finch
#

yea so that text Susantas-iMac:my-project-name SiaYT$ is called your prompt or PS1 if we're being technical

sand skiff
#

ok

grand finch
#

if you see it it means your terminal (or shell) is free to do anything new

sand skiff
#

ohh opk

#

ok*

grand finch
#

if you don't see it come up when you type or press enter it means some software is using the terminal

sand skiff
#

ohhhhhhh

#

okk

#

Susantas-iMac:my-project-name SiaYT$ npm install discord.js --save
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN my-project-name@1.0.0 No repository field.

  • discord.js@12.3.1
    added 15 packages from 17 contributors and audited 15 packages in 3.412s
    found 0 vulnerabilities

Susantas-iMac:my-project-name SiaYT$

#

done

earnest phoenix
#

Alright

#

What are you doing ?

sand skiff
#

ok wait

earnest phoenix
#

Are you setting up git?

#

Yo answer me

#

Susan and u

#

What r u trying to do

sand skiff
#

.24

#

oops

earnest phoenix
#

Setting up workspace?

sand skiff
#

sorry my grandpa dropped something on my keyboard

earnest phoenix
#

You are doing smthing wrong

#

Uou on linux or macos

#

Alright so why you neet git init

solemn leaf
#

Node error: Unexpected server response: 200

earnest phoenix
#

Well ok ig

#

Well, ok, i guess*

clever rampart
#

question, with Discord.js' rich embeds:

It says it takes a buffer as a valid argument for

let rich=new Discord.RichEmbed()
rich.setImage(buffer)

BUT, I get the following error (attached image) when passing it my giant buffer string:

I'm not sure how to proceed with setting an image from buffer in Rich Embeds; please ping me if you have any insight

#

yea but I want to pass it a Buffer. The documentation states that it takes a Buffer Resolvable as a valid argument

sudden geyser
#

Since you're using RichEmbed, I'm assuming you're using v11. The only argument it takes is a string, which I don't see it taking a buffer.

clever rampart
#

"You can upload images with your embedded message and use them as source for embed fields that support image urls by constructing a MessageAttachment from them to send as message option alongside the embed. The attachment parameter takes a BufferResolvable or Stream including the URL to an external image."

Oh perhaps I'm interpreting this wrong. When it says BufferResolvable, is that not the same thing as a Buffer string?

earnest phoenix
#

I have this error TypeError: Cannot read property 'members' of undefined when I do one of my commmands

clever rampart
#

what is your command?

earnest phoenix
#
const Discord = require("discord.js")
const canvacord = require("canvacord");
//const canva = new Canvacord();
module.exports = {
    name: 'bed',
    description: "",
    async execute(client, args, message) {
        let member = message.mentions.members.first() || message.member,
            user = member.user
        let image = await canvacord.bed(user.avatarURL({ dynamic: false, format: "png" }), message.author.avatarURL({ dynamic: false, format: "png" }));
        message.channel.send(canvacord.Attachment(image, "bed.png"))
      

    }
}
#

Idk why it didn't happen before but it happened since yesterday

clever rampart
#

try message.member.user

neat crystal
#

Help

earnest phoenix
#

okay

sudden geyser
#

Perhaps you're looking for .attachFiles?

earnest phoenix
#

Same error

clever rampart
#

I want it to populate in the actual .setImage field of the embed though. The documentation says " source for embed fields that support image urls", so I thought it was possible

sudden geyser
#

@earnest phoenix you may want to inspect what the value of message is. It may not be a Message instance.

earnest phoenix
#

Hmm how?

neat crystal
#

someone help me! I can't put Carl bot on my server! always the error what do I do?

clever rampart
#

can you translate your page to English? I can't read that language sadly

sudden geyser
#

Yeah sweet but you're trying to give it a buffer. The only way I see you doing it with the RichEmbed class is by using that method (.attachFiles).

neat crystal
#

can you translate your page to English? I can't read that language sadly
@clever rampart yes

clever rampart
#

I see

neat crystal
#

I'm braziliam

#

someone help me? I can't put Carl bot on my server! always the error what do I do?

sudden geyser
#

@earnest phoenix simply log the variable (such as console.log(message))

winter basalt
#

@neat crystal use a browser

sudden geyser
#

we don't offer support for specific bots

winter basalt
#

oauth2 isn't supported by android app

solemn leaf
#
Error: Unexpected server response: 200
    at ClientRequest.<anonymous> (C:\Users\Owner\Desktop\discordjs2\node_modules\ws\lib\websocket.js:576:7)
    at ClientRequest.emit (events.js:321:20)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:610:27)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:116:17)
    at Socket.socketOnData (_http_client.js:479:22)
    at Socket.emit (events.js:321:20)
    at addChunk (_stream_readable.js:297:12)
    at readableAddChunk (_stream_readable.js:273:9)
    at Socket.Readable.push (_stream_readable.js:214:10)
    at TCP.onStreamRead (internal/stream_base_commons.js:186:23)
Emitted 'error' event on WebSocket instance at:
    at abortHandshake (C:\Users\Owner\Desktop\discordjs2\node_modules\ws\lib\websocket.js:694:15)
    at ClientRequest.<anonymous> (C:\Users\Owner\Desktop\discordjs2\node_modules\ws\lib\websocket.js:576:7)
    [... lines matching original stack trace ...]
    at Socket.Readable.push (_stream_readable.js:214:10)

why am I getting this error

earnest phoenix
#

It works fine now. Thanks

solemn leaf
#

can someone help me pls

sudden geyser
#

@solemn leaf it's coming from the ws module but we don't know what's causing it. Can you track down where it's coming from in your project

solemn leaf
#
var express = require('express');
var app = express();

app.get('/', function (req, res) {
  res.send('Hello World!'); // This will serve your request to '/'.
});

app.listen(2333, function () {
  console.log('Example app listening on port 2333!');
 });
#
const nodes = [{
    host: "localhost",
    port: 2333,
    password: "youshallnotpass",
}]
#

@sudden geyser

neat crystal
#

This "OAult2 scope is not yet supported in the application." but we have good news it works in browsers "but I click and go back to the beginning

winter basalt
#

you should move to #general for that question @neat crystal

solemn leaf
#

@sudden geyser ?you good?

neat crystal
#

Thanks

sudden geyser
#

I don't work with websockets so I won't be of much help but is there more to your code?

solemn leaf
#

that is the full thing

#

@sudden geyser ?

#

;/

real nacelle
#

can anyone tell me if coding a bot with python, also have embed,

solemn leaf
#

yea

real nacelle
#

oh thx

solemn leaf
#
Error: Unexpected server response: 200
    at ClientRequest.<anonymous> (C:\Users\Owner\Desktop\discordjs2\node_modules\ws\lib\websocket.js:576:7)
    at ClientRequest.emit (events.js:321:20)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:610:27)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:116:17)
    at Socket.socketOnData (_http_client.js:479:22)
    at Socket.emit (events.js:321:20)
    at addChunk (_stream_readable.js:297:12)
    at readableAddChunk (_stream_readable.js:273:9)
    at Socket.Readable.push (_stream_readable.js:214:10)
    at TCP.onStreamRead (internal/stream_base_commons.js:186:23)
Emitted 'error' event on WebSocket instance at:
    at abortHandshake (C:\Users\Owner\Desktop\discordjs2\node_modules\ws\lib\websocket.js:694:15)
    at ClientRequest.<anonymous> (C:\Users\Owner\Desktop\discordjs2\node_modules\ws\lib\websocket.js:576:7)
    [... lines matching original stack trace ...]
    at Socket.Readable.push (_stream_readable.js:214:10)

why am I getting this error

formal dome
#

.setfield("") .setdiscriptions("") .setimage("") .setthumbnail("")

delicate shore
#

MY BOT GOT VERIFIIED

modest smelt
#

anyone here

#

?

#

NICE!

#

Can someone help me with this error

#
@commands.command()
async def beg(self, ctx):
#
    @commands.command()
                      ^
IndentationError: unindent does not match any outer indentation level```
#

this is the error i get

#

@delicate shore

#

Can someone help me?

delicate shore
#

I am js

modest smelt
#

oh

#
@commands.command()
async def beg(self, ctx):

error message:

    @commands.command()
                      ^
IndentationError: unindent does not match any outer indentation level```
torn ravine
#

nice

#

you got the badge too

delicate shore
#

yeah

modest smelt
#

@torn ravine can u help?

#
@commands.command()
async def beg(self, ctx):

error message:

    @commands.command()
                      ^
IndentationError: unindent does not match any outer indentation level```
#

this is the problem

torn ravine
#

I’m javascript

modest smelt
#

o

#

@slender thistle

#

u online?

torn ravine
#

Oh

modest smelt
#

@thorn owl?

#

lmao

#

404

torn ravine
modest smelt
#

?

#

i haven't been in there

#

can u DM me the invite pls

torn ravine
#

@modest smelt

modest smelt
#

thanks

summer torrent
#

you can use partials

#

discord.js caching every data. But they will delete if you restart the bot

carmine summit
#

how do i check if a specific user is a twitch follower?

summer torrent
#

look at twitch api docs

cinder patio
#

@grand finch You can fetch a message's reactions

delicate shore
#

how to get someone's pfp with their id

earnest phoenix
#

how do i make my bot delete a message in a specific channel if its something else than a certain text

delicate shore
#

if someone does s!avatar 53235235235235

restive pebble
#

client.users.get

delicate shore
#

ok

cinder patio
#

client.users.cache.get for v12

delicate shore
#

but how to check if user is giving mention or id

#

currently i use msg.mentions.users.first() || msg.author

#

so i wanna check for id

cinder patio
#

Well try if client.users.cache.get returns a user or not

delicate shore
#

oh

cinder patio
#

All you have to do is put it in the code you sent above, in the middle

solemn leaf
#
console.log(strings.join(' '))
if (!strings.join(' ').endsWith('?')) return message.channel.send(EmbedFail);

Im doing this but the console logs the string and the string shouldnt be running the if

#

if you understand

#

hi?
hi will it rain?

#

but it still runs the if

cinder patio
#

what's the string

#

that you tested this with

solemn leaf
#

@cinder patio dont ask pls im lazy

    let strings = [
        args[0],
        args[1],
        args[2],
        args[3],
        args[4],
        args[5],
        args[6],
        args[7],
        args[8],
        args[9],
        args[10],
        args[11],
        args[12],
        args[13],
        args[14],
        args[15],
        args[16],
        args[17],
        args[18],
        args[19],
        args[20],
        args[21],
        args[22],
        args[23],
        args[24],
    ]
cinder sandal
#

ah

#

i have almost consumed all my 500 dynos this month
now probably heroku is bad

delicate shore
#

I realised something

solemn leaf
#

is it helping me

mystic pike
#

how do I make bot wait

#

like wait 1 second then do a thing

ionic dawn
#

.setInterval

pale vessel
#

setTimeout

pale vessel
#

setInterval would do it every one second

ionic dawn
#

sry then, mb eyesshaking

mystic pike
#

I tried settimeout

#

it was super confusing and I couldn't get it to work

ionic dawn
#

can you send the code you have by far?

mystic pike
#

I cant now

ionic dawn
#

I can't spoonfeed but i actually easy to do

mystic pike
#

I'm trying to edit a message after a second or so

ionic dawn
#

setTimeout(f(){
});

and all that stuff

mystic pike
#

whats the f?

ionic dawn
#

function

#

I mean, if you type: nodejs settimeout example on google

#

you'll have 100 examples

#

its something easy to do

mystic pike
#

ok

#

I'm just starting to learn JS

#

or anything related to programming

ionic dawn
#

Same

#

started 2 months ago

mystic pike
#

2 days ago

ionic dawn
#

trust me isnt that hard to do something, theres a lot of tutorials, docs, examples..

#

and people here is helpful

mystic pike
#

so I could do

setTimeout(function () {
message.channel.send('hi');
}, 1000);

pale vessel
#

yes

mystic pike
#

how would u do that with editing a message

restive furnace
#

or arrow functions

pale vessel
#

use .then or await

#

setTimeout(() => message.channel.send("ye"), 1000) arrow function

#

you can use message.edit to edit a message, you'd just need the message object

mystic pike
#

so I could do

setTimeout(function () {
.then(message => message.edit("new message"));
}, 1000);

pale vessel
#

you can get it by using .then after sending one or await it

#

send().then()

mystic pike
#

?

ionic dawn
#

you send the message

mystic pike
#

yes

pale vessel
#

message.channel.send("something").then(m =>...

ionic dawn
#

and use .then to do something after sending it

pale vessel
#

not just .then

mystic pike
#

I can edit it

#

but I cant figure out how to use setTimeout

pale vessel
#

you can't edit other person's message

mystic pike
#

I know

pale vessel
#

oh

#

okay

ionic dawn
#

You have to send the first message and then use .then to do something after sending it, in you case edit the message.

mystic pike
#

I can edit it

#

but it edits it instanttly

ionic dawn
#

If we can't see the code we can't help much

#

not able to see where is your mistake

pale vessel
#

use channel.send().then(sent => setTimeout(() => sent.edit(), 1000));

mystic pike
#

ok

#

I'll try that

earnest phoenix
ionic dawn
olive atlas
#

Hello all. May I know how do I play a certain playlist from my Spotify

forest drift
#

hello,
So I'm having a problem where sometimes my bot will lose its variable settings. I've been told this is because the variables need to be stored on some sort of secure Sequelize or something, anyone know why the variables would just sometimes reset and how to fix this?

sick cloud
#

define variables

forest drift
#

theres 3 specific ones, 2 of them hold user defined IDs, and the third holds a timestamp

sick cloud
#

so you need a db

#

look into mongodb or mysql/sqlite

forest drift
#

I dont know about the timestamp one yet, but last night i set the 2 id variables and this morning theyre both reset

#

look into mongodb or mysql/sqlite
@sick cloud k

#

would that work?

thick gull
#

yes

forest drift
#

for learning about it?

sick cloud
#

try it and see

forest drift
#

k thanks

thick gull
#

oops

#

should’ve said try it and see

#

😔

sick cloud
#

banned

forest drift
#

lol

#

also, refering to my origional first question, what causes the variables to reset?

hazy sparrow
#
if (condition1 = args[0] === 'PAPER'){}
if (condition1 = args[0] === 'SCISSORS'){}```
these were wereing only if args[0] was either `ROCK`, `PAPER` or `SCISSORS` which was fine, but as i changed it to this, 

```if (condition1 = args[0] === 'ROCK'.toLowerCase){}
if (condition1 = args[0] === 'PAPER'.toLowerCase){}
if (condition1 = args[0] === 'SCISSORS'.toLowerCase){}```
it only works with `rock`,`paper` and`scissors`, not even `ROCK`,`PAPER` and `SCISSORS`.
how can i make it work without having to be case-sensitive?
sick cloud
#

actually call the to lower case function??

hazy sparrow
#

wot?

sick cloud
#

'SCISSORS'.toLowerCase

#

you're close

pale vessel
#

who the fuck

hazy sparrow
#

thats what i did

sick cloud
#

besides thats pointless

#

you lower case the args

cinder sandal
misty sigil
#

selfbot?

sick cloud
#

args[0].toLowerCase() === 'rock'

hazy sparrow
#

ayy

#

i thought of it first

#

ty for clarifing

pale vessel
#

@west raptor @sand skiff reaction spam

hazy sparrow
#

and who is staring all messages?

sand skiff
#

sorry

hazy sparrow
#

wow

sick cloud
#

selfbots are fun

carmine summit
#

im confused of how twitch API works

sand skiff
#

@pale vessel sorryyyyyy pls

hazy sparrow
#

reaction spam
@pale vessel april has dnd better ping timo

pale vessel
#

im confused of how twitch API works
@carmine summit you're confused on how oauth works

waxen cloak
#

how to know if user has opt for voting reminder?

carmine summit
#

im confused on how everything works

pale vessel
#

timo is on mobile

carmine summit
#

pls help

pale vessel
#

it doesn't matter anyway, it's not ruining the conversation

sand skiff
#

@wooden jacinth

hazy sparrow
#

yup, all my messages deserve to be starred anyways

pale vessel
#

bruh

sand skiff
#

@fossil oxide

hazy sparrow
sand skiff
#

loll

pale vessel
#

let oliy punish them or something

fossil oxide
#

What do you want?

sand skiff
#

punish WHO

#

OMG HI

hazy sparrow
#

punish WHO
@sand skiff you

pale vessel
#

smh

sand skiff
#

:O

waxen cloak
#

how to know if user has opted for voting reminder?

fossil oxide
#

Hello?

sand skiff
#

hiii

pale vessel
#

no reason at all lmao

sand skiff
#

nice to meet u

fossil oxide
#

Why are you disturbing the people of development

pale vessel
#

he starred thousands of messages

hazy sparrow
#

Oliy scroll up

pale vessel
#

@waxen cloak don't think that's included in the api

hazy sparrow
#

oh wow that fella removed the reactions

fossil oxide
#

okay don't answer me then

forest drift
#

rejected

sand skiff
#

wait who me?

fossil oxide
#

-m @sand skiff Spamming stars in development | 1 hour

gilded plankBOT
#

🤐 Muted Sia (ALT)#9417 (@sand skiff)

pale vessel
#

too generous

carmine summit
#

pls i need help on how to use twitch api

#

me confused

pale vessel
#

learn how to use oauth

hazy sparrow
#

too generous
@pale vessel KEKW

carmine summit
#

i duuno how

#

pls teach me

forest drift
#
client.user.setActivity("with Linky", {type: "STREAMING",url: "https://www.twitch.tv/eviesiconworldbot"});

shouldn't that set the status to streaming? (btw not advertisement, u can check the twitch account, its literally just for the link)

#

oh wait nvm, just forgot to update the bots heroku page, nvm then

hazy sparrow
#

args[0].toLowerCase() === 'rock'
@sick cloud same problem

waxen cloak
#

@waxen cloak don't think that's included in the api
@pale vessel i am a newbie, can you guide me how to work it out, when user selects to remind so my bot can remind the user to vote agian

hazy sparrow
#

only "rock" works

#

not ROCK

#

or ROck

pale vessel
#

that's not possible afaik

carmine summit
#

how do i

#

use twitch appi

#

pls

pale vessel
#

<@!> same problem
@hazy sparrow that should work

ionic dawn
#

if + else if perhaps

summer torrent
#

@carmine summit which programming languages do you know

carmine summit
#

javascript

summer torrent
carmine summit
#

whats the difference

opal plank
#

Ngl twitch irc is shit

#

Im not even joking

glacial sun
#

OMG

#

DUDEEE

fickle dune
carmine summit
#

pls help twitch api

summer torrent
#

stop begging for help

ionic dawn
#

@fickle dune to many characters

fickle dune
#

ok

summer torrent
#

@fickle dune did you read the error

ionic dawn
#

The error literally told you the error

opal plank
#

i doubt anyone here other than me uses twitch IRC dude @carmine summit

ionic dawn
carmine summit
#

i really need it lol

#

ill do anything

opal plank
#

what for?

summer torrent
#

then read the docs

opal plank
#

their docs are absolutely user unfriendly

fickle dune
#

still same error

#

@ionic dawn

opal plank
#

if you dont have a habit of reading docs, you will never get thru twitc's docs

ionic dawn
#

Read the error and then ask here again

opal plank
#

unlike d.js and shit that has pretty guides n stuff, twitch docs are bare bones

carmine summit
#

sad sad sad

opal plank
#

u still havent answered my question

carmine summit
#

umm

#

bleh purposes?

opal plank
#

cant help you with 'bleh' purposes

#

either tell me what you need help with so i can help or try figure out urself

#

¯_(ツ)_/¯

carmine summit
#

i wanna see who follows me on twitch so i can just do ?verify <twich name>

opal plank
#

use axios

#

that endpoint is open

carmine summit
#

ik

opal plank
#

you dont

carmine summit
#

eh?

opal plank
#

dont use a twitch lib for that

#

use axios to send a request

carmine summit
#

err: endpoint is undefined

opal plank
#

you know what an api is?

carmine summit
#

yeah

#

i dont know twitch's endpoint

#

so yeah

#

¯_(ツ)_/¯

opal plank
#

users/follows

summer torrent
#

I already sent you that smh

opal plank
#

thats the endpoint

#

dont use a lib

#

use manual requests

#

you arent doing anything fancy with twitch, completely waste of time to add heavy libs for one request

#

those 2 endpoints are freely open

carmine summit
opal plank
#

just send an axios request with your id as param

#

that is the endpoint

carmine summit
#

whats user id?

#

how do i get

opal plank
#

send a request to /user to get it and save on your bot

summer torrent
#

READ THIS FUCKING DOCS

opal plank
#

just need to do it once

carmine summit
#

REAH THIS FUCKING DOCS
@summer torrent its a lie

summer torrent
carmine summit
#

all of it is a lie

opal plank
#

to get yourself use login and /users endpoint

pale vessel
#

create a god damn oauth application

opal plank
#

no need for that either

#

axios and those 2 requests

pale vessel
#

you do

opal plank
#

thats literally all you need

#

you dont

pale vessel
#

oh

carmine summit
#

how do i create an oauth application

opal plank
#

you dont need that

carmine summit
#

I DONT EVEN KNOW WHATS THE MEANING OF OAUTH

opal plank
#

im literally telling you what TO DO

#

i use twitch api on a daily basis dude

carmine summit
#

getting the user id requires oauth

summer torrent
#

you are just spamming "pls help me", "pls teach me". But not trying to do anything

pale vessel
#

nope, oauth token is missing

opal plank
#

theres only 2 params needed

pale vessel
#

i used the api

carmine summit
pale vessel
#

and i needed oauth

opal plank
#

just need token and client-id

#

no oauth required

carmine summit
#

i dunno

opal plank
#

im telling you how

carmine summit
#

im newb

opal plank
#

aight i give up, i tried

carmine summit
#

ok ty tho

opal plank
#

you dont need auth for that endpoint

#

just token

#

oauth is used very rarely

hazy sparrow
#

@hazy sparrow that should work
@pale vessel its not

carmine summit
#

How do i get twitch user id?

opal plank
#

i told you

carmine summit
#

I dont understand

ionic dawn
#

Gn pepeleave

carmine summit
#

I want the user ID for a different user

opal plank
#

then use a different login

#

¯_(ツ)_/¯

carmine summit
#

Huh

opal plank
#

its not called /users endpoint for a reason

#

you can fetch any user in there with their login name

carmine summit
#

Whats /users endpoint?

opal plank
#

the api endpoint uses where you fetch, guess what, users

carmine summit
#

Whats the url for this endpoint?

opal plank
#

same as the one you sent me

#

the base url is always the same

carmine summit
opal plank
#

its ony the endpoint that changes

#

why does that embed?

#

oh

carmine summit
opal plank
#

added ? in the end

#

yes

#

yes and no

carmine summit
#

Define no

opal plank
#

you need to target the api

#

if you ping that you'll get no response

#

just like discord

carmine summit
#

Uhhh

#

My brain went yeet

opal plank
carmine summit
#

Is dis good?

opal plank
#

there we go

carmine summit
#

{"error":"Unauthorized","status":401,"message":"OAuth token is missing"}

#

Uh

opal plank
#

thats your token

#

and you'll need client id to

#

as for april's change, twitch helix requires those 2 on every endpoint

carmine summit
#

I need my bot token and bot client token to use this thing?

opal plank
#

yes

#

no

#

yes and no

#

you need a twitch application

carmine summit
#

Ohh

#

How?

opal plank
#

y'know what?

#

here

weak rain
#

lmao

#

whatsupp

opal plank
weak rain
#

how to set autorole

#

using role id is easy

#

but

#

how to make it as custom roles in each server

opal plank
#

database + cache

weak rain
#

like zira,mee6,dyno

opal plank
#

ask the user to set a role, if no role is there, use default

weak rain
#

hm

opal plank
#

to add role, add it to cache and then send it to database to keep it persistent

#

then just check the server's cache

#

¯_(ツ)_/¯

weak rain
#

pro

carmine summit
#

What is oauth redirect url and how do i get one

earnest phoenix
#

figured out mongodb atlas

#

Is it possible for someone to see my databases if I leak the URL?

opal plank
#

you dont need that

#

just follow the guide to get your token via kraken or helix app

carmine summit
#

I need it cuz its a required feild

earnest phoenix
#

yep

#

cuz

#

where will oauth send the token to

#

<your redirect>?code=token

#

Your code can read the code query to get the token

carmine summit
#

Finally someone that agrees with me