#development

1 messages · Page 1242 of 1

charred geyser
#

how it would be structured

pure lion
#

Just make a new project

#

I'll run through the basics

charred geyser
#

so like a node app?

#

or

pure lion
#

Yeah

#

You'll need express and ejs

charred geyser
#

okay

#

do i need ejs

pure lion
#

ehhhhh

charred geyser
#

i have like

pure lion
#

I'd reccomend it for ease

charred geyser
#

kinda a dashbord

#

let me get it up on like heroku to show you one sec

pure lion
#

Don't reccomend heroku for an app like this

charred geyser
#

i know

#

its just

#

for show

#

ing

pure lion
#

So you have a vps?

charred geyser
#

yeah

pure lion
#

Sick

charred geyser
#

but i cant be bothered to put it on there rn

pure lion
#

Just use localhost on your pc

#

No need for heroku

charred geyser
#

but then you cant go on

pure lion
#

Use it for yourself

#

Send screenies

charred geyser
#

uh

#

okie

faint prism
pure lion
#

@faint prism whatum the fuck

faint prism
#

I did the thing

#

Just as an example for @silk chasm

#

messed up the status though lol

#

I love how I can SSH into my phone and update a bot lmao

#

For demo purposes. Not for a real prod environment

sullen frost
#

How i can fix if my bot replys commands twice?

faint prism
#

tell it not to reply twice

#

count where you're sending to the channel

cinder patio
#

ejs is not required at all

charred geyser
faint prism
#

definitely don't let it record a new mixtape

ionic dawn
#

Hi, i know selfbotting is against ToS

flint yew
#

ye

#

sure

ionic dawn
#

but create dc servers automatically is it?

flint yew
#

also

#

its

ionic dawn
#

F to my idea

flint yew
#

do it manual man

#

:/

#

why selfbotting

ionic dawn
#

wanted to make a: ServerMaker Bot

#

RIP my idea

charred geyser
#

im not sure

#

@ionic dawn bare in mind YK303 didn't know how to message.channel.send

ionic dawn
charred geyser
#

ask someone who knows stuff thinking_smirk

flint yew
#

i report u to admin @charred geyser

charred geyser
#

for what?

ionic dawn
#

ill read the ToS

charred geyser
#

good luck

ionic dawn
#

but create a server isnt "self" botting

#

its an actual bot that make stuff

faint prism
#

I believe a regular bot can create guilds

charred geyser
#

i would have thought so

ionic dawn
#

so there's hope

#

ty bois

charred geyser
#

nice

faint prism
#

yep, you def can

ionic dawn
#

yeah, i was wondering how Emote Collector the bot can storage so many emojis

charred geyser
#

uh

ionic dawn
#

probably a guild creator and save emojis there

#

10 guilds o o f

charred geyser
#

yeah

#

is it correct that all bots automatically get nitro?

ionic dawn
#

I guess

charred geyser
#

nice

#

well not nitro

#

but

ionic dawn
#

I would make a nitro for bots so we can add custom status and different tag

charred geyser
#

i mean like emojis

#

yeah

ionic dawn
#

yeah... animated emoji

charred geyser
#

that would be cool

ionic dawn
#

also gif pfp

charred geyser
#

yea

slender thistle
#

@charred geyser We're not here to judge people for their skills/knowledge

ionic dawn
slender thistle
#

if you want to trashtalk someone, go to a different server

#

thanks

ionic dawn
#

Actually he give's me wrong info and seasnail just warn me of his low knowledges

#

thats not trashtalk at all, its like calling my bot trash, it is, but its honest trash

charred geyser
#

okay maybe i was a bit rude but i was just notifying void that what he said probably wasn't accurate (which is wasn't)

slender thistle
#

Inform them that they are sharing misleading information but no need to be rude 👍

charred geyser
#

sorry

ionic dawn
#

shivaco, now that you are here

#

i want to report something

charred geyser
#

😮

pale vessel
#

why here

#

go somewhere else

slender thistle
#

DM me

ionic dawn
#

I want to report that ur qt

faint prism
charred geyser
#

lmfao

ionic dawn
#

I just edited that message 10 times in 2s

faint prism
#

I saw that, I thought i was having a stroke

ionic dawn
#

the mod leaves me on read readed

drifting wedge
#

if 'true' in arg:

#

this doesnt work\

#

like basicly i want to get like the arg of the command

#

and if it says true or false

#

and that stuff

ionic dawn
#

just check if theres something in the args index

faint prism
#

python really holds peoples hands if that's valid syntax lol

ionic dawn
#

if (!args[1]){
// do stuff if theres no arg
}

#

oh wait thats py

#

is it?

faint prism
#

yeah if x :

charred geyser
#

what does Warning: Accessing non-existent property 'findOne' of module exports inside circular dependency mean?

faint prism
#

oh god, circular deps

ionic dawn
#

did you put a 0 instead of a O

#

?

charred geyser
#

where

ionic dawn
#

that font looks like a fckin 0

charred geyser
#

it doesn't say where

#

nah its a O

faint prism
#

||0O0O0OO0oO0 👻||

charred geyser
#

oOo

#

what are circular dependencies

#

and how do i fix

faint prism
#

Remember Excel?

charred geyser
#

uh

#

yes?

ionic dawn
#

im reading it

#

it means 2 or more modules are working together

#

and something happend

faint prism
#

Pretty sure in Excel you can recreate a circular dep by having overlapping =VLOOKUPs

charred geyser
#

right

#

uh

ionic dawn
#

vlookup eyeshake

pale vessel
#

you know how you can do message.client.user.client.user.client.user.client.user.client.user.client.user

charred geyser
#

why doesn't it say

#

where

ionic dawn
#

we use "LibreOffice" at school lol

pale vessel
#

that's circular (i think)

proven lantern
#

It is true because I say so and I say so because it is true.

faint prism
#

ugh this one rasp pi keeps freaking crashing

#

oh wait, it hasnt auto-rebooted

#

well rip

ionic dawn
#

did you reinstall the os at the sd?

faint prism
#

yup

#

even swapped power cords to an official one (in case it was a power issue)

ionic dawn
#

your sd is mayb damaged

#

run a check at your deskt

faint prism
#

check for bad blocks?

ionic dawn
#

idk

faint prism
#

I wonder if the board itself is damaged

ionic dawn
#

mayb is somthing damage in the sd and when your os tries to load something just crash

#

hopefully your board isnt damage

#

wich rpi do you have?

faint prism
#

I was able to flash and validate it

#

Zero W

#

I use them for security cameras

ionic dawn
#

lol

#

do you stream your cameras using the pi?

#

like your home security cameras?

ripe wasp
#

soundcloud rapper

#

auger

faint prism
#

IR camera module is hooked up to it

ripe wasp
#

why are you still here

#

its been hours

faint prism
#

I'm "working"

ripe wasp
#

oh

faint prism
#

do you stream your cameras using the pi?
@ionic dawn I rsync to my main rpi

#

Probably should do a network storage

ionic dawn
#

@faint prism NAS

faint prism
#

Yeah, essentially what my main rpi server is (one of it's many functions)

earnest phoenix
#

what's wrong. how should I define
TypeError: Cannot read property 'name' of undefined

let invite = bot.fetchInvite(`https://discord.gg/${args[0]}`)

const embed = new MessageEmbed()
.setColor(autimatic)
.addField(`Ad`,`${invite.guild.name}`)
message.channel.send(embed)
pale vessel
#

that returns a promise

#

await it

earnest phoenix
#

working.

#

thx flazepe

floral creek
#

Is there a way to make this faster?

#

can take ages before gessing it

charred geyser
#

monogdb interraction

#

no problem

#

it was a bug with mongoose

#

fixed by updating

glossy elk
#

is there a way to tell which word u used most

main chasm
slender thistle
#

what exactly are you entering in those two fields

earnest phoenix
#

have more features? I did not understand. i'm getting an undefined error

const ozellikler = {
    ANIMATED_ICON: 'Animasyonlu İkon',
    BANNER: 'Afiş',
    COMMERCE: 'Ticaret',
    COMMUNITY: 'Topluluk',
    DISCOVERABLE: 'Keşfedilebilir',
    FEATURABLE: 'Özellikli',
    INVITE_SPLASH: 'Davet Ekranı Görüntüsü',
    NEWS: 'Haberler',
    PARTNERED: 'Partner',
    VANITY_URL: 'Özel URL',
    VERIFIED: 'Onaylı',
    VIP_REGIONS: 'VIP Bölgeleri',
    WELCOME_SCREEN_ENABLED: 'Hoşgeldin Ekranı Aktif'
};

embed.addField(`Özellikler`,`${ozellikler[invite.guild.features]}`
#

Any one can help me to setup tor browser in AWS ubuntu server

cinder patio
#

aprox, invite.guild.features is an array of features

#

You are trying to access a property via an array

ancient nova
#

TypeError: Cannot read property 'end' of null <- any help

sudden geyser
#

Whatever you used .end on is null.

ancient nova
#

how do I fix that being null then?

#

I mean

earnest phoenix
#

what even is null

#

like what did you use .end on

#

something.end what is "something" in this case

ancient nova
#

connection.dispatcher.end

misty sigil
#

have you tried logging connection

ancient nova
#

yep

#

also error is always the same

#

doesn't always appear though

#

only sometimes

#

idek what's the cause

earnest phoenix
#

how do i know if a server has a bannerURL?

misty sigil
#

check using an if

#

or something

earnest phoenix
#
if (invite.guild.bannerURL) ataturk.push(`[Afiş](${invite.guild.bannerURL({ dynamic: true, format: 'png' ,size: 1024 })})`)
#

how do i know if a server has a bannerURL?
@earnest phoenix if (invite.guild.bannerURL({dynamic: true})) // banner url exists

#

thx @earnest phoenix

#

amm ok so, me and my friends have a bot in 630 guilds, the "message" event and any other event is emitted like after 5-7 seconds from where it was created (big delay) and when we are switching to Eris its working with no delay, is there a reason for that ?
@earnest phoenix are you sharding?

drifting wedge
#

to get server prefixes

#
    for pre in prf:
        prefix = pre["prefix"]
    return prefix[str(message.guild.id)]

client = commands.Bot(command_prefix = prefix)```
#

this says prefix not defined

#

above is mongo stuff

slender thistle
#

Then that means prf is an empty list

ancient nova
#

The request cannot be completed because you have exceeded

opal plank
#

ratelimit

#

haha

ancient nova
#

does that mean I got rate limited by youtube's api?

#

damn

misty sigil
#

ratelimited

ancient nova
#

:c

opal plank
#

dont use youtube api

#

it wont work for big bots unless you looping various ip's

#

cuz quotas

ancient nova
#

I see

#

do you sugest anything else

#

to play music on/

opal plank
#

maybe try spotify,but iirc both youtube and spotify scraping are against their TOS's

ancient nova
#

some songs on youtube aren't on spotify

#

that'd be a problem

misty sigil
#

fuck tos

opal plank
#

well you going to be stuck at that ratelimit then

#

pick which one

#

less music or ratelimit

ancient nova
#

Imma just commit suicide then >:c

#

jk

#

but that's annoying

torn pine
#

Help :(( SyntaxError: invalid or unexpected token

misty sigil
#

code pls

ancient nova
#

@opal plank couldn't I mix both apis though?

opal plank
#

of course you could

#

if it doesnt find on spotify, try youtube

ancient nova
#

yeah

#

that'd be a good idea

#

do you have a link to the documentation maybe?

opal plank
#

or you could do the same as Rythm and spend thousands buying ipv6's and looping them to avoid being ratelimited

ancient nova
#

😳 well... no lol

#

that's too much work

#

if I can just make an easy searching system

#

for both apis

#

that'd make me avoid getting rate limited

#

because of curse you're gonna play less songs

opal plank
#

that being said, idk how spotify ratelimit their users

ancient nova
#

I gotta read into it

opal plank
#

most bots you see using them arent big enough to cause a problem

ancient nova
#

wouldn't want this to be a waste of time

#

@opal plank someone told be that it'd be a good idea to make like 20 api keys and make the bot randomly choose one from them

#

but that'd be a problem for queue wouldn't it?

opal plank
#

random always bad

#

properly put a system in place to loop them

#

though i think it also checks for your ip

#

i doubt they'd be dumb enough not to takein consideration that too

ancient nova
#

yeah..

#

@opal plank could I ask you a question

#

you may know why

opal plank
#

usup

#

wusup*

ancient nova
#

when I do serverQueue which is a definition of ytdl-core npm package and use it serverQueue.dispatcher (which is defined) .connection.end <- sometimes I get a error that end is not defined (which it actually is)

#

not sure how to fix that

opal plank
#

i wouldnt know, i havent used ytdl at all

ancient nova
#

corrention, that end is null

earnest phoenix
#

Bruh

faint prism
#

what's wrong with SQL?

ancient nova
#

@opal plank alright

#

was worth asking

split hazel
#

nothings wrong with sql

faint prism
#

Yeah, it's pretty fantastic for in the correct applications

slender thistle
#

Just ask your question

thick gull
slender thistle
#

uh what

pliant iron
#

So my npm package that I'm making is to get data from my mysql database on my website. Like getting an id of a user then it shows other details about them etc. How would I get it to connect to the MySQL database because if I just insert my MySQL details such as host,user,password etc people can just go in the node_modules file and get info and then login and that would not be ideal at all.

slender thistle
#

Why use both , and concat

#

You do either, not both

#

You don't need to do , +

faint prism
#

You're provided multiple arguments. You should be providing a concatenated single one

slender thistle
#

that's not the issue

#

print allows multiple arguments

faint prism
#

oh alright

slender thistle
#

They will be separated by a sep argument's value, which is " " by defaukt

faint prism
#

then , + like you said. Seems like invalid syntax

slender thistle
#

(Just use f-strings, silly)

#

for i in range(number_of_iterations + 1)

#

What are you trying to do

#

that's my main confusion here

faint prism
#

is this python?

#

You need indentions and a :

slender thistle
#

But why

faint prism
#

python requires indentation

#

It's whitespace sensative

slender thistle
#

What do you want to do programmatically

#

You'd just be printing the same thing 9 times

faint prism
#

advanced hello world

slender thistle
#

Actually, 10?

faint prism
#

l0l

ionic dawn
slender thistle
#

yeah, 10

faint prism
#

9+1 = 10 🐛👏

slender thistle
#

Forgot that 10-0 is 10 😂

misty sigil
#

no

#

but yes

slender thistle
#

Don't bring quantum physics into this

opal plank
#

quantum physics

slender thistle
#

There are 10 elements in the generated list, therefore it's 10 iterations

opal plank
faint prism
#

0, 1, 0|1

opal plank
#

according to most langs,10 means 11

#

0,1,2,3,4,5,6,7,8,9,10

#

300iq

faint prism
#

That's why I only reference in hex

slender thistle
#

Seems you did an oopsie

opal plank
#

array[10] means it has 11elements

faint prism
#

(10)_10 = (16)_10

opal plank
#

prime example of developer right there

slender thistle
#

eh well

opal plank
#

'it no work,i give up'

faint prism
#

that gif is 2big4me

#

inb4 he comes back 5m later

misty sigil
#

"wHY NO WORK"

opal plank
#

oye

#

auger

misty sigil
#

"GIV UP!"

opal plank
#

that thing

#

still no work

faint prism
#

oh right

opal plank
#

fix

#

im starting to think its on my end

faint prism
#

what's your thing again? I was too tired to remember

opal plank
#

i was watching yesterday messages, and my message count is reliable

#

i was getting about 4k messages/min

faint prism
#

send website again

opal plank
#

i pinned down

#

the error is on my end

#

its on the cache 100%

#

with 3 mil users i get 20k+ messages

#

the fact that i was getting 4k and still showing 3 mil means the cache is borked

#

though i cant find what

faint prism
#

send the website link

opal plank
#

will do, but i already pin pointed the issue on my end, its useless

#

i think i found it

faint prism
#

hmmmmmm

opal plank
#

huh?

#

holdup, i gotta fetch food rq

#

can you log the outgoing request?

#

to see whats the url

#

okay but for real,gimme 10

#

gotta get food

#

k im back

faint prism
#

Some of the values I can console.log out are in the object named Y

#

Can't find the live one though

#

found the avg for 7 days though

#

Really weird how they hardcoded the token like that

opal plank
#

which endpoint they connecting to tho?

#

whats the uri

#

on the api docs i couldnt find any stats or metrics documented

faint prism
opal plank
#

thats the thing

#

helix is the api

#

whats the uri?

#

thats the endpoint they're getting the stats from

#

which isnt documented

faint prism
#

At least you have a Helix token you can use now 🤷‍♂️ it'd probably be easier if I knew JS

opal plank
#

i got a token already

faint prism
#

tbh I'd just scrape it and be done

opal plank
#

all this is futile tbh

#

i was checking on that to see where the problem is

#

but i pinpointed it from being on my end

#

which im fixing rn

#

'i think'

faint prism
#

who does that

opal plank
#

300iq

#

not going to

#

but would be fun to access their bot acc with that

#

surely they cant be that stupid....

#

right.......?

thick gull
#

No that looks possible

#

have fun breaking TOS (probably)

ionic dawn
#

I saw sql psswords on websites

opal plank
#

twitch has some weird bits with permissions

#

its not like discord if thats what you're basing off

ionic dawn
#

And some API tokens around

#

People dont know what backend is for

valid gyro
#

hello, ive been messing with discord js embeds and i keep getting this error, not sure how im supposed to fix it

#
    at Function.normalizeFields (/home/runner/Dragon-aid-bot-beta/node_modules/discord.js/src/structures/MessageEmbed.js:443:8)
    at MessageEmbed.setup (/home/runner/Dragon-aid-bot-beta/node_modules/discord.js/src/structures/MessageEmbed.js:77:91)
    at new MessageEmbed (/home/runner/Dragon-aid-bot-beta/node_modules/discord.js/src/structures/MessageEmbed.js:18:10)
    at embedLikes.map.e (/home/runner/Dragon-aid-bot-beta/node_modules/discord.js/src/structures/APIMessage.js:164:40)
    at Array.map (<anonymous>)
    at APIMessage.resolveData (/home/runner/Dragon-aid-bot-beta/node_modules/discord.js/src/structures/APIMessage.js:164:31)
    at TextChannel.send (/home/runner/Dragon-aid-bot-beta/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:166:62)
    at Request.request [as _callback] (/home/runner/Dragon-aid-bot-beta/index.js:99:21)
    at Request.self.callback (/home/runner/Dragon-aid-bot-beta/node_modules/request/request.js:185:22)
    at Request.emit (events.js:198:13)
(node:1565) 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:1565) [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.```
opal plank
#

@valid gyro likely ()

#

fields.flat is not a function

#

it tells you right there

faint prism
valid gyro
#

issue is

#

i dont have the function fields.flat in my code

opal plank
#

(/home/runner/Dragon-aid-bot-beta/node_modules/discord.js/src/structures/MessageEmbed.js:443:8)

#

update your d.js and node version

#

that usually fix 99% of ur issues

ionic dawn
#

Can you send the embed?

#

The code

faint prism
valid gyro
#

im stuck with node 12 with my host

faint prism
#

@opal plank a lotta global values that are the stats on the page

earnest phoenix
#

what kind of a host are you using

valid gyro
#

replit

earnest phoenix
#

yuck

valid gyro
#

free hosting lolol

#
    color: 0x0099ff,
    title: 'Some title',
    url: 'https://discord.js.org',
    author: {
        name: 'Some name',
        icon_url: 'https://i.imgur.com/wSTFkRM.png',
        url: 'https://discord.js.org',
    },
    description: 'Some description here',
    thumbnail: {
        url: 'https://i.imgur.com/wSTFkRM.png',
    },
    fields: [
        {
            name: 'Regular field title',
            value: 'Some value here',
        },
        {
            name: '\u200b',
            value: '\u200b',
            inline: false,
        },
        {
            name: 'Inline field title',
            value: 'Some value here',
            inline: true,
        },
        {
            name: 'Inline field title',
            value: 'Some value here',
            inline: true,
        },
        {
            name: 'Inline field title',
            value: 'Some value here',
            inline: true,
        },
    ],
    image: {
        url: 'https://i.imgur.com/wSTFkRM.png',
    },
    timestamp: new Date(),
    footer: {
        text: 'Some footer text here',
        icon_url: 'https://i.imgur.com/wSTFkRM.png',
    },
};```
ionic dawn
#

Free hosting arent freep

valid gyro
#

le embed

earnest phoenix
#

can't hurt to get a 3 buck vps

misty sigil
#

check le pins

opal plank
#

@faint prism that page is whack to say the least

valid gyro
#

yeah yeah yeah

opal plank
#

though i know the error is on my end

valid gyro
#

ik its a bafd idea

#

bad

earnest phoenix
#

you know there's the golden rule of frontend design

#

never expose sensitive data to frontend

faint prism
#

yup

earnest phoenix
#

and what do they do

#

expose sensitive data to frontend

faint prism
#

TwitchToken: "" lol

misty sigil
opal plank
#

i may have an idea of what broke my cache

#

MAY

#

lets stress test it again and hope it works fine

#

4k streams should suffice for a test run

misty sigil
#

lmfao

faint prism
opal plank
#

cross fingers i dont get ratelimited cuz i just removed the limiter for this test

misty sigil
#

yea

#

twitchtracker 5Head

opal plank
#

'Huh Duh No ScraPINg'

ionic dawn
#

Yo

#

Keep sharin the token w_elonlaugh

opal plank
#

its not like discord peeps

#

though they can be ratelimited if you abuse their thing

#

their website may have a ratelimit

#

though if you connect with that and abuse on your own it may revoke their token

earnest phoenix
#

oh wow

#

i thought that maybe the token changed per visitor since it's bearer

#

but no

opal plank
#

they def hardcoded

earnest phoenix
#

it's static direct access to twitch

opal plank
#

tokens would need oatuh to be generated

earnest phoenix
#

their frontend ugly anyways

#

this site has no backend lol

opal plank
#

unless they are related directly to twitch,that could lead to some issues

earnest phoenix
#

this is so sad

opal plank
#

just like discord you are responsible for your credentials

earnest phoenix
#

i think they're genuinely manually updating all categories

faint prism
#

If that were the case then Erwin, maybe your values are more accurate than the website's

earnest phoenix
opal plank
#

im barely escaping ratelimits lmao

#

this is way too fast

misty sigil
#

just fucking barely

opal plank
#

200 streams within 4 minutes

misty sigil
#

getting at them with the skin o yer teeth

opal plank
#

i think im just shy of hitting a rl

misty sigil
#

oooooooh ats nae good

opal plank
misty sigil
#

lmao

opal plank
#

d.js be like

#

take 100mb for 10, thats best i can do

#

i wonder if redis would be better for this

#

prob would

misty sigil
#

d.js light be like
take 200mb for 131

opal plank
#

no 406's yet

#

actuallytwitch is 429 i think

#

or 430

#

i forgot

#

its one of those

#

429, i got it

#

third of the way there

#

oh shit

#

OH SHIT

#

i just noticed its running twice

#

why has no one pointed it out??

faint prism
opal plank
#

Well today we learned, twitch doesnt have ratelimit for that

#

hmmm

faint prism
#

Lol

opal plank
#

which endpoint you touching/

#

?

faint prism
#

I said: scraped

opal plank
#

gib

faint prism
#

The code above it

#
using System;
using System.Net;
string html;

public string GetLiveViewers()
{
  using (var client = new WebClient())
  {
    html = client.DownloadString(new Uri("https://twitchtracker.com/statistics"));
  }
  string sIdx = "<div class=\"g-x-l g-x-l-4\">\n<div class=\"g-x-s-block\">\n<div class=\"g-x-s-value to-number\">";
  string eIdx = "</div>\n<hr class=\"g-x-s-separator border-live\">\n<div class=\"g-x-s-label color-live\">Live viewers now</div>";
  int a = html.IndexOf(sIdx)+sIdx.Length;
  int b = html.IndexOf(eIdx);
  return $"LIVE VIEWERS NOW: {html.Substring(a, b-a)}";
}```
opal plank
#

oh

ionic dawn
#

This twitch bot is about to die scared

opal plank
#

i though you were logging outside events

#

sent packets*

#

i think i did that yesterday

#

hol up

#

hmmmm

#

interesting

opal plank
#

yay we got rate limited

valid gyro
#

you guys were right, it was an issue with my host, im moving my bot to a pi tomorrow morning

earnest phoenix
#

anyone know of a good way to shorten this?

case({J, I, H, G, F, E, D, C, B, A})
  10'b00_0000_0000: begin
    HEX_A = 0;
    HEX_B = 0;
    HEX_C = 0;
  end
  10'b00_0000_0001: begin
    HEX_A = 1;
    HEX_B = 0;
    HEX_C = 0;
  end
  10'b00_0000_0010: begin
    HEX_A = 2;
    HEX_B = 0;
    HEX_C = 0;
  end
  ...
endcase

@swift umbra what the fuck does that code resemble

#

and what language is that

#

thats not js

#

that cant be js

faint prism
#

delphi?

earnest phoenix
#

oh jesus

slender thistle
#

Oh no

opal plank
#

looks kinda likq sql

faint prism
#

Are you sure about that lmao

#

no SQL I've ever seen

opal plank
#

apart from caps

#

cuz SQL devs

#

but not rlly

faint prism
#

sql is:

CASE
    WHEN condition1 THEN result1
    WHEN condition2 THEN result2
    WHEN conditionN THEN resultN
    ELSE result
END;
opal plank
#

CASE() END BEGIN END CASE

ancient nova
#

anyone knows how to open a node module in a txt file using nano or anything else idc I just wanna see files of a module I hav ehelp

#

pls

faint prism
#

nano index.js

ancient nova
#

yeah what next

faint prism
#

it opens?

ancient nova
#

it follows me to a menu

opal plank
#

use it

ancient nova
#

nope

faint prism
#

wtf do you mean "nope"

ancient nova
#

it doesn't open

opal plank
faint prism
#

and?

ancient nova
#

it goes to a menu

faint prism
#

nano menu??

nimble kiln
#

Is it the menu where you have to select an editor?

#

1-----vim
2-----nano

earnest phoenix
#

tip: dont choose vim

ancient nova
#

nope it gives me 10 choices to write file etc

#

what does that mean

earnest phoenix
#

ohhh

nimble kiln
#

Send a screenshot

earnest phoenix
#

you are in the editor

#

you can type and it will be saved to a buffer

#

ctrl + s will save the buffer to the file

#

ctrl + x to exit

ancient nova
#

ah alr

faint prism
opal plank
#

this is nano

ancient nova
#

Error: XOF Ignored

earnest phoenix
#

what the fuck are you in

faint prism
#

Lol

ancient nova
#

a console

nimble kiln
#

Send screenshots KEKW

earnest phoenix
#

press ctrl + x, nano somefile and type away

#

ctrl + s to save, ctrl + x to exit

faint prism
#

Pro tip: ^X mean CTRL+X

nimble kiln
#

CTRL+S to save is lame. Just hit CTRL+X straight away and press Y :3

earnest phoenix
#

no

nimble kiln
#

yes

ancient nova
#

alright let me try

faint prism
#

no u

opal plank
#

yeah this aint right at all

earnest phoenix
#

ctrl s and then directy x while holding ctrl is bae

#

just

#

badu

opal plank
nimble kiln
#

it's literally 1 button press more

opal plank
nimble kiln
#

Please, efficiency.

earnest phoenix
#

it's literally 1 button press more
@nimble kiln the same goes with s and x

#

(holding ctrl) s x

nimble kiln
#

I'm talking about your approach

faint prism
#

My text editor is echo mmLol

earnest phoenix
#

no

nimble kiln
#

you have to press one button more than my method

earnest phoenix
#

stop

opal plank
#

stares in VSC

earnest phoenix
#

you have to press one button more than my method
@nimble kiln that is invalid

opal plank
nimble kiln
#

it is?

earnest phoenix
#

i have to release one button more

faint prism
#
echo Check out my\
code, isnt it great?\
I know it is >> indexmmLol.txt```
earnest phoenix
#

in your method i have to release one button more

nimble kiln
#

oh right i get what you mean

opal plank
#

devs arguing about 1 extra key press

nimble kiln
#

^yes, efficiency

earnest phoenix
#

efficiency

nimble kiln
earnest phoenix
#

holding ctrl while pressing s and x

#

bae

glossy elk
#

bot

nimble kiln
#

no u bot

earnest phoenix
#

holding ctrl while pressing x, then releasing ctrl and pressing y

#

bad

opal plank
#

meanwhile in code
if() else if() else if()else if()else if()else if()else if()

earnest phoenix
#

no

#

seek jesus

faint prism
earnest phoenix
#

oh

#

fuck

nimble kiln
#

Alright lets get back to his question then

#

@ancient nova show screenshots

#

of your error(s)

#

or does it work now?

faint prism
#

First things first, type sudo apt update && sudo apt full-upgrade -y && sudo apt autoremove -y && sudo apt clean -y

nimble kiln
#

ewww 1 liner

#

ewwww sudo

#

ewwwwwwww apt

#

apt-get 👌

earnest phoenix
#

sudo su && some random ass command && su yourOldUsernam

faint prism
#

why on earth would you type apt-get in 2020

nimble kiln
#

I alternate between apt and apt-get

opal plank
#

is it wrong that i want to punch both of them auger?

nimble kiln
#

I was born with apt-get

faint prism
#

is it wrong that i want to punch both of them auger?
@opal plank I do too

earnest phoenix
#

I was born with apt-get
@nimble kiln apt is shorter

faint prism
#

I was born with apt-get
@nimble kiln congratulations. You're depreciated

nimble kiln
#

Wow that hurts

earnest phoenix
#

lmao

nimble kiln
#

welp

earnest phoenix
#

THAT WAS FAST

#

BRUH

nimble kiln
#

now the grammar mistake is starboarded

misty sigil
#

it was starred so fast u broke luca

faint prism
nimble kiln
#

Let me star it too

earnest phoenix
#

we broke luca again pog

#

nvm it fixed itself

nimble kiln
#

^i like

#

Also why u booli me for being old 😠

#

@faint prism A second post was in starboard for a couple seconds

earnest phoenix
#

Also why u booli me for being old 😠
@nimble kiln because you are depreciated

opal plank
#

i saw the bugged one for a sec too

earnest phoenix
#

a depreciated weeb

ancient nova
#

@nimble kiln hold on I'm trying

earnest phoenix
#

DEPRECIATED WEEB

opal plank
earnest phoenix
#

POG

opal plank
#

stop the bs

#

cease

tight plinth
nimble kiln
#

Where else should we shitpost

faint prism
earnest phoenix
#

lmao

nimble kiln
#

Also I'm waiting for @ancient nova to send problem

opal plank
#

shitpost has been deprecated, just like you mmLol

nimble kiln
ancient nova
#

it's probably because I am using a web terminal

nimble kiln
#

oh

#

use a local tool like Putty

ancient nova
#

I'll check it out

#

is thera ny other way

#

to open a node module

#

though

nimble kiln
#

directly from a linux machine?

ancient nova
#

yes

nimble kiln
#

There is vi or vim which is complicated for a beginner tho

#

nano is the best option

ancient nova
#

hmm alright

nimble kiln
#

otherwise, use WinSCP (with Putty integration) or MobaXterm

earnest phoenix
ancient nova
#

alright

opal plank
#

aaaaaaaaaaaaaaand we got rate limited again

ancient nova
#

thanks

opal plank
nimble kiln
#

huh? who got ratelimited

opal plank
#

i has

nimble kiln
#

you?

#

how, where, why

opal plank
#

by spamming, on my bot, cuz i spammed

nimble kiln
#

oh

opal plank
#

gonna re-enable the limiter

#

ffs

nimble kiln
#

Implement anti-spam

#

👌

opal plank
#

i did

#

but im currently testing

#

therefor i didnt wanna wait for the whole cache to start

#

it takes an awful amount of time to cache 4k streams

nimble kiln
#

oh boy you're the guy with that bot which serves a bunch of twitch streams

opal plank
#

yessir

nimble kiln
#

How's the twitch API treating you so far?

opal plank
#

its been going

#

twitch really dislikes big bots

nimble kiln
#

I see 😄

opal plank
nimble kiln
#

Ratelimit goes BRRRR

opal plank
#

indeed lol

#

literally 2 commits before

#

lowering cooldown(ratelimit) for testing

faint prism
#

ah

opal plank
#

webhook

#

👀

faint prism
opal plank
misty sigil
#

WHY NOT

earnest phoenix
#

ffs

#

OH WAIT A SECOND

opal plank
#

and when i say twitch is a joke people ask me why

earnest phoenix
#

I SMELL CROSS SITE REQUEST FORGERY

misty sigil
#

u can just scrape the token

earnest phoenix
#

why are we in development again

placid iron
#

whats the rate limit on kicks and bans?

sonic obsidian
#

Why is there no search for servers button on the Android app?

misty sigil
#

There is no android app for top.gg

sonic obsidian
#

Oh I thought this was discord

rich violet
#

hello

#

How can I change the token of my bot in dbl

ancient nova
#

why doesn't this wanna work

#

const detectionWord = message.content.replace(1chat, "");
if (!detectionWord==="ItsOkayBae") return message.channel.send("ItsOkayBae is my creator.")

pure lion
#

@ancient nova you wanna make sure if it's not equal, not flip detectionWord

#

Use !== and not ! at the start of the if

ancient nova
#

if !== means equal then what does === mean? please don't tell me that I'm that dumb

restive notch
#

bruh my command handle has changed completely now it says client.commands=new Discord.Collection(); ^ TypeError: Cannot read property 'Collection' of undefined at Object.<anonymous> (/app/echo.js:16:29) at Module._compile (internal/modules/cjs/loader.js:759:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:770:10) at Module.load (internal/modules/cjs/loader.js:628:32) at Function.Module._load (internal/modules/cjs/loader.js:555:12) at Function.Module.runMain (internal/modules/cjs/loader.js:826:10) at internal/main/run_main_module.js:17:11

ancient nova
#

There is no android app for top.gg
@misty sigil make a webview app and put in on googleplay lol

restive notch
#

yesterday this worked perfectly

opal plank
#

@ancient nova !== means not equal(and type)

#

!= not equal
= set
== equal
=== equal type
!== not equal type
! reverse signal

ancient nova
#

@opal plank how do I make it so if 1chat (my prefix) and after this will be ItsOkayBae then there's gonna be message.channel.send

#

const detectionWord = message.content.replace(1chat, "");
if (detectionWord==="ItsOkayBae") return message.channel.send("ItsOkayBae is my creator.")

#

that's my current code

#

it's just doesn't work

opal plank
#

what?

ancient nova
#

why

opal plank
#

what???

ancient nova
#

1chat is a command that allows you to talk with the bot

#

I wanna make so if someone mentions my name

opal plank
#

'1chat' okay

ancient nova
#

it'll say that I created the bot

#

that's the code I wrote for it

#

const detectionWord = message.content.replace(1chat, "");
if (detectionWord==="ItsOkayBae") return message.channel.send("ItsOkayBae is my creator.")

#

but it doesn't work

#

why?

opal plank
#

if(message.mentions.users.first() === your id) send(owner)

#

idk what the heck you overomplicating things for

ancient nova
#

if they just say my name

#

not mention me

opal plank
#

then check content

ancient nova
#

just say ItsOkayBae in chat

thick gull
#

if message.content.includes()?

ancient nova
#

after prefix

#

1chat

#

so for example

#

1chat something

#

it'll reply with anything else

opal plank
#

if(message.content.match(yourid)) send(owner)

ancient nova
#

if they say

#

1chat ItsOkayBae

#

it'll reply that I am the creator

opal plank
#

actually

#

my bad

#

test()

#

not match()

restive notch
#

my attempt at a command handler prints this (discord.js)client.commands=new Discord.Collection(); ^ TypeError: Cannot read property 'Collection' of undefined at Object.<anonymous> (/app/echo.js:16:29) at Module._compile (internal/modules/cjs/loader.js:759:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:770:10) at Module.load (internal/modules/cjs/loader.js:628:32) at Function.Module._load (internal/modules/cjs/loader.js:555:12) at Function.Module.runMain (internal/modules/cjs/loader.js:826:10) at internal/main/run_main_module.js:17:11

ancient nova
#

test?

opal plank
#

@thick gull includes is for array,not string

#

or indexOf()

restive notch
#

my code is this const commandFiles = fs.readdirSync('./commands').filter(file => file.endsWith('.js')); client.commands=new Discord.Collection(); for (const file of commandFiles) { const command = require(`./commands/${file}`); client.commands[command.name]=command; }

thick gull
#

oops

earnest phoenix
#

how can i search for username#1234?
ex: /avatar aproxthethat#2017

opal plank
#

with id you can search on the api

#

i dont think you can without id

finite atlas
#

can anyone help me with the mimu bot?

opal plank
#

dont ask to ask @finite atlas

finite atlas
#

hmm?

#

oh

opal plank
#

just ask what you need help with/are stuck with

finite atlas
#

oh alright

thick gull
#

wrong server?

finite atlas
#

im struggling to figure out how to edit an existing welcome embed i used to know how but ive forgotten

thick gull
#

yeah wrong server

ancient nova
#

@opal plank alright I got it but thanks anyway

opal plank
finite atlas
#

oh it directed me here for some reason

#

thats odd

opal plank
#

here is for development support, if you want mimu support you need to go to their server

#

i assumed mimu was urs

slender thistle
#

iara get your people outta here

thick gull
finite atlas
#

well ty anyways i tried making my own bot before but its very difficult but ty anyways

opal plank
restive notch
#

i changed my code to this const cmdFiles = readdirSync(join(__dirname, "commands")).filter(file => file.endsWith(".js")) for (const file of cmdFiles) { const command = require(join(__dirname, "commands", file)) client.commands.set(command.name, command) } along with the depends and now it says client.commands = new Discord.Collection() ^ TypeError: Cannot read property 'Collection' of undefined at Object.<anonymous> (/app/echo.js:10:31) at Module._compile (internal/modules/cjs/loader.js:759:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:770:10) at Module.load (internal/modules/cjs/loader.js:628:32) at Function.Module._load (internal/modules/cjs/loader.js:555:12) at Function.Module.runMain (internal/modules/cjs/loader.js:826:10) at internal/main/run_main_module.js:17:11 keep in mind i added ```client.commands = new Discord.Collection()
client.prefix = PREFIX
client.queue = new Map();

thick gull
#

do

#

do you have discord defined

restive notch
#

yes

thick gull
#

like

opal plank
#

ur compiler says otherwise

restive notch
#

const { Guild, Discord, MessageEmbed, Client } = require('discord.js');

opal plank
#

just call Discord directl

earnest phoenix
#

@restive notch
const Discord = require('discord.js');

opal plank
#

const Discord = require('discord-js')

thick gull
#

D A S H

ancient nova
#

messgae==='' or !message XD

opal plank
#

what you're importing is the exported class/object from discord-js

earnest phoenix
#

+1

restive notch
#

now Client is not defined or MessageEmbed

opal plank
#

deinfe them

ancient nova
#

new MessageEmbed()

#

^

opal plank
#

wrong

ancient nova
#

huh

opal plank
#

since he used Discord

ancient nova
#

no that works for me

opal plank
#

he's now gonna use Discord.MessageEmbed()

#

same for client

#

Discord.Client

thick gull
#

~~ or define client afterwards ~~

ancient nova
#

let embed = new MessageEmbed()

restive notch
#

oh adding discord to the beginig it worked

ancient nova
#

^ that works the same

opal plank
#

different instances okay

#

your code isnt similar to theirs

earnest phoenix
#

Does someone know how dyno members's command works (2 lines of members)?

thick gull
#

you need Discord.MessageEmbed() if MessageEmbed isn’t defined

earnest phoenix
#

Does someone know how dyno members's command works (2 lines of members)?
@earnest phoenix
btw im using discord.js

restive notch
#

oh

#

it signed in

rich violet
#

How do I change the client id of the attached bot

earnest phoenix
#

Does someone know how dyno members's command works (2 lines of members)?
@earnest phoenix can you explain in detail?

opal plank
#

this is so annoying

#

from that time its not even half way done

#

gonna take so long to get to 2k

#

-.-

earnest phoenix
#

@earnest phoenix
Dyno have a "members" command to check members in a role, the command is sent in embed like:

member1 member2
member3 member4

so my question is how to to that? (this 2 lines part)

#

I'll send an ss

opal plank
#

inline = true

earnest phoenix
#

.addField(user,aprox,true)

opal plank
#

Fields uses 3 keys

earnest phoenix
#

true writes side by side. false down

opal plank
#

name,value and inline(boolean)

restive notch
#

it signs in but when i run e!ping nothing comes out i have module.exports = { name: "ping", description: "Pinging the bot", execute(client, message) { message.channel.send('Pong :)') } } as my commands/ping.js

earnest phoenix
#

did I get it wrong?

#

@earnest phoenix
But when trying to mention in field, its saying <@id> instead of mention

opal plank
#

no

#

inline is, well, in line

#

it pushes max 3

earnest phoenix
#

I will send an s

#

ss

opal plank
#

3 maximum fields per line

earnest phoenix
#
message.guild.members.cache.get(args[0])
#

hm

opal plank
#

that wont work

earnest phoenix
#

the "s" its check i can make it to show the other members, but nope its not working

opal plank
#

onl description, field name and another field can accept mentions

#

title, footer, field name, all wont render

earnest phoenix
#

its seems like dyno is using fields since there are no blank soaces

#

spaces*

opal plank
#

unrelated

#

you using name

earnest phoenix
#

Can you send your code

opal plank
#

they are using value

earnest phoenix
#

so he is making the name blank?

#

@earnest phoenix Cant im on phone rn

restive notch
#

it signs in but when i run e!ping nothing comes out i have

    name: "ping",
    description: "Pinging the bot",
    execute(client, message) {
        message.channel.send('Pong :)')
    }
}```
 as my commands/ping.js
opal plank
#

this is a field example

{
name: 'title',
value: 'this is the text below the title',
inline: true,
}

#

@earnest phoenix

#

on name,you cant put a mention

#

on value, you can

#

inline makes it inline or not

earnest phoenix
#

I know, so if i make the name blank like 20xb i think

#

will it work?

restive notch
#

that command works on my other bot but not this one

opal plank
#

put the mention on the value

#

not the name

#

or use description

earnest phoenix
#

@restive notch

module.exports = {
    name: "ping",
    description: "Pinging the bot",
    await execute(client, message) {
        message.channel.send('Pong :)')
    }
}
#

use await

restive notch
#

ooh

earnest phoenix
#

@opal plank Yea i understood that

#

so i will put mentions in value and make the field name empty

opal plank
#

hence why i said use description

#

THOUGH

#

if you really want it

#

theres a little hack u can do

#

\u200B

#

use that in your name

restive notch
#

no that doesnt seem to work becaue cannot use keyword 'await' outside an async function

opal plank
#

if you leave name empty it returns undefined

earnest phoenix
#

\u200b

#

yea

#

that is what i said

#

async execute

opal plank
#

like 20xb i think

earnest phoenix
#

i will make mentions in values and name empty

#

yea i havnt rememberd it well

restive notch
#

yeah the line is await execute(client, message) {

earnest phoenix
#

but this is what i meant xd

restive notch
#

oh

earnest phoenix
#

ok thanks

restive notch
#

im dumb

earnest phoenix
#

@restive notch

module.exports = {
    name: "ping",
    description: "Pinging the bot",
    async execute(client, message) {
        message.channel.send('Pong :)')
    }
}
#

:)

opal plank
#

why make it await?

#

no need

summer torrent
#

^

opal plank
#

if that's not sending it means your index is fucked

restive notch
#

yeah that works

opal plank
#

either the detection of the command args or the execution

earnest phoenix
#

👍

opal plank
restive notch
#

but it still doesnt respond to e!ping

opal plank
#

rule of the thumb, if theres no await,it doesnt need async

#

mind u i told you that 5 messages ago

restive notch
#

oh

#

ok ill change to a command handler latter since just using a client.on('message') ect works fine

opal plank
#

wait what?

thick gull
#

wait what

ember lodge
#

someone knows how can i delete something i added using db.push?

#

in quick.db

strange citrus
#

You'd have to get it, splice the item, and put it back in

opaque hawk
#
import { pluralize, model, connect, Schema, Document } from "mongoose";

pluralize(s => s);

connect(process.env.DB!, {
    useNewUrlParser: true,
    useUnifiedTopology: true,
    useFindAndModify: false,
}).catch(e => {
    console.error(e);
    console.log("Error while connecting to database, see above for full error");
    process.exit();
});


interface IGuild extends Document {
  guildId: string;
  prefix: string;
}
const GuildSchema = new Schema({
  guildId: String,
  prefix: String,
});
export const guild = model<IGuild>("guilds", GuildSchema);

export async function getGuild(id: string) {
  return await guild.findOne({ guildID: id }) || new guild({ guildID: id });
}``` why does this not save the guildID to the database
valid frigate
#

i havent used mongoose in a long fuckin time but iirc you need to call .exec() after new guild

#

or you could alternatively use findoneandupdate and upsert the document, then return the document it finds after the query

opaque hawk
uneven lagoon
#

I am a poor fucker.

earnest phoenix
#

yes man

uneven lagoon
#

I am so happy I learned javascript at school.

earnest phoenix
#

😳 i cant even do real coding

glad charm
#

I'm being controlled by a hoister.

#

-vps

gilded plankBOT
#

A VPS or virtual private server is a virtualized server instance run in the cloud. It acts like a normal server, allowing you to remotely login and manage it just like a physical server or computer. If you're looking for a way to keep your bot online 24/7, a VPS is a great option.

Having trouble choosing a VPS provider or don't know where to start? Click here for a list of common and affordable VPS providers.

uneven lagoon
opal plank
#

i feel like im doing some dumbshit here

uneven lagoon
#

YES, THE KEKW EMOJI EXISTS HERE.

#

Huh.

opal plank
earnest phoenix
#

@earnest phoenix Learn to do coding

glad charm
#

Is that your debugger?

opal plank
#

indeed

earnest phoenix
#

Instead of using some china knock off language

opal plank
#

offline has that item

glad charm
#

What is e_c?

opal plank
#

anything

#

just a variable name

#

for filter

glad charm
#

Oh yeah my bad.

opal plank
#

as it takes a function

glad charm
#

I see yeha

opal plank
#

_offline is null tho

glad charm
#

If you make it != it'll work

#

You're using triple

#

Which doesn't allow implict conversions

earnest phoenix
#

school just teached me fucking scratch when i was in fifth grade