#development

1 messages ยท Page 958 of 1

limber flume
#

bruh

lyric mountain
#

he'll not answer anytime soon

earnest phoenix
#

i dont see any error

wet iron
#

msg.member.addRole is not a function

#

fricc

#

and the arrow is pointing to the .addRole

modest maple
#

@lyric mountain It litterally just chunks a list into 250 item sections and generates and calls them in the chunks

limber flume
#

bruh

#

the procces commands

lyric mountain
#

ah

modest maple
#

just for efficient mass message

summer torrent
#

what is your djs version @wet iron

limber flume
#

watch the video ong

wet iron
#

what is your djs version @wet iron
@summer torrent V12

limber flume
#

i never made it for no reason

lyric mountain
#

I know little about python, only the basics

summer torrent
#

that is msg.member.roles.add

wet iron
#

ok

#

lemme try

lyric mountain
#

I use it mostly for task automation

modest maple
#

@lyric mountain Still know more than him

earnest phoenix
#

i8 did

#

i watched video

#

but

#

i fixed everything

lyric mountain
#

"a video"

limber flume
#

no

#

omg

modest maple
#

you clearly fucking didnt

#

You think python just making shit up?

limber flume
#

check the video one more time

modest maple
#

IF YOU LEARNT THE BASICS WE WOULDNT BE HERE

limber flume
#

ffs

wet iron
#

It works

limber flume
#

gg

wet iron
#

thanks

lyric mountain
#

you do know that it takes months (weeks for some) to learn a language, right?

stable grail
#

i prefer bot instead of client xd

limber flume
#

same

#

!

lyric mountain
#

"a video" will not teach u python from night to day

limber flume
#

i could make mine sean buts that effort

wet iron
#

you do know that it takes months (weeks for some) to learn a language, right?
@lyric mountain I still didn't master python after 3 years

#

so yea

#

i can approve

modest maple
#

same why people call a fucking bot instance client i will never know

#

saying that so many people doing do good var names

stable grail
#

i need more than 100 videos to learn python just start with the basics

#

you*

#

sry

lyric mountain
#

not to say that every single day a language is updated

wet iron
#

same why people call a fucking bot instance client i will never know
@modest maple I call it client

#

Im a wierdo

#

xD

modest maple
#

i was refering to python tbh

copper cradle
modest maple
#

d.js calls it client does it not?

copper cradle
#

go and learn what indentation is and how python works

stable grail
#

u can use ctx

copper cradle
#

before you give us a headache

stable grail
#

ctx.send("test")

modest maple
#

only in commands

stable grail
#

await ctx.send

#

sry

copper cradle
#

making a discord bot isn't the best project to start with

lyric mountain
modest maple
#

What hes dont is smash some badly copied YT tutorials

limber flume
#

sean = commands.Bot(command_prefix="w/", case_insensitive=True)

#

lol

modest maple
earnest phoenix
#
                  .addField(":diamant: `-` **Roles**", `[${target.roles.cache.filter(r => r.id !== message.guild.id).map(roles => `\`${roles.name}\``).length}]`,`${target.roles.cache.filter(r => r.id !== message.guild.id).map(roles => `<@&${roles.id }>`).join(" **|** ") || "No Roles"}`, true)

(node:2337) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'cache' of undefined

lyric mountain
#

language?

limber flume
#

bruH

modest maple
#

its js

earnest phoenix
#

discord.js

lyric mountain
#

d.js 11 or 12?

earnest phoenix
#

v12

stable grail
#

i have a question, i looked up the logs and i bot got denied because of anti swear feature, should i remove mine too?

#

a

#

A BOT

#

omg so many typos

limber flume
#

yes

lyric mountain
sudden geyser
#

same why people call a fucking bot instance client i will never know
why do people do const Discord = require("discord.js") when Discord is not a class. KoishiThonk

stable grail
#

my brain is messing with me while typing xd

pale vessel
#

probably muted not denied

limber flume
#

bruH

#

LOL

#

yeah muted

modest maple
#

@stable grail i dont think it would get declined for ati swear

limber flume
#

even error messages can be muted

stable grail
#

i read that

limber flume
#

i had to remove mine

quartz kindle
#

@stable grail any kind of automated feature that is on by default is frawned upon. you can have an anti-swear feature as long as its opt-in instead

limber flume
#

on_command_error

stable grail
#

it said declined for anti swear

knotty steeple
#

@sudden geyser it is?

limber flume
#

make it so u can filter it

sudden geyser
#

it is what

limber flume
#

on and off

stable grail
#

im pretty scared rn

pale vessel
#

it is a class

lyric mountain
#

bot id?

limber flume
#

im pretty scared rn
@stable grail filter anti swear

stable grail
#

looks like im gonna remove it xd

knotty steeple
#

make it opt in

proven lantern
#

is there a list of common issues somewhere that cause a bot to be rejected?

sudden geyser
limber flume
#

yes

stable grail
#

make it opt in
@knotty steeple im trying xd

limber flume
#

dot make it filtered

#

so u can turn it off and on

proven lantern
#

@sudden geyser thanks

stable grail
#

yeah thats what i meant :d

limber flume
#

then that way u can keep the anti swear

#

just make sure its off

stable grail
#

ok

#

ty

limber flume
#

np

analog sinew
#

anypone wanna cehckt out my bot?

modest maple
#

no

limber flume
#

bruh

modest maple
#

its not approved

limber flume
#

self advertising

modest maple
#

so no one can see it

#

nice try tho

#

lmao

limber flume
#

lol

#

dum stoopid or dum huh

stable grail
#

๐Ÿคฃ

limber flume
#

haahaha lul

stable grail
#

pycharm takes a while to start bcs of those codes xd

limber flume
#

pycharm = ew

#

vscode = drake yes

stable grail
#

i prefer pycharm

analog sinew
#

surry

limber flume
#

lol

proven lantern
#

my bot will send the host a message when a person joins their lobby. does this break the automatic message rule?

analog sinew
#

I never made bot

#

so just wanna show it

stable grail
#

i can also use atom

knotty steeple
limber flume
#

my bot will send the host a message when a person joins their lobby. does this break the automatic message rule?
@proven lantern if the prefix is not used yes

misty sigil
#

so, say, i wanted to get the battery percentage and charging status of my discord bot host

sudden geyser
#

Sammy I like the second one

misty sigil
#

how would i do that?

knotty steeple
#

what language

misty sigil
#

js

limber flume
#

battery?!

analog sinew
#

@proven lantern What type of bot is this? A competitive queue bot?

#

like the elo bot?

limber flume
#

lol

knotty steeple
#

check if os module has a way to get that

proven lantern
#

it's a general purpose matchmaking

limber flume
#

fortnite?

#

loL lul

analog sinew
#

@proven lantern HEY, I needed a matchmaking bot, can you send me invite to your server?

#

in dms

limber flume
#

whats matchmaking bot

#

ive never heard of it

mossy vine
#

it

#

makes a match

limber flume
#

dating?

stable grail
#

sounds like fighting other bots

analog sinew
#

@limber flume Its a bot like, if you do /join it will make you join a queue, if enough players, it will give you a private server's link or code then you join it and play it, or a host can host the match in their own server. ๐Ÿ˜„

#

there are multiple commands also.

#

like /leave

limber flume
#

game, what kind of game

stable grail
#

playing what?

analog sinew
#

csgo

#

dota 2

limber flume
#

krrunker?

analog sinew
#

valorant

#

yeah

#

krunker

stable grail
#

how should that work?

#

who hosts?

turbid bough
#

That should be fine to add as you tell it in your project description

#

and the help command

limber flume
#

gimme a link to a matchmaking bot

#

plez

#

lol

proven lantern
#

i will make a little demo video

mossy vine
#

krunker has a ranked queue and also competitive servers with their own matchmaking lul

analog sinew
#

@limber flume I think there are none, that automatically makes a private server for you.

limber flume
#

oh theres none?

proven lantern
#

i'll send an oauth link if you want in invite it

mossy vine
#

bots can only create servers if they are in less than 10

analog sinew
#

@limber flume well, there is a ELO BOT

limber flume
#

nah i wanna join public

mossy vine
#

so thats not a good one

turbid bough
#

why would you create a private server?

limber flume
#

i will inv hiim

analog sinew
#

its a matchmaking but doesnt makes private server for it

mossy vine
#

bots can only create servers if they are in less than 10
@mossy vine

stable grail
#

then its pretty useless to me xd

limber flume
#

xd

turbid bough
#

if a bot creates the private server, that would mean the bot would own it, not you

analog sinew
#

@turbid bough you wanna play in a public lobby? when you queue up with 10 other peoples?

turbid bough
#

can't you just make it channel based?

analog sinew
#

@turbid bough Why channel based?

turbid bough
#

i dont play valorant

analog sinew
#

I think its more efficient way of doing it.

#

If the bot can create a private server, then NOISEEE-SAAA

turbid bough
#

bots can only create servers if they are in less than 10

analog sinew
#

@turbid bough what do you mean?

#

@proven lantern yes please send it

turbid bough
#

@mossy vine would that mean if a bot is in 11 servers, they cant create servers?

quartz kindle
#

well you can have several bot applications to handle that

#

1 public bot that people invite

#

and a few private bots that create servers then destroy them as needed

analog sinew
#

@turbid bough what serversyou mean here.

turbid bough
#

discord guilds

analog sinew
#

no no

#

@turbid bough bruh, I was talking about game servers.

turbid bough
#

oh

analog sinew
#

like faceit, SoStronk, ESEA

#

Can a discord bot be like faceit?

turbid bough
#

/join create a private game server in valorant you mean?

proven lantern
analog sinew
#

@turbid bough I mentioned Valorant as its a 5v5 competitive game

turbid bough
#

pls remove the pings when using commands lol

#

just add author to embed instead

analog sinew
#

@proven lantern Does a host makes the private game server? or it automatically makes one?

proven lantern
#

right now the channel is made in my guild, but thinking about changing it so the host's guild makes the channel

analog sinew
#

@mossy vine when you said has their own competitive server with their own matchmaking, you mean discord matchmaking or ingame matchmaking?

proven lantern
#

it would require more permission for the bot though

analog sinew
#

@proven lantern Give me the guild please.

#

I mean send discord

mossy vine
#

both

analog sinew
#

@turbid bough Would it be possible to make private game server via discord bot?

turbid bough
#

idk

mossy vine
#

of course

#

but would you want to do it

stable grail
#

im playing games have a nice day guys/girls! :d

mossy vine
#

the question here is not the "can you" but the "should you"

turbid bough
#

you mean game severs as in valorant servers, or discord guilds?

analog sinew
#

@mossy vine of course for a matchmaking bot.

turbid bough
#

im confused

analog sinew
#

@turbid bough csgo private servers

turbid bough
#

ok now csgo?

mossy vine
#

yeah ok lets take csgo private servers as an example

analog sinew
#

I used valorant as a example.

#

Now lets take csgo private server as an example

stable grail
#

u could host a community server with ur bot connected

mossy vine
#

you can containerize a csgo server and spin it up once you find a match, set password, distribute it, etc etc

stable grail
#

so ur bot says the stats so on

#

im talking about csgo :d

mossy vine
#

but for best user experience, these servers should be fast and close to the users

#

so now you need to pay for servers in different places

#

route to those places with your bot

#

etc etc etc

#

and it can get very costly

stable grail
#

but u can make them buy ranks like moderator

analog sinew
#

nvm

#

sorry

mossy vine
#

at that point just distribute the steam profile links, make em add each other and host some game

analog sinew
#

A very dumb and stupid question, Im a roblox game developer, can discord connect with roblox, and make private servers.

stable grail
#

not sure

mossy vine
#

you can probably make it happen with place routing or something

analog sinew
#

@mossy vine In roblox, it requires robux to buy private server, but Im talking about own private server, I can script it and a private server for my game, but how can I connect discord into roblox?

#

lets say

#

10 people in lobby

#

then 2 captain picks player

#

then the bot automatically sends the player a code, that a player can join my game, click on server, then put the private code and join them and the team they chose, the map the elected.

mossy vine
#

i have no idea about roblox stuff

analog sinew
#

roblox uses .Lua

mossy vine
#

not what i meant

#

but how it handles routing between servers

analog sinew
#

roblox has this local http = game:GetService("HttpService")

#

It is mostly used in webhooks in discord

#

@mossy vine

amber fractal
#

Well discord actively blocks roblox

#

because too many 10 year olds were spamming webhooks with logs

mossy vine
#

lololol

analog sinew
#

@amber fractal AHEM... I had made a report system that goes to roblox to discord

#

But is it possible to discord to roblox?

amber fractal
#

I doubt roblox would allow you to accept incoming requests.

analog sinew
#

Why not?

amber fractal
#

Because that could cause security issues

analog sinew
#

Well, Just found out, it is posible to do discord to roblox

amber fractal
#

I mean it might still work

analog sinew
#

What are you trying to say, exactly? @amber fractal

amber fractal
#

It's probably old

analog sinew
#

also another thing

#

can you make a csgo trading bot in discord?

amber fractal
#

Oh lmao it uses google sheets

topaz fjord
#

I'm pretty sure you can

amber fractal
#

and periodically checks the sheet for new bans

analog sinew
#

๐Ÿ˜—

#

whatever

amber fractal
#

It also uses d.jsv11

#

which wont work come October, someone may migrate it

#

wouldn't be surprised

rigid maple
#

Does anyone know HTML?

analog sinew
#

can you make a csgo trading bot in discord?
@amber fractal

amber fractal
#

idk I dont play csgo

#

idk how their trading stuff works

rigid maple
#

I encode BotList but when I send the application it says fill in the required fields

#

(ฤฑ'm use translate),

quartz kindle
#

i can see that lol

#

some field is missing

rigid maple
#

:D?

topaz fjord
#

making a csgo trading bot is possible but not without researching an API which can

quartz kindle
#

show picture

rigid maple
#

how will i solve

topaz fjord
#

ik the steam api can but it'll be hell to link accounts and process trading

quartz kindle
#

@rigid maple show picture / image / screenshot

rigid maple
#

ss me?

analog sinew
#

@amber fractal you trade with steam app

wet iron
#
      throw er; // Unhandled 'error' event
      ^

Error: listen EADDRINUSE: address already in use :::3000```
#

I get this error

#

when I try to run my bot from glitch

proven lantern
#

something is already running on port 3000

wet iron
#

fricc

#

ik that

proven lantern
#

change the port or find the process running on port 3000 and close it

quartz kindle
#

glitch only allows using port 3000 afaik

wet iron
#

well how do I fix that

quartz kindle
#

you dont run multiple servers on the same port

wet iron
#

okay

quartz kindle
#

check all the lines where you use port 3000 or process.env.PORT

wet iron
#

Im fricking new to glitch

#

I removed all projects

#

that were a fail

#

and nothing

#

still nothing

quartz kindle
#

the problem is not your projects, its your code

#

look in your code where you use port 3000 or process.env.PORT

earnest phoenix
#
                   .addField(":diamant: `-` **Roles**", `[${target.roles.cache.filter(r => r.id !== message.guild.id).map(roles => `\`${roles.name}\``).length}]`,`${target.roles.cache.filter(r => r.id !== message.guild.id).map(roles => `<@&${roles.id }>`).join(" **|** ") || "No Roles"}`, true)
 

(node:2337) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'cache' of undefined

wet iron
#

msg.guild.createChannel is not a function anyone help?

proven lantern
#

@wet iron what version of discord.js are you using?

wet iron
#

V12

nocturne dagger
#

So I am having a issue

proven lantern
#

msg.guild.channels.create()

#

i think

nocturne dagger
#

with a command it works if I type it twice

wet iron
#

okay

nocturne dagger
#

but not on the first time

#

non of the other commands do it

#

discord.js

summer torrent
wet iron
#

I fixed it

#

thanks anyways

proven lantern
smoky spire
#

CategoryChannel is just the first type that createChannel can return but there's more

proven lantern
#

and guild.channels.get(channelId); returns a CategoryChannel

#

you do a get on a collection of items and get a different type than what's in the collection?

smoky spire
#

The | means there's more than one type

proven lantern
#

not the best design

quartz kindle
#

because discord.js is not a full typescript library

#

their typings are not perfect

smoky spire
#

discord.js-next smirk

proven lantern
#

i ran into this issue yesterday.

quartz kindle
#

also if you're using discord.js v11 you should switch to v12

earnest phoenix
#

why

smoky spire
#

v11 won't work come october

earnest phoenix
#

why

smoky spire
#

intents

earnest phoenix
#

what

proven lantern
#

i'm using firebase which is limited to version 10 of node.js right now

#

tomorrow they deprecate version 8 and move to version 10

#

maybe version 12 will go into beta then

smoky spire
#

Discord will start requiring gateway intents in october and v11 won't receive an update for it @earnest phoenix

earnest phoenix
#

@smoky spire oh, okey thx for info.

copper cradle
#

why would they update v11

smoky spire
#

They aren't

earnest phoenix
#

hello

#

can anyon help

#

?

copper cradle
#

that's what I said

#

Why would they even update v11, it's an older version, that no one should be using

proven lantern
#

@copper cradle backwards compatibility

copper cradle
#

besides from that

proven lantern
#

lol

#

@smoky spire where can a learn more about these gateway intents?

quartz kindle
proven lantern
#

@quartz kindle thanks

quartz kindle
#

and this for discord.js v12

proven lantern
#

will these gateway intents allow us to setup message listener without a socket connection?

quartz kindle
#

no

proven lantern
#

dang

quartz kindle
#

they allow you to selectively subscribe to packet types

#

instead of being forced to process everything discord sends you

proven lantern
#

gotcha

summer torrent
#

is there any way to detect clicking browser tab

quartz kindle
#

@stable grail i believe you can do -bots mention in #commands and it will show you

stable grail
#

i mean ur bot

quartz kindle
#

yes

#

you mention someone and it will show you the bots they own

stable grail
#

ah thx

proven lantern
#

wouldn't it be better to have us define a set of endpoint that can be invoked when the bot receives messages. then no socket is needed

quartz kindle
#

socket will always be needed

#

its the only way to reliably receive potentially hundreds of messages per second

#

when your bot gets on more servers

proven lantern
#

APIs can receive lots of messages pretty reliably

quartz kindle
#

i mean for you to receive them

#

the only alternative would be webhooks

proven lantern
#

yeah

quartz kindle
#

but that would be a huge overhead to establish a new connection on every single message

proven lantern
#

i think http/2 reuses connections. maybe even http/1

quartz kindle
#

partially yes but not in the same way websocket does

#

because http is self-contained and stateless

proven lantern
#

the webhook could also receive a batch of messages every x seconds instead each message individually

quartz kindle
#

theoretically

#

but that would hurt latency and response times

proven lantern
#

that's true. discord could charge for a higher frequency polling

#

i just want to be able to use cheap hosting

quartz kindle
#

polling would be an extra strain on their servers

#

you can still use cheap hosting

#

i mean, i pay 3$ a month

proven lantern
#

i mean free

quartz kindle
#

well, if you want free, then you have to settle for glitch/heroku/free trial

proven lantern
#

i'm just running it from a machine i keep online

quartz kindle
#

the problem is not the websocket anyway

cinder patio
#

websockets aren't that expensive

quartz kindle
#

90% of a bot's resource usage comes from processing discord presence updates

cinder patio
#

typing start update ๐Ÿ˜ณ

copper cradle
#

@cinder patio dude what

quartz kindle
#

and with intents, you can selectively subscribe to the events you want, and get rid of presences altogether

cinder patio
#

as in RAM not money

copper cradle
#

ah yes

proven lantern
#

sockets dont work with lambda type hosting where the server shuts down when it's not receiving traffic

quartz kindle
#

just do what everyone who uses glitch does

#

set up a periodic http request to ping it and keep it alive

proven lantern
#

lol

copper cradle
#

lmao

proven lantern
#

i want the server to shut down so i save money

#

i only get 28 hours a day and i host a few other websites

cinder patio
#

Can't you buy a cheap vps to host the bot on?

earnest phoenix
#

who here uses discord.js 11.5.1

copper cradle
#

@cinder patio cheap is relative to your currency

cinder patio
#

that's true

quartz kindle
#

@proven lantern are you using app engine or compute engine?

proven lantern
#

i was using app engine for project before, but i switched to firebase

quartz kindle
#

you can host your bot in compute engine instead

proven lantern
#

yeah, but that would use my instance hours

quartz kindle
#

you're not in the free trial anymore?

oblique steeple
#

can anyone give me ideas for a discord bot

proven lantern
#

i've been using google hosting for around 3 years now

quartz kindle
#

ah

proven lantern
#

but still haven't paid for anything yet

#

never gone over the free quota

quartz kindle
#

i only used them for a year, during my free trial, then i moved out

mystic violet
#

Im using Nginx, I was wondering how I would have 2 different websites (hosted with express and node.js) on two different domains
on the same server ip

quartz kindle
#

because compute engine is much more expensive than the competition once you go non-free

proven lantern
#

but you still get the 28 hours free instance time each day before you start paying

digital ibex
#

hi, i have to models for a member, one for my dashboard and one for the bot itself, im trying to use the same model and database collection, when i use two different ones, everything works the way i want it to, when i use one, it doesn't load, and when it eventually does, i get an error InternalOAuthError: Failed to fetch user's guild, using passport-discord and passport. if anyone can help it would be great :)

quartz kindle
#

@proven lantern yes but the f1-micro compute engine instance that you get in the free plan only has 20% cpu capacity and 600mb ram

#

once your bot grows, it will need much more than that

#

besides being limited to 1gb/month bandwidth which is extremely low

proven lantern
#

the blaze plan just needs a credit card, but is still free unless you go over the quota

quartz kindle
#

i was regularly going over the bandwidth quota

#

and anyway i wanted more cpu and ram

proven lantern
#

just rewrite everything in go and make it super optimized

#

jk

quartz kindle
#

already hyper optimized discord.js

#

even made a framework for it

#

using 120mb ram at 3700 guilds lol

proven lantern
#

not bad

quartz kindle
#

another thing is that google's disks are very slow

#

they scale down their disk speeds depending on disk size

digital ibex
#

nice

proven lantern
#

the good thing about go is that it compiles to a binary so when it's scaling out it just needs to load the binary and not load an interpreter

#

they are slow and cheap

#

just like a disk should be

quartz kindle
#

i rather pay 3$ a month to get full ssd speed, unlimited bandwidth and a dedicated cpu core

proven lantern
#

not a bad deal

quartz kindle
#

yeah, vps has become so cheap that is well worth paying for

proven lantern
#

unlimited is always a trick though

quartz kindle
#

and this coming from a person who pirated his entire life

#

and never bought a single game/movie

#

lmao

proven lantern
#

not as bad as real pirates

fiery stream
#

hey

#

can anyone tell me how do you import a ts file in ts

#
import "bot.ts" from "./CordDex"
``` im getting error for second one
quartz kindle
#

should be the opposite

fiery stream
#

./Cordex is the folder btw

quartz kindle
#

ah

fiery stream
#

yea

quartz kindle
#

i think you need an index.ts file

fiery stream
#

ah

#

so i cant name it bot.ts

quartz kindle
#

from stackoverflow:

fiery stream
#

oh thx

#

actually tim

#

you were kinda wrong

digital ibex
#

is typescript just es6 js and when defining things, u define the type?

proven lantern
#

basically

digital ibex
#

my question is

summer torrent
#

typescript is superset of javascript

proven lantern
#

super duper set

quartz kindle
#

typescript is a super duper annoyance

digital ibex
#

why would people use ts instead of js is more efficient and faster than ts and ts shouts at u?

#

i tried ts for liek

#

a week

#

didn't like it

quartz kindle
#

because ts makes your code look nice in code editors

#

and prevents teams from making mistakes

proven lantern
#

more intellisense

digital ibex
#

oh

#

im having a little crisis with javascript breaking with large arrays lol

#

does ts also break with large arrays?

quartz kindle
#

ts compiles to js

digital ibex
#

oh

fiery stream
#

its kinda weird to use tho

quartz kindle
#

ye

#

i dont use ts

fiery stream
#

i am already hating it

digital ibex
#

what is a good way for me to counteract it from breaking?

fiery stream
#

and im hating deno too

quartz kindle
#

why are you using deno lmao

fiery stream
#
error: Access is denied. (os error 5)``` this is the most stupid i have ever got
earnest phoenix
#

So I'm trying to detect if the user has the server booster badge for my userinfo command, and I'm checking if the user has boosted the current, the current guild or one of the guild that my bot is on...
But is there any other way to check than these 2?

digital ibex
#

i don't think d.js has a way to detect badges

earnest phoenix
#

What

#

It has

#

My bot is crazy

digital ibex
#

oh ๐Ÿ—ฟ

#

calm it down then

earnest phoenix
#

I do โ‚ฌping

midnight blaze
#

scuusy

earnest phoenix
#

My bot: Pong!

midnight blaze
#

good

#

๐Ÿ“

quartz kindle
#

@earnest phoenix you can check if member.premiumSince exists

earnest phoenix
#

After...
โ‚ฌping
Pong!
Pong!
Pong!

#

I can't stop it

tight plinth
#

Send your ping command code

midnight blaze
#

how bout you post your command in here'

earnest phoenix
#

Wait

#

@quartz kindle I'm... Already doing that?

#

Reread my message

quartz kindle
#

then what else do you want?

earnest phoenix
midnight blaze
#

oof

quartz kindle
#

omg

midnight blaze
#

ghostBOTTTTTTTTTTt

earnest phoenix
#

?

#

Is there any other way of detecting the server booster badge other than that 2 i said @quartz kindle

quartz kindle
#

not afaik, the badge is server specific

earnest phoenix
#

It continues to spam

quartz kindle
#

@earnest phoenix i dont know how that app works, but you have to disable responding to bots somewhere in its settings

earnest phoenix
#

@earnest phoenix i dont know how that app works, but you have to disable responding to bots somewhere in its settings
@quartz kindle i tried EVERYTHING

#

And this with other commands

quartz kindle
#

have you tried uninstalling that app and actually coding your bot yourself? :^)

midnight blaze
#

that app is way too complicated for me, I would help, but I am only using discord.js :/

summer torrent
#

or learning prog. language

quartz kindle
#

whats that app called again?

#

bot designer?

earnest phoenix
#

have you tried uninstalling that app and actually coding your bot yourself? :^)
@quartz kindle i am scared to lose my data

midnight blaze
#

isnt that ghostbot?

earnest phoenix
#

bot designer?
@quartz kindle yeah

fiery stream
#

import "bot.ts" as bot from "./CordDex"; guys is something wrong with this code

earnest phoenix
#

isnt that ghostbot?
@midnight blaze the name of my bot is The Gamers Bot

misty sigil
#

isnt it meant to be js?

fiery stream
#

its ts

earnest phoenix
#

But the bot is ALL IN ITALIAN

misty sigil
#

ok no idea

quartz kindle
#

you didnt try that stackoverflow answer i sent you?

digital ibex
#

@misty sigil big fan

earnest phoenix
#

you didnt try that stackoverflow answer i sent you?
@quartz kindle huh?

midnight blaze
#

@earnest phoenix make your own bots, dont use those apps PepeCri

fiery stream
#

it didnt work that way

earnest phoenix
#

@earnest phoenix make your own bots, dont use those apps :PepeCri:
@midnight blaze and which app i can use?

misty sigil
#

visual studio code

earnest phoenix
#

Just make your own

#

I have the token of the bot

quartz kindle
#

@earnest phoenix ask in their support server

earnest phoenix
#

visual studio code
@misty sigil is for PC or Mobile?

misty sigil
#

PC

earnest phoenix
#

Ok no

digital ibex
#

u can use glitch

misty sigil
#

if you are on mobile there is very low chance of making bot

earnest phoenix
#

I don't have a computer

#

If you want for mobile you can use Termux nano or a code editor

digital ibex
#

i believe they have a text editor

earnest phoenix
#

As these guys know i made my bot on mobile

digital ibex
#

or gitlabs "ide"

midnight blaze
#

termux -> go hardcore

#

xD

earnest phoenix
#

If you want for mobile you can use Termux nano or a code editor
@earnest phoenix gimme the link

#

@earnest phoenix for which?

midnight blaze
#

you can create a bot with termux and nano

#

but it is hard af

earnest phoenix
#

I want the link

#

Use a code editor and host it with Termux

quartz kindle
#

@fiery stream from what i know about js, you cant import a file from a folder, you have to import all files in an index file, then import a function from the index file. when you import from a folder, it tries looking for an index file in that folder, if it doesnt find one it quits looking. Never heard ts doing anything different from that, but i dont use ts so...

earnest phoenix
#

I want to make my own bot

#

COMPLETELY italian

#

@earnest phoenix both are available in Google play store

#

@earnest phoenix both are available in Google play store
@earnest phoenix ok

midnight blaze
#

programming languages dont have a speaking language ๐Ÿ‘€

#

hmm

earnest phoenix
#

But you can speak a programming language

midnight blaze
#

xD

#

true

earnest phoenix
#

OH MY GOD SO MUCH PING

#

MY BOT IS GONNA DIE

#

rip bot

proven lantern
#

that is not a good ping to pong ratio

earnest phoenix
#

Lol

#

lmao xddddddd

quartz kindle
#

lmao

#

cant you just shut it off?

earnest phoenix
#

1306 wtf

#

Perfect.

#

Now i want to die

#

The ping is getting higher

#

"Koya lick"

royal portal
#

anyone know how to check discord.js version? i forgot

earnest phoenix
#

cant you just shut it off?
@quartz kindle i tried

#

@royal portal npm ls discord.js

#

require('discord.js').version

royal portal
#

thank you

earnest phoenix
#

But nothing changed.

merry shuttle
#

Why is website down

earnest phoenix
#

?

merry shuttle
#

The website is down

digital ibex
#

code it urself instead of using a shit app mmLol

earnest phoenix
#

@earnest phoenix that ping is gonna hit a number higher than an actual ID

quartz kindle
#

impossible

earnest phoenix
#

Thanks bot. Thanks.

quartz kindle
#

IDs are higher than the max integer js supports

digital ibex
#

is that ur site @merry shuttle ?

merry shuttle
#

Nop

digital ibex
#

oh then

earnest phoenix
#

Now i need to reset the bot

merry shuttle
#

lmao

#

rude

digital ibex
earnest phoenix
#

@quartz kindle yea ik... Just joking

#

Wait i have an IDEA!

#

@earnest phoenix if you coded a bot yourself that wouldn't have happened

#

@earnest phoenix if you coded a bot yourself that wouldn't have happened
@earnest phoenix i used the templates for the commands

quartz kindle
#

@earnest phoenix you can probably get better help in that app's support server. Here we help with programming questions, not with apps that do it for you

earnest phoenix
#

@earnest phoenix you can probably get better help in that app's support server. Here we help with programming questions, not with apps that do it for you
@quartz kindle wait let me translate

quartz kindle
#

if you google bot designer, you will find their website, which has a link to their discord server

earnest phoenix
#

Can you give me a link for a bot designer?

#

Hello?

#

You are alive?

quartz kindle
merry shuttle
#
        Config.findOne({
            guildID: id
        }, (err, guild) => {
            if(err) console.log(err)

            if(!guild) {
                const newConfig = new Config({
                    guildID: id,
                    prefix: config.prefix
                })
                return newConfig.save();
            }
        })
    })

});``` Is this api abuse on client.ready?
fiery stream
#

ayy anybody got idea how to set author in embed in py

earnest phoenix
#

can anyone help me

#

with python bot

#

What does this mean?

strong tundra
#

guys how would i scale to multiple servers

jagged gulch
#

@merry shuttle what exactly are u tryna do?

strong tundra
#

if i theoretically get multiple hundreds of thousands of people

fiery stream
#

@earnest phoenix your token is incorrect

earnest phoenix
#

?

#

what do you mean

#

my token is incorrect

fiery stream
#

do you know waht token is?

merry shuttle
#

@jagged gulch Store the id and prefix of all the servers on start

strong tundra
#

do you define token earlier

merry shuttle
#

like default

#

and fetch the guild id

#

of all

earnest phoenix
#

ok

digital ibex
#

@earnest phoenix you've been told many times to learn python before making a bot

#

please

earnest phoenix
#

I KNOW PYTHON

jagged gulch
#

@jagged gulch Store the id and prefix of all the servers on start
@merry shuttle What library / language u using

merry shuttle
#

Js

digital ibex
#

u don't

jagged gulch
#

I KNOW PYTHON
@earnest phoenix but do u know what an api token is?

merry shuttle
#

@jagged gulch Is it allowed or no tho lol

digital ibex
#

it is allowed

jagged gulch
#

@merry shuttle if ur using discord.js couldnโ€™t u just use client.cache to avoid that?

merry shuttle
#

Nope.

#

Can you just say if its allowed or not

jagged gulch
#

But either way ur just grabbing a list of guilds so ur good

merry shuttle
#

Alright thanks.

lyric mountain
#

@earnest phoenix but do u know what an api token is?
@jagged gulch he does, earlier today he leaked his token, so we told him to redact it from the screenshot

strong tundra
#

lol

earnest phoenix
#

I KNOW

#

I LEAKED IT

strong tundra
#

does python have some kind of dotenv?

earnest phoenix
#

I KNOW YOU SHOULDNT

merry shuttle
#

lmao

lyric mountain
#

Dude

earnest phoenix
#

so i reseted my coin

jagged gulch
#

does python have some kind of dotenv?
@strong tundra was just aboutta ask that lol

lyric mountain
#

You were already told to learn basic python syntax

earnest phoenix
jagged gulch
#

@earnest phoenix did u set up a dotenv properly?

lyric mountain
#

Oh my

#

Even discord noticed that

jagged gulch
#

We love discord ๐Ÿ˜

lyric mountain
#

What a nice way to start bot development

jagged gulch
#

Wait does python have a dotenv library/module tho?

lyric mountain
#

Probably

#

You can start the bot with command line arguments

#

Then get them with sys.argv

jagged gulch
#

@earnest phoenix where did u import dotenv and define TOKEN

limber flume
#

lOL

#

he expose his token again?

lyric mountain
#

That's not the issue, he need to put login after all the methods

jagged gulch
#

Iโ€™m a js dev so I donโ€™t really mess with cmd line args but thatโ€™s also an option

lyric mountain
#

His login is before the methods

jagged gulch
#

It doesnโ€™t look like he actually got the token tho, like with process.env.token

#

And yeah u gotta define stuff then login

lyric mountain
modest maple
#

oh this kid

#

he still hasnt awnser my challenge smh

#

needs to learn basics

earnest phoenix
#

Users : 10 in this line, how can i get just 10 ?

#

is for my membercount bot

#

And i want to get only numberโ€™s in a channel name

strong tundra
#

i use dotenv in rust and i put all my tokens are in .env

#

very easy and fun

modest vessel
#

hey

#

My Bot discord add bot error pls help me

digital ibex
#

no ones gonna do that LOL

jagged gulch
#

@modest vessel if youโ€™ve actually got an error, what is it?

#

Also what language

modest vessel
#

Turkฤฑsh ๐Ÿ˜„

#

invalid server format

#

I get an invalid server format error

jagged gulch
#

tรผrkรงe konuลŸmuyorum ama google translate'i kullanabilirim

modest vessel
#

aga

#

hata alฤฑyorum neden

jagged gulch
#

Hatanฤฑn tam ekran gรถrรผntรผsรผnรผ alabilir misiniz?

modest vessel
small crystal
#

arkadaลŸlar disord bot developer rolรผnรผ nasฤฑl alฤฑrฤฑm ?

slender thistle
#

id1, id2, id3

jagged gulch
#

oh yani bot programฤฑnฤฑzla deฤŸil

#

-support

modest vessel
#

ลŸimdide bu hata

slender thistle
#

What did you enter in the owner and servers fields

small crystal
#

hello ฤฑ want bot developer role.

slender thistle
#

You'll get it once your bot is approved

modest vessel
slender thistle
#

Space after the commas

modest vessel
#

how will it get approval?

modest maple
#

magic

slender thistle
#

-faq 2

gilded plankBOT
modest maple
#

love faith and pixy dust

slender thistle
fiery stream
#

how is server count checked on py and user count

modest maple
#

user count isnt

#

guild count is

#

len(bot.guilds)

fiery stream
#

wdym user count isnt?

modest maple
#

usercount isnt posted

slender thistle
fiery stream
#

so i cant check it?

modest maple
#

oh wait

#

you can get user count by doing len(bot.users)

#

but thats only cached users

cunning gorge
#

Hey im setting up visual studio code and planning on pushing it to github and then to my vps. It prompts me to add node_modules to gitignore. Should I do that?

fiery stream
#

idc

#

if it works and tells me average thats fine

modest maple
#

If you have certain things with d.py disabled its heavily effected

#

@earnest phoenix Current thinks it can only see 5 Users out of 55k servers

#

cachingโ„ข๏ธ

fiery stream
#

ayy while your at it

#

do you know how uptime works?

#

like a good one lol

modest maple
#

I do it so then the bot first starts it logs the time with a datetime object

#

then when i do uptime or somthing

#

it works out the time delta

digital ibex
#

hi, i have to models for a member, one for my dashboard and one for the bot itself, im trying to use the same model and database collection, when i use two different ones, everything works the way i want it to, when i use one, it doesn't load, and when it eventually does, i get an error InternalOAuthError: Failed to fetch user's guild, using passport-discord, passport and mongoosejs

modest maple
#

and then its just td.days, etc...

fiery stream
#

oh that seems hard

modest maple
#

its legit just doing self.start = datetime.now()

#

and then working out is just

#

td = datetime.now() - self.start

onyx summit
#

Don't know about py, but you could sum every .memberCount property of every guild, isn't super accurate but it works

mystic violet
#

can anyone help me with nginx? I have this in my config file (and more) Im trying to host 2 domains on seperate node apps on the same server

server {

        listen       192.168.0.8:80;
        server_name  www.flexiboat.ga;

        location / {
            root   /var/www/flexiboat.ga;
        }
    }```

I was wondering why it isn't working
sick cloud
#

hi all, my bot has an api built into it and the web dashboard makes requests to it to change settings, but i'm wondering how to authorize it so people can't go and randomly post to it from the outside, and so you can only modify settings if you're logged in on the dashboard

onyx summit
#

discord oauth?

mystic violet
#

set headers

#

with a token or something

onyx summit
#

๐Ÿช

#
  1. You only have it listening on the local ip, is that on purpose?
  2. You should also accept flexiboat.ga as server name
  3. Aren't you trying to proxy the request to a node application?
mystic violet
#

yeah

#

I have no idea nginx

#

lol

#

I tried apache

#

it didn't work

onyx summit
#

I ask you two questions and you answer with yeah

sick cloud
#

yeah but what sort sort of token - couldn't someone just inspect element on the dash, get the token, and then use it outside of the dashboard?

onyx summit
#

yes, sure they could, but why is that bad

sick cloud
#

i only want the dashboard to be able to use the api

#

so only the guild owner or users w/ perms can

onyx summit
#

I think you are getting this wrong

sick cloud
#

[ dashboard ] ------> [ bot + api ]

#

that's how it is

limber flume
#

so only the guild owner or users w/ perms can
@sick cloud js or py

#

aired

mystic violet
#

this is what I use in my dash

#
hasAdmin(auth, id) {
    return new Promise((resolve, reject) => {
        auth.guilds.forEach(async (guild) => {
            if(guild.id == id) {
                if(!!(guild.permissions & 0x8) == true) {
                    resolve(true)
                }
            }
        })
        resolve(false)
    })
  },```
#

id is the id your checking for

#

and auth is what you get from oauth2

onyx summit
#

There are plenty of solutions, but I'm currently doing it like this:

  1. Get User to use discord oauth
  2. Get access token from discord
  3. Get owned/able to administrate guilds over oauth
  4. Send cookie to user

Then when the user makes request you take his cookie, somehow get the pre saved guilds, check if they have permissions to manipulate the guilds setting

umbral estuary
#

how can i host my discordjs bot on digital ocean

onyx summit
#

You install nodejs on the server, install some kind of process manager (e.g. pm2) and let it run your bot files

sick cloud
#

that's all useless

tough minnow
#

Hey, I was wondering something, but decided to wait until the chat quieted down a little.

sick cloud
#

the dashboard handles perms fine, but the api is diff

onyx summit
#

your dashboard handles permissions?

sick cloud
#

as it's separate to the dashboard

#

they run separate

tough minnow
#

So I'm trying to regex something, but I have no clue how to regex it. For my mute command, I want to be able to set a time. This obviously has to be specified, but obviously doing "90m" isn't viable for a lot of people, 1h30m however is. How would I parse anything beyond "30m" using regex, or anything that works for that matter? I use NodeJS with the Discord.JS library.

onyx summit
#

ok buddy either you are explaining yourself really bad or your infrastructure design is kinda bs

sick cloud
#

well i either just make the dashboard update the db and hope the bot works it out, or i build the dash into the bot which i don't want to

tough minnow
#

I figured out how to do "30m", /\d+\s?[a-zA-Z]/ (if I remember correctly)

onyx summit
#

oh wait, with dashboard you do not mean a pure frontend?

fiery stream
#

3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 23:03:10) [MSC v.1916 64 bit (AMD64)] anybody know how can i get just the python version number not the other uneeded stuff

#

just 3.8.2

#

with sys.//version_/_/

#

uhh

#

this is weird

umbral estuary
sick cloud
#

it's got backend

onyx summit
#

I don't think you need a private ip

umbral estuary
#

Oh ok?

#

monitoring isn't necessary either right?

onyx summit
#

Idk, I don't think so

#

Not sure what DO understands by monitoring

proven lantern
#

is there a listener like client.on('message', messageListener); that only listens to messages with the command prefix?

sick cloud
#

you build it yourself @proven lantern

#

inside the message event, check if the message starts with your prefix

proven lantern
#

i want to have less bandwidth

onyx summit
#

no such thing yet

proven lantern
#

dang

sick cloud
#

that's... not gonna make any diff

onyx summit
#

iirc discord working on it

#

at least the figma example looked like it

sick cloud
#

that's totally different

glacial beacon
#

I think my DB is too big to host on a VPS

sick cloud
#

how big is it

#

i host my db on a vps and it's pretty huge

onyx summit
#

@sick cloud pretty sure it is, the approach looks similar to how slack does it

#

Only sending messages that trigger a command, at least that what it looked like for me

sick cloud
#

discord probs won't ever do it

onyx summit
proven lantern
#

think of the wasted bandwidth

onyx summit
#

yeah, and think of the ways to steal loads and loads of data

glacial beacon
#

I think I'm up to 20GB but it will grow quickly

#

Not huge but it will be expensive

onyx summit
#

nah, my server has 80GB storage ASdogeface
And will Prolly upgrade soon

sick cloud
#

bandwidth really doesn't matter lmao everyone has lots

proven lantern
#

attach an EBS to your VPS

onyx summit
#

depends on the size of your bot AShmm

#

But messages are probably your smallest problem, typing events and presence updates ASASYuiNoLike

glacial beacon
#

Intents thonkku

proven lantern
#

buy a server rack and setup a raid that you can expand when needed

sick cloud
#

well that's cache not db

#

cache uses ram

onyx summit
#

lmao

#

did you just try to ping everyone because you had an issue

#

You did

#

you tried to

quartz kindle
#

^

#

lmao

onyx summit
quartz kindle
#

if you want help then explain what you need help with, what the problem is, show code examples, etc...

#

dont just ask for help and say nothing about the actual issue

#

please read this

#

that explains exactly why its such an issue asking for help without explaining whats wrong

sudden geyser
#

bruh

#

Define, "command just won't work". What doesn't work about it. What steps have you tried which lead to the issue

earnest phoenix
#

How do I prevent rate limits? I use eris

sudden geyser
#

where do you define bot in your code

earnest phoenix
#

i think he meant the bot variable

turbid bough
#

Bot logs in, nothing works

earnest phoenix
#

bot

#

your client

#

i mean he is asking where is bot defined

#

the bot variable

#

like the client?

sudden geyser
#

Aspect do you happen to have any knowledge on Python.

earnest phoenix
#

like where is bot defined

#

like bot = Discord.Client

quartz kindle
#

they are asking you to show the code where you defined your bot variable

turbid bough
#

It's the main file. So probably on top

earnest phoenix
#

Tim is good at explaining lol

sudden geyser
#

all I see is client up there

earnest phoenix
#

i still dont see bot

sudden geyser
#

so you never defined it but still using it?

earnest phoenix
#

I mean the bot variable

#

I donโ€™t see anything that has bot=

stark abyss
#

does anyone know how to get unviersal emotes?

earnest phoenix
#

just use <:name:id> for custom emotes?

stark abyss
#

like an emote from discord to unviersal emote

#

well

#

what if i wanan add reaction

earnest phoenix
#

pretty sure you need to do @client instead

#

because theres no bot

stark abyss
#

huh?

quartz kindle
#

@stark abyss wdym universal emote?

#

you mean unicode?

earnest phoenix
#

replace @bot with @client

#

all of them

stark abyss
#

like emote from discord to- yeah that i think

earnest phoenix
#

or just do bot = client

#

fixed

stark abyss
#

so how?

earnest phoenix
#

add bot = client under your client variable

stark abyss
#

um

quartz kindle
#

@stark abyss you can do \emoji to make it show its code

stark abyss
#

this didn't really work

quartz kindle
#

default emojis have unicode counterparts, but custom emojis dont

stark abyss
#

so i can't do custom emotes?

sudden geyser
#

Reset your bot token.

earnest phoenix
#

just do bot = client under the client variable @earnest phoenix

quartz kindle
#

custom emojis are just images, the only way to use them outside of discord is downloading them image

stark abyss
#

\๐Ÿ˜…

mystic violet
#

I have this in Nginx config js server { listen 192.168.0.8:80; server_name www.flexiboat.ga; location / { proxy_pass http://192.168.0.8:8080; } }

shouldn't it work instead of giving me this (it has cloudflare too) https://prnt.sc/su0r05

Lightshot

Captured with Lightshot

stark abyss
#

i c

sudden geyser
#

Also aspect you should look up declaring variables in Python because you're struggling over a basic part of Python.

stark abyss
#

ty

earnest phoenix
#

just make bot an alias of client and everything will be fine

#

cuz shortcuts = best

sudden geyser
#

Or they could stick to one variable and use it from there

earnest phoenix
#

^

#

but he already used bot for most of the lines

#

and its gonna be annoying and time consuming to change them one by one

sudden geyser
#

To stay consistent.

quartz kindle
#

@mystic violet shouldnt you listen to localhost instead of your router-assigned address?

earnest phoenix
#

have u added bot = client?

#

client only?

#

not @client?

mystic violet
#

maybe

#

lemme test

earnest phoenix
#

show code again

mystic violet
#

still says not found tim

sudden geyser
#

all this for the name of a variable...

quartz kindle
#

@mystic violet do listen 80; only

#

without ip

mystic violet
#

ok

#

nope still not found sadly

sick cloud
quartz kindle
mystic violet
#

still 404

#

;-;

quartz kindle
#

also put server name both with and without www: flexiboat.ga www.flexiboat.ga

earnest phoenix
#

How do I prevent myself from getting rate limited? My bot is always being used like 10 people doing commands at the same time in the same server which ratelimits it.

sick cloud
#

cooldowns

#

only let them use x command every 10 seconds maybe

earnest phoenix
#

no one know what happened to ur code aspect

#

its confusing

#

no

#

just confusing

sick cloud
#

inb4 its just shitty glitch

sudden geyser
#

glitch and python

earnest phoenix
#

does glitch even works with python

sudden geyser
#

yes

#

but aspect I think what you could use is a review on python or at least declaring variables.

mystic violet
#

;-; sad that nginx isnt working

sudden geyser
#

Once you know your why you'll know how to solve it

mystic violet
#

127.0.0.1:8080 is tho

earnest phoenix
#

btw i remember that d.js have some kind of rate limit preventer. Is it possible for me to implement that to my eris bot?

quartz kindle
#

eris should also have it

#

if people use 10 commands in 5 seconds, does your bot respond to 5 commands, pause, then respond to the other 5?

lyric mountain
#

Glitch + anything = bad deal

earnest phoenix
#

if people use 10 commands in 5 seconds, does your bot respond to 5 commands, pause, then respond to the other 5?
@quartz kindle no it outputs something in the console like "YOU ARE BEING RATE LIMITED" then only respond to the other 5 after like 30 seconds

gentle gazelle
#

color list

lyric mountain
#

Not here hoister

gentle gazelle
#

color bot

lyric mountain
#

Not here

gentle gazelle
#

color=pink

lyric mountain
quartz kindle
#

@earnest phoenix shouldnt be 30 seconds lol, other than that its working

#

thats the library's rate limit prevention kicking in

gentle gazelle
#

color help

lyric mountain
#

@gentle gazelle dude

quartz kindle
earnest phoenix
#

๐Ÿ‘Œ

lyric mountain
#

Can't u read?