#development

1 messages · Page 1467 of 1

jovial nexus
#

sometimes i dont belive he is working for me

hollow sedge
#

Lol

lusty quest
#

well redis is a Database designed to hold more or less temporary stuff

eternal osprey
#

i think that i like this one more.

#

more simple

crimson vapor
#

poggers I got redis cache working for files

tawdry oracle
#

how do you do that?

hollow sedge
hollow sedge
crimson vapor
#
const { Router } = require('express');
const router = Router();

router.get('/files/:id', async (req, res) => {
  const fileID = req.params.id;
  if(fileID) {
    const domain = req.domain;
    let subdomain = req.subdomains.join(' ');
    subdomain = subdomain ? subdomain : '@';
    const databaseID = domain.subdomains[subdomain] + ':' +  fileID;
    const fileData = await req.app.server.models.FileModel.findOne({ id: databaseID });
    if(fileData) {
      await req.app.server.models.FileModel.updateOne(fileData, { 'stats.views': fileData.stats.views + 1 });
      const redisFile = await process.f.redis.get('files.' + databaseID);
      if(redisFile) {
        res.end(Buffer.from(JSON.parse(redisFile)), 'binary');
      } else {
        const file = await req.app.server.storage.getFile(fileData.node.file_id, fileData.node.node_id);
        await process.f.redis.set('files.' + databaseID, JSON.stringify(file));
        res.end(file, 'binary');
      }
      return;
    } else res.render('pages/error.ejs', { message: 'File Not Found', error: 404, user: undefined });
  } else res.render('pages/error.ejs', { message: 'File Not Found', error: 404, user: undefined });
  return;
});

module.exports = router;
#

oh god

hollow sedge
#

I shouldn't have asked

#

Ok so basically storing them as binary?

crimson vapor
#
        const file = await req.app.server.storage.getFile(fileData.node.file_id, fileData.node.node_id);
        await process.f.redis.set('files.' + databaseID, JSON.stringify(file));```
#

idk tbh

#

it works tho loggers

hollow sedge
#

But...

#

You made it?

crimson vapor
#

yep

hollow sedge
#

If you don't know who does

crimson vapor
#

idk

#

this is so fucking poggers

#

ima test saving files on my vps

hollow sedge
#

That is tho

tawdry oracle
#

how can i put a background on the page?

hollow sedge
#

CSS

crimson vapor
#

im hosting the server on my pc but the files on my vps

hollow sedge
#

"hosting the server" 😆

spice pier
#

nice ip mil

crimson vapor
#

ty

#

IT WORKED

rocky hearth
crimson vapor
#

file is hosted on vps

#

cached on pc

jovial nexus
#

cache uses a lot of ram rigth?

hollow sedge
#

Is that a good idea

crimson vapor
#

only if you cache big files

hollow sedge
#

Shouldn't you store your files somewhere else

crimson vapor
#

or data

lusty quest
#

cache is in your Ram

#

so dont cache 2GB random files

crimson vapor
#

no im making node based storage for a reason lmfao

hollow sedge
#

What if there were like three levels of storage

grizzled raven
#

@rocky hearth
interface String<T> { // document extended functions here }

jovial nexus
#

then fuck you @tawdry oracle because i was right

lusty quest
#

well in best case you just store keys in ram

crimson vapor
#

nah

#

entire files

#

all

hollow sedge
#

So like remote storage --> local storage --> in-memory

#

I'm a genius

crimson vapor
#

yes files that are big will probably be stored in a tmp folder

rocky hearth
crimson vapor
#

but the rest will be cached

lusty quest
#

just remove the local storage to get probably better performance

crimson vapor
#

yes 300ms better

hollow sedge
#

But next level caching ;(

lusty quest
#

use different tiers of caching

hollow sedge
#

How

lusty quest
#

use one SSD for longish term Caching and Ram for stuff that gets frequently used

hollow sedge
#

Ooohh

lusty quest
#

this is how most servers do it.

hollow sedge
#

Remote ssd?

lusty quest
#

local?

lusty quest
#

this is just local caching

hollow sedge
#

I thought you just said not to use local

manic cairn
#

Why use an ssd or a hard drive when you can use a usb stick

lusty quest
#

bcs the usb stick will be dead in 4 months

#

also slower as a HDD

hollow sedge
#

Loll

manic cairn
#

just get a new one

hollow sedge
#

Rip data

manic cairn
#

nah

crimson vapor
#

first reload not cached

lusty quest
#

so you want to send a new USB stick to your datacenter every 4 Months

crimson vapor
#

second reload cached

manic cairn
#

yea

lusty quest
#

why not buy a SSD that will hold way longer

hollow sedge
#

Whaaat

#

That's legit so cool

lusty quest
#

also cheaper within 4 years

crimson vapor
#

I boot my laptop off a USB

hollow sedge
lusty quest
#

well Booting and using it as Storage is a difference

manic cairn
#

usb stick for the win

hollow sedge
#

Everyone knows the fast read and write speed of usb

manic cairn
#

^

lusty quest
#

my NAS also Boots of a USB drive but uses HDDs for long term storage and a SSD for frequently used stuff

#

nah use a Tapedrive

crimson vapor
#

what NAS do you have? or custom built?

hollow sedge
#

Yeah booting is way different from production

#

They aren't even connected

lusty quest
#

ive took a random old PC ive had lying around and now it runs a OS for NAS systems

crimson vapor
#

lol

#

fair enough

lusty quest
#

also got a 2nd proper nas ive decomissioned bcs its to slow

crimson vapor
#

this code is poggers

#

it actually worked

#

no errors

stable nimbus
#

Does anybody know how to create the slash commands? I have been reading the documentation but I have no idea what to do.

outer perch
crimson vapor
#

exactly

hollow sedge
#

@crimson vapor you know you can store images in mongo

crimson vapor
#

thats dumb

hollow sedge
#

How

crimson vapor
#

max 16mb

#

slow

#

make reading the db slow

hollow sedge
#

GridFS

outer perch
hollow sedge
crimson vapor
#

hmm

#

still

#

nah

#

im only caching

#

not storing in db

hollow sedge
#

I mean instead of storing it as a file

crimson vapor
#

imo waste of time

#

to code check for 16mb

hollow sedge
#

So..one if statement?

crimson vapor
#

correct

hollow sedge
#

Makes sense

crimson vapor
#

it does indeed

outer zenith
#

lmao

#

my bot wasn't online when it was supposed to be

#

cause the leveling system was being fucky wucky

crimson vapor
#

I never had issues with mine

outer zenith
#

lmao its not the leveling system itself technically

#

its the sql connection

#

but i just removed it

crimson vapor
#

oh lmao

outer zenith
#

temporarly

#

cause it was being a headache

#

ill add it in an update later

crimson vapor
#

how big of a file is too big to cache?

#

strange

#

why did you use quick-db if you installed quick.db?

mellow kelp
#

your entrypoint must be valid

#

i think

#

oh wait its quick-db

#

confusion

crimson vapor
#

@mellow kelp how big is too big for caching files?

mellow kelp
#

hmm

#

ig it depends on memory or something

crimson vapor
#

ima do 4mb

keen zephyr
#

Hey, I'm trying to set up the webhook to show users that have voted for my server.
We have our own bot.

In order to do this, am I going to need to submit that bot also to top.gg? This isn't a public bot and solely used for our own server.

I think we need an auth code? I'm not quite sure, I'm no developer.

Any help would be appreciated

crimson vapor
#

you should just be able to make a request to the api

mellow kelp
#

its kinda easy

crimson vapor
#

servers get keys?

hollow sedge
#

If you're not a developer, then why are you asking

#

😕

keen zephyr
#

Because I just want the webhook to show when people vote. Someone else codes our server's bot, not me. I'm just trying to find out what they need to make this happen

mellow kelp
#

you would need a developer to make a web server for you

misty sigil
#

you're better using a bot

#

e.g. DBL Vote

outer perch
#

actually, it looks better if the featured bot does that

keen zephyr
#

I don't want to fill the sever with yet more random bots, if I can help it.
We have our own bot, just trying to work out how we can do this.

mellow kelp
#

well then hire a dev to make a web server for detecting votes

outer perch
#

copy and paste the endpoint link in DBL

#

create an SSL event listener in the main bot file

#

code what you want to do when you receive a vote (the code has to identify if it's a vote or not)

#

and voilĂ 

keen zephyr
#

@outer perch Thankyou, I'll pass this on and see if we can work it out from there. :D

outer perch
#

đŸ‘ŒđŸ»

hollow sedge
#

What is pipedream

#

That doesn't seem like the conventional solution for this

earnest phoenix
crystal yew
#

I am stuck at around 63-68 servers, does anyone have any tips to grow?

lusty quest
lusty quest
#

i know some people here also use ads on Facebook

crystal yew
#

What tags to you reccmond? My bot is pure economy

lusty quest
#

well good luck. economy tag is one of the Big boy tags.

crystal yew
#

I see

lusty quest
#

ive used warframe back then bcs my bot is mostly themed around the game

stable nimbus
lusty quest
#

when its ready -D.js Dev Team

summer torrent
#

there is a PR for that

stable nimbus
#

K

eternal osprey
#

hey peeps

#

i am trying to get a string from a map i made

#
let result = familymap.get(args)```
celest schooner
#

Wdym slash commands

eternal osprey
#

i am tryin to use ars

#

but it won't work as i need to add ' '.

#

how would i implement that?

restive furnace
#

@celest schooner /cmd

pure lion
#
enum CommandTypes {
  SUB_COMMAND = 1,
  SUB_COMMAND_GROUP = 2,
  STRING = 3,
  INTEGER = 4,
  BOOLEAN = 5,
  USER = 6,
  CHANNEL = 7,
  ROLE = 8,
}
```i have this enum because big brain
#

but

#

im not sure i completely understand how they work
when i do CommandTypes[bla] it throws a typerror

celest schooner
#

/cmd

eternal osprey
celest schooner
#

¯_(ツ)_/¯

#

u mean that

#

?

lusty quest
#

yes

celest schooner
#

Wait you can add those now?

pure lion
#

yup

#

adding it to my lib

mellow kelp
#

yea

pure lion
#

with difficulty

mellow kelp
#

they're pretty much useless but they're a thing

eternal osprey
#

how can i add '' to an existing args?

lusty quest
#

join(" ") doesnt work?

celest schooner
#

Krista are you making communist discord

eternal osprey
#

nvm i fixed it

celest schooner
lusty quest
#

not you lol

celest schooner
#

alr

#

mb

pure lion
#

opt.type is a string

eternal osprey
#
}
if (message.content.startsWith == `${prefix}oogkleur`){
let args = message.content.slice(prefix.length)
let result = familymap.get("'"+ args + "'")
message.channel.send(result)
}```why is my bot not showin results?
analog tinsel
#

switch (tempVars("gg")) {
case fb: var t = "fenerbahce"; break;
case gs: var t = "galatasaray"; break;
}
this.storeValue(t, 1, 'yazı', cache);

#

can anyone help ?

eternal osprey
#

and please use command block.

analog tinsel
#

its give undefined

eternal osprey
#

what gives undefined

analog tinsel
#

its not work case text:

eternal osprey
#

state out the whole error

mellow kelp
#

what is this supposed to be?

#

give more context

eternal osprey
celest schooner
#

args includes the command

#

in your thing

#

so if the command was

eternal osprey
#

oowh

celest schooner
#

!abc abc

outer zenith
#

can u add slash commands

#

in python

#

?

eternal osprey
#

so it actually takes abc abc

celest schooner
#

it would return abc abc instead abc

eternal osprey
#

how would i trim that?

celest schooner
#

since your doing string.slice() rn

analog tinsel
#
 switch (tempVars("gg")) {
   case fb: var t = "fenerbahce"; break;
   case gs: var t = "galatasaray"; break;
 }
this.storeValue(t, 1, 'yazı', cache);
celest schooner
#

I think you can split the message content with a space

#

and then remove the first element of the array

#

then the array would be args

#

and then you can do args.join(" ") for all of them

#

That’s what I’m doing

#

you can also just slice the length of prefix + command + a space

rocky hearth
eternal osprey
celest schooner
#

Alr

celest schooner
#

I’m on my phone

eternal osprey
#

but how would i slice the command?

misty sigil
#

you'd need to botch that in yourself

rocky hearth
#

But I've defined that. Look carefully

#

And I'm not getting any red lines in the editor

celest schooner
eternal osprey
#

oogkleur

#

oowh can't i just .slice("oogkleur")

celest schooner
#

then get the length of oogkleur

eternal osprey
#

yeah the size

celest schooner
#

it’s length for strings I think

#

You’d also probably have to remove a space too

#

because args would return " abc"

lusty quest
#

just trim it

pure lion
#

how can i get from an enum without calling a .

earnest phoenix
#

hey

#

how can i make my server get a custom invite code?

#

like discord

#

.gg

#

/Barnie

celest schooner
pure lion
#

30 boosts

earnest phoenix
pure lion
#

yeah

celest schooner
eternal osprey
#
if (message.content.startsWith == `${prefix}oogkleur`){
let args = message.content.slice(10)
console.log(args)
let result = familymap.get("'"+ args + "'")
message.channel.send(result)
}```
#

uhhm logging args showed me absolutely nothin

#

it just didn't work and logged nothing.

celest schooner
#

What are you running

eternal osprey
#

wdym?

celest schooner
#

like the command

pure lion
#

maybe you should

#

const args = message.content.split(/ +/g)

#

which will split at every space

celest schooner
eternal osprey
eternal osprey
pure lion
#

" " is fine but / +/g will account for multiple spaces

celest schooner
#

ahh smart

eternal osprey
#

it's only usin 1 space

pure lion
#

some people will be stupid

pale vessel
#

use \s+ if you want it to support other variant of spaces

celest schooner
#

who the heck would use other space

lusty quest
#

tabs?

pure lion
#

flaz do you know how to get from enums without doing enum.prop

celest schooner
#

I don’t think tabs work in discord

pale vessel
#

some languages use a different kind of space

celest schooner
#

I guess

eternal osprey
pale vessel
#

like this

pure lion
#

thicc

pale vessel
#

like you

celest schooner
#

anime pfps scare me

eternal osprey
#

strange! My bot still doesn't log anything.

celest schooner
#

code?

eternal osprey
#

if (message.content.startsWith == `${prefix}oogkleur`){
const args = message.content.split(/ +/g)
console.log(args)
let result = familymap.get("'"+ args + "'")
message.channel.send(result)
}```
#

haven't changed much

pale vessel
#

because it didn't trigger that if block

celest schooner
#

does it even log []

eternal osprey
celest schooner
#

are you using that font

pale vessel
#

it's if (string.startsWith("text")) {}

#

startsWith() returns a boolean

celest schooner
#

oh crap

pale vessel
#

not a text

celest schooner
#

I didn’t see that

#

either

earnest phoenix
#

I updated the code for my bot on heroku, but now my bot is offline... do yall know whats causing this?

earnest phoenix
#

Yea the code was working fine

pure lion
#
enum CommandTypes {
  SUB_COMMAND = 1,
  SUB_COMMAND_GROUP = 2,
  STRING = 3,
  INTEGER = 4,
  BOOLEAN = 5,
  USER = 6,
  CHANNEL = 7,
  ROLE = 8,
}
```Will CommandTypes.SUB_COMMAND return 1?
earnest phoenix
#

but the bot is offline

celest schooner
#

I’ve never used heroku srry

earnest phoenix
#

oh alr

#

Do I have to reupload my bot to top.gg every time I update it?

celest schooner
#

no

earnest phoenix
#

alr

celest schooner
#

top.gg only lists info and invite link

#

so it’s like a poster for a barber shop

eternal osprey
#

sorry for botherin you guys so much but: js if (message.content.startsWith(`${prefix}oogkleur`)){ const args = message.content.split(/ +/g) console.log(args) const args2 = args[1] let result = familymap.get("'"+ args2 + "'") message.channel.send(result) } the message isn't being sent as its empty. Why tho?

#

it should return the name

#

even args2 is showin up with Bilal

lusty quest
#

how did you store stuff in the map?

eternal osprey
#

i fixed it

#

nvm

lusty quest
#

why do i even answer?

eternal osprey
#

I am stupid sometimes.

pale vessel
#

you should you know, try more before asking

hollow sedge
#

Sometimes it helps to just spell out the problem in front of you

eternal osprey
#

yeah sorry guys!

willow mirage
#

Anyone know how i can auth the spotify api

#

How i can get the token

#

i got my client secret here but it doesn't works

#

@pale vessel can you help me?

honest perch
#

Read their docs?

#

You will most likely need to send the secret in the Authorization header

willow mirage
#

oh

#

i see now

earnest phoenix
#
at Client.<anonymous> (/home/container/index.js:42:53)
at Client.emit (events.js:326:22)
at WebSocketManager.triggerClientReady (/home/container/node_modules/discord.js/src/client/websocket/WebSocketManager.js:433:17)
at WebSocketManager.checkShardsReady (/home/container/node_modules/discord.js/src/client/websocket/WebSocketManager.js:417:10)
at WebSocketShard.<anonymous> (/home/container/node_modules/discord.js/src/client/websocket/WebSocketManager.js:199:14)
at WebSocketShard.emit (events.js:314:20)
at WebSocketShard.checkReady (/home/container/node_modules/discord.js/src/client/websocket/WebSocketShard.js:467:12)
at WebSocketShard.onPacket (/home/container/node_modules/discord.js/src/client/websocket/WebSocketShard.js:439:16)
at WebSocketShard.onMessage (/home/container/node_modules/discord.js/src/client/websocket/WebSocketShard.js:293:10)
at WebSocket.onMessage (/home/container/node_modules/ws/lib/event-target.js:125:16)
(node:13) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:13) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.```
Api doesnt work
```dbl.postStats(client.guilds.size, client.shards.id, client.shards.total);``` someone?
willow mirage
#

bruh

mellow kelp
#

your client probably doesn't have shards

willow mirage
#

remove the client.shards

earnest phoenix
#

?

#

why

errant perch
pale vessel
#

You mean readFileSync()?

willow mirage
#

@pale vessel what scopes for spotify you use ?

pale vessel
#

readdirSync() reads a directory, returning an array of string

#

You can't set an image to an array

willow mirage
#

?

pale vessel
willow mirage
#

ok

mellow kelp
#

vscode just freaking crashed again

errant perch
#

scary

mellow kelp
#

thats a buffer

#

to attach a local image you have to create a MessageAttachment

errant perch
#

yay

#

thank you for bearing with my stupidity

#

i wish this couldve been more simple

pure lion
#

i want to check if an array doesnt have stuff:

if (!config.options.every(conf => conf.name) || !config.options.every(conf => conf.description) || !config.options.every(conf => conf.typeID))```
#

but it doesnt work

#

the stuff is there

mellow kelp
#

you can just check myArray.length

#

ig?

pure lion
#

no

#

i want to check if it doesnt specifically have those

#

hence the array.every

mellow kelp
#

you could also try array.some

tepid laurel
#

Which ubuntu version on a vps would you guys prefer for bots?

honest perch
#

the latest?

glass nacelle
#

windows 9

tepid laurel
#

Lmao

pure lion
#

thank god it works now

#

i used typeof

#

and it works

#

istg this took me an hour

tough merlin
#

hey guys

glass nacelle
#

I use centOs cus it's more Light Ubuntu is more for a pc in my opinion

tough merlin
#

is it possible to make a bot use a slash command

pure lion
#

yeah

tough merlin
#

how

#

this was what i was trying to do

#

everytime this bot talks i use a slash command

willow mirage
#
const result = await fetch('https://accounts.spotify.com/api/token', {
        method: "POST",
        headers: {
            'Content-Type': 'application/json',
            'Authorization': `Basic ${btoa(process.env.spotifyId+":"+process.env.spotifySec)}`
        },
        body: 'grant_type=client_credentials'
    });

I have done something like this but it is not working

#
[Symbol(Response internals)]: {
    url: 'https://accounts.spotify.com/api/token',
    status: 415,
    statusText: 'Unsupported Media Type',
    headers: Headers { [Symbol(map)]: [Object: null prototype] },
    counter: 0
  }
#

af

#

ah

#

the application/json

outer zenith
#

can someone help me

#

add slash commands to my bot

#

lik e i just want one simple command

#

and i can expand from ther

honest perch
outer zenith
#

well i should correct myself

#

i made a slash command

#

but its not connected to the server

outer zenith
#

does anyone have a simple slash command code

#

like for maybe

#

a ping command?

#

anyone 😩

#

it is a new feature tho

solemn latch
#

Most libs don't have support for it

outer zenith
#

really?

solemn latch
#

You'll have to make the code yourself

#

Well its a new feature

outer zenith
#

yea ik that

#

theyre aren't any packages that package it

#

but how do u make it

#

raw code

earnest phoenix
#

hey so how do i make my bot direct message a member that just joined like i can make my bot direct message when someone asks him (aka using the prefix with command) and do something when someone jo0ins the server but i cannot mix both

outer zenith
#

like i think i maade one

solemn latch
#

You write it the same as any other code

outer zenith
#

but i can't connect it

solemn latch
#

The docs would tell you

#

Which misley linked to

earnest phoenix
solemn latch
#

It doesnt seem super hard đŸ€”

earnest phoenix
#

its a bit

solemn latch
#

It seems rather straightforward to me

outer zenith
#

it isn't from what i see

earnest phoenix
#

well i only saw info on discord dev portal

outer zenith
#

but the connection i cannot understand

earnest phoenix
#

so it didnt help me

outer zenith
#

like

earnest phoenix
outer zenith
#

but like i wanna understand dude

earnest phoenix
#

and u do bot

outer zenith
#

yea ik

earnest phoenix
#

u have to also add application.commands

outer zenith
#

i gave it that oauth

earnest phoenix
#

so when u invite the bot

outer zenith
#

yea i did

earnest phoenix
#

it will say in the first page

#

it will say

outer zenith
#

well i think i did

twin zinc
#

what are the requirements to add a bot?

earnest phoenix
#

this bot has acces to / commands

solemn latch
earnest phoenix
twin zinc
solemn latch
earnest phoenix
#

yr

#

yr*

#

ye*

earnest phoenix
#

tho*

twin zinc
#

only that?

earnest phoenix
#

ye

#

and add him

twin zinc
#

oh, ez

solemn latch
earnest phoenix
#

but like dm the person

#

it cant

solemn latch
#

User.send()

earnest phoenix
#

rlly

#

dude im dumb

outer zenith
#

nvm

#

i managed to do it

twin zinc
#

help my bot does not send the welcome msg already activated intents

outer zenith
#

i just had to kick it out

#

and rejoin

vernal dagger
#

need a bot that posts info from a certain website lmao

#

how

earnest phoenix
solemn latch
earnest phoenix
#

yeah if its your website u have to do that api and then use it

vernal dagger
#

its not my website so idk

earnest phoenix
#

oof

#

search if they have a discord compatible api

vernal dagger
#

this idea is so complex lol

sour jungle
#

How to get my bot on the website?

vernal dagger
#

idek if its possible

earnest phoenix
#

or u mean put a link where people can add him?

sour jungle
#

Yes

earnest phoenix
#

just get hes link

#

and add it

twin zinc
#
   let myguild = await bot.guilds.cache.get("789603347849543681");
  let canal = await bot.channels.cache.get("789603688837939210");

  const embed = new Discord.MessageEmbed()
  .setTitle('![Entrada](https://cdn.discordapp.com/emojis/789605945478873108.webp?size=128 "Entrada") - Welcome
(a)')
  .addField(`Welcome to my support server! have fun with our community, read the rules to avoid severe punishments! Did you know you formed $ {member.memberCount}?`)
  canal.send(embed)
})```
sour jungle
#

@earnest phoenix how to add it?

outer zenith
#

but thesecommands are very dirty

#

and ill need to put theem in a seperate file

earnest phoenix
#

google sites

#

or your own

mellow kelp
earnest phoenix
#

or any other

sour jungle
#

?

earnest phoenix
#

where is your server

#

website* sorry

sour jungle
#

I dont have one

earnest phoenix
#

then where are u thijking on add it

mellow kelp
earnest phoenix
#

ohhhhhhh

sour jungle
#

Yah.

earnest phoenix
mellow kelp
earnest phoenix
#

log in

#

then add bot

#

ez

mellow kelp
#

gg ez

earnest phoenix
#

ye

sour jungle
earnest phoenix
#

mafe?

outer zenith
#

made*

#

but what does that even mean

earnest phoenix
#

idk

solemn latch
earnest phoenix
#

ye

solemn latch
#

Its for listing bots

sour jungle
#

Oh

#

But how?!

earnest phoenix
#

btw @solemn latch it didnt work

#

user is not defined

sour jungle
#

I can't find where I can add it.

outer zenith
#

lmao

solemn latch
earnest phoenix
outer zenith
earnest phoenix
#

yeah or that

outer zenith
#

oh oop

#

u already sent it

solemn latch
#

@earnest phoenix what did you name the variable from the event?

earnest phoenix
#

please remove the embed

earnest phoenix
solemn latch
#

You need to define the variable in the event handler

earnest phoenix
#

i dont have a handler

#

i never used

#

never saw use on it

solemn latch
#

But you just posted it

earnest phoenix
#

wait

#

my bad

solemn latch
#

Your not defining a variable named user

earnest phoenix
#

and what do i define it for?

#

discord.js never asked me to define user

#

it wqas always alredy defined

solemn latch
#

It never is auto defined.

earnest phoenix
#

ok then

#

ill try to fix it later

#

thx anyway

solemn latch
#

Its just typing user into the functions parameters ().

twin zinc
#

what I need to do here: Detailed description of your bot *
A description of at least 300 characters of what your bot does. HTML, CSS and Markdown allowed. Javascript will be removed.

summer torrent
#

write about your bot

outer zenith
#

honestly this is a pain

vernal dagger
#

damn idk how to do this at all. someone pm me about this i need some serious help

earnest phoenix
#

i was just dinering

earnest phoenix
#

just tell me

vernal dagger
#

i want the bot to take that same info

earnest phoenix
#

(i will not click since it can be a virus)

vernal dagger
#

its called a virtual stable for race horses. tells u there results, and all that. i want it to send me that stuff in a discord bot instead of notifactions to an email

mellow kelp
vernal dagger
#

its not a virus i promise lmao i really need help with this lol

mellow kelp
#

but yea its not a virus

earnest phoenix
#

what the website does

#

mkay

vernal dagger
#

yes, but i need it to send notifications to discord instead of an email

#

i want it to take a certain horse i pick and upload that info for my other discord people in it

normal raptor
#

would anyone point me to example how to make multiple instances of the same bot to respond only once? i'm using discord.py

untold basalt
#

if u dont then dont answer with useless responses

vernal dagger
#

so idk how to do this at all

earnest phoenix
#

btw why are u hgere lol

untold basalt
#

looking for help with smt smh

earnest phoenix
#

what is it<'

#

?*

untold basalt
#

time

earnest phoenix
#

oh

#

thats a hoven thingy

#

like

#

where u put the temp

untold basalt
#

?

earnest phoenix
#

that wheel

earnest phoenix
#

cool

#

btw can u go to ruffus server (on 4NG3L)?

untold basalt
earnest phoenix
#

ik

#

im just saying go there so we can speak

#

lol

quartz kindle
# vernal dagger i want it to take a certain horse i pick and upload that info for my other disco...

Thats not enough information to give you a definite answer, but there are several ways to approach it.
If you already receive emails, you could setup an email server that triggers webhooks to your bot. Alternatively, if the website requires logging in to access the information you want, you will need a headless browser such as pupeteer, cheerio or zombie.
Not much else we can say without looking at how the website works

outer zenith
#

to hook info from the WEB

earnest phoenix
#

lol

young flame
#

i fixed some bugs witth it

outer zenith
#

nice

earnest phoenix
#

mice

outer zenith
#

i still don't even have a basic queue command working

#

😭

outer zenith
#

but i do have youtube search and play

young flame
#

when you would do +play never gonna give you up rick astley it would send the searches

#

like 8 times

outer zenith
#

ah lol

#

i have a seperate search command

young flame
#

i forgot to add a return

#

the search is apart of the play command

outer zenith
#

ah

#

makes sense

young flame
#

so if you dont have a link to it you can just type the name

outer zenith
#

but mine is seperate lol

#

and then it gives a list

#

and then if you do ~play 2

#

itll play the second search results

young flame
#

mhm

outer zenith
#

still need to fix queue 😭

vernal dagger
outer zenith
#

before

#

i can add it in as a full plugin

#

which is also why i took out leveling

quartz kindle
outer zenith
#

^

#

just use beautiful soup

outer zenith
#

ok?

#

just scrape it

vernal dagger
#

idk wtf that means

#

iv never made shit

outer zenith
#

?

vernal dagger
#

but i have this vision and i need one made lmfao

outer zenith
quartz kindle
#

Looks pretty straight forward

#

You will need to download the page and parse it as html

#

Have you ever done coding before?

vernal dagger
#

none

quartz kindle
#

Then it wont be an easy task

#

This is not basic coding

vernal dagger
#

so how about when things are live updated on the website ? will it still pull info then ?

outer zenith
vernal dagger
#

i know its not, i would hire somebody lmao

outer zenith
#

u don't tech need to download it

outer zenith
#

how much

vernal dagger
#

if somebody made this for me, id definitely make it worth it, just pm

outer zenith
#

wait so WHEN the results happen

#

u want it to be sent?

#

wait thats more complicated than i thought now that i think abt it

vernal dagger
#

yes in a discord chat page.

outer zenith
#

its not a simple scrape

#

hm

vernal dagger
#

so say a horse does a workout, it will say this on the website

quartz kindle
#

I only work for people who like paying, ive had my fair share of annoying clients who ask for a billion things then dont pay or pay almost nothing lul

vernal dagger
#

lmao id like to pay, im an honest guy, no owrries with that

outer zenith
#

i think he wants a flat rate

#

like how much

#

but yall should work that out in dms

vernal dagger
outer zenith
#

i see

vernal dagger
#

Laurel Park 11/15/2020 Dirt 3F 35.60 Handily 1/20

#

and i just need his info updated to my discord when it happens on the site

#

so idk shits way to complicated for me

outer zenith
#

the thing is

#

i might be able to do it

#

but youll need to host the bot

#

(basically just run an exe file)

#

for however long you'd want ur bot to be up

vernal dagger
#

wanna come over & do it for me xd

outer zenith
#

what the hosting?

hollow sedge
#

Come over?

vernal dagger
#

well id want it to always be up id suppose xd

outer zenith
#

Yea come over?

vernal dagger
#

yeah to my place lmfoa im joking

outer zenith
#

i mean as long as u let the exe file run

#

itll run forever

#

if u don't close it

hollow sedge
#

Also this channel isn't for hiring people

outer zenith
#

^

hollow sedge
#

So you'll have to ask somewhere else

vernal dagger
#

lmao okay ill go ask somewhere else

outer zenith
#

any way

#

slash commands are gonna be intresting

quartz kindle
#

Im thinking about converting my whole bot to slash commands

#

But havent looked into them yet to see if its feasible

hollow sedge
#

Limit is 25 commands I think

quartz kindle
#

Thats plenty enough for me

#

My bottleneck is command complexity

#

You can literally use up all 2k chars in a single command if you want to

outer zenith
#

the real thing im looking at

#

is guild commands

#

that way i can custom make commands for my friend's servers

#

and maybe get a little $$ custom making commands for other servers

quartz kindle
#

Hmmm

#

My bot can take more than 10 options per command

#

But 10 is a reasonable limit

#

I can work with it

#

10 choices per option is good too as long as it accepts free written choices

#

Because otherwise i have options with literally millions of choices

hollow sedge
young flame
#

why did you take out leveling

outer zenith
#

because

#

the sql was getting fcky

hollow sedge
#

Nah

outer zenith
#

and im gonna fix it

young flame
#

smh

outer zenith
#

in another script

young flame
#

rule numbe rone

outer zenith
#

before readding it

hollow sedge
#

Sql for leveling would be so easy

outer zenith
#

it is

young flame
#

rule number one*

outer zenith
#

but the thing is handling

#

join and leaves

young flame
#

never use one database for everything

outer zenith
#

it prob was a simple mistake

#

im not

young flame
#

thats just stupid smh

hollow sedge
#

What?

#

Since when is that rule #1

outer zenith
#

it prob was mised space and stuff

young flame
#

i have atleast 4 databases lol

outer zenith
#

but it was bugging me

hollow sedge
#

That's not even a thing

outer zenith
#

bruh i do too

hollow sedge
#

You have too many databases

young flame
#

nah

hollow sedge
#

4 databases?

quartz kindle
#

Why not a single database lol

hollow sedge
#

Can you name each one

young flame
#

yes

hollow sedge
#

I really hope you mean tables

outer zenith
#

i have a database for warnings

hollow sedge
#

And not databases

outer zenith
#

and a table for each guild

young flame
#

MoonSQL, ikigai.josn mongo.db and quick.db

quartz kindle
#

I mean, if its different apps sure, but you dont need multiple dbs for a single app

young flame
#

easy

hollow sedge
#

so..tables or databases?

#

BRUH

quartz kindle
outer zenith
#

wait thats what u meant?

#

i thought u meant .db files

hollow sedge
#

If you're using MongoDB you don't need the other 3

young flame
#

eh

#

i barely use mongo tbh

#

i only got it so shivaco would stfu about it

hollow sedge
#

Ik MoonSQL is yours, dunno why you would be using it tho

young flame
#

i use it for most of my bot tbh

hollow sedge
#

So why use quick.db if you're using "MoonSQL"

young flame
#

i need it for uh

#

things

quartz kindle
#

Lol

hollow sedge
#

Quick.db isn't a cache

young flame
#

mainly for the keys doe

hollow sedge
#

What makes sense is a database and a cache

quartz kindle
#

Ngl that sounds like a clusterfuck

hollow sedge
#

No more

young flame
hollow sedge
#

Yes but it would be easier without

quartz kindle
#

I just use sqlite flr everything

young flame
#

eh

hollow sedge
#

Rule #1 always go for what's simpler

young flame
#

i might remove them all besides moonsql tbh

hollow sedge
#

See that makes sense

open flicker
#

https://hatebin.com/frniphvcpn events loader
https://hatebin.com/rqjkgvvhev ready.js
error TypeError: Cannot read property 'tag' of undefined
what am I doing wrong?
if anyone can help mention me

console.log(Luni) 

    user: ClientUser {
      id: 'id Bot',
      system: null,
      locale: null,
      flags: null,
      username: 'Name Bot',
      bot: true,
      discriminator: '6495',
      avatar: '079798043de15b2ffe157e96d292a808',
      lastMessageID: null,
      lastMessageChannelID: null,
      verified: true,
      mfaEnabled: true,
      _typing: Map(0) {}
    },```
molten yarrow
young flame
#

but i like having 8 databases

hollow sedge
#

Imagine using two (three?) query languages at once

#

you make me cry

young flame
#

i can see me saving a database in a database ina database smh

hollow sedge
#

Idek know what that json thing is

young flame
#

sounds fun

#

i use the json

#

for my warning command

hollow sedge
#

Why tho

#

It legit doesn't make sense

outer zenith
#

llmao

#

i just use sqlite3

hollow sedge
#

You literally needlessly complicated it

#

sqlite is slow tho ;(

outer zenith
#

really?

hollow sedge
#

postgres ftw

outer zenith
#

it isn't that slow

#

slower*

#

but it isn't slow really

young flame
#

seems simpler

#

since i can tell wtf is happpening

hollow sedge
#

Obviously, no DB is going to be slow

#

It's just that you want to go for what's fastest

outer zenith
#

i mean

#

:Z

#

😒

#

i dont feel like making another db switch

hollow sedge
#

You can view that info in any DB @young flame

#

mongo uses that format

outer zenith
#

i already spent a good part of 1 week

young flame
#

eh

hollow sedge
#

Sql uses a table with columns and rows

outer zenith
#

debugging and transfering

hollow sedge
#

It's not hard

young flame
#

if you try to edit a thing like that in sql you get disk malformed

quartz kindle
hollow sedge
#

Your queries remain the same

#

I didn't mean that but I think it doesn't scale well

outer zenith
#

it depends what u mean scale

#

i do not expect my bot to go to 10k-100k servers

#

if it does

#

ill adjust it then

quartz kindle
#

It dpesnt scale well only when you need multiprocess and web support

outer zenith
#

web support?

hollow sedge
#

^

#

What is that

young flame
#

idk

#

i should make a mute command

#

but i want it like how lucas is

#

where you go like

#

+mute reason | time

#

or something

outer zenith
#

i mean

#

it isn't that hard

#

just take a normal mute command

#

add reason and time

hollow sedge
#

Nothing is hard đŸ˜©

outer zenith
#

output reason

#

and schedule the unmute

outer zenith
hollow sedge
#

👀

young flame
outer zenith
#

damm tho

#

i really need to fix my leveling

#

then my music plugin

young flame
#

i mean

outer zenith
#

leveling should be easier

#

but has more corners that i need to check

#

and music i still don't have a good queue command 😭

young flame
#

idk i might change how to card looks

outer zenith
#

the leveling it selft isnt hard

#

but goddam thats a good leveling card

#

mine is way more simple

quartz kindle
outer zenith
#

like this

#

very simple

#

not very pretyt

open flicker
#

đŸ€”

outer zenith
#

and btw

#

id take off the user tags

#

cause thats annoying

drifting wedge
#

java

young flame
#

@drifting wedge you still down for web development?

drifting wedge
#

for wat?

young flame
#

im thinking about buying a domain for my bottums lol

drifting wedge
#

oh

#

sure ig

#

ill do it

#

uhh ik how u can get free subdomains

young flame
#

ooo

drifting wedge
young flame
#

tell @drifting wedge

#

bet brb

drifting wedge
#

make sure status is public

outer zenith
#

lmao

#

what do u need help in 0exe

#

ah i see

#

public static void main(String[] args){

#

should be ur header

vernal rivet
#

@drifting wedge don't use vsc for Java lol

outer zenith
#

^^ use eclips

crimson vapor
vernal rivet
#

Intellij better

drifting wedge
outer zenith
crimson vapor
#

well

outer zenith
#

0exe

crimson vapor
#

umm

outer zenith
#

replace ur header

crimson vapor
#

why

lyric mountain
#

Eclipse is poggers

outer zenith
#

public static void main(String[] args){

#

instead of

#

public static void main(){

crimson vapor
#

that shouldnt matter tho

#

right?

outer zenith
#

it should

lyric mountain
#

It does

outer zenith
#

cause of overloading

crimson vapor
#

o

outer zenith
#

in java

crimson vapor
#

lmao

#

thats strange

vernal rivet
#

But yes it should be java public static void main(String[] args){}

drifting wedge
#

by the end of this year imma know like 10 langs

#

lmao

outer zenith
#

lmao

#

i know python and java well

lyric mountain
#

Because jvm needs to pass args to the main method

crimson vapor
#

to know a lang, you need to be decent at it by the way

drifting wedge
#

learnt python, doing js, cpp and java rn

vernal rivet
#

The main method has to have the parameters.

crimson vapor
#

I don't like when people say they know a bunch of languages then ask for help on simple things

drifting wedge
#

errored

crimson vapor
#

whats the error?

drifting wedge
#

Cannot find a class with the main method.

#

IM LEARNING JS

wide badger
#

Hi, Does anyone know how to connect the top.gg site to discord so the bot can count if you vote for the bot there and thus give rewards etc?

drifting wedge
#

java*

vernal rivet
lyric mountain
crimson vapor
#

vsc KEKW

lyric mountain
#

Ah

vernal rivet
#

Don't use vsc for java

wide badger
#

Where can i find the info on those @crimson vapor

crimson vapor
#

use eclipse at worse

outer zenith
#

?

outer zenith
#

0Exe it still didnt work

wide badger
#

ok thank u

outer zenith
#

??

vernal rivet
#

Intellij is the best for java

crimson vapor
#

I like eclipse

#

works well

vernal rivet
#

Either one works

crimson vapor
#

does what it needs to

lyric mountain
vernal rivet
#

But not vsc

outer zenith
#

even after u changed it didn't work ? @drifting wedge

lyric mountain
#

Like, EXACTLY like that

outer zenith
#

yea ik python and java

#

learning cpp in school

crimson vapor
#

snake

#

ewwww

#

I joke

outer zenith
#

and html and css im iffy

crimson vapor
#

no lang wars today

outer zenith
#

html isnt really a lang tho

crimson vapor
#

I know basic js

#

(HTML instanceof Language) // false

#

right

outer zenith
#

yw

#

ye

vernal rivet
#

I know J's, java, c#, and some cpp, and rust shrug

#

Html is technically is a language. It's considered a scripting language

crimson vapor
#

lmao all I know is basic js

young flame
#

@drifting wedge dms?

outer zenith
#

fight me

crimson vapor
#

you're telling me scratch isnt a language

#

nah

#

you're wrong

vernal rivet
#

I mean esolang shouldn't exist but it does

crimson vapor
#

scratch best language

vernal rivet
#

So scripting language can be a language happy_boy

#

And fuck scratch.

hollow sedge
crimson vapor
lyric mountain
#

Flash?

lyric mountain
#

How are u even going to test flash?

crimson vapor
#

flash dies in like 1 month

hollow sedge
#

Uh huh

lyric mountain
#

Like, browsers don't even run it anymore

hollow sedge
#

You can see why I'd be mad now

vernal rivet
#

Lol

crimson vapor
#

flash is a dead language like latin

lyric mountain
#

Dead?

#

Dude