#development

1 messages · Page 774 of 1

fluid sapphire
#

ok

modest maple
#

let us go through it

#

one

#

youre passing bot

west spoke
#

For example, you dont have the on message listener

modest maple
#

two you havent got any sort of event handler iirc

west spoke
#

^

modest maple
#
  1. you are returning anything with that message content which will just be nothing
fluid sapphire
#

@Lady Neko the Third I have the message listener

modest maple
#
  1. you will try add a reaction to every message
west spoke
#

I dont see it

modest maple
#
  1. i dont even think thats how you add reactions in d.js
tranquil drum
#

It’s going to react to everything other than “#test”

fluid sapphire
#

yeah it is only a part of code

west spoke
#
  1. you arent using a correct if statement
tranquil drum
#

Although yeah I only know JDA

west spoke
#

My code for my own bot in js, for sending a message

#

if (receivedMessage.content.startsWith(prefix+"neko")){ receivedMessage.channel.send(nekoEmbed)}

#

that's how you would structure a if statement

restive furnace
#

or if (cmd = "smh") return reaction("9") ex

west spoke
#

^

tranquil drum
#

Wait if you use startsWith doesn’t that lead to any command starting with “neko” to be caught

west spoke
#

that should work too

#

@tranquil drum it uses startswith (prefix) + (command)

#

so no

tranquil drum
#

Like you couldn’t have two commands with aliases that start with “neko”

west spoke
#

I would parse args if needed

#

that's what I do for my main bit

#

bot

#

I define the base (neko) command and split it into sub commands, (startswith), and then I split the args off of it

tranquil drum
#

Gotcha just checking

west spoke
#

So for example, #=neko upload req:url/attachment would have the command layout be:
Main command: neko
Sub-command: upload
Arguments: <req:url/attachment>

#

I should start uploading all of my commands to the github tbh

tranquil drum
#

But your main command could be “nekoa” and it would still work?

west spoke
#

Yes, technically.

restive furnace
#

^

west spoke
#

that's how arguments should work

tranquil drum
#

So you couldn’t have any other command with an alias that starts with “neko”

west spoke
#

why would I need a alias for it

tranquil drum
#

I mean the name of any other command you write couldn’t start with “neko”

mint storm
#

client.on("ready" () => {
console.log(${client.user.username} rocket arrived on Mars!);
client.user.setActivity(${cliet.guilds.size} Servers);
}

please anyone can help me in this code ?? whats wrong

west spoke
#

cliet

tranquil drum
#

If you’re asking why you would want another command that starts with “neko” idk

west spoke
#

no ""

mint storm
#

?

tranquil drum
#

You need a comma after “ready”

mint storm
#

"ready,"

west spoke
#

also, what I would do for aliases would be make the command #=n and make the main command use the same sub command system

tranquil drum
#

Also you need ‘around the strings

mossy vine
#

"ready",

mint storm
#

oh ok

mossy vine
#

@tranquil drum what

tranquil drum
#

For interpolation?

#

He’s using ${}

mossy vine
#

its already that

#

discord formatting

tranquil drum
#

Ohhhh

mint storm
#

guys i got this error message

/home/runner/discordjs/index.js:12
}
^

SyntaxError: missing ) after argument list

tranquil drum
#

Add the missing )

west spoke
#

stop spoon feeding at this point

mint storm
#

put ) where

west spoke
#

@mint storm learn the language before you make a bot

modest maple
#

learn basic js

west spoke
#

^

tranquil drum
#

The same way you would call any function, you have to close the argument list with a )

west spoke
#

Dont smite me for using my phone

#

but

#

what

mossy vine
#

LMAO

mint storm
modest maple
#

yeah

#

its called learn the basics

mint storm
#

i am not kidding

earnest phoenix
#

neither was he

#

learn the basics

modest maple
#

i see the error and i dont even do js

slender thistle
#

Too many of you young devs think developing Discord bots is easy without learning the programming language first

restive furnace
#

@mint storm this is your 2 or 3 or what ever time here asking for help. so

learn the basics

  • Rico
modest maple
#

also

#

nice token leak

slender thistle
#

even to make a simple program you need at least basic understanding of some part of computer terminology

restive furnace
#

nice token leak
^ and security

earnest phoenix
mint storm
#

. so i throw all that in the bin and they are working

modest maple
#

i mean go learn the basics

#

problem solved

#

btw

west spoke
#

@mint storm learn the basics

slender thistle
#

Oh yes please cry send that video

west spoke
#

jesus

modest maple
#

your token is leaked

#

so go reset that

mint storm
#

ok

west spoke
#

^

slender thistle
#

No one said "delete your shit and don't code"

west spoke
#

^

#

tbf

#

they should start from scratch

#

but

#

you should still try first

slender thistle
#

If you want to and you are willing to put time and effort into learning programming, you should take a step back and get back to basic programming and get hang of it

west spoke
#

I knew nothing about JS but I kept trying (and getting hurt by shiv) but it eventually worked

#

I learn best by failing and recovering

slender thistle
#

Hey that's my way of teaching

mint storm
#

oh my godness............................

west spoke
#

hehe

earnest phoenix
#

the problem is not doing research

west spoke
#

^

modest maple
#

and somtimes the hashing algorthm not actually hashing anything

west spoke
#

know what

modest maple
#

xD

slender thistle
#

At least you learned so ig it was effective :^)

west spoke
#

Go to the javascript area

modest maple
#

one of my fav basic learning site tbh

west spoke
#

that's what I used

#

to get http requests down, get await stuff down, etc.

#

I run the script, if it works, yay.

#

If it doesnt, I keep trying.

#

That's what I'm doing right now

#

I know n o t h I n g

#

about java

mint storm
#

DONE I FIXED IT WITHOUT UR STUPID BASICS

west spoke
#

alright

#

good

slender thistle
#

Oh well

west spoke
#

shiv was I ever like that

earnest phoenix
#

lol

slender thistle
#

Don't complain next time you don't get help

west spoke
#

^^

slender thistle
#

or don't understand what is said to you

west spoke
#

^

earnest phoenix
#

tfw you're 10 and didn't get out of your spoiled brat phase

#

can't relate

west spoke
#

^

modest maple
#

should we see if he actually reset his token

west spoke
#

^

#

I can go test it

slender thistle
#

Better now than later ig

modest maple
#

short awnser

#

noi

#

now he did

#

xD

west spoke
#

Alright

#

And ya see

#

I kept at this for about 2 hours

#

(And now it actually runs q.q)

solemn fern
#

so in python 3, my outputs and everything are running properly however I am wanting to add a "line break" in between sections of the output see the picture for reference.

#

any ideas on what I can get that to print as such

modest maple
#

indentation

#

wait have u hidden part of the code

solemn fern
#

It hasn't changed much from what I originally messaged you but I will repost it if you want

modest maple
#

yh

#

and do it as text

#

not ss

#

altho im grabbing dinner soon because hunger

slender thistle
#

Have a nice one

solemn fern
#

def calc():
    while True:
        print("Options:")
        print("Enter 'add' to add two numbers")
        print("Enter 'subtract' to subtract two numbers")
        print("Enter 'multiply' to multiply two numbers")
        print("Enter 'divide' to divide two numbers")
        print("Enter 'quit' to end the program: ")
        user_input = input(": ")
        print('You have selected to ' + user_input)
        if user_input == "quit":
          break
        elif user_input == "add":
            num1 = float(input("Enter a number: "))
            num2 = float(input("Enter another number: "))
            result = str(num1 + num2)
            print("The answer is " + result)
        elif user_input == "subtract":
            num1 = float(input("Enter a number: "))
            num2 = float(input("Enter another number: "))
            result = str(num1 - num2)
            print("The answer is " + result)
        elif user_input == "multiply":
            num1 = float(input("Enter a number: "))
            num2 = float(input("Enter another number: "))
            result = str(num1 * num2)
            print("The answer is " + result)
        elif user_input == "divide":
            num1 = float(input("Enter a number: "))
            num2 = float(input("Enter another number: "))
            while num2 == 0:
                print("Number to be divided by 0. This is invalid.")
                num2 = float(input("Enter a different number: "))
            result = str(num1 / num2)
            print("The answer is " + result)
        else:
            print("Unknown input")
    print('Thanks for using the python calculator. See you next time.')

modest maple
#

if you want to add like a space between each thing

#

just do print()

#

it will print a blank line

slender thistle
#

\n

#

yeet

modest maple
#

or \n yh

solemn fern
#

so if I did the \n where would that go in the code?

slender thistle
#

In the strings

#

It just stands for newline

modest maple
#

u may need todo \n\n

solemn fern
#

so example

print("The answer is " + result \n)

or

print("The answer is " + result + "\n")

slender thistle
#

Yeah

#

The second one

solemn fern
#

does it matter which one?

slender thistle
#

The \n must be inside a string

shut cipher
modest maple
#

erm

shut cipher
#

Can i get opinions on the server banner and icon?

modest maple
#

why here

#

not the right server for this

slender thistle
#

You'd better just send the banner and icon themselves in #memes-and-media at least

solemn fern
#

I will be back later

grizzled raven
#

google images

shut cipher
#

Oh

#

Alright

slender thistle
#

But yeah, as CF8 said, this is barely a server to ask feedback for anything...

solemn fern
#

thank you for the assistance

split hazel
#

I'm trying to learn a bit about MySQL but i'm blank. How do the client and server connect? What protocol does the client use to send a query to the server & then receive a response

green kestrel
#

@split hazel very open ended question

#

You don't directly connect to mysql you use an SQL client library, the protocol is documented but I couldn't tell you it's details

#

It connects via Unix socket, TCP on port 3306

#

Or windows shard memory

#

Or a windows pipe

#

You simply give it queries as strings, and it returns rows and columns as results

#

In short

#

And usually mysql is configured on localhost only for TCP

#

But not always

split hazel
#

ah, thanks for the explanation!

golden condor
#

So

#

I am tryna use random puppy to make a reddit command

#

But I don't know how to make the first argument after the command the subreddit

#

const subReddits = needs to be the first arg

#

Can anyone help?

delicate zephyr
#

what lang

golden condor
#

discord.js

solemn fern
#

That is a file not a language

#

You are working in JavaScript

golden condor
#

Ok chill

modest maple
#

@solemn fern that is a library not a file

solemn fern
#

Excuse me, I stand corrected I still stand by it that it isn’t a language

golden condor
#

Yeah, well he was asking what i coded my bot on

slender thistle
#

The "not language" part is correct but discord.js is a library

earnest phoenix
#

even so the .js part is pretty obvious

golden condor
#

Yeah

slender thistle
#

Hyperlinks work only in embeds

#

and webhook messages

golden condor
#

Oh

#

Right

#

About my earlier question

#

I am tryna use random puppy to make a reddit command
But I don't know how to make the first argument after the command the subreddit
const subReddits = needs to be the first arg
Can anyone help?

earnest phoenix
#

well you just need the very first argument, and args should be an array, unless you've done something different, what you need to do is get the first element in the array

golden condor
#

@earnest phoenix This is what I have done

 const { RichEmbed } = require("discord.js");
const randomPuppy = require("random-puppy");

module.exports = {
    name: "meme",
    category: "fun",
    description: "Sends an epic meme",
    run: async (client, message, args) => {
        const subReddits = 
  
        const random = subReddits[Math.floor(Math.random() * subReddits.length)];

        const img = await randomPuppy(random);
        const embed = new RichEmbed()
            .setColor("RANDOM")
            .setImage(img)
            .setTitle(`This image came from r/${random}`)
            .setURL(`https://reddit.com/r/${random}`);

        message.channel.send(embed)
            
    }
}```
grizzled raven
#

i checked a guild that my bot is in and i mapped all the channels's messages, and all of them were ```js
Collection [Map] {}

meaning no messages in that channel were getting cached even after messages were sent
that was the case for all channels except a few
is this because too many messages are cached on the bot?
marble juniper
#

you can use client.sweepMessages to remove some from the cache

#

if needed

earnest phoenix
#

@golden condor if the only arguments you need are links you could just do const subReddits = args; (though you wouldn't need the const subReddits, and could use args directly)

#

otherwise what I would personally do

golden condor
#

Ok thanks

#

const subReddits = args;

earnest phoenix
#

if you want something like +mycommand [arg] [subreddits], you could just slice after the first argument (0)

golden condor
#

This gave an error

earnest phoenix
#

tbf you dont need to set const subReddits = args, and can just replace all occurences of it with args

#

what error are you getting though?

grizzled raven
#

@marble juniper i dont want to do that lol

golden condor
#

It works

#

Thanks so much

earnest phoenix
#

no problem

floral bloom
#

Why am I getting this error? I started getting it after I changed the prefix code but I reverted the changes and still get the error.

(node:10973) UnhandledPromiseRejectionWarning: DiscordAPIError: 401: Unauthorized
    at item.request.gen.end (/rbd/pnpm-volume/5ddd8829-e3a3-4cf4-987f-20ee0c322ca8/node_modules/.registry.npmjs.org/discord.js/11.5.1/node_modules/discord.js/src/client/rest/RequestHandlers/Sequential.js:85:15)
    at then (/rbd/pnpm-volume/5ddd8829-e3a3-4cf4-987f-20ee0c322ca8/node_modules/.registry.npmjs.org/snekfetch/3.6.4/node_modules/snekfetch/src/index.js:215:21)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:10973) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:10973) [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.
#

Please ping with response.

earnest phoenix
#

wrong token

floral bloom
#

Really? Normally I get an email for that.

earnest phoenix
#

401 is always wrong tokeb

#

token*

tiny tinsel
#

Anyone ever used Strapi and Purest?

floral bloom
#

@earnest phoenix I regenerated the token and changed it but still get the error.

earnest phoenix
#

are you sure you're using the token and not the client secret

floral bloom
#

Yes.

earnest phoenix
#

are you loading the token externally or is it hardcoded

shadow palm
#

Are you using a bot or a user account? What endpoint are you trying to access?

floral bloom
#

I have it in a .env file and load it using client.login(process.env.TOKEN;

#

One moment.

earnest phoenix
#

then print the token to console and see what it returns

lunar crystal
#

Can someone explain my mistake ?

message.reply('{client.user.ping}')```
shadow palm
#

You may have to do Bot <token> depending on the library you're using.

earnest phoenix
#

no

shadow palm
#

No one can help you, that code snippet has zero context.

earnest phoenix
#

the token type is always set in the library

tiny tinsel
#

@lunar crystal What is message.content type?

earnest phoenix
#

@lunar crystal learn basics of js

#

that's only a very obvious mistake

lunar crystal
#

@lunar crystal What is message.content type?

I don't know sorry

#

I'm a simple beginner

floral bloom
#

@lunar crystal Try client.ping instead.

earnest phoenix
#

that's not the issue

tiny tinsel
#

The issue is pretty obvious.

earnest phoenix
#

^

floral bloom
#

Also, ${}.

lunar crystal
#

@lunar crystal Try client.ping instead.

ah ok nice thx u

earnest phoenix
#

they don't know how to compare strings, hence being told to learn basics of the language

shadow palm
tiny tinsel
#

@shadow palm spoonfeed

shadow palm
#

¯_(ツ)_/¯

lunar crystal
#

Yeah i can't write those character into code text

floral bloom
#

@lunar crystal

if (message.content === "+ping") {
  message.reply(`Pong! ${client.ping}ms`)
}
earnest phoenix
#

avoid spoon-feeding

tiny tinsel
#

Anyway anyone here by any chance used Strapi with Purest?

marble juniper
#

spoon feed detected

#

I suggest you use Math.round for client.ping but its not needed ofc

#

just looks more clean

earnest phoenix
#

that is also the websocket latency, not the rest ping

floral bloom
#

The console prints the token.
NjY5NzU5He9MzY1MjQ1NDUw.Xin_8w.zjjFlTdAl_Fbgp3nuTx5ayhEE1A ||Obviously joking.||

I'm not sure what's wrong, this is the first time I've had this error.

earnest phoenix
#

compare the lengths of the token

#

you might have some invis chara

#

chars*

west raptor
#

d.js says if your token is invalid iirc

floral bloom
#

They're the same. Also, yes, April.

earnest phoenix
#

if nothing else, try hardcoding the token - if that doesn't work you got temporarily api banned for hitting the ratelimits too much

west raptor
#

iirc like 2 months ago i was getting a 401 with d.js because of an api update i think

earnest phoenix
#

yeah the lib version could be the issue too

west raptor
#

yeah

#

im checking stable version rn

floral bloom
#

The only thing I have is a ping command that responds with Pong! and normally when I log on too much it changes the token and emails me.

west raptor
#

they seem to be updated

floral bloom
#

I have Discord.js v11.5.1.

marble juniper
#

well as far as I know this version is completely fine and should work

#

so probably not the version

floral bloom
#

Yeah, because it was just fine and I never messed with the version.

west raptor
#

what if you try a different bot token

floral bloom
#

I did, I regenerated the token. Or do you mean a completely different bot?

west raptor
#

completely different bot

floral bloom
#

Ah.

#

Same error.

west raptor
#

seems (as cry said) you're api banned right now

#

not much you can really do

marble juniper
#

guess you just have to wait

floral bloom
#

But why? What would I have done to get banned?

marble juniper
#

hitting the rate limit multiple times in a row

floral bloom
#

Eh, I wouldn't think so. What rate limit?

west raptor
#

that's for you to figure out

marble juniper
floral bloom
#

I never changed anything from what I normally do and if the bot logs on too much, it regenerates the token and emails me.

west raptor
#

well.. that might be your issue in the end

floral bloom
#

😕 I'm so confused.

west raptor
#

pretty sure discord isnt gonna like you logging in 1000 times a day

#

(that you seem to make it very common placed)

sterile minnow
#

Only wait a few weeks or days or sth, i didnt had that yet

floral bloom
#

Only wait a few weeks or days or sth, i didnt had that yet
@sterile minnow Is that how long the API ban lasts?

west raptor
#

don't comment on how long it will take if you've never experienced

#

weeks seems overkill but you never know

earnest phoenix
#

api bans last an hour by default

sterile minnow
#

We dont know how much the Bot spammed or sth

floral bloom
#

It only sent eight messages.

#

And it didn't log on that much, I'm pretty sure it was under 30.

west raptor
#

discord api bans your whole account

#

not just one bot

earnest phoenix
blissful scaffold
#

8 messages in total? or 8 messages per server, or 8 messages per user it sees?

floral bloom
#

8 total.

blissful scaffold
#

It could be that you commit your token to github and that is the reason why your token gets deleted?

earnest phoenix
#

have you tried hardcoding the token yet though

#

@blissful scaffold no such thing as token deletion exists

marble juniper
#

they don't delete it

#

wdym

earnest phoenix
#

the whole of discord depends on JWTs they can't delete them

modest maple
#

they just nullinvoid it

floral bloom
#

I think Discord deletes your token if you break the rate limit too often, and you say discord keeps deleting your token?
No, Discord only changes it if I have the bot login too many times, which isn't the case.

It could be that you commit your token to github and that is the reason why your token gets deleted?
I don't have my code on GitHub, only protected in a .env file on Glitch (Don't judge.).

floral bloom
#

No, I haven't, but process.env.TOKEN prints it to the console. I'll try though.

#

Same thing.

teal pasture
#

so i'm looking to integrate mysql storage with my bot, but i cant for the life of me get my code (node.js) to connect to it? Anyone got some insight? I keep getting a er_not_supported_auth_mode

quartz kindle
#

which mysql library are you using?

teal pasture
#

npm install mysql

quartz kindle
#

have you checked this?

teal pasture
#

thats what I've got

quartz kindle
#

do you have a mysql server running somewhere?

teal pasture
#

yes, local machine based.

quartz kindle
#

does it have a username and password?

teal pasture
#

yes

#

i am using them in the code.

quartz kindle
#

show the full error

teal pasture
#

one moment

#

sent via PM, its a lot of text so.

fallow mango
#

im making music commands for my bot using ffmpeg and youtube-dl and im getting an error saying Module import youtube_dl doesnt exist

modest maple
#

is it in your env site-packages folder

marble juniper
#

im using youtube-dl and ffmpeg
youtube**_**dl doesn't exist

modest maple
marble juniper
#

_

modest maple
#

did you install the python wrapper for it>?

fallow mango
#

why did my friend tell me to do pip install -U youtube-dl

modest maple
#

i mean you need to get the python package some how

fallow mango
#

then how would i import it?

#

into my code

west raptor
#

import youtube-dl? mmulu

fallow mango
#

tried that

modest maple
#

did you even do what ur friend said

fallow mango
#

yes

#

i did it twice when i got the error

slender thistle
#

It's most likely import ytdl if I am guessing without reading the docs

fallow mango
#

ill try that

slender thistle
#

Yes I am a liar

west raptor
#

python is weird

slender thistle
fallow mango
#

yup

#

still didnt work

west raptor
#

why is the import name different from the package name

modest maple
#

to simplify stuff

slender thistle
#

That how it be Dream

modest maple
#

alot of packages do it

slender thistle
#

Take the case with dblpy where you pip install dblpy but import dbl instead

west raptor
#

yeah ok but

#

why

slender thistle
#

Logic doesn't apply to Python

modest maple
#

reasons

#

people who make modules do weirds

west raptor
#

i hate python

modest maple
#

not that it rlly matters because you can just do xyz as zyx

west raptor
#

makes zero sense

modest maple
#

python good

slender thistle
#

As long as docs explain how to import the actual package

fallow mango
#

Traceback (most recent call last):
File "bot.py", line 7, in <module>
import ytdl
ModuleNotFoundError: No module named 'ytdl'

west raptor
#

i feel like when python was being made logic and common sense was thrown out the door

slender thistle
#

Isn't that the case with almost every language

fallow mango
#

i guess

west raptor
#

in certain cases sure

#

but

#

python is just

#

no

#

zero sense

fallow mango
#

well music commands are out the window 😦

west raptor
#

honestly

#

lavalink

#

use it

fallow mango
#

tf is lavalink?

modest maple
#

basically better ytdl

slender thistle
#

import youtube_dl per YTDL example

modest maple
#

its basically just the go to music system

slender thistle
#

LL is cool

fallow mango
#

im just going to leave music commands out and make fun commands instead

fallow mango
#

im just going to leave music commands out and make fun commands instead

knotty steeple
#

yea you are trying to do music commands but cant even install and import a lib

stable horizon
#

I think this comes down to a lack of documentation reading

#

Which will cause you problems no matter what you do with your bot.

slender thistle
#

The pypi page for youtube_dl doesn't have any documentation

stable horizon
#

Don't rely on pypi lul

slender thistle
#

You need to visit its Github page

#

bUT tHAt'S whERE I doWnLoADeD iT FRoM

stable horizon
earnest phoenix
#

Can someone like tell me what do I do to detect if a player has voted today using webhooks? I’ve set up the webhook and it works perfectly but idk what to do next.

#

.

amber fractal
#

@earnest phoenix Make a database map their id to the time they voted

#

if it's within 24 hours then horrah it's today

earnest phoenix
#

like record the id and the time the person voted?

amber fractal
#

Yep

earnest phoenix
#

ok thanks

floral bloom
fallow mango
#

:BRUH-

#

can someone help me make a server info command? i use discord.py btw

earnest phoenix
#

no @floral bloom

#

it's just a json database

fallow mango
#

can someone help me make a server info command? i use discord.py btw

earnest phoenix
#

you don't need to copy and paste the same question

fallow mango
#

ok

floral bloom
#

Dang it.

earnest phoenix
#

json databases shouldn't be recommended...

#

i would suggest using an actual database

#

like sqlite as an example

floral bloom
#

I'm trying but failing.

#

Looking for alternatives.

fallow mango
#

for a development help chat noone is being helpful and answering my question

#

can someone help me make a server info command? i use discord.py btw

#

REPEATS FOR THE 3RD TIME

floral bloom
#

@fallow mango Read the server description.

Channel for chatting about (bot) development. If you have questions, ask the questions and wait for someone who can answer to help you. Do not ask to ask. Provide all possible information so people know what's up. Just saying "I get an error" doesn't give us enough information on your problem. Do not @mention people randomly.

fallow mango
#

but i didnt mention anyone 😦

summer torrent
#

what kind of help do you need

fallow mango
#

i'm trying to make a server status command but i'm having trouble on how i should make it and my friends explanation was very confusing

summer torrent
#

just explain your trouble

fallow mango
#

i tried using my user info and changing a few things and i get flooded with tons of errors (probably because i cant do it that way)

floral bloom
#

Has anybody tried using Google Sheets for a database?

amber fractal
#

If you want insanely high response times go for it

fallow mango
#

@floral bloom sqlite is manly used. never heard of google sheets for a database

floral bloom
#

I've been trying SQLite, but I'm not getting anywhere.

fallow mango
#

hm

amber fractal
#

also it has usage limits unless you pay for more uses so it isnt good with bigger things

fallow mango
#

go for it i guess

floral bloom
#

also it has usage limits unless you pay for more uses so it isnt good with bigger things
Welp, never mind.

fallow mango
#

i use 5 JSON files running parallel for my database

amber fractal
#

I use mongo it's quite easy

fallow mango
#

pretty fast response

floral bloom
#

i use 5 JSON files running parallel for my database
@fallow mango The issue is that it's prone to corruption.

amber fractal
#

Well JSON is only limited by the read/write speed of your drive but it can corrupt easily

fallow mango
#

your right

#

i should change that

#

bat file database?

#

is that possible?

#

hmm

tiny tinsel
#

Batch file database what.

fallow mango
#

thats what i said

#

i use 5 json files

#

but The issue with that is that it's prone to corruption.

#

trying to find an easy alt

tiny tinsel
#

Why not using any standard database?

fallow mango
#

just dont to i guess

tiny tinsel
#

Anything but storing data in json files.

fallow mango
#

how are they prone to corruption

tiny tinsel
#

@fallow mango Because every server will write in the file at the same time.

#

It can corrupt the file.

#

You'd have to use a lock everytime a server is writing to it.

#

Again storing data in a json file is not good.

fallow mango
#

5 files running in parallel is good?

tiny tinsel
#

Again storing data in a json file is not good.

#

Even If it is multiple or not.

#

if the json file is to store a bot prefix ok..

#

But if you are holding user data that's really bad.

cloud hollow
#

ok... here me out.. im trying to add moderator commands to my discord server, and its working, but regular users (not mods) are able to use them. how do I make it so that they can't do that?

tiny tinsel
#

Check for user permissions.

cloud hollow
#

the user didn't even have a role, and was able to kick someone with admin perms

#

isnt there a code that makes it so u must have KICK_MEMBERS in the user permissions?

tiny tinsel
#

Yes there is.

#

D.js?

cloud hollow
#

Yes

#

Thank you

#

I'm a newbie to this

tiny tinsel
cloud hollow
#

Thank you part 2

fiery stream
#

Heya

polar shadow
#

@floral bloom json isnt prone to corruption if its written atomically but i doubt he is writing it atomically

#

@tiny tinsel u 2

#

also if you do use json dont store everything in one file

#

use a diff file for each id

#

so you have guild settings you have a json file for every guild

#

atomically written json could probably handle 50K+ guilds, you would probs have to have a NVM ssd vps tho or it would get slow. but it doesn't use as many write/read calls as sqlite because sqlite rewrites the entire file everytime you change 1 thing

stable horizon
#

if i have an app running on that port, is there a reason this would just give me the nginx welcome screen?

polar shadow
#

@stable horizon try 127.0.0.1 instead of localhost

stable horizon
#

been there, done that

#

same result

polar shadow
#

did u restart nginx?

stable horizon
#

yea

polar shadow
#

where are you putting the conf file?

stable horizon
#

/etc/nginx/sites-available/
with a link to /etc/nginx/sites-enabled

polar shadow
#

@stable horizon does /etc/nginx/conf.d/default.conf exist?

stable horizon
#

nuked it

polar shadow
#

look closesly

#

not sites-available

#

conf.d

stable horizon
#

wait a second

polar shadow
#

yes i want you to see if conf.d has a default conf file

stable horizon
#

wrong folder

polar shadow
#

if so move ur conf file to conf.d

stable horizon
polar shadow
#

ls /conf.d

#

not the default.conf file

#

ls /etc/nginx/conf.d

stable horizon
#

top one

polar shadow
#

oh ok it does exist

#

can u copy ur sites conf and put it in there

#

then restart nginx with sudo service nginx restart

stable horizon
#

no difference

polar shadow
#

@stable horizon you need to put www. in your server_name

#

or remove www.

stable horizon
#

HMMM

#

lol

#

im dumb

polar shadow
#

ur not

floral bloom
polar shadow
#

use fs-nextra

#

it has a writeJsonAtomic function

floral bloom
#

fs-extra?

polar shadow
#

no fs-nextra

floral bloom
#

Ah, okay, wasn't sure if it was a typo.

#

Thanks! I'll look into it!

polar shadow
#

as you can pass a JS object directly

floral bloom
#

So what exactly does writing a JSON file atomically do opposed to the writing it unatomically?

#

Please ping with response.

slender thistle
#
Atomicity. In computer programming, an operation done by a computer is considered atomic if it is guaranteed to be isolated from other operations that may be happening at the same time.
#

@floral bloom

floral bloom
#

Ah, thanks!

slender thistle
#

👍

dim flume
#

what do i do here

summer torrent
#

Read the channel topic

eternal adder
#

so close to release, I could have it tonight potentially...

grizzled raven
#

h,

#

m

eternal adder
#

Take your time

grizzled raven
#

i checked a guild that my bot is in and i mapped all the channels's messages, and all of them were ```js
Collection [Map] {}

meaning no messages in that channel were getting cached even after messages were sent
that was the case for all channels except a few
is this because too many messages are cached on the bot?
#

also that has been happening for multiple guilds

eternal adder
#

I know for discordpy the default cache limit is 5000, I can't speak for other languages though.

#

I'm pretty sure the cache is overwritten though, so that may not be the issue...

modest maple
#

You can change it with d.py

eternal adder
#

Yes, that's why I said default cache limit.

modest maple
#

D.py caches everything by defualt unlike the other libs

#

Most other libs require you to fetch the message again compared to d.py

prime cliff
earnest phoenix
#

@prime cliff what is this website ??

prime cliff
#

It's a wip website i'm making for a nice project btw that is not the full view

earnest phoenix
#

Can i have the url🤔

prime cliff
#

Sure i can show u in DMs

earnest phoenix
#

Yes

#

Ty

eternal adder
#

What do you think of getting websites for bots?

quartz kindle
#

do it if your bot is big or unique

west raptor
#

I wouldn't get a whole new domain for it personally

#

Just use my website and make a page for it

eternal adder
#

advertising

#

But nah, I can get a custom domain, website etc for free

#

Just a bit of work

modest maple
#

Not massively needed unless for a web dashboard

west raptor
#

Tfw I don't even have a website besides for a meme domain mmulu

modest maple
#

I have a domain that I use for PDF exporting from the server

#

And some redirectuon

#

But the main site is bigger than the bot so xD

prime cliff
#

Something as simple as github wiki is enough for any small bots tbh

eternal adder
#

YEEES THANK YOU @modest maple

#

You've given me an idea aha

modest maple
#

Yh

toxic jolt
#

I use "Glitch Host" "Free" as you know. However, 512 MB of RAM is allowed. My "bot" a very highing using of ram so I use 5 projects. These are connected through "Token".
Changing "Token" takes 5 minutes, but "Token" replacement times vary. For this reason, I noticed that it was bot offline for 10 minutes or even 2 hours. I how to fix this problem?

modest maple
#

Get a VPS of self host

#

You can't expect glitch to work for you forever

toxic jolt
#

I have no money. Is there another solution?

modest maple
#

Not rlly

#

If you're using more ram than you have then that's the limit of you bot

toxic jolt
#

I live in Turkey, where VDS very expensive one-month money needed.

quartz kindle
#

depending on what your bot does, you can optimize its ram usage

#

most discord libs allow for a pretty ridiculous optimization, if you know what you're doing

toxic jolt
modest maple
#

You can only do so much with a free host

#

Reasource limits is one of them

toxic jolt
#

😦

quartz kindle
#

my bot uses 50-60mb ram

#

on 2000+ servers

toxic jolt
#

what

#

2.000 servers?

#

wowww

modest maple
#

Tim does mad optimisation

#

Mean while mine idles at like 6GB

#

XD

quartz kindle
#

i wanna fit all my projects in a 3$ vps

modest maple
#

Fairs xD

toxic jolt
#

3$ vps?

#

what

modest maple
#

VPS r cheap

quartz kindle
#

yes, my vps is 3$ per month

#

1 cpu, 1gb ram, 20gb ssd disk

toxic jolt
#

3$

#

@quartz kindle pls give my vps site

#

in 3$

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

toxic jolt
#

😄

#

thanks

sage bobcat
#

One message removed from a suspended account.

toxic jolt
#

omg

#

8$

#

in 4 gb ram

#

whaat

quartz kindle
#

vps are very cheap these days

sage bobcat
#

One message removed from a suspended account.

toxic jolt
#

so expensive...

sage bobcat
#

One message removed from a suspended account.

toxic jolt
#

im living africa yes.

#

😄

#

i go to africa

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

delicate zephyr
#

@sage bobcat thats a terrible price

quartz kindle
#

google compute engine is free for 1 year, but you need a credit card to register

#

amazon aws also free for 1 year

delicate zephyr
#

11.25$ for that bad of stats?

sage bobcat
#

One message removed from a suspended account.

toxic jolt
#

yes but 1 year debt if he cuts money

#

in google cloud

#

200$

sage bobcat
#

One message removed from a suspended account.

toxic jolt
#

I think I need to escape this country 😄

coral trellis
#

Lets just not have a argument of who can get the cheapest vps

sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

google compute engine is free for 1 year, but you need a credit card to register
amazon aws also free for 1 year
^ and if you have an edu enabled email you can make use of github's education pack which offers 2 or 3 hosting providers willing to give you free credits while you're a student

sage bobcat
#

One message removed from a suspended account.

toxic jolt
#

need a credit card***

sage bobcat
#

One message removed from a suspended account.

quartz kindle
#

hes already using glitch

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

earnest phoenix
#

all free "hosting" providers are bad if you plan to do anything productive

toxic jolt
#

I think I still have to keep glitch 😄

quartz kindle
#

i just didnt get why exactly do you need 5 projects and token swaps?

toxic jolt
#

but one project max 512 mb ram using

quartz kindle
#

and how much is your bot using? how many servers does it have?

toxic jolt
#

and so high error

#

ping and many many error

quartz kindle
#

yes but it will not crash from that

grim aspen
#

is there anything else shown besides socket hang up

quartz kindle
#

discord.js can handle more than 500 servers before reaching 300+mb ram without any optimization

toxic jolt
#

this project is 160 command

#

and disk: 110 mb

#

and ram: 130 mb min.

quartz kindle
#

that is normal

toxic jolt
#

4 project: 150 command

quartz kindle
#

commands take very little disk space, its only js files

toxic jolt
#

glitch crashes if i collect it all in one place

#

its a impossible

quartz kindle
#

160 commands will be like 10mb at most

toxic jolt
#

quick.db

quartz kindle
#

what are you saving in the db?

toxic jolt
#

music commands using 1 day for 11.000

#

1 month: 60.000

quartz kindle
#

oh you have music commands...

#

music uses a lot of ram

#

glitch is not good for music commands

sage bobcat
#

One message removed from a suspended account.

toxic jolt
#

160 commands= 100.000 using for 1 day its a so impossible

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

toxic jolt
#

@quartz kindle yes...

quartz kindle
#

so yeah, you need a vps

toxic jolt
quartz kindle
#

that error is not because of ram

toxic jolt
#

yes.

#

api error

quartz kindle
#

anyway a discord bot with 0 commands will use ~100mb ram

#

its normal for a bot to start with that much

toxic jolt
#

hmm

grim aspen
#

you just leaked your youtube tokens

#

might wanna reset

teal pasture
#

time to hack a club penguin account aww yeeaaa

toxic jolt
#

my bot is abnormal 😄

#

@grim aspen i how to upgrade youtube tokens

quartz kindle
#

thats just his project id, where's the token?

toxic jolt
#

10.000 max using

grim aspen
#

@quartz kindle a picture he posted was deleted, showed like 4 tokens

quartz kindle
#

ah

toxic jolt
#

quick.db using for so high mb

quartz kindle
#

what is that? what are you saving?

toxic jolt
#

its a counter .json

#

😄

quartz kindle
#

counter for what?

toxic jolt
#

wait

#

sorry its a turkish 😄
the counter counts the incoming and outgoing and informs the server leaders.

#

There are many commands like this and I guess the bot can't stand anymore 😄

trim saddle
#

are these logs

toxic jolt
#

Turk servers, commands like this are famous. I had to add it to the bot

#

i hate this country....

trim saddle
#

oh ok

toxic jolt
#

Where can I get discord mail address

earnest phoenix
#

discord's email?

toxic jolt
#

discord support mail

earnest phoenix
toxic jolt
#

thx

#

i send my problem

#

😄

earnest phoenix
#

discord doesn't care about your hosting problem

toxic jolt
#

I will ask how to stop the token exchange

grim aspen
#

what are you exchanging them for?

toxic jolt
#

nothing

#

changing automatically

sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

you mean the discord bot token?

toxic jolt
#

yes

earnest phoenix
#

discord changes it for you when you exceed 1000/24h IDENTIFY payloads to the gateway - aka logging in and out more than a thousand times in a day

toxic jolt
#

I found the first token error in the world. omg...

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

earnest phoenix
#

the issue boils down to you not using a reliable host so the host keeps turning off and on - starting and stopping your bot constantly

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

toxic jolt
#

hmm

sage bobcat
#

One message removed from a suspended account.

toxic jolt
#

my bot gg is now omg 😄

#

5 project 5 token

#

lol

#

😄

#

i found this npm

sage bobcat
#

One message removed from a suspended account.

toxic jolt
#

do you think i will see my job

#

😄

sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

that npm package is against the tos

sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

it requires you inputting your user token, you're not allowed to use user tokens outside of official clients

sage bobcat
#

One message removed from a suspended account.

toxic jolt
#

ok and I have no money! 😄

earnest phoenix
#

ok! 😄

sage bobcat
#

One message removed from a suspended account.

toxic jolt
#

I think I have to do it from "shit heroku"

sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

be warned that logging in with a user token outside of the official client will most likely end up in your account getting terminated

toxic jolt
#

@sage bobcat
How can I trust? :d

#

and my project is 250 mb

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

toxic jolt
#

and 1 gb ram

#

using

#

and internet

#

😄

sage bobcat
#

One message removed from a suspended account.

toxic jolt
#

what the

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

quartz kindle
#

i feel like this is an optimization problem, not a resource problem

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

quartz kindle
#

instead of throwing more hardware at it, work on optimizing your code

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

earnest phoenix
#

mines only 6mb lmao

#

250mb seems a bit out there

quartz kindle
#

mine's like 2gb

#

because it saves user-generated images

sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

thats a different case tbh

sage bobcat
#

One message removed from a suspended account.

quartz kindle
#

but i gonna remove that feature tbh

#

i'll just save the parameters used in the generation instead

#

and re-generate the images each time

#

its gonna cost more cpu, but w/e

#

a say?

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

quartz kindle
#

i know he did but i like trolling people's grammar mistakes

#

xD

sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

but will it work with same credit card

quartz kindle
#

try it and see, most likely not

sage bobcat
#

One message removed from a suspended account.

modest maple
#

My bot is like 700KB so how df Ur bot is 200mB is insane

#

Considering 500KB is a preload for cache

earnest phoenix
#

Is there a cheap VPS like glitch that allows you to both host a website and a Discord bot

quartz kindle
#

if you count node.js itself and node modules, it easily gets several tens of mb

modest maple
#

Glitch can do websites aswell @earnest phoenix

earnest phoenix
#

ik

modest maple
#

And if you count just the bot code

earnest phoenix
#

but im afraid of glitch not being able to handle my bot

modest maple
#

If it's modulea then yh I'm in the hundreds of MB

#

Well then buy a vps

earnest phoenix
#

which?

modest maple
#

Just what ever specs you need idk

earnest phoenix
#

galaxy gate is prolly the cheapest for what you get, idk if its reliable though

#

I just know it's one of the cheaper options

quartz kindle
#

im on galaxygate and so far its been great

earnest phoenix
#

@earnest phoenix self host

#

wdym not able to handle?

#

how tf

quartz kindle
#

contabo is cheaper but afaik they use atom cores

modest maple
#

I mean bigger bots won't be able to run on glitch

quartz kindle
#

but people's been praising contabo a lot here lately

modest maple
#

Usually

earnest phoenix
#

is your bot like checkin rhings every 0.1 seconds?

#

@earnest phoenix my bot is growing very quick and i think glitch wont be able to handle it together with my website too

#

they buy vps

quartz kindle
#

a website doesnt use much resources

earnest phoenix
#

wait

#

you want something free?

#

im here asking for cheap VPS suggestions

modest maple
#

A website uses hardly anything as long as it's small

earnest phoenix
#

k got you

quartz kindle
#

i can vouch for galaxygate

slender thistle
#

There was a list of cheap VPS in the pins here

earnest phoenix
#
#

this

quartz kindle
#

^no

slender thistle
#

SkySilk has fairly cheap stuff imo

modest maple
#

No

earnest phoenix
#

isn’t replit the same as glitch but worst?

modest maple
#

Yes

#

Because it's not made for bot hosting etc

slender thistle
#

Repl.it is supposed to be only an online IDE

modest maple
#

A cheap vps is a few quid a month

#

See pins

slender thistle
#

not a hosting provider

modest maple
#

I just released combined the website and bot use nearly 48GB ram and 24 cores xD

#

That is insane

earnest phoenix
#

😳

modest maple
#

Logical cores that is

slender thistle
#

What in the honest to all Gods fuck

#

You thought I wouldn't see it but ik you're mining bitcoins there

modest maple
#

Nu

earnest phoenix
modest maple
#

The website went from running on a 4 core with 8gb ram to a 12 core 32GB ram server xD

#

Loading time went down a bit xD

earnest phoenix
#

is aws good for bot hostin?

trim saddle
#

computerfreaker8 hi

quartz kindle
#

aws is good but very expensive

#

there are better and cheaper options

modest maple
#

Yh

earnest phoenix
#

eg

trim saddle
#

did i show you what i made for lunch yesterday

#

wait fuck

#

this isn't off topic

earnest phoenix
#

for example what is good

trim saddle
#

i'm now just seeing that

#

@earnest phoenix check the pins

earnest phoenix
#

windows or ubuntu?

uneven wyvern
#

Ubuntu

amber fractal
#

Windows sucks as a development... Anything

#

Linux is the way to go for developing stuff imo

restive furnace
#

win server is k on dedi, but on like 1gb ram and 1vcpu, linux.

slim heart
#

how does one even do timely punishments. ik the db is involved, and i'm guessing i'm not doing timeouts on every single one. do i load like all the one within a certain time period into timeouts or what?

scenic kelp
#

Idk just run a background thing every minute that runs a db query to find expired punishments?

#

Seems like a better alternative to timeouts and punishments are saved even when the bot dies

slim heart
#

hm alright

scenic kelp
#

Be sure to use lots of for loops mmLol

tiny tinsel
#

@slim heart You mean ban user 1 where 1 is 1 day or hour?

slim heart
#

dw that's not what i'm on about :p

scenic kelp
#

He's talking about how to unban/mute users when their time is up if i understand

earnest phoenix
#

how can i abuse aws trial?

tiny tinsel
#

I would add a datetime to the database (punishment ends date)

#

And use something like Hangfire to run a query to check every expired punishments.

#

No clue what's your language equivalent of Hangfire.

earnest phoenix
#

@ me if you know how 🙂

tiny tinsel
#

And a bool (muted, banned)

scenic kelp
#

hell you could even have a cron task that runs every minute that just connects to the db and runs through the users, dk about actually telling the bot that their time is up

tiny tinsel
#

@scenic kelp That's why I add a datetime example he gets banned on 2020-01-24 10:09 AM and I ban the person for 1 day

#

It would ends on 2020-01-25 10:09 AM

#

So the cronjob just check If the date is in the past. If yes set (muted, banned) bool to false.

late hill
#

@earnest phoenix No one here will (or at least shouldn't) tell you how to abuse anything

earnest phoenix
#

😐

uneven wyvern
#

How can I do this.db in the Main Code and this.module.db in the Test Code?

modest maple
#

Sorry what

#

You gotta give use more than that

#

What language r u using

#

And what do you want todo

earnest phoenix
west spoke
#

you would export the db object

#

and import the db object

#

ez

#

(To @uneven wyvern )

quartz kindle
#

@earnest phoenix is the response actually taking that long to appear?

modest maple
#

@uneven wyvern what language r u usig

quartz kindle
#

i mean, its no wonder considering the request has to go to neptune and back

uneven wyvern
#

JavaScript

earnest phoenix
#

yeah

quartz kindle
#

where is your bot hosted?

earnest phoenix
#

im just going to switch

#

to aws

quartz kindle
#

yeah try that

#

@uneven wyvern there are many ways to do that, how are your files organized? is this a module you want to publish?

#

do you want to require the main module in the test file? or do you want to require the test file into the main module?

uneven wyvern
#

yes, but i want to use the db object for me for a test

#

oh my English is crap today

earnest phoenix
#

and if my trial ends im going to switch to digital ocean maybe

uneven wyvern
#

lmao

quartz kindle
#

still not enough information, which file is requiring which file?

uneven wyvern
#

well, for the file for exporting the db object is Data/database.js and for importing is it index.js

quartz kindle
#

for example, lets say you have this structure:
node_modules/mymodule/index.js
test.js
in your test file, you will have ```js
const mymodule = require("mymodule");

class SomeClass {
constructor() {
this.module = new mymodule();
}
someMethod() {
// this.module.db
}
}

let myclass = new SomeClass();
let db = myclass.module.dband in your module's index.js you will havejs
const db = require("somedatabasemodule");
module.exports = class {
constructor() {
this.db = db;
}
}```

#

i dont know how your code looks like, but im assuming you're using classes since you mentioned the this keyword

#

its just a matter of requiring the correct file, and assigning either the class or an instance of the class to another class, or however works better for your use case

uneven wyvern
#

Ok ty as always

earnest phoenix
#

ubuntu or linux

modest maple
#

thats not how that works

quartz kindle
#

ubuntu is linux

#

a flavor of linux

glacial anchor
#

discord.js is telling me to install a node engine, even though i have one installed.

#

im on discord.js v12. tried @discordjs/opus, node-opus, and only opusscript seems to work

#

but who wants to use opusscript

#

lol now even opusscript doesnt work

blissful scaffold
#

Opus gave me PTSD 😦

amber fractal
#

Opus is just ptsd

#

Lavalink isnt any better for your mental health tho

glacial anchor
#

i know whats the problem. just because of one folder i dont have access to, it refuses to use npm at all

green kestrel
#

Which languages have shards as clones of the bot process, rather than OS threads? From what I can tell most node.js bots do

modest maple
#

i mean most can

#

depends if you run the shards clustering

quartz kindle
#

node can run both, processes and threads (well, "worker threads")

modest maple
#

class Drive:
    def __init__(self):
        self.gauth = None
        self.drive = GoogleDrive(auth=self.authorise())

    def authorise(self):
        """ Automatically loads our creds and saves if needs be. """
        self.gauth = GoogleAuth()
        if os.path.exists('token.pickle'):
            with open('token.pickle', 'rb') as token:
                self.gauth = pickle.load(token)
        else:
            if self.gauth.credentials is None:
                self.gauth.LocalWebserverAuth() 
            elif self.gauth.access_token_expired:
                self.gauth.Refresh()
            with open('token.pickle', 'wb') as token:
                pickle.dump(self.gauth, token)
                
        self.gauth.Authorize()
        return self.gauth```
#

finally got it auto loading creds

#

appart from i spelt Authorize wrong

#

xD

slender thistle
#

Nah you just went British there

modest maple
#

i went correct

#

xD

lone wave
#

Hello, excuse me for disturbing you but I'm just starting to learn how to code, I would like to know where I could find a good hoster, free and secure if possible, to put my bot in.

If I missed something, just give me the link to the message and I'll read it all, thank you ^^

slender thistle
#

"free" = "not safe" essentially

lone wave
#

I can't put money on, i'm ... like poor ... the nitro you see someone give it to me ...

quartz kindle
#

if you have or can borrow a credit card, you can get 1 year for free at google and amazon

#

otherwise, glitch and heroku are the only "free" services, but have several limitations and restrictions

lone wave
#

Okey, thank you

glacial mango
#

Could anyone help me installing java on my vps?

#

Ping me please 🙂

delicate zephyr
#

@glacial mango Linux?

#

And what version of java

prime cliff
#

Google: How to install java on linux for ubuntu/debian/arch it's not that hard K_Kappa

delicate zephyr
#

@prime cliff read pins

prime cliff
#

We no lang/lib wars

delicate zephyr
prime cliff
#

Yea i see

grizzled valley
#

can someone gimme an example on how to develop an market system for my economy bot?

sudden geyser
#

That'd be a lot for an example, you can probably find one on github.

grizzled valley
#

umm....not any in python tbh

stable horizon
#

Well, I know of a few, none of them are any good.

grizzled valley
#

exactly

sudden geyser
#

there are likely a lot (and if they're not good, just make it better!), but all you really need to do is fetch all the items in the market, check how much it costs compared to your balance and list them

stable horizon
#

You'll probably need a database, a way to add points (whether that be per message, or using an activity monitor (hint: discord.ext.commands.cooldowns), a command to view said points, a shop or something, and commands for people to interact with the currency (think robbing, slots etc)

grizzled valley
#

just gimme a link

#

yeah thought of that but cogs arent working

#

so i make them into a single file

stable horizon
#

User error

delicate zephyr
#

You'll have to learn to make one. We can't really give an example of something that specific

stable horizon
#

Cogs work fine

grizzled valley
#

then it says syntax error