#development

1 messages · Page 1492 of 1

heady sable
#

wut

slender thistle
#

Why do you think I linked you cog_unload?

heady sable
#

sohigdz;nsyvle th

#

Im confsue

slender thistle
heady sable
#

so

#

do I have to do that...

#

cant I just restart my bot

slender thistle
#

A solution that could take literally a few seconds if you knew what you were doing

heady sable
#

yep

slender thistle
#

but sure, you can just keep restarting your bot

heady sable
#

uhh it dosent work if I restart it

#

it gives me that error that another one is their

cloud oak
#

@heady sable I am trying it aswell lmao

heady sable
#

nice

#

race

cloud oak
#

A friend just voted nothing got printed tho

#

I see you everywhere

heady sable
#

mines works

#

but it cant send dm

#

when it doss it errors

#

and says theirs another webhook

slender thistle
#

Just restarted my bot completely and it created a new webhook under my port just fine

heady sable
#

IT WORKS

#

OSDHJAOFHDEG

cloud oak
#

soos can you help me?

heady sable
slender thistle
heady sable
#

LERTS GOIODFISD

#

@slender thistle Thank you lol I still dont know what Im doing

cloud oak
#
import dbl
import discord
from discord.ext import commands, tasks

import asyncio
import logging


class TopGG(commands.Cog):
    """Handles interactions with the top.gg API"""

    def __init__(self, bot):
        self.bot = bot
        self.token = 'no' # set this to your DBL token
        self.dblpy = dbl.DBLClient(self.bot, self.token, webhook_path='/dblwebhook', webhook_auth='password', webhook_port=5000)

    # The decorator below will work only on discord.py 1.1.0+
    # In case your discord.py version is below that, you can use self.bot.loop.create_task(self.update_stats())

    @tasks.loop(minutes=30.0)
    async def update_stats(self):
        """This function runs every 30 minutes to automatically update your server count"""
        logger.info('Attempting to post server count')
        try:
            await self.dblpy.post_guild_count()
            logger.info('Posted server count ({})'.format(self.dblpy.guild_count()))
        except Exception as e:
            logger.exception('Failed to post server count\n{}: {}'.format(type(e).__name__, e))



    @commands.Cog.listener()
    async def on_dbl_vote(self, data):
        logger.info('Received an upvote')
        print(data)
        print(f'Someone voted !')
        channel = self.bot.get_channel(794536699246018571)
        await channel.send(f'Someone voted for the bot!')

def setup(bot):
    global logger
    logger = logging.getLogger('bot')
    bot.add_cog(TopGG(bot))
    print('Top GG API loaded.')
slender thistle
#

I don't know what you're doing either but

heady sable
#

@cloud oak I think I can help u

#

BRUH

#

DELETE THAT

#

RN

slender thistle
#

Reset your top.gg token @cloud oak, thank you

cloud oak
#

whoops

#

sorry

#

lmao

#

one sec

trim saddle
#

gonna post 9 million guilds

heady sable
#

yea

#

sme

#

I got token before it changed it to no

#

thanks @cloud oak

cloud oak
#

I regenerated

#

alr

heady sable
#

xd

cloud oak
#

@heady sable can you help me?

heady sable
#

what

#

ok

#

what do you have here

cloud oak
#

it doesn't print it on dbl_vote

heady sable
slender thistle
#

What do you have set on the top.gg website in your bot's webhook settings?

#

Are you sure your URL is actually reachable for the port 5000 (is the port 5000 open?)?

cloud oak
#

Nothing, my bot does not have 1000 votes ?

#

Wait lemme do that then

#

where can I set that?

#

ah got it

#

alr

#

so

heady sable
#

dud

#

Ik your pass

#

its password

#

xd

cloud oak
#

lmao

#

xd

#

yeah

#

but what do I set there?

slender thistle
#

http://ip:port/dblwebhook
ip is your VPS' public IP address
port is 5000, because webhook_port=5000
/dblwebhook is because webhook_path='/dblwebhook'

heady sable
#

^

cloud oak
#

And password is what I want?

slender thistle
#

webhook_auth must match with whatever you set in the Authorization field

cloud oak
#

And I can put whatever I want there?

slender thistle
#

Sure

cloud oak
#

alr one sec

#

So basically to make sure that I understood it right:
webhook_port=5000
webhook_auth = Authorization code

#

webhook_path='/dblwebhook'

#

right?

slender thistle
#

Sure

cloud oak
#

and Webhook URL = http://ip:port/dblwebhookip

#

am I correct?

slender thistle
#

replace ip and port with corresponding stuff and you're good to go

#

also remove the ip after dblwebhook

cloud oak
#

wait, whats the ip?

slender thistle
#

whatever you use to connect to your VPS

#

A public IP to the machine the bot is hosted on

cloud oak
#

ah

#

alright

#

one sec lemme get my ip xD

#

alright, now its saved

#

alright

#

now it should work?

#

let me see

slender thistle
#

I don't know. Maybe

#

If you use the Test button, you need to have on_dbl_test listener

cloud oak
#

ah

#

oke

#

lemme do that rq XD

#

with which arguments?

slender thistle
#

Same as on_dbl_vote

#

Main difference: it's not an actual vote being sent, data['type'] will return test

cloud oak
#

so async def on_dbl_test(self, data['type']): ?

slender thistle
#

just data

cloud oak
#

hmm alright

#

so this is the code:

    @commands.Cog.listener()
    async def on_dbl_test(self, data):
        channel = self.bot.get_channel(794536699246018571)
        await channel.send('Test')
#

But

#

like

#

I have a weird error

#

OSError: [Errno 10048] error while attempting to bind on address ('0.0.0.0', 5000):

slender thistle
#

Can you send the full error?

cloud oak
#

its a bit in german tho

slender thistle
#

Bleh, Google Translate exists

cloud oak
#

future: <Task finished name='Task-753' coro=<DBLClient._webhook() done, defined at C:\Users\User\AppData\Local\Programs\Python\Python38\lib\site-packages\dbl\client.py:436> exception=OSError(10048, "error while attempting to bind on address ('0.0.0.0', 5000): normalerweise darf jede socketadresse (protokoll, netzwerkadresse oder anschluss) nur jeweils einmal verwendet werden")> Traceback (most recent call last): File "C:\Users\Muaz Ugur\AppData\Local\Programs\Python\Python38\lib\site-packages\dbl\client.py", line 457, in _webhook await self._webserver.start() File "C:\Users\User\AppData\Local\Programs\Python\Python38\lib\site-packages\aiohttp\web_runner.py", line 100, in start self._server = await loop.create_server( # type: ignore File "C:\Users\User\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py", line 1463, in create_server raise OSError(err.errno, 'error while attempting ' OSError: [Errno 10048] error while attempting to bind on address ('0.0.0.0', 5000): normalerweise darf jede socketadresse (protokoll, netzwerkadresse oder anschluss) nur jeweils einmal verwendet werden

slender thistle
#

or I can wake up my German friend by spam pinging him

cloud oak
#

oh no xD

#

thats the error which is in german:
normally each socket address (protocol, network address or connection) may only be used once

slender thistle
#

Yeah, right

#

Missed this little detail in examples

#

Basically, you reloading the cog doesn't actually close the webhook

#

and as you probably understood already, a port can only be used by one program at a time

cloud oak
#

yeah right

#

so

slender thistle
cloud oak
#

I should maybe restart the whole bot?

#

ah

#

oke

#

self.dblpy.loop.run_until_complete(self.dblpy.close())

slender thistle
#

That works, but you could use the cog_unload event to close it whenever the cog is unloaded

cloud oak
#

alright

#

let me try

#

alright

#

testing time

#

alright I sended it

#

I'll wait for a few sec now

slender thistle
#

Usually it's instant

cloud oak
#

Hmm, nope

#

nothing

slender thistle
#

Fun

#

DM me what you entered in webhook settings on the website

cloud oak
#

alrighty

quartz kindle
#

you're trying to send something after you already sent something

crimson vapor
#

this looks like djs + express

#

im so confused

#

but its not

#

who has eval in an express server tho

pale vessel
#

Eval API 5Head

#

I have that

crimson vapor
#

why

#

thats like

#

so useless

lusty quest
#

why?

#

no risk to nuke your bot

trim saddle
#

@quartz kindle good morning tim

crimson vapor
#

its an api

trim saddle
#

@pale vessel one more thing

pale vessel
#

br

trim saddle
#

is there any documentation on 1xxx closing codes

#

or am i just breaking more stuff

lusty quest
#

websocket?

trim saddle
#

indeed

lusty quest
#

1000?

trim saddle
#

yeah

lusty quest
#

you missed an heartbeat and your websocket closed the connection

#

took me also a while to get it

earnest phoenix
#

anyone know a website better than glitch.com that can be used on mobile?

misty sigil
earnest phoenix
#

Is it better than glitch?

#

@misty sigil

lusty quest
#

yesnt

earnest phoenix
#

Thanks then I guess

#

But I got a problem :(.

#

I’m gay

#

Lol jk

misty sigil
#

same

lusty quest
#

never used it personnaly but i dont trust this type of page

weary socket
#
WARNING: Illegal reflective access by com.google.gson.internal.reflect.UnsafeReflectionAccessor (file:/home/Discord-Bots/Interception-Javacord-2.3.1/lib/gson-2.8.5.jar) to constructor java.lang.Void()
WARNING: Please consider reporting this to the maintainers of com.google.gson.internal.reflect.UnsafeReflectionAccessor
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release```
This is a Error which comes up from top.gg api through Gson.
how can I fix this?
earnest phoenix
#

So my bot on repl.it isn’t working

#

What do I do?

quartz kindle
#

all ports lower than 1024 are reserved for admin access only

#

you're trying to use port 300

earnest phoenix
#

I’m confused what do you mean by that?

quartz kindle
#

somewhere in your code you have port:300

#

or listen(300)

earnest phoenix
#

Let me check

#

@quartz kindle thanks!

#

Bots running :)!

#

Guys do you know a way I can make a puzzle to create mute, unmute, unban commands?

pure lion
#

make a puzzle?

earnest phoenix
#

what

#

Like create a mute, unmute, unban command

#

Like somehow make it

pale vessel
#

use magic

lusty quest
#

language?

earnest phoenix
#

pray to discord gods to grant you the powers

earnest phoenix
#

No ones really helping me I ask almost everyday

lusty quest
#

for muting create a Role that got only read permissions (if you want to use it for text channels) if the mute should be temporary use something like redis for storing the user who got muted. To mute the user just give him the role. for unmuting take the role away.

earnest phoenix
#

I mean like for the bot @lusty quest

lusty quest
earnest phoenix
#

I’ve already read it

lusty quest
#

where is then the issue?

rocky hearth
#

what happens, if I create a new branch, without commiting the changes?

earnest phoenix
#

But I want a mute command where there is no role I’d to be used and can be used like dyno @lusty quest

#

@earnest phoenix I’ve been reading everyday :/

#

I’m trying my best

#

read with understanding then

umbral zealot
#

It takes weeks and months to learn a language.

lusty quest
#

then get the user and set the Write permission for this user in every channel to false

earnest phoenix
#

Yes but I’m not a smart guy and need a lot of help

umbral zealot
#

It sounds like you're just either lazy or impatient.

earnest phoenix
#

I’m not I read but I just need help sometimes :/...

umbral zealot
#

Ok but we can explain things for you - we just can't understand them for you

#

Help me, I'm dumb!
Are you actually dumb, as in, lacking the mental fortitude to code, or are you just lacking the experience and knowledge to understand the code?
Because if you're actually just dumb, the only help we can provide in terms of bot coding is "don't code bots, use those that exist".
if you're just lacking experience, then there's a solution and it's "just take the time to learn javascript and you'll be fine".
Most people that say or think they're dumb, it's just because they're rushing into thinks head first and being overwhelmed by a lot of information all at once. Anyone would be!

earnest phoenix
#

Yea like everyone says that to me

#

Every time in development

lusty quest
#

i guess the issue is people start coding bots with way to high Expectations. after a few days they get frustrated that it took already 3 days to get started with learning a language

earnest phoenix
#

maybe programming just isn't for you

umbral zealot
#

If everyone says this to you, maybe it's time for you to listen to everyone.

earnest phoenix
#

I AM FREAKING TRYING MY BEST

umbral zealot
#

It is a very unfortunate truth that not everyone can actually code. Like, not everyone has the ability to understand programming.

#

If you're trying your best and your best isn't enough, well, find another hobby, sorry.

earnest phoenix
#

I don’t wanna I wanna learn this

#

There’s only gone 8 days and I’ve made peofrsss

#

Progress

umbral zealot
#

Then go actually learn, instead of randomly mashing the keyboard and expecting other people to hand hold you through every step of the way

lusty quest
#

i can suggest to limit the time per day you try to learn something new. Humans can only process a certain amount of Informations in a short span. if you Hammer your brain with the entire Documentation for a language you only get headache and dont learn anything. this helped me a lot

umbral zealot
#

like I said, it takes weeks , months to learn a language. not 8 days. WEEKS. Months.

earnest phoenix
#

^ people go to college for this type of stuff too

umbral zealot
#

I've been doing programming for over 20 years.

earnest phoenix
#

What the fuck

umbral zealot
#

And I still learn new things every day

earnest phoenix
#

Are you 30 then?

umbral zealot
#

I'm 39.

earnest phoenix
#

What the

#

i started when i was 9

umbral zealot
#

What, you think coding bots is reserved for tweens? lol.

lusty quest
#

you would be suprised how old people here are actually

earnest phoenix
#

I’m just 45

#

no you're not

#

Lol jk

#

it isn't funny

#

you're just being annoying

lusty quest
#

would guess somewhere between 10-14

#

maybe 15

earnest phoenix
#

How 10? The discord tos is 13+...

lusty quest
#

lol the same way pornhub got users that are born in 1387

rocky hearth
#

can we continue this discussion in some other channel?

umbral zealot
#

You really need to learn a lesson here: stop thinking shit takes a couple days to learn. This isn't like learning how to make a minecraft house. This is complicated stuff that takes a long time to learn.

umbral zealot
#

Roblox then

#

you get the idea. don't be obtuse.

lusty quest
#

i would suggest to lower your expectations. take it back a notch and try to learn every day a bit. just forcing you throu it wont help.

earnest phoenix
#

also just a tip, programming requires good competency in logic problem solving, if you can't find yourself doing that (which from the last few days i've been reading your messages, you can't), drop it and find another hobby

umbral zealot
earnest phoenix
#

Do I read all the damn documents?

umbral zealot
#

You need to go through at least ONE course.

#

completely. from start to finish. the entire thing.

earnest phoenix
#

JavaScript

lusty quest
#

dont read all at once. take one page, read and understand it.

earnest phoenix
#

you can read, but you need to read with understanding

#

that

lusty quest
#

then take a break.

earnest phoenix
#

Alr I mean in one of the link there is like 80 documents @umbral zealot

lusty quest
#

if its not much maybe 2 pages.

umbral zealot
#

Yes. Courses can have hundreds of pages

earnest phoenix
#

lol

#

it's like talking to a wall

#

No there is like 80 documents in one link...

umbral zealot
#

again, this is Complicated. It's not trivial.

earnest phoenix
#

Ok..

umbral zealot
#

It's not as simple as connecting wires in electrical, for god's sake. Programming is a complete science you can spend 10 years in school learning.

#

Damn kids thinking they can master something that literally takes years to learn, in a week.

lusty quest
#

maybe you find somewhere else something that teaches you some programing. Ive started to learn a bit Lua back in 2013 bcs ive played a lot of Gmod. the knowledge that ive gathered in my 3k hours in the game helped me a lot when ive started to program my first bot 2 years ago.

#

i guess this above is badly explained.

#

but i hope you get the point

crimson vapor
#

well

#

imo we gotta use different terminology

umbral zealot
#

I'm not pissed I'm being authoritative and insistent in the face of dunning-kruger tweens.

crimson vapor
#

anyone can code

#

anyone can program (kinda)

#

not anyone can develop

#

because that takes time, effort, and skill

#

at least for my definitions

earnest phoenix
#

I can also say a lot of stuff that will offend you

crimson vapor
#

smh

lusty quest
#

maybe just reading docs is not really a way for you to learn stuff. i have this issue, so ive looked in a few Github Repos of bots and tryed to understand what happens if a certain part of code gets executed. bcs of my prior knowledge with programing ive got quite fast into coding my first bot.

earnest phoenix
#

@lusty quest yea you’re right I’m not really a guy that likes to read

#

everyone can code

#

not everyone can program

#

I like to get straight to the point

crimson vapor
#

what do you define as programing?

earnest phoenix
#

logical thinking & problem solving skills

crimson vapor
#

o

#

makes sense

#

so you have to understand to program

earnest phoenix
#

coding is a wide term for just knowing how to bash a language's syntax on your keyboard

crimson vapor
#

yea

earnest phoenix
#

I.don’t.have.a.pc.I.repeat

crimson vapor
#

its like how anyone can write but not everyone is an author

lusty quest
#

funny enough i do Programing for Milling machines at work. and the problem solving there is the retarded software we have to use for writing the programs

crimson vapor
#

I don't have a job

earnest phoenix
#

Same

lusty quest
umbral zealot
#

A programmer without a PC is like a cook without a stove.

#

no wonder you're having trouble.

crimson vapor
#

voltrex master

earnest phoenix
#

Ye ^

#

Say that to him @umbral zealot

crimson vapor
#

he has a fucking butane torch

#

bruh

#

are you ok

umbral zealot
#

I'm not saying it's impossible.

crimson vapor
#

voltrex adapted

trim saddle
umbral zealot
#

I'm saying it'S even harder, so if your talents are less, it's going to be nigh impossible.

crimson vapor
#

true

trim saddle
#

i learned python from messing with template bots

#

i forgot how i learned js

#

and ts is like python js so that was easy

earnest phoenix
#

@trim saddle how can you find template bots?

crimson vapor
#

@humble gyro to join a channel on v2 we use name?

#

not id

trim saddle
#

github

earnest phoenix
#

i just threw myself into full stack development and started making random ass apps lmfao

crimson vapor
#

I started with my bot

earnest phoenix
#

GitHub what do I search in there? @trim saddle

crimson vapor
#

then did express

#

now im here

#

ig I could call myself fullstack

earnest phoenix
#

ended up browsing a fuckton of documentation and slowly became fluent in a lot of languages

crimson vapor
#

but css is shit

earnest phoenix
#

I started with bdfd

trim saddle
#

discord-bot tag lol

earnest phoenix
humble gyro
#

@crimson vapor yes

crimson vapor
#

why

#

the FUCK

humble gyro
#

channel names are unique

crimson vapor
#

everything is /channels/ID/action

#

not join

#

join is fucking /channels/join with name

#

LOL

earnest phoenix
crimson vapor
#

idc its just funny

humble gyro
#

thats because channels/:id/join is a seperate thing

crimson vapor
#

oh what

#

what is it

humble gyro
#

it joins the channel by id

trim saddle
#

if you strictly use bot templates

crimson vapor
#

wait

#

so you can join by id and name?

trim saddle
#

don't expect to learn

humble gyro
#

yes?

crimson vapor
#

oh

#

I didn't know

#

nvm

trim saddle
#

i had to evolve pass them

crimson vapor
#

so /channels/1/join should join main channel

humble gyro
#

no it doesn't

#

because you can't use it yet

crimson vapor
#

oh

#

when can we use it

#

when channels come out?

earnest phoenix
humble gyro
#

yea

crimson vapor
#

eta on that?

humble gyro
#

you can use join by name tho

crimson vapor
#

or work starting soon?

humble gyro
#

no

#

no eta

trim saddle
#

veld why are you pulling a hiven

#

but worse

humble gyro
#

skull

crimson vapor
#

its fun

humble gyro
trim saddle
#

are you trying to move dbl to vcbl

crimson vapor
#

yes

humble gyro
#

let me enjoy my holidays

crimson vapor
#

Terano best veldchat bot

#

only one still best one

earnest phoenix
#

@trim saddle why are your DM’s closed?

crimson vapor
#

wait veld how do I get a user's avatar?

#

im still confused on this

trim saddle
humble gyro
#

user.avatarUrl

crimson vapor
#

its not null?

earnest phoenix
#

Can I dm you?

humble gyro
#

default avatars = cdn(chat/avatars/{id % 5}.png)

trim saddle
#

you'd have to friend me, but i don't really respond to non-familiars

humble gyro
#

e.g.

umbral zealot
#

"I don't want anyone else to tell me I have to learn I want someone to spoonfeed me"

crimson vapor
#

wait

#

oh

umbral zealot
#

sigh. nice help vampire.

humble gyro
crimson vapor
#

id % 5 is

#

oh

#

its an operation

trim saddle
#

just tell me what you need to tell me here

earnest phoenix
#

check out jSensors, i used it a while back to monitor minecraft server impact

#

what

#

why did the reply go poof

#

oh

#

@trim saddle I just need help with bot templates

crimson vapor
#

remainder of ID / 5

earnest phoenix
#

deleted message

crimson vapor
#

makes so much sense

umbral zealot
humble gyro
#

just use the modulo operator

trim saddle
#

this is the dev channel

lusty quest
#

you could use a time series database and stuff like telegraf

trim saddle
#

tell me here

earnest phoenix
#

I can’t find the uh templates for the bot

crimson vapor
#

ty for explaining that veld

humble gyro
#

anytime :D

knotty obsidian
#

jSensors?

humble gyro
#

btw @crimson vapor

crimson vapor
#

yea

earnest phoenix
#

it doesn't seem to be actively maintained anymore

humble gyro
#

channel members working again in dev

crimson vapor
#

the sidebar?

humble gyro
#

yea

earnest phoenix
#

@umbral zealot stop wtf

crimson vapor
#

how do I see it

humble gyro
crimson vapor
#

hmm

humble gyro
#

not deployed yet

crimson vapor
#

eta on deploy?

humble gyro
#

no eta

crimson vapor
#

alr

humble gyro
#

i just wanna vibe

crimson vapor
#

well good work

#

I rate it

humble gyro
crimson vapor
#

10/10

knotty obsidian
crimson vapor
#

yikes

humble gyro
#

still a lot needs to be done tho

#

to get this api working properly

crimson vapor
#

pog

knotty obsidian
#

What I'm mainly worrying about is can a bot use a Terminal 🤔

crimson vapor
#

what do you mean by that

earnest phoenix
#

a bot is not anything special

crimson vapor
#

you can code a bot any way you want

earnest phoenix
#

it's a part of your application

knotty obsidian
#

so can it open a terminal and enter measure temp?

earnest phoenix
#

and yes, you can launch the terminal in almost any language

knotty obsidian
#

what about typing in it

earnest phoenix
#

you launch it with arguments

#

you don't type in it

crimson vapor
#

can't you just get a lib that does the temps for you?

#

then you have all of them

#

on every most devices

knotty obsidian
#

jSensor then?

crimson vapor
#

no idea

knotty obsidian
#

ill check it out

crimson vapor
#

veld is there a leave endpoint yet?

#

if not, will it be channels/ID/leave

humble gyro
#

no

#

delete channels/:id

#

actually

#

not sure yet

crimson vapor
#

ok

knotty obsidian
#

only python can do stuff like going somewhere and typing something right

crimson vapor
#

what do you mean?

#

with bots?

#

all libs can do the same things

knotty obsidian
#

yes

#

woot

earnest phoenix
#

@trim saddle I love you man so much! You’re the best this will help me so so so much :(. You’re really a true nice guy!

#

No homo Lol

drifting wedge
#

how do i remove the scrollbar from something without removing it for the whole page

#

like just remove from adiv

quartz kindle
#

overflow

drifting wedge
#

overflow hide?

#

like i want it to still be scroll-able

#

just no scroll bar

#

or more even, rn its like a second scrollbar in the sidebar

#

how can i sync it with the page scroll

earnest phoenix
#

Can someone help I don’t know which one } to remove?

golden condor
#

Lime 114

#

You didn't put something into the if statement

earnest phoenix
#

Wdym?

#

@golden condor what should I change with it?

sonic lodge
#

indent your code properly so that you can see where each block starts and ends clearly

stark abyss
#

be honest you copy pasted code didn't you? AHWeirdChamp

plain reef
#

Does anyone have a simple css bot description template because I am extremely bad at css

sudden geyser
#

A CSS bot description to design what? That's a very broad range where Markdown would probably be satisfactory.

long hare
#

what all are the scripts from where you can steal a token from a bot on eval command?
client.token and ?

misty sigil
#

idk man

long hare
#

does anyone know?

mellow kelp
#

Depends on your code

long hare
mellow kelp
#

If you have a TOKEN env variable, another way would be process.env.TOKEN

#

But as i said, it depends on what your code has

long hare
#

alright

earnest phoenix
#

who wanna have my token??!!?!

#

giveaway!!!!!!!!!!

#

jkjk

sudden geyser
#

🚪 🚶‍♂️

earnest phoenix
#

loool

drifting wedge
#

like how do i hide the scrollbar from a div?

#

i still want it to be scroll-able, just without the bar

pale vessel
#

Pretty sure there's a webkit property for that

drifting wedge
#

ye

#

there is

#

but can i put the webkit in a class?

#

like for a div only?

#

not for full page?

#

@pale vessel

pale vessel
#
/* Hide scrollbar for Chrome, Safari and Opera */
.example::-webkit-scrollbar {
  display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.example {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}```
#

There's this

#

Use your selector

#

why do you want to hide it though

earnest phoenix
#

wouldn't it be smarter to hide the overflow on the body and then set overflow to auto on a parent container

pale vessel
#

I don't think hiding it would be good for accessibility

drifting wedge
#

like this is it rn

#

so basically i either, want the scroll bar on the sidebar to sync

#

or for the scrollbar to be invis / nonexistant

#

like maybe when you scroll down the page it also goes down?

#

^ ignore

#

it doesnt matter that much

dull blade
#

heh

fierce ether
#
const fetch = await client.channels.cache.get(find.queueChannelID).messages.fetch(find.queueID)```
#

work around this

jade juniper
#

I will continue to use BDFD ...😢

drifting wedge
#

dont

#

just dont

jade juniper
#

I just have no other choice ...

drifting wedge
#

how?

jade juniper
#

I was going to use dbd.js but at first I don't understand anything although it is not much of a problem and second I have no place to keep the bot

weary widget
#

how do i make a ping command in discord.js? all I know is python and this clearly dont work

trim saddle
#

@earnest phoenix 😳 no problem i guess

earnest phoenix
trim saddle
#

@pale vessel you think discord would have a meltdown if someone made 2 channels at exactly the same time

trim saddle
#

in fact you're in violation of tos if you try

earnest phoenix
lyric mountain
#

Still illegal

trim saddle
#

you're not supposed to be running bots on glitch anymore

earnest phoenix
#

Oh no

trim saddle
#

it's meant for web apps

lyric mountain
#

Heroku also isn't an option since they also actively fight against bot hosting there

#

They just not banned like glitch

earnest phoenix
#

I made bot there oh noo i founded it on YouTube

lyric mountain
#

Hello youtube founder

earnest phoenix
#

So basically I'm f*****d

lyric mountain
#

Well, vps ain't expensive

umbral zealot
lyric mountain
umbral zealot
#

Repl.it has confirmed that they allow ping services and such.

#

I literally have a word from the CEO about this being allowed.

earnest phoenix
#

Wait can i get arrested for that

lyric mountain
#

Well yes but actually no

#

Unless you're a world-famous rich dude

umbral zealot
#

Glitch.com would simply shut down your bot and code if they see you're using a ping service, as it's against their ToS

lyric mountain
#

Noone is gonna punish u at all through law enforcement

earnest phoenix
#

Im deleting account on glitch that will help?

umbral zealot
#

Glitch started off as an open free platform but when they finally decided to add their paid service it was too late and they had to go full reverse impulse on everything they could - otherwise they would have simply shattered.

umbral zealot
lyric mountain
#

Glitch is still in collision course lul

earnest phoenix
#

OK

#

Thank you all

lyric mountain
#

Nonetheless, you'll eventually need to move out of free hosting depending on bot growth, just keep that in mind

#

There's only so much you can do while free

umbral zealot
tight plinth
#

hi fellow 1am people

solemn latch
#

weird development conversation

umbral zealot
tight plinth
lyric mountain
#

If it wasn't broken it'd not be called discord

tight plinth
#

my code down there is broken too but I wanna fix that before anything else

earnest phoenix
#

It's 1 14 am for me hehe

tight plinth
#

same hehe

merry stirrup
#

Is it possible to deploy a react app (with express) to like <ur domain>/dashboard

umbral zealot
#

yeah sure,a ctually you can, Carlo.

earnest phoenix
#

I decided that it's hard making bot I'm shutting it down

merry stirrup
#

how

tight plinth
#

so is there any way to make discord not broke

umbral zealot
#

However, your dashboard will have to communicate with your bot through an API, so, not only do you have to server your react's build folder from Express using static(), you will also need to have express running from the bot's code itself, in order to have access to the bot data.

lyric mountain
#

React doesn't like too much being embedded in a webserver

merry stirrup
#

everything works

umbral zealot
#

Oh react doesn't care

merry stirrup
#

just want express to run my build on /dashboard

#

instead of /

umbral zealot
#

REact is front-end, as long as you serve HTML and the JS it creates, it doesn't care what it's served from.

#

So... change the route?

#

lol

earnest phoenix
#

I shuted down the bot

merry stirrup
#

just like that

#

ooh lol

#

like this?

this.app.get('/dashboard', (req,res) =>{
            res.sendFile(path.join(__dirname+'/../client/build/index.html'));
        });
umbral zealot
#

well yeah, absolutely

#

That should work fine 😄

merry stirrup
#

ok ty

#

will try

umbral zealot
#

(though, as a secondary change, your other files like the JS and CSS, might require you to change the paths in your static serving files)

merry stirrup
#

will see what it'll give

#

if not, then i'll just change everything on frontend

#

the routing

mellow kelp
umbral zealot
#

It depends on the setup.

merry stirrup
#

don't think so either

mellow kelp
#

I mean, react router dom works fine too so any route should work

umbral zealot
#

how does react-router-dom work if you don't get your JS bundle? lol.

mellow kelp
#

Thats kinda my point KEKW

umbral zealot
#

Your point is vague and imprecise because I'm saying it wouldn't.

mellow kelp
#

Hmm k

lyric mountain
#

Bruh, there's a dude asking for a copy-ready example of usage for my lib

solemn latch
#

did you give him your docs Thonk

#

copy paste KEKW

lyric mountain
#

Yeah, readme.md has a full example of usage, and the lib itself is abundant in javadocs

#

Asked him to show how he's doing it, now gotta wait for a reply

#

Not to say copypasting it would be useless since it's a pagination lib KEKW

solemn latch
#

ah yes.

craggy pine
#
async function subscribe(message) {
  if (!usersToNotify.find(x => x == message.author.id)) {
    usersToNotify.push(message.author.id);
    saveCurrentPrice();
    await message.reply("Subscribed to price updates!");
  } else {
    saveCurrentPrice();
    await message.reply("You're already in the database!");
  }
}

What would be the proper way to delete the .reply after x amount of time?
I've done message.delete(1000) - gives an error about it not being an object.
I've also done

.then(message=> {
    message.delete(10000)
  })

same error.
Supplied options is not an object

solemn latch
#

ah a properly formatted question, im scared.

craggy pine
solemn latch
#

didnt know delete needed an object for its options

#

message.delete({ timeout: 5000 })

craggy pine
#

Guess I could have just looked at the docs PepeHands but ya, wasn't expecting to need anything like "Timeout" in it.

#

But hey, thx kittyLove

solemn latch
#

its so much easier with properly formatted questions 😄

craggy pine
#

I have a bad habbit of googleing my things before looking at docs for whatever reason

#

bonk me

trim saddle
#

@craggy pine google how to look for docs

#

ez

craggy pine
solemn latch
#

i like docs. its like a bunch of puzzle pieces with logic, almost like its documentation or something.

lyric mountain
#

But how will you know how to read the docs if there's not a doc about it?

solemn latch
#

a doc doc

lyric mountain
#

A doc about reading the docs

opal plank
#

question

#

whats the embed url attachment buffer format?

#

it doesnt go into url

#

files?

lyric mountain
#

Wdym? Like, attachment://name.extension?

opal plank
#

thats with local files

#

i got a buffer of an image

#

i wanna send into an embed

pale vessel
#

still works

lyric mountain
#

Send file normally

opal plank
#

its not local though

lyric mountain
#

The embed will pull it

pale vessel
#

it's fine

lyric mountain
#

Just send the file + embed

opal plank
#

huh?

lyric mountain
#

Like

pale vessel
#

are you using the embed object or what

lyric mountain
#

If the embed image's url is attachment:// and you send a file with the same name, it'll pull the image into it

opal plank
#

files work just fine

#

but i got it on a buffer, not on a file

lyric mountain
#

You can convert the buffer into bytes then send it

opal plank
#

could i get an example?

#

the files work, its just the embed thats fucky

pale vessel
#

you have two files property?

opal plank
#

cuz image: doesnt have a set type for it

#

its only url or proxy

pale vessel
#

There should be only one and the one that's outside embed

opal plank
#

again, it should be in image

#

not in files

#

files is outside

#

i want it in the embed

pale vessel
#

that's how it works

opal plank
#

aight, gime one example

pale vessel
#

send({ files: [{ attachment, name }, ...], embed: { image: { url: "attachment://image.png" } } });

opal plank
#

image.png does not exist

#

again, doesnt exist

#

cuz its in a buffer

#

not local

pale vessel
#

it works bro

#

it doesn't need to be local

opal plank
#

aight, lets see

pale vessel
#

that's literally what I use

#

and I deal with buffers a lot

opal plank
#

wait wtf

#

does it not send normally

#

?

#

i would've assumed it sent into both the image payoad and the message one

lyric mountain
#

Like, all it needs is the image to be sent with the message

pale vessel
#

if you use it in embed then it wouldn't send it as attachment

lyric mountain
#

It doesn't matter where it came from

opal plank
#

oh shit

#

ty both

#

❤️

pale vessel
#

:GWomoGabSmile:

#

Gg

earnest phoenix
#

@heavy anchor do I make it in a new project or in my bot project?

sudden geyser
#

Make what?

earnest phoenix
#

A website for my bot

heavy anchor
#

Both will work

earnest phoenix
#

Okay who changed my name

mellow kelp
#

Depends on the size

sudden geyser
#

Both can work, but I recommend a new project

mellow kelp
#

Yea same

heavy anchor
#

Yes

mellow kelp
#

Keeps stuff organized

earnest phoenix
#

Okay in a new project

ionic dawn
#

Hi, how would I do something to get the words between certain charactrs?
Input: xheyxxhahax
Output: ['hey', 'haha']

lyric mountain
#

Regex

#

Well, replace would also work, up to you

ionic dawn
#

replace?

lyric mountain
#

.replace()

#

But you'd still need to separate it into an array

#

Regex will be smaller, but not necessarily faster

ionic dawn
#

I know what replace is but i dont see the way I can use it

lyric mountain
#

Replace duplicate delimiters, then split

umbral zealot
#

why not just split the string by x and remove all empty elements

#

¯_(ツ)_/¯

#

if you don't want to use regex

lyric mountain
#

That could also work

ionic dawn
#

What im traying to do is find emojis that hasnt work and bring some... example

User message:
Eating some burgers lol :burger1::burger2:

Return:
['burger1','burger2']

umbral zealot
lyric mountain
#

The replace idea was to minimize possible empty indexes

ember lodge
#
TypeError: Cannot read property 'roles' of undefined

I need help, it's from the event called "messageReactionAdd"

umbral zealot
#

Users don't have a member property.

#

that's... not a thing.

mellow kelp
#

User doesnt have a member

lyric mountain
earnest phoenix
#

Does anyone here

mellow kelp
#

Use guild.member(user)

ember lodge
#

it will be just user?

lyric mountain
#

:.+:

earnest phoenix
#

I need your help please now I have bot I finished it after 2 months work now I will make a website for it but the problem now how do I connect my bot to the website like in the website you can change the prefix and like every bot website please help me I really will appreciate if you can help me

ember lodge
#

ok thanks

earnest phoenix
#

TypeError: Cannot read property 'roles' of undefined

I need help, it's from the event called "messageReactionAdd"

lyric mountain
#

Not u, was showing the regex for void's issue

earnest phoenix
#

@lyric mountain how do you do this g

lyric mountain
#

You just did it

#

Wait

earnest phoenix
#

@lyric mountain no it's another thing

ember lodge
lyric mountain
#

Do you mean regex?

earnest phoenix
#

@lyric mountain yep

lyric mountain
#

Why do u need regex?

earnest phoenix
#

@lyric mountain to share my code topgg_codebase

lyric mountain
#

Dot dot dot

#

I'm not understanding

ember lodge
#
you mean this?
earnest phoenix
#

Yes @ember lodge

#

..hello..

ember lodge
#

use ```

earnest phoenix
#

hi

ember lodge
earnest phoenix
#

TypeError: Cannot read property 'roles' of undefined

earnest phoenix
#

hi hello no yes no heh

mellow kelp
#

Check a markdown cheatsheet

earnest phoenix
#

hello no essays island

#

@mellow kelp do you know how you do that hi

ember lodge
#

Search on google: "Discord markdown"

earnest phoenix
#
Memes aren't. Always dream s
#
Memes aren't always open source lol 😂
#

Guys how to Make an API call to the bot
Discord.js ??

cerulean ingot
#

im making a ticket bot what should i call it

lyric mountain
#

Boticket

earnest phoenix
#

@cerulean ingot Ticketo

lyric mountain
#

Ticketinator

#

Botum Ticketum

opal plank
#

Not Another Ticket Bot

lyric mountain
#

Ticket Yeeter

cerulean ingot
#

its mostly for practice since i dont know what else to do

cerulean ingot
opal plank
#

an instagram bot

#

like i suggested

cerulean ingot
#

nah

opal plank
#

why not?

#

unique

#

new

#

fresh

#

ez success

cerulean ingot
#

i want to make a discord bot

opal plank
#

why not link the 2?

#

my bot leviathan works on 3 different platforms at once

#

the SAME bot

cerulean ingot
#

really?

opal plank
#

twitch discord and youtube

cerulean ingot
#

what does it do though

opal plank
#

its meant for streamers

lyric mountain
#

Mine is discord-twitch only

opal plank
#

to cross-chat between different apps

#

also minigames

#

and all that, but they carry values on all platforms

#

!gamble 20

#

now your balance is 20 on discord, twitch and youtube

#

!redeem Kit

#

now your balance is 10 on all of them

cerulean ingot
#

wow

#

thats cool

lyric mountain
#

Mine has a card/drop spawn system, it drops both during my streams and on servers

opal plank
#

try doing stuff that wasnt done before

#

mine also has drop system

#

creates spawn for 20 seconds on stream/discord

lyric mountain
#

And some smaller commands like ping, 8ball, whatever for twitch side

opal plank
#

with limits per server

cerulean ingot
#

how many use it

#

how many peop;le

opal plank
#

rn?

lyric mountain
#

Twitch chat is way too limited for most of my cmds

opal plank
#

hmmm lets see

cerulean ingot
#

yes

opal plank
#

3 embeds coming

#

like i said, they are all into a single bot

cerulean ingot
#

55k streamers use it-

opal plank
#

its in 55k streams, correct

cerulean ingot
#

whats twitch slave

opal plank
#

currently 46k of those streams do

#

thats the main module on the twitch branch

cerulean ingot
#

thats a lot of streams

opal plank
#

the other one is a premium type of deal, nothing to worry about

#

i got my bot verified on twitch before i got it on discord

#

talk about ironic

cerulean ingot
#

wow

opal plank
#

specially because it started as a discord bot

cerulean ingot
#

people must love it

opal plank
#

theres some commands there nobody else has

#

!price for example

#

which fetches the price of a game

#

also the speed at which is sends some of the default commands is a lot faster

#

since im using caching

#

most bigger bots use fetching

cerulean ingot
#

i use fetching lol

#

i dont know how to use caching

opal plank
#

i remember sending this somewhere

#

I was just able to properly run some Latency Test on some twitch bots.

My bot won every single time in response time against Nightbot, Moobot and Streamlabs.
This is all due to my library cache which cuts down on API calls done on Twitch which massively reduces the latency in command response.

Just wanted to share the results of Caching vs Fetching

Moobot: [1006, 869, 1011, 769, 799, 789, 961]; mean:886ms
Nightbot: [950, 876, 1002, 1008, 788, 766, 789];mean:882ms
StreamLabsBot: [1131, 1004, 1102, 894, 751, 799, 978];mean:951ms
My bot => Leviathan: [681, 412, 512, 551, 671, 413, 409]; mean:521ms
cerulean ingot
#

damn

#

anyways i would make a twitch bot but i have no idea how

#

idk the first step to and idk where to learn

opal plank
#

dont

#

twitch isnt easy nor begginer friendly

#

its some of the messiest API's i've dealt with

#

you're in for a headache with twitch

lyric mountain
#

And the chat is heavily limited

opal plank
#

theres nos caling

#

scaling*

lyric mountain
#

Actually, all u can do is read-write in the chat

#

No editing

#

Or deleting

opal plank
#

all the libs availably for js (tmi and tjs) are not good for scaling

cerulean ingot
#

i use python

opal plank
#

you want a bot for 10 ish streams?

#

fine

#

go past that and you'll encounter issues

#

by the bucket

cerulean ingot
#

yeah

opal plank
#

ratelimits being funky

cerulean ingot
#

but insta

#

idk

opal plank
#

startup issues with ratelimiting with their IRC

#

its just a whole ass mess

cerulean ingot
#

never used an insta bot

opal plank
#

not even going to mention their docs which are absolutely garbage

cerulean ingot
#

no idea what it does

#

lol

opal plank
#

i dont even think there ARE any instagram bots

#

apart from the ones that auto-like shit

cerulean ingot
#

yeah

opal plank
#

i doubt theres a discord bot -like instagram bot

cerulean ingot
#

ive seen that

opal plank
#

which replies to commands and all that garb

#

which is why im telling you

#

try it

#

do something new

#

something that wasnt done before

#

doing the same stuff that has been done and perfected before is dumb

#

dont try to reinvent the wheel

#

go in an area nobody is in

cerulean ingot
#

thanks for the advice

opal plank
#

np

#

i started with the genshin bots before they started being a thing

#

now its getting flooded with bots, but i started/hoped onto the train before it was trending

#

so now im atop of it

#

i'd disencourage doing another genshin bot, specially cuz me and the other 2 big bots are quite complete already and hard to compete with

lyric mountain
#

I hope I'm the first in my train too

#

Unfortunately it's limited by language

cerulean ingot
#

whats ur bot

opal plank
#

Klee Paimon and GenshinUtils are the biggest ones so far (excluding the wikis)

#

mines is GenshinUtils, which is an actual genshin bot

#

the others are just discord bots themed with genshin

cerulean ingot
#

whats Genshin

opal plank
#

your average Joe discord bot with leveling system but they call money primogems and they call it a Genshin Bot, its quite sad imo

lyric mountain
#

Shiro, she's a multi-purpose bot with card collecting, but what's the real train is her TCG

opal plank
#

Genshin Impact is a game

#

Penny is a bot for a friend of mine, check that

#

you'll likely see your biggest competitor

#

PennyTs

lyric mountain
#

For tcg?

opal plank
#

yup

#

and multipurpose too

#

800 ish guilds rn iirc

lyric mountain
#

But like, not tcg info commands, but an actual game

opal plank
#

correct

lyric mountain
#

Lul

opal plank
#

wiggy has their own cards generated

#

im doing something similar but its going to take a day or two to be released

#

i cant talk about it till then

#

i've started seeing a lot of people copying some of my commands

lyric mountain
#

Yeah I guess

#

I also got into the habit of only talking about my stuff after it's complete and implemented

opal plank
#

same

#

though in this case its quite a big thing

#

so i doubt there'll be anything soon

#

hmmm in fairness someone could hard code these and make a make-shift one is maybe 3 or 4 days

#

though good luck updating the code on every new genshin update

lyric mountain
#

My current code roadblock is i18n

raven urchin
lyric mountain
#

Like, I started the localization project but man

#

Think about a flood of strings

opal plank
#

i can imagine

#

mine could have localization but fuck that

lyric mountain
#

And after collecting all the strings I still need to find people to help translating

opal plank
#

im working more on the performance and efficiency of each command rather than keep adding a shitton of useless commands like the rest of the bots

#

so my command list is on the lower end

#

kinda like Tim

#

noy many commands but each command is well done

#

and complex

lyric mountain
#

Mine has a lot of commands, but most are linked to some major module

#

Like, the card collecting module has about 10 cmds

opal plank
#

been there, not going again

#

remember what i said about leviathan?

lyric mountain
#

Pixel canvas has about 5

opal plank
#

well, heres the thing right

#

leviathan on discord has around 80 commands

#

then theres about 50 on twitch

#

and 60 on youtube

lyric mountain
#

Lul

opal plank
#

yeah, not fun

#

im tuning it down now and focusing on each command to be good and well crafted

lyric mountain
#

I'm planning to rewrite my bot's source code once the menu update kicks in

ember lodge
#

how do i react to a message by the id?

opal plank
#

<channel>.messages.fetch(id).then(m => m.react(reaction))

#

or see if you have the message cached

#

if you do, even better

ember lodge
#

ok, thanks

opal plank
#

np

#

anyway, yeah, im going for low command count now

#

users cant handle that many commands from the back of their heads

ember lodge
#

i tried

 const channel = message.channel
let a = channel.fetchMessage("793982002889621504")

a.react(":island:")

but it says that a.react is not a function

lyric mountain
#

Oh my

opal plank
#

i told you above

ember lodge
#

I'll see

lyric mountain
#

Actually, stopping to think, it's better if I leave the i18n for the code rewrite

#

I'll change a bunch of stuff anyway, current code has tons of inefficient sections from when I started deving

crimson vapor
#

Erwin did you read PoggersDB?

opal plank
#

i have not

#

my chick is calling me rn, cant watch it

crimson vapor
#

nah im not showing you PoggersDB

#

I like living

distant copper
#

Que errores tengo aca?

#

What error in imagen?

sudden geyser
#

You tell us. What error are you receiving? What is supposed to happen, and what is happening instead?

distant copper
#

Wait

#

Espera

#

Este

#

Here

#

Hay

drifting wedge
#

how do i get the data from a <input> with a type=file and accept=image/*

umbral zealot
# distant copper

Are you maybe redefining the variable resolve somewhere? Because require.resolve is definitely a thing that exists, and it's a function.

sudden geyser
# distant copper

It looks correct. Try logging require beforehand. It should show the function and object attached to it.

umbral zealot
#

Unless you're using an archaically old version of node

sudden geyser
#

Like, 0.3 old

distant copper
#

Ok