#development

1 messages · Page 743 of 1

surreal sage
#

ok

mossy vine
#

get that with \:emoji:

surreal sage
#

ok

#

:dblMod:

#

or notwait

summer torrent
#

:dblMod:

quick grove
#

Only from pc

summer torrent
#

Yes

surreal sage
#

no id

#

what to do at id

#

server id?

mossy vine
#

no

summer torrent
#

No

mossy vine
#

emoji id

#

can you not read

surreal sage
#

yes but i dont understand

#

<dblModid?>

modest maple
#

:dblMod:

#

Then just add the emoji ID at the end

summer torrent
earnest phoenix
#

:dblMod

restive furnace
#

Is it worth of making api for dash and then make express server? or just make directly dashboard into bot ?

late latch
#

Help to do a channel search from such a value <# 652179984349134858> and get its id

#

plz

grim aspen
#

right click a channel name

#

and click copy id

late latch
#

Probably worth explaining, I'm sorry

grim aspen
#

oh

#

now i see

late latch
#

That is, it just saves the link to the channel

#

args[0]

late hill
#

Don't save them like that in the first place

late latch
#

next?

#

I already know that it’s better not to keep it that way, but the request was different

late hill
#

Well

#

You can use some regex to filter out the numbers

late latch
#

example?

late hill
#

Seeing as the format is always the same it shouldn't be that difficult to filter out the part you need

late latch
#

ok

#

thanks

late hill
#

You can google examples

#

You already know that the id will be all numbers in the string

#

You also know that the id will be the entire string - the first 2 characters and the last character

#

Multiple ways to get to it

late latch
#

In search of

empty owl
#

Like the args and stuff

#

I get the .includes

late hill
#

uh

#

.replace() maybe

#

Or splitting the string

amber fractal
#

Mostlikely

late hill
#

And than adding it back together

#

with some adjustments

empty owl
#

Ok thanks

late latch
#

hm

ruby talon
#

I there a reason I can't use exesive site elements?
For example I cant change the raduis of the .bot-img ect.

late latch
#
var logs = settings.musicCommandChannel.substring(settings.musicCommandChannel.lastIndexOf('#') + 1);
    console.log(logs);


settings.musicCommandChannel = channel id
Output : 652179984349134858>

It remains to get rid of >

earnest phoenix
#

then just remove it...?

earnest phoenix
#

rather than saving the mentions

fluid basin
#

use substring again and remove it?

earnest phoenix
#

save the ids

fluid basin
#

yeah ^^

late latch
#

@fluid basin no

earnest phoenix
#

you're putting unnecessary load on your cpu by having to extract the id out of the mention

late latch
#

I agree

fluid basin
#

I mean thats the direct answer to his question

#

well I didn't say it was the best way or anything

#

and I do agree saving the id instead is more efficient

empty owl
#

var regex = /dog/gi;

#

What does that mean

mystic nexus
#

Hello @someone how are you

mossy vine
#

matches dog globally and case insensitively

empty owl
#

Thanks

#

@mystic nexus what are you trying to do

fluid basin
#

regex is fun

empty owl
#

It’s weird since I haven’t learnt it yet

mystic nexus
#

The bot thing

empty owl
#

Yea

mystic nexus
#

Scroll up

empty owl
#

I’m trying to add it to my bot

fluid basin
#

tfw search is broken

mystic nexus
#

The pic

mossy vine
#

from experience regex is something you learn as you need it

empty owl
#

Cause that one is better

#

ok

fluid basin
#

thats rather simple

#

all you need is to check if the @\someone is in there

#

wut

empty owl
#

Yea I have it

#

figured out I think

fluid basin
#

then random user

empty owl
#

Yes

fluid basin
#

can do with a simple regex

#

or the more easier way of includes

surreal sage
#

client is bot client id right? js const dbl = new DBL('eyJhbGnodonttryl9xHPbnbbbsOeq0w0vttl_SYQkYpg7DP3U', client);

earnest phoenix
#

the client is your bots client object

#

and uhh you shouldn't share tokens

compact oriole
#

^

surreal sage
#

orginal tokens are longer and..

earnest phoenix
#

that's a DBL token ?

surreal sage
earnest phoenix
#

ah ok

surreal sage
#

i dont have to do anything at that client?

earnest phoenix
#

no

#

just client

surreal sage
#

no i dont have to?

#

ok

#

thx

earnest phoenix
#

np

surreal sage
#

how to do like: js args.startsWith('http' || 'https')

#

if js (args.startsWith('http' || 'https'))

earnest phoenix
#

well that's not how you use startsWith

surreal sage
#

i forgot it

earnest phoenix
#

and is args an array or a string?

surreal sage
#

i know

#

you dont see it rn

earnest phoenix
surreal sage
#

thx

earnest phoenix
#

that's how you use startsWith

#

np

#

Yaa but i want like above image the bar system

#

I have time system

#

well i wasn't talking to you sorry, i was replying to CDeveloper

surreal sage
#
if(args.startsWith('http')) {
  //code
} else {
if(args.startsWith('https')) {
    //code
}}``` does this work?
earnest phoenix
#

sure if args is a string

surreal sage
#

ok

earnest phoenix
#

and you can use else if

surreal sage
#

yeah.............

#

makes no change well position

#

but the *

#

i wanted to make a "aximage <link>" command and i dont want anything else then a http or https link cuz y

latent willow
#

it would never reach the https since https also starts with http

surreal sage
#

thatstrue

#

then https:// or http:// lol

#

http or https can be a fool to

#

ik

twilit rapids
#

A simple solution would be to check for https first

surreal sage
#

ok

warm marsh
#

@surreal sage you should only need to check for http as https includes http.

surreal sage
#

ik

#

i did it

#

already

warm marsh
#

Fair.

surreal sage
#

join my bot server then

mossy vine
#

why would they join your server for that lol

earnest phoenix
#

hi

earnest phoenix
#

hi there is an xp system and i want to add a set level command
but I tried everything but it doesnt work, can someone help me here is the whole system

#
  //console.log(`xp ${xpAdd}`);

  if(!xp[message.author.id]){
    xp[message.author.id] = {
      xp: 1,
      level: 1
    };
  }

  let curxp = xp[message.author.id].xp;
  let curlvl = xp[message.author.id].level;
  let nxtLvl = xp[message.author.id].level * 600
  let nxtLvldel = xp[message.author.id].level * -600


  xp[message.author.id].xp =  curxp + xpAdd;
  if(nxtLvl <= xp[message.author.id].xp){
    if(curlvl >= 100) return;
    xp[message.author.id].level = curlvl + 1;
    xp[message.author.id].xp =  curxp + nxtLvldel;
    message.channel.send(`> Gratulálok <@` + message.author.id+`> elérted a **${curlvl + 1}** szintet, csak így tovább`)
  }


  fs.writeFile("./xp.json", JSON.stringify(xp), (err) => {
    if(err) console.log(err)
  });```
#

discord js

late latch
#
const Discord = require('discord.js')
const profile = require('../profile.json')
const fs = require('fs')
module.exports.run = async (ub, message, args) => {

    if (!message.member.hasPermission("ADMINISTRATOR")) return message.channel.send('Недостаточно прав').then(x => x.delete(1 * 5000))

    let pUser = message.mentions.users.first() || message.author;
    if (!profile[pUser.id]) {
        profile[pUser.id] = {
            balance: 0,
            BitBalance: 0.001
        };
    };
    let u = profile[pUser.id];
    fs.writeFile('./profile.json', JSON.stringify(profile), (err) => {
        if (err) console.log(err);
    });
    let member = message.guild.member(message.mentions.users.first() || message.guild.members.find(m => m.user.username == args[0] || m.id == args[0]))
    const setbalance = args[2]
    const setbitbalance = args[3]
    if (!member) return message.channel.send('Введите имя пользователя')
    if (!setbalance) return message.channel.send('Введите баланс')
    message.channel.send(`Установка баланса\n\nПользователю:${member}\nБаланс:${args[2]}`)
    u.balance += args[2]
}

module.exports.help = {
    name: "sb"
}

Edit for yourself @earnest phoenix

quartz kindle
late latch
#

?

earnest phoenix
#

using json as a database 🤢

#

did i hear json database

late latch
#

I agree, I also do not like

earnest phoenix
#

then dont do it

late latch
#

What???
I actually kind of helped a man above

earnest phoenix
#

oh you were replying to that dude

modest maple
#

thats a four course meal

late latch
#

LUL

modest maple
#

meanwhile im dealing with this annoying issue:

#
Traceback (most recent call last):
  File "C:\Users\ChillFish8\AppData\Roaming\Python\Python37\site-packages\discord\client.py", line 270, in _run_event
    await coro(*args, **kwargs)
  File "C:/Users/ChillFish8/Documents/SoraBot/Sora.py", line 107, in on_message
    Leveling.leveler(message, client, Colour)
  File "C:\Users\ChillFish8\Documents\SoraBot\Leveling.py", line 97, in leveler
    Data = readfile(message.author.id, DefualtLevelBoundry, BaseMultiplier)
  File "C:\Users\ChillFish8\Documents\SoraBot\Leveling.py", line 81, in readfile
    insert_level_data(UserID, DefualtBoundary, Multiplier)
  File "C:\Users\ChillFish8\Documents\SoraBot\Leveling.py", line 61, in insert_level_data
    c.execute("INSERT INTO levels(userid, level, xp, levelup, multiplier) VALUES(userid=?, level=?, xp=?, levelup=?, multiplier=?)", (int(UserID), 0, DefualtBoundary, Multiplier))
sqlite3.OperationalError: no such column: userid```
#
  with conn:
        print("Data base opened sucessfully!")
        # Create table
        c.execute('''CREATE TABLE levels(userid integer, level integer, xp integer, levelup integer, multiplier real)''')
        print("Level Table Made Sucessfully")
        conn.commit()```
#

when this is happening

#

smh

#

makes me vvv sad

late latch
#

sqlite3.OperationalError: no such column: userid?

modest maple
#

its not liking that i told it to add values into the column userid

#

saying that it doesnt existr

#

even tho

#

i litterally define it above

#

and then save the table

#

just hrrrrrrrrrsadas

earnest phoenix
#

i sorta wished i picked sql based db instead of mongodb for my project

#

oh well ¯_(ツ)_/¯

modest maple
#

i dont

earnest phoenix
#

we have a lot of relational data

modest maple
#

,you get random bugs like it not liking a column which is litterally their and staring you in the face

#

xD

earnest phoenix
#

that happens regardless of what db struct you use :^) just means you did it wrong

#

i usually use orm frameworks because sql gives me headaches notlikenoot

#

orm?

#

object-relational mapper

#

like?

#

uh, in c# we have entity framework/core

#

basically

#

you do everything with objects

#

the orm framework does the sql for you

#

ok but like where is it stored

#

oh its sql

surreal sage
unique nimbus
#

why is it 3314 files

surreal sage
#

node modules

#

new module added so i got the reupload

#

UTIL

#

axannounce #commands grey OOOOOOOOOOOOF OOOOOOOOOOOOF

#

there it is

unique nimbus
#

what

surreal sage
#

cant find anything

#

cuz i deleted everything

restive furnace
#

@surreal sage uhm... Fun fact: you can re install modules.

green kestrel
#

@surreal sage FTP? What is this, 1999?

surreal sage
#

i cant with my fps

#

u dont know what ftp is?

restive furnace
#

yes i do, but how u then start the bot?

surreal sage
#

with the vps

mossy vine
#

@green kestrel what do you sugest instead

restive furnace
#

cli?

surreal sage
#

just for upload/downloading files

#

lol

restive furnace
#

but i dont understand, how u start the bot w/out cli/rdp

green kestrel
#

SSH/SCP/SFTP

surreal sage
#

sftp i use

green kestrel
#

anything other than FTP

surreal sage
#

ftp is for website :)

green kestrel
#

Good :)

restive furnace
#

then its possible to use ssh

#

and reinstall modules

#

boom

green kestrel
#

FTP is plaintext and anyone sniffing your traffic can see your password

surreal sage
#

not on mine

restive furnace
#

sftp = ssh file transfering idk

earnest phoenix
#

there is ftps

#

but

#

ftp is still slow and outdated

surreal sage
#

its sftp

restive furnace
#

you can connect to ssh too w same host:port and username and pass

#

atleast i think thats the logic..

surreal sage
#

does not work

restive furnace
#

u tried w putty?

#

kk probably user is then limited to only sftp

green kestrel
#

sftpopnly shell and chroot

#

Yeah that's secure

#

I assumed FTP when I saw FileZilla

#

Personally I prefer winscp, but FileZilla works. I stopped trusting them when they tried to put spyware in their installer in agreement with sourceforge

amber fractal
#

You dont download it from sourceforge tho....

prime cliff
#

Omg windows defender just logged a virus from filezilla

unique nimbus
#

bruh

prime cliff
#

It seems to be most anti-virus softwares too

unique nimbus
#

FileZilla is fine if you download it properly I dont have any viruses

green kestrel
#

@amber fractal not the point, they agreed with SF to bundle adware so I don't trust them anywhere now

#

They may be clean everywhere else. They may have learned their lesson, but why risk it when there are alternatives? 99% of the time i just use scp -r on the command line

amber fractal
#

I mean every freeware does that just actually pay attention when you download shit it isnt hard

unique nimbus
#

exactly

#

There was a menu for downloading some crap and legally they have to have a deny button

#

click that

#

ez

prime cliff
#

Yea but it comes to the point of freeware installing shitty programs and browser extension by a tiny checkbox or having to click advanced install to not allow it.

green kestrel
#

I don't and can't accept such behaviour

#

Every technical competent person like us that clicks "don't install" on the adware option adds to their download count and encourages them to distribute to others who aren't so smart

earnest phoenix
#

hey, why do I get this error when i try to update my server on top.gg discord servers?
500
Internal server error, server lost?
If you believe something should be here contact us through our Discord Server or at support@top.gg

green kestrel
#

I do think the FileZilla devs learned their lesson pretty quick, but I don't forgive that so easily

#

It was all over theregister, Slashdot etc

#

@earnest phoenix they've upped their cloudflare setting and it redirects now from a html page with js for some. Hopefully they've fixed that now

earnest phoenix
#

ive tried to update it on my ipad, different browsers, everything

#

but it always redirects to 500 internal server error

#

well

#

internal server error

#

it's not you, it's the server that's erroring out

#

switching your browser won't help

#

oh okay so its everyone getting it?

#

maybe

#

most likely

knotty steeple
#

a PUP is not 100% a proplem

#

its just unwanted and slightly annoying

unique nimbus
#

Just delete it

knotty steeple
#

cant really just delete a pup its probably in some other app

earnest phoenix
#

guys i made a bot in discord and when i try to invite it it redirects to the link i put but the bot doesnt appear in the server any help?!

quartz kindle
#

whats the link?

distant plank
#

How can I detect if a message has an emoji?
I tried to use this
!fwemoji.startsWith("<:") && !fwemoji.endsWith(">")
to know if a message does not have an emoji, but I think it only works with custom emojis, but if I use the default ones it does not detect

#

discord js

earnest phoenix
#

@quartz kindle private?

west raptor
#

what's fwemoji?

distant plank
#

@west raptor
let fwemoji = args[3]

west raptor
#

so it's the 4th thing passed in?

earnest phoenix
#

&&

distant plank
#

@west raptor yes

west raptor
#

so whats happen if the if statement is true

#

does it returns an error or something?

distant plank
#

@west raptor returns nothing

west raptor
#

no need to ping me everytime

#

alright

distant plank
#

ok xD

west raptor
#

aaa i used to have a function to parse emojis but i cant search for it

distant plank
#

Here I was testing, when it is a custom emoji nothing happens because until now I have not put anything up, but when it is an emoji by default it detects it as it does not exist

earnest phoenix
#

i think its beacause regular emojis are detected as ascii characters

distant plank
#

And what can I do?

earnest phoenix
#

idk

distant plank
#

:c

earnest phoenix
pliant adder
#

ascii?

#

You mean unicode?

distant plank
#

xD

trail reef
#

Do bots still have free nitro?

earnest phoenix
#

sry im lazy

#

""nitro""

#

yes

#

why

trail reef
#

It'd be cool to add custom emojis, that's all

#

(to my bot)

idle basalt
#

you can

#

make a server with you and your bot, add as many emoji as you like

#

then you can use them anywhere with their id

trail reef
#

Yeah

earnest phoenix
#

:doggowave

#

for example

trail reef
earnest phoenix
#

<:emoji:id>

trail reef
#

oops lol

#

thx

earnest phoenix
#

and <a:emoji:id> for animated one

trail reef
#

oOH

earnest phoenix
#

windows key + shift + S

empty owl
#

What

west raptor
#

?

distant plank
#

@west raptor did you find your code? :c

west raptor
#

I cant

#

because discord search is borked

scenic kelp
#

search by scrolling up

earnest phoenix
#

Wonder if there's a possibility for the development of a movie bot, given the ability to go live exists KanchiSipFast

unique nimbus
#

So the bot will stream movies?

earnest phoenix
#

Basically

#

bots cannot send video data

unique nimbus
#

That is illegal if you don't have permission

#

anyway

earnest phoenix
#

there are legal ways to stream movies

#

Totally not working on something like that

unique nimbus
#

However that requires licencing

earnest phoenix
#

theoretically speaking, if bots were able to send video data, the bot could just stream from an owner's movie subscription service

unique nimbus
#

yes

#

however wouldn't the owner need permission from the company who made the film to stream it?

earnest phoenix
#

not really

#

it's equivalent of having a movie night

unique nimbus
#

However the bot is "to the public"

#

that is to a group

earnest phoenix
#

good point but go live has a limited amount of viewers

#

so 🤷‍♂️

unique nimbus
#

However it is still public

earnest phoenix
#

this is just an if

#

bots still aren't able to send video data

unique nimbus
#

correct

earnest phoenix
#

they probably never will

unique nimbus
#

Just wait until someone makes an AI which logs what happens in the movie

#

into an audio

earnest phoenix
#

google's voice to text API 🙃

unique nimbus
#

However more advanced

#

Think of it as an auto-making audiobook

#

but it gets it from an mp4

modest maple
#

what

unique nimbus
#

Somebody wanted to make it so bots can stream video content in a Go Live situation

amber fractal
#

No

#

Discord already shits itself enough

#

we dont need bots using up more bandwidth

empty owl
#

lmao

unique nimbus
#

Well its also illegal in some ways

empty owl
#

music bots make up like more than half of the bots

#

tho

unique nimbus
#

Stream the whole bee movie

empty owl
#

yes

unique nimbus
#

there will be a guild just for that

amber fractal
#

Then twitch would be illegal too

#

Any streaming service

empty owl
#

according to all know laws of aviation

#

there is no way a bee could fly

unique nimbus
#

Steven, its content like a whole movie

#

without consent

#

thats illegal

amber fractal
#

Yes and the DMCA exists

empty owl
#

wait

#

how does spotify avoid copyright

amber fractal
#

People stream movies on twitch all the time illegally

#

Their tos

empty owl
#

oh

amber fractal
#

the content is on behalf of the user

#

not the company itself

vital lark
#

Spotify has to get permission from the music label, I think

empty owl
#

then how about music bots

amber fractal
#

All streaming services use that

empty owl
#

arent music bots basically spotify but on discord

amber fractal
#

I asked discord about the legality of music bots, they arent allowed to tell us though

empty owl
#

oh

vital lark
#

no not really

empty owl
#

wait no they take it from yt

#

most

amber fractal
#

Some take it from a lot of places

#

I wouldn't mind seeing rhythm taken down lmao

scenic kelp
#

I mean there's nothing inherently bad about music bots just like there's nothing inherently bad about torrenting

amber fractal
#

There is tho

scenic kelp
#

o

amber fractal
#

torrenting is illegal

scenic kelp
#

No

#

Torrenting as in bittorrent protocol

#

Just like Tor isn't illegal

amber fractal
#

Well then what you said makes no sense

scenic kelp
#

it's a medium for bad things but not bad itself

amber fractal
#

if you download content that is copyrighted that you have no rights to

#

it's illegal

empty owl
#

how do you get updates out to your users without tos abuse or it being annoying

grim aspen
#

it's called pirac

#

piracy*

amber fractal
#

Which is illegal

#

And you wouldn't steal a car

scenic kelp
#

smh ik piracy is illegal

amber fractal
#

Then I don't see the argument here

scenic kelp
#

You can torrent things without pirating things

empty owl
#

i have the

scenic kelp
#

some software also distributes via torrents

amber fractal
#

If you dont own that thing, however, it is piracy

scenic kelp
#

yes

amber fractal
#

Then what are you even talking about?

scenic kelp
#

idk anymore

amber fractal
#

Copyrighted things regardless of torrent is illegal to download without a license or permission

scenic kelp
#

My point would be that a music bot isn't bad so long as it doesn't break copyright laws but what music bot doesn't violate copyright laws

modest maple
#

Most? @scenic kelp

scenic kelp
#

?

modest maple
#

It's not against the law to stream music off somthing like YT which TOS allow bots Todo as long as it isn't a pay to unlock <x song>

#

If you bot forced people to pay to play a song then that would be copy right

#

And disallowed

distant plank
#

Is it possible to get the url of an emoji from those already in discord?

earnest phoenix
#

twemoji?

distant plank
#

what?

earnest phoenix
#

twemoji or custom

distant plank
#

twemoji

amber fractal
#

Yes

earnest phoenix
amber fractal
earnest phoenix
#

yeah but you aren't going to do that for every single one lol

#

that's why i sent the map

distant plank
#

but can a bot get it?

amber fractal
#

He sent the map

trail reef
#

copy link only works for the messages

#

not the emoji

twilit rapids
#

You can copy the link of an emoji

trail reef
#

to get the id of an emoji use ctrl+shift+i and select the emoji to get it's id or link

#

oh

#

Didn't seem to work for me

sudden geyser
#

That's the most clean map I've ever seen

amber fractal
#

It actually is tho

earnest phoenix
#

steven

#

ily

unkempt arch
#

yall how do you define item where you want to get that specific item given by forEach in this scenario:

    category.forEach(item => {
    let demand = client.users.size * .5
        let supply = government.item
      })
low wasp
#

are you trying to get the item in the government array?

unkempt arch
#

yeah

low wasp
#

government[item]

unkempt arch
#

thanks mate

low wasp
#

np

slender mountain
#

hey guys, if I were to theoretically want to fetch 100 message until I reached the end of a channel, how would I do this?
Some sort of loop as the limit is 100 messages for fetchMessages

#

this is with discord.js btw

warm marsh
#

With a loop yes just make sure your not abusing the api.

sudden geyser
#

Don't do that

slender mountain
#

Anyone know how to get the first message ever sent to a channel?

#

(discord.js)

earnest phoenix
#

@late latch thank you for doing what I wanted just doing it wrong

#

error shown there could not help anyone

late latch
#

@earnest phoenix Nothing, all is well

#

Lvl = Lvl + args[1]

earnest phoenix
#

not completely because you add it and I want to set it up and the "sign screwer doesn't move one level from then on but 1 after 11 after 111

#

your code

#

    let pUser = message.mentions.users.first() || message.author;
    let u = profile[pUser.id];
    fs.writeFile('../xp.json', JSON.stringify(profile), (err) => {
        if (err) console.log(err);
    });
    let member = message.guild.member(message.mentions.users.first() || message.guild.members.find(m => m.user.username == args[0] || m.id == args[0]))
    const setlvl = args[1]
    if (!member) return message.channel.send('jelölj meg egy felhasználót')
    if (!setlvl) return message.channel.send('Kérlek ad meg az értéket')
    message.channel.send(`${member} Beállítotják a szintjét\núj szinteje:${args[1]}`)
    u.level = args[1]
}

module.exports.help = {
    name: "setlevel"
}```
#

xp json error

#

{"xp":8,"level":"10"}}

#

this is how it should look

#

{"xp":8,"level":10}}

#

cause of error "

#

setlevel command writes

#

all I need to do is set the level

#

pl

#

Level 10

#

setlevel 11

#

level 11

#

just added "

compact raft
#

hello

earnest phoenix
#

here I show you what my problem is

late latch
#

try setting xp = 598.

willow magnet
#

Idk why when i post this in #topgg-api it gets deleted

grizzled raven
#

@earnest phoenix Number(args[0])

willow magnet
#

Where? @earnest phoenix

twilit rapids
raven axle
#

I have a problem if i start my bot using the sharding then it repeats its self and when I use a command it sends the message like 3times

#

Or is that normal lol

quartz kindle
#

then you're doing something wrong

#

@willow magnet you set the webhook port and password yourself. then you need to go to your bot's edit page and put there the password you set and the full url to your webhook

willow magnet
#

@quartz kindle how to get the full url?

quartz kindle
#

depends on your hosting

#

where is your bot hosted?

compact raft
#

can i host my bot free??

mossy vine
#

well no but actually yes

twilit rapids
#

You can host it for free but then your bot will be very limited

compact raft
#

ohh

#

can i host my bot on shared hosting which is not supported nodejs

green kestrel
#

if you have ssh access to the shared hosting, you can maybe install nodejs in there yourself

#

but you can get an entire virtual server for under $5 a month

#

then you can install what you want

compact raft
#

no i already have shared hosting of 1 year

empty owl
#

@slender mountain try message.channel.messsages.first()

broken jay
#

I need help with discordgo. I need use db connection pool, that i create in bot.go. But all handlers is in different files. Is there way to move pool to handler files or attach to discordgo.Session?

surreal sage
#

is for json multiple things for one this the same? json "test": {[ "hi", "test" ]}

compact oriole
#

What do you mean

#

That sentence made 0 sense

surreal sage
#

oh

vital lark
#

no

surreal sage
#

oh {[ and ]} right?

vital lark
#

that's not valid json

compact oriole
#

^

vital lark
#

if ur using the .json extension

#

it can be an object or an array

surreal sage
#

i want it to be text

vital lark
#

oh

#

ur using plain JavaScript

surreal sage
#

now

#

ye

vital lark
#

you have to randomize the array

surreal sage
#

i do

compact oriole
#

so whats the problem lol

surreal sage
compact oriole
#

copy pasta dev doesnt know what to do

surreal sage
#

i want to know how to get that in javascript into json

#

js --> json

earnest phoenix
#

you could've said so in the first place

#

instead of making us guess

surreal sage
#

i did

#

tf

earnest phoenix
#

it's quite literally the same in json

compact oriole
#

No you didnt

surreal sage
#

so does

compact oriole
#

Learn English

surreal sage
#

.......

#

but: how to

earnest phoenix
#

JavaScript Object Notation, so doing it in json is the same as in js

restive furnace
#

google -> learn english to learn englidh

surreal sage
#

just removing const?

earnest phoenix
surreal sage
#
{
    "images": [
            "test"
        ]
}``` hmm? works?
mossy vine
#

yes that is valid json

surreal sage
#

ok thx

earnest phoenix
#

why do you need it to be an object if you're only going to have one property though

#

might aswell make it an array from the getgo

surreal sage
#

yeah

#

like for multiple commands you could use this

#

if you want more

#

or more prefixes

compact oriole
#

???

#

wdym

earnest phoenix
#

uh

surreal sage
#

nvm

earnest phoenix
#

avoid using json as a database

compact oriole
#

^

mossy vine
#

^^^^^^^^^

surreal sage
#

wdym not use it as db?

compact oriole
#

...

#

Copy pasta dev uses bad practices

earnest phoenix
#

storing dynamic data in a json file is really bad

surreal sage
#

but links ok?

#

or text

earnest phoenix
#

yeah, sure

surreal sage
#

ok

earnest phoenix
#

just keep in mind that you should read the file once on boot and then save the object in a variable

vital lark
#

json can be linked with numbers, objects, strings, and booleans

compact oriole
#

^^

prime cliff
#

"storing dynamic data in a json file is really bad"
Bruh json files are literally meant to be dynamic in the first place

modest maple
#

Not rlly

prime cliff
#

Yes that's why every language allows you to get the keys and root values when loading a json file so you can either load it fully or get and save certain peices of data

restive furnace
#

but theres not good reading/writing thingy what wouldnt corrupt json files ex if u have 5 shards and every 5 shards write into it at same time and result is corrupt, thats why use real db/on boot set them into variable

earnest phoenix
#

Yes that's why every language allows you to get the keys and root values when loading a json file so you can either load it fully or get and save certain peices of data
that literally makes no sense

#

how is getting keys and values relevant to storing data that's often changed in json files

#

and no

#

json files aren't meant to be used in the context of being constantly changed

#

it'll never even compare with actual databases

#

it's IO operations

#

it is bad for a reason

restive furnace
#

MongoDB is k for not so big bot

#

(if u dont know its json v2)

earnest phoenix
#

glorified json

mossy vine
#

its literally bson but its awesome

earnest phoenix
#

it's a nice idea

#

but it's slow

restive furnace
#

it dont really mind if ur bot does only have few shards/no shards

compact oriole
#

its easy to use

prime cliff
#

If your bot is to the point of needing to be sharded then it's expected for you to already have a database setup

modest maple
#

not really?

#

not all sharded bots necessarily need DBs but json is just not good for constantly changing values full stop

earnest phoenix
#

hey everyone
I want to ban users from my bot. I've created a banlist.json file, put this (https://prnt.sc/q8wyjw) in the file, and then put a little loop (https://prnt.sc/q8wzzn) into the index.js file. It works. The only thing I need is commands to remove or add users into the banlist.json file. How to do that?

Lightshot

Captured with Lightshot

Lightshot

Captured with Lightshot

cinder patio
#

note that modifying the file too often is not a good idea

#

you should use a real database

earnest phoenix
#

hmm

#

too lazy for it

modest maple
#

json as DB is just not good

#

xD

cinder patio
#

Also, you can use banlist.users.includes(id) instead of a loop

surreal sage
#

whats the property to see how many guilds my bot is in?

earnest phoenix
#

in which lib

surreal sage
#

discord.js

surreal sage
#

count

#

in numbers

earnest phoenix
#

yes, it's a collection

surreal sage
#

no

#

like

#

Guild Count:
10

earnest phoenix
#

yes, it's a collection

surreal sage
#

sigh ok

cinder patio
#

collections have a size property

surreal sage
#

it takes long to install a module

modest maple
#

bruh

surreal sage
#

works right? ```js
if (command === "delete" || command === "deletechannel") {
if(!message.member.hasPermission("MANAGE_CHANNELS")) return message.reply(You don't have permission. :no_entry:);
client.user.delete(${message.author.tag} deleted this channel.)
message.reply(Deleted channel!)
}

trail reef
#

Test it lol

restive furnace
#

@surreal sage what fp??
collection#size

surreal sage
#

nvm

trail reef
#

After the multiple messages saying json = trash I started trying to migrate to MongoDB. I’m running my bot off a raspberry pi (if that helps at all). I’m getting this error:
Extension 'cogs.currency2' raised an error: ConfigurationError: query() got an unexpected keyword argument 'lifetime'

restive furnace
#

Tried searching from MongoDB doc?

trail reef
#

Yes, I have tried the trouble-shooting suggestions already

restive furnace
#

k, i dont know cuz using postcres

#

postgres

trail reef
#

Ok

vital lark
#

never used pymongo

#

so can't really help

slender thistle
#

Send related code

trail reef
#

K

#
from discord.ext import commands, tasks
import discord
import dbl
import pymongo
import dns
import json

class Currency2(commands.Cog):
    def __init__(self, bot):
        dbclient = pymongo.MongoClient("mongodb+srv://MongoDB0:theartofracingintherain@cluster0-22qio.mongodb.net/test?w=majority")
        db = dbclient.test
        
    @commands.command(name="boop")
    async def boop(self, ctx):
        ctx.send("bonk")
            
def setup(bot):
    bot.add_cog(Currency2(bot))
#

That’s my code

#

sad programmer noises

restive furnace
#

sry but idk

#

ask on python disc at #help-0(-7)

#

(in databases channle they wont answer)

modest maple
#

@trail reef youre passing it a object but telling it to get the command cog within what its being passes?

#

commands.Cog is just getting set to the object bot

#

idk if thats what its suposed todo or what

trail reef
#

That’s how you use cogs and extensions, I use this regularly and it seems to work.

surreal sage
#

i think shutdown command for discord.js is client.disconnect

#

a alternative

knotty steeple
#

you can literally just process.exit() as a shutdown command

#

or restart if you use pm2

#

what exactly does <Client>.disconnect do

mossy vine
#

disconnects from the gateway

knotty steeple
#

and

#

exists process..? xd

lavish inlet
#

Kill me pls I no understand

mossy vine
#

i dont think it does

knotty steeple
#

so it just leaves it

pliant adder
#

leaves whut

surreal sage
#

is it possible to add/edit things to a ftp server?

#

with discord.js

#

nvm

#

how to let a a bot edit a voice/text channel in a server to a specific value?

#

every minute

hollow condor
#

hi

#

i have a question, not about bots but limitations

#

how often should app presence state or anything be updated without being considered spam

surreal sage
#

60 max for status

slender thistle
#

1/12s

surreal sage
#

oh

#

lol

lofty lagoon
#

script for join voice chat :) pls

slender thistle
#

We don't spoonfeed here

surreal sage
#

how to like do a find server with id command save that as const/var then (varname).channels.find("name", "test1") and gets a channel out that server

amber fractal
#

First, don't use that way of find, it's deprecated, pass a function. Second it's like assigning any other variable, but you might need to await it

surreal sage
#

wait il get on my phone

#

im here

earnest phoenix
#

how do i add days to a date and time?

green kestrel
#

Wait a while

#

🤣

pliant adder
#

by formating it

#

@earnest phoenix

vital lark
#

what @earnest phoenix

earnest phoenix
#

i want to try get the expiry date

#

i have 300 days

#

and i want to add that to the current date

#

how would i convert that to the month the day and time

#

what language? js?

#

yes

#

Date.now() + <300 days in ms>

#

ill try it

#

that's how you get the expiration date of whatever is expiring

#

will hat convert to the year month date?

#

it will be a date in ms

mossy vine
#

you could also use somethig like moment

earnest phoenix
#

Hello

#

Hello

willow magnet
#

@quartz kindle my bot is hosted on my own vps

quartz kindle
#

10 hours later lol

#

then just replace 0.0.0.0 with your vps's ip address

distant plank
#

I already discovered how to detect a default emoji of discord, so I share it xD

let regex = [ 
     "\u00a9",
     "\u00ae",
     "[\u2000-\u3300]",
     "\ud83c[\ud000-\udfff]",
     "\ud83d[\ud000-\udfff]",
     "\ud83e[\ud000-\udfff]"
    ]

let input = args[0];

if (input.match(regex.join('|'))) return message.reply("It's an emoji")
else return message.reply("not an emoji")
solar mauve
#

How I can kick members in library JDA pls code(I tried all versions but Nothing is working)?

earnest phoenix
#

i don't think people are going to spoon feed you code

solar mauve
#

It is one line...

earnest phoenix
mossy vine
#

then figure it out LOL

distant plank
#

xD

earnest phoenix
#

.

#

What is AWS

severe gyro
#

Amazon Web Services

#

A cloud platform similiar to GCP, Digital Ocean etc..

west spoke
#

No?

severe gyro
#

Oh, ok, sorry

west spoke
#

when tf did I say that lol

#

but ye aws imo is simple

earnest phoenix
severe gyro
#

Well, i thought you meant it with "hehe says who"

west spoke
#

You said "not everything can be done with aws"

#

that's the response

#

Sorry if it seemed like something else

earnest phoenix
west spoke
earnest phoenix
#

😅

severe gyro
#

Oh, well, i misunderstood, it's just that i'm a Digital Ocean fanboy

west spoke
#

^

earnest phoenix
#

Digital Ocean is free right?

west spoke
#

Nope

severe gyro
#

Well, no

earnest phoenix
#

Hmmm

west spoke
#

I think that's just a bot host

#

I may be wrong

severe gyro
#

It's not

vital lark
#

@solar mauve we can't help you if you don't share whats wrong

west spoke
#

but if you have access to apache you can host a website on a temp IP

earnest phoenix
#

I have a vServer...

west spoke
#

Static*

#

I'm just pointing it out

severe gyro
#

It's a full-fledged platform, not just a bot host

west spoke
#

for anyone else

#

ah, cool

vital lark
#

also what version of jda are you using?

earnest phoenix
#

I use js

severe gyro
#

Also, @earnest phoenix, if you're searching for something free, Zeit Now and Heroku are good

west spoke
#

same for AWS. Storage, web hosting, scripts hosting (lambada, etc.) and a lot of other 3rd party stuff that's useful

#

Heroku for the website, not bot*

severe gyro
#

Well, it's possible to host bots there too

earnest phoenix
#

Bot i host over my vserver

#

i wouldn't recommend any free hosts

#

By zaphosting

#

they are generally bad

west spoke
#

I self-host

severe gyro
#

Well, Zeit Now is not that bad

#

But it's mostly used for static content hosting

earnest phoenix
#

is Zeit Now for websites

#

I also hosted myself for a long time

severe gyro
#

Well, yes and no

earnest phoenix
#

On Raspberry PI 3b+

severe gyro
#

@earnest phoenix It's intended for websites but you can use it to host APIs

earnest phoenix
#

lol

#

how do i convert 300+ days to the current time to get this format? Jan 5, 2021 15:37:25

#

i also linked this earlier
or you can just do .toString()

severe gyro
#

Funniest thing about Zeit Now is that it's actually AWS restricted by Zeit to only allow what they want and given to you for free until you reach the limits (that are rather low)

#

It literally is AWS

west spoke
#

AWS limits are actually quite high

green kestrel
#

Is there some kind of newbie page for this channel that answers such faq entries as "where can I get free hosting", "why not glitch"etc?

#

We seem to answer these questions an awful lot

earnest phoenix
#

-tags

green kestrel
#

Should be a GitHub wiki or something

#

You have to know what tag to search which is only useful if you know it's there already

#

Also iirc only mods can add tags? I'd happily contribute to a FAQ wiki

west spoke
#

On it

#

hehe

#

should I slap it onto a readthedocs?

modest maple
#

koyu answers alot of stuff

#

but it should be updated yh

west spoke
#

Yeah ik

#

but no new user reads it smh

modest maple
#

we need as the hermits of #development to create a C+P paragraph

west spoke
modest maple
#

to send to any new person approaching the area

#

xD

west spoke
#

d o n e

#

help me change it

#

I just got the basics down

modest maple
#

python isnt exactly the 'easiest' to learn with bot making

west spoke
#

ik but it's one easy to learn

modest maple
#

its somtimes harder infact cuz people overestimate their ability after spending 5 mins with python

west spoke
#

^

#

I'll change it

green kestrel
#

Python peh

#

Back when I was a kid we programmed in BASIC. You could feel like a programming god in half an hour with that

west raptor
#

Having an issue where I can just directly pass the CreateEmbed object to CreateMessage::embed and I'm not sure how to work around this since I don't want to pass a function ```rs
#[command]
fn info(_ctx: &mut Context, msg: &Message) -> CommandResult {
let embed = CreateEmbed::default()
.title("Rin bot information")
.description(
"..."
)
.field("Owner", "Dream#0009", true)
.field("Github", "aapriI/rin", true);

msg.channel_id.send_message(&_ctx.http, |m| m.embed(embed))?;

Ok(())

}```

unique nimbus
#

You still code in BASIC @green kestrel

#

well some schools

#

in UK

#

still does Basic

green kestrel
#

I uh, grew out of it, like babies grow out of nappies

unique nimbus
#

I think Python is decent to what it does

green kestrel
#

It doesn't scale for big programs but is really a great beginner language

unique nimbus
#

Just like any other languages

#

yes

green kestrel
#

Basic I mean

unique nimbus
#

yes

west raptor
#

python is actually decent for big scale projects

unique nimbus
#

It is decent

#

however the only problem I find with python is how it likes to take a lot of ram

green kestrel
#

Python tries to be what basic was but is still kind of advanced for a pure beginners language, a beginner's programming language shouldn't go anywhere near objects, classes, or even modularity imho

#

It's too much for someone to take in who's just learned what a variable is

unique nimbus
#

I mean however

#

People makes bots as their first project

green kestrel
#

Most interpreted languages take a ton of ram

#

Someone had a go at me last week for running 10 shards for 480 servers, because each was a thread, "but threads are 60+ megs each" not in a compiled language they aren't

west raptor
#

aaaaa i still can't figure this out and i've been trying for a while now

#

closures are annoying because I want to just directly pass an object

#

but

green kestrel
#

@unique nimbus making a bot as a first project is like.... Hmm... Every dev community has them. Gamedev has the newbies who want to make an mmo that does every game mechanic. Osdev has the newbies that want to make windows...

west raptor
#

i can't

#

osdev is a SUPER slow process

green kestrel
#

Osdev is a pointless process

#

IMHO

#

Unless you're a Linux kernel dev

unique nimbus
#

The fun thing is, people are fucking retards when they think that these look easy but will actually make you want to die

green kestrel
#

Or other large established open source os

west raptor
#

I want to go into os development so I'm attempting to get into it

#

it's tedious but you learn a lot

green kestrel
#

I made an OS that had its userland in interpreted basic

#

It was funny

modest maple
#

Python is pretty good with scaling

green kestrel
#

Had filesystem drivers and all sorts

modest maple
#

It's also incredibly powerful with AI

#

As for ram it doesn't nessesarily use that much just most people don't optimise their code properly

west raptor
#

python in ai is pretty good yeah

#

wish other languages had better support for it

#

I mean

#

tensorflow basically focuses on python when it comes to ai

green kestrel
#

I'm one of the few that doesn't bash perl

#

But I've seen some awful perl scripts

west raptor
#

i've never used perl honestly

modest maple
#

Tensorflow makes use of alot of python's simple way of workings etc compared to other languages

#

You can get tensorflow for java

#

But it's rlly not very good

#

And perl is alright ig?

west raptor
#

yeah that's what im saying

modest maple
#

It's just mostly been replaced by subscripts of JS now

distant plank
#

Why can't Unicode emojis be saved in MySQL?

unique nimbus
#

idk

quartz kindle
#

It is important to point out that the 3 bytes of utf8mb3 was an optimization chosen to cover "most modern languages". This optimization becomes untrue in MySQL 8.0 because of a number of performance enhancements

#

so basically no reason to use utf8 anymore, one should always use utf8mb4, but utf8 (mb3) is still the default

distant plank
#

@quartz kindle
I'm trying to use this to change it, but I get an error that I don't understand
ALTER TABLE table_name CHANGE column_name column_name VARCHAR(140) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL;

error:
Missing comma before start of a new alter operation. (near "CHARACTER SET" at position 63)

floral bloom
#

Discord.js
How come the bot won't send a message to the specified channel?

client.channels.get("648064713132867584").send({ <embed> })
```The code before and after this bit is working. It's not in any kind of `if () {}` or any other thing to check it... I'm all out of ideas.
vital lark
#

are you sure the channel exists

#

Collection#get can return undefined if it doesn't exist

floral bloom
#

Yes, I directly copied the channel ID. Also, no errors.

amber fractal
#

perhaps you copied the incorrect id

floral bloom
#

Nope; no other channel received the message.

junior hornet
#

I’m new to making bots and I keep getting an error in my logs saying “ discordAPIERROR : missing permissions “ how would I give it the permissions it needs to play music in vcs

#

Also am I allowed to put image of error in chat

floral bloom
#

Enable the permissions for VC.

junior hornet
#

In the server? Beacuse i already did

earnest phoenix
#

Is it just me who is experiencing problems which MongoDB deleting the entire document sometimes?

vital lark
#

@earnest phoenix which language and library

junior hornet
#

Yea I already did that would you mind looking at my code ?@floral bloom

vital lark
#

it could be you're doing something wrong

floral bloom
#

Okay, let's go to DM so we don't crowd the chat.

junior hornet
#

Ok

floral bloom
#

Are you using JS?

earnest phoenix
#

@vital lark javascript and normal mongodb

#

not mongoose

vital lark
#

so you're just using the native driver

earnest phoenix
#

yes

vital lark
#

do you have any code that you think can be the cause of the problem you're having

earnest phoenix
#

i dont think so because it only happens sometimes

#

it works perfectly sometimes

vital lark
earnest phoenix
#

like when i update a document, it will sometimes update it perfectly and sometimes delete the entire document

#

and i used too many sometimes

trail reef
#

If a discord.py bot is sharded, do the shard ids remain the same? If so, do the servers which have been previously put on a shard stay on that particular shard?

earnest phoenix
#

I dont have experience with sharding because my bot is still 900 servers away from reaching the point that needs sharding

trail reef
#

f same

quartz kindle
#

@distant plank collations are set per database and per tables

#

ALTER DATABASE dbname CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE tablename CHARACTER SET utf8 COLLATE utf8_general_ci;

#

you can also change individual columns. your error says its missing a comma, idk which database version/edition you're using

empty owl
#

@floral bloom are u doing ({embed: somethingEmbed})

floral bloom
#
({embed: {
color: 0xffff00,
title: "Etc."
}})
empty owl
#

why dont u use rich embed

#

do js let embed = new Discord.RichEmbed() .setTitle("Etc.") .setColor("0xffff00") message.channel.send({embed: embed})

earnest phoenix
#

@empty owl I dont think you need quotes with 0x

slender mountain
#

Wait whats the problem 👀

floral bloom
#

I'm just faster with object based embeds.

slender mountain
#

Object based embeds are better

earnest phoenix
#

people have different preferences

slender mountain
#

¯_(ツ)_/¯

#

true

earnest phoenix
#

I use both

empty owl
#

oh

#

nothey arent

slender mountain
#

people have different preferences

earnest phoenix
#

Can somebody answer my question above, please?

empty owl
#

i dont use mongodb

#

soo

slender mountain
#

same

#

@floral bloom You fix the channel thing?

earnest phoenix
#

ok thats fine guess i will just ask somewhere else

empty owl
#

ok

distant plank
#

@quartz kindle phpMyAdmin SQL Dump
-- version 4.8.5
Versión del servidor: 8.0.13-4
-- Versión de PHP: 7.2.24-0ubuntu0.18.04.1

#

that comes out when i export it

slender mountain
#

Just in case you haven't, you also need to grab the guild, so either grab the guild with message.guild or bot.guilds @floral bloom

floral bloom
#

@slender mountain I don't see how that'd be an issue because I detect deleted messages and use the same thing and it works.

earnest phoenix
#

I am making a Beyblade game bot and when I need to call out for a special move of a specific bey, I will require the Bey’s file and execute the special function. But it outputs in the console that special is not function. I am sure that I got the correct file and constructor. Here’s my code

vital lark
#

are you sure there is special method in the Beyblade class?

earnest phoenix
#

its in the ace dragon class which extends the beyblade class

#

super.special just sets a value to 0

slender mountain
#

@floral bloom lol I never actually knew that the client had a collection of channels. I just tested it and it worked for me so it must be something else?

floral bloom
#

Mhm, not sure what though.

slender mountain
#

can I see a bit more code?

floral bloom
#

I have the end of a if () {} else {} before it and a message.delete(); after it. (delete the author message, nut the embedded message.)

sudden geyser
#

@earnest phoenix can you share your code for ./Beyblade.js?

#

it's probably not in the super class

vital lark
#

super is from the BeyBlade class

#

this is from the Ace Dragon class

earnest phoenix
slender mountain
#

@floral bloom Thonk I am afraid I still don't really have enough information or code to really help.

#

No errors?

#

it just doesn't send?

knotty steeple
#

put the options in an object

#

:bigbrain:

sudden geyser
#

@vital lark I think the problem is they set this.special in the constructor

#

I tested it myself and it used the value from the constructor instead of the method

earnest phoenix
#

so i need to give another name to the special function?

sudden geyser
#

Either one, but the function could be ideal

earnest phoenix
#

ok thanks

vital lark
#

@sudden geyser yea

#

ur correct

#

this.special (from that class itself) is a function and a getter

sudden geyser
#

@floral bloom are you still having issues getting the channel?

floral bloom
#

@sudden geyser Yes, I am.
@slender mountain I'll DM you a code snippet.

Also, sorry, AFK.

slender mountain
#

np

sudden geyser
#

if you log client.channels.get("648064713132867584") to your console, do you get a channel instance or undefined? Is there an error?

floral bloom
#

@sudden geyser I get a channel.

empty owl
#

try richEmbeds

sudden geyser
#

rich embeds and normal objects are both fine

floral bloom
#

Yeah, it won't change. Unless my embed has an error and it isn't being caught.

#

Woo, I found it! I was using message.guild.members.get(memberID).tag instead of client.users.get(memberID).tag. The logs weren't catching it.
@slender mountain ^

slender mountain
#

Oh lol, so we were looking at the wrong code haHAA

floral bloom
#

Yes. 😂
Normally it gives me an error for that, so I didn't suspect anything...

slender mountain
#

haha

floral bloom
#

Well, thanks everyone for trying. Sorry for wasting your time. 🤣

#

User error.

slender mountain
#

No problemo

earnest phoenix
#

Should I use db.collection.updateOne or updateMany when I need to update several data for one person? MongoDB, Javascript

slender thistle
#

How do you store that data

#

in separate documents or a single one?

earnest phoenix
#

@slender thistle a single one like {_id: 123, stuff: “hi”}

slender thistle
#

updateOne

earnest phoenix
#

what if i need to update both id and stuff?

#

still updateone?

slender thistle
#

for single documents use updateOne

earnest phoenix
#

ok

hollow thicket
#

Yo I just need some help

#

I’m new to developing bots, I have tried to load a bot I was developing onto a private server but when I pull up the authorize tab then load the client ID for some reason I get “Unknown_error you may now close this window or tab”

sudden geyser
#

What's the url?

hollow thicket
sudden geyser
#

Are you sure you passed the client_id correctly like client_id=1234567890 (numbers being the actual client ID copied)

hollow thicket
#

I believe I’ve figured it out, the problem was that I had to reinstall node. I’m going to try it tomorrow.

vital lark
#

no it's not...

#

you need to do what Lite said

lament meteor
#

imagine having to install node to invite discord bots

hollow thicket
#

Well then yes I’m sure, i’ve tried to input the client id multiple times. The same result has occurred.

earnest phoenix
#

console.log(someGoodMornigMessage());

modest maple
#

Lol

#

That's not how inviting discord bots work but okay

grizzled raven
surreal sage
#

how can i store custom prefixes for servers? like !setprefix <prefix> i know how to do args etc but how to store in json or in mysql?

modest maple
#

NEVEER USE JSON AS A DB, that over with most people use a SQL db yh

surreal sage
#

or mysql lool

modest maple
#

Mysql is a SQL DB smh

surreal sage
#

ik

modest maple
green kestrel
#

soooo, today's project: implement a dynamic shared object module loader, with the facility to load, reload and unload modules at runtime.