#development

1 messages ยท Page 574 of 1

dense dove
#

thanks mate

#

๐Ÿ˜

#

didnt work afacepalm

#

lol

sly wyvern
#

in that vein, does someone have a stylesheet I can quickly add to my bot page that's not as butt-ugly as the default markdown theme?

#

All of my inline code blocks are barely even visible since it's light-red on white.

dense dove
#

use html + css

shy turret
#

yah

#

xD

sly wyvern
#

I know, I can just put the markdown through a parser to get working HTML, but I'd rather not have to go through developing an entire site theme if I can just borrow someone-else's stylesheet.

amber fractal
#

well

#

we dont spoonfeed

dense dove
#

i just made mine myself, took a couple of mins ig

#

@amber fractal man adding the !importants didnt work

amber fractal
#

does the pc work tho?

dense dove
#

nope

sly wyvern
#

Ah well, guess I'll just see if I can put together something minimal that can at least fix the inline code blocks..

dense dove
#

the background color aint even changing lol

safe steppe
#

Any idea why my c# bot no longer responds to commands. I tried to put a Console.Write in MessageReceivedAsync but that never writes so It's not receiving messages I assume. I know it loads the CommandHandler because If I put Console.Write in InitializeAsync it writes it

earnest phoenix
#

share your code...?

safe steppe
dull bobcat
#

Any errors?

safe steppe
#

Nope

#

I updated my Visual Studio (haven't in a couple months ablobsweats) and It hasn't worked since. That might not be why but pinkblobshrug

dull bobcat
#

I have only tried coding a discord bot with C# once lmfao, i dont think im able to help you with the code lol

#

Sorry man, but goodluck

sly wyvern
#

Well, you could try rolling back commits on your bot until it starts working again, that may tell you which commit the breaking change was added in.

dull bobcat
#

or debug

safe steppe
#

Don't use GitHub bolbworried

dull bobcat
#

Then Debug

sly wyvern
#

@safe steppe well there's your problem. And if you're not comfortable publishing your source you can always just use git locally without an external service like github.

#

Or subversion if that's more your style.

amber fractal
#

private repos are free now and amazing back ups

sly wyvern
#

Wait they are?

amber fractal
#

yes

safe steppe
#

Yeah

amber fractal
#

private repos are free now

sly wyvern
#

I guess I've had github premium for so long I'd never bothered to check...

opaque eagle
#

I never knew they were free either

#

Is there a way to pass in a function as one of winston's transports? (winston aka the npm logging package)

earnest phoenix
#

so im trying to update every object inside an array inside every mongodb document as to add a new variable

#

each document is styled like { blah : [ { blah2: true }, { blah2: true } ] }

#

or what im trying to modify is

#

anyone know how to do that with mongo?

#

something similar to like
db.users.updateMany({}, {$set:{blah.$.blah2 : false}}, {upsert: true})

#

so that it updates every object in the array

#

that string dosnt work but i think its in the corret direction to modify all objects in nested array

keen drift
#

Can you post a before and desired after

earnest phoenix
#
before
{
    blah : [
        {
            blah2: true
        },
        {
            blah2: true
        }
    ]
}

after
{
    blah : [
        {
            blah2: false
        },
        {
            blah2: false
        }
    ]
}```
#

i need to apply that with every document

#

db.users.updateMany({}, {set every object inside an array}, {upsert: true}})

keen drift
#

Your previous code should've worked, does it not?

earnest phoenix
#

but it dosnt seem to do so

#

military_goods currently also dosnt exist but upsert should handle that

keen drift
#
upsert
Do not use the positional operator $ with upsert operations because inserts will use the $ as a field name in the inserted document.
earnest phoenix
#

oh

keen drift
#

For now, you should prob just iterate every document

earnest phoenix
#

there are like

#

hundreds

#

of docs

keen drift
#

that's not much Thonk

earnest phoenix
#

to do manually?

#

lol

keen drift
#

i mean programmatically

earnest phoenix
#

oh

#

yea

#

i was thinking about doing that but wanted to see if i could manage it

keen drift
#

pull document, reinsert/update

earnest phoenix
#

querry wise

#

yea

#

ill probably write something to handle updating that array

#

for future use

#

or something

keen drift
#

This positional operator with upsert is tracked as issue server-3326 in mongodb

#

So in the future, it may potentially be possible

earnest phoenix
#

still on same boat

#

ill just iterate programmatically

amber fractal
#

kinda looks like a bot I was making then kinda stopped mmLol

#

I'd have to guess they are way different tho

earnest phoenix
#

if it a galaxy conquest mmo then i mean

#

yea same bot

keen drift
#

jesus, that issue was created in 2011

earnest phoenix
#

omg really?

#

its still not resolved?

#

lol

keen drift
#

mongodb team ๐Ÿ‘๐Ÿพ

earnest phoenix
#

mongodb step up

keen drift
#

It's in their backlog still

#

so I guess not a priority

earnest phoenix
#

i mean

#

i imagine people fall into my position

amber fractal
#

Nah, it was a thing where you make a castle, make treaties, form confederacies, raid neighboring castles, keep control of your people and all that shit

earnest phoenix
#

quiet often

amber fractal
#

I worked on it for like a month

#

then lost interes

earnest phoenix
#

nested objects inside array inside doc

amber fractal
#

interest*

earnest phoenix
#

is not

#

uncommon

earnest phoenix
#

when does dbl re-fetch bot pfp?

#

i updated mine rather a long time ago and it still uses the old one

mossy vine
#

Try refreshing with ctrl + f5

earnest phoenix
#

its not cache (on my end)

mossy vine
#

When did you update it?

#

The pfp i mean

earnest phoenix
#

few days ago

mossy vine
#

Huh

earnest phoenix
#

oh wait hold on

#

i know whats wrong

#

nvm

sand crown
#

How do you add html css in a bot's desc?

earnest phoenix
#

anyone know how to put 2 prefix on config.json(discord.js)

sand crown
#

Can you add other things than html in the editor on yt?

mossy vine
#

@sand crown what?
@earnest phoenix just check for both prefixes

earnest phoenix
#

??

#

what?=

mossy vine
#

Check for both prefixes.

sand crown
#

Bot desc

#

html and css to style the desc

mossy vine
#

@sand crown write your css between <style> tags in your <head>

dull bobcat
#

@earnest phoenix ```json
{
"prefix1" : "first_prefix",
"prefix2" : "second_prefix"
etc...
}

earnest phoenix
#

Ok

#

in the bot.js i put config.prefix1 and config.prefix2?

dull bobcat
#

Okay how about you actually fkn learn JavaScript

earnest phoenix
#

ok

dull bobcat
#

First you wanna require the config file, and then like you said, you use config.<name>

#

@earnest phoenix

earnest phoenix
#

yes

dull bobcat
#

You shouldn't do this though

#

Do you mind if i ask why you want 2 prefixes?

earnest phoenix
#

There is no more or less type: "prefix": "v; | @native fulcrum"

#

?

dull bobcat
#

What??

earnest phoenix
#

@dull bobcat i want 2 prefix for use v;help and @native fulcrum help

ruby dust
#

what lib are you using

dull bobcat
#

well you cant do that in a json file

earnest phoenix
#

Eu acho que tem um jeito de ser mais ou menos "v; | @native fulcrum" in the config.json

dull bobcat
#

Man

#

This is not how json works

earnest phoenix
#

oh

#

ok

dull bobcat
#

The prefix will be broken if you include unknown characters and spaces

ruby dust
#

some libraries give you an option to use bot mention as it's own prefix

dull bobcat
#

He's on Discord.JS

#

@ruby dust

#

@earnest phoenix Just create a variable for the mention, then compare that variable to the first mention and if the member is mentioning the bot, the command will trigger, and if its not mentioning the bot then just use the else statement

earnest phoenix
#

Ok

dull bobcat
#

Im not gonna give you the code, i don't think youre compable to do this thats why im telling you to learn JS, you dont even know how to call a module

#

Just search up on google "JavaScript and NodeJS courses"

earnest phoenix
#

Ok im going to search

restive bough
#

๐Ÿ˜ฑ zoomeyes

earnest phoenix
#

is there any WAY that I can get a tag of a user while I have the user's default information to mention him

#

in example

#

if I know

#

message.member

#

can I get message.member.user.tag

dull bobcat
#

ugh

earnest phoenix
#

but NOT

dull bobcat
#

get by id

marble needle
#

all you need is the user object, if the object doesnt have a tag property you can build your own by <user.username>#<user.discriminator>

dull bobcat
#

^

earnest phoenix
#

the member who send the message

dull bobcat
#

or use <user>.tag

mossy vine
#

???

dull bobcat
#
let author = message.author;
message.channel.send(author.tag);
earnest phoenix
#

I have the user object,but in string

#

@dull bobcat Not the author

sick cloud
#

read the docs

marble needle
#

please for the love of god

#

learn js and read the docs

dull bobcat
#

^

earnest phoenix
#
var a= string
dull bobcat
#

man

marble needle
#
#

user has a tag property

dull bobcat
#

^

earnest phoenix
#

I read that doc

ruby dust
#

you said this will be a discord.js question, this is most likely a general coding question

dull bobcat
#

Thats literally what i said

marble needle
#

he mentioned it was about djs

dull bobcat
#

@earnest phoenix Learn NodeJS or JavaScript, dot!

earnest phoenix
#

I think u guys didn't fully understanded my question because of my poor english

#

@dull bobcat I learned js

dull bobcat
#

No

marble needle
#

doesnt seem like it

#

message(obj) -> member(obj) -> user(obj) -> tag(string)

earnest phoenix
#

I will show the specific case

dull bobcat
#

What are you trying to do ffs

earnest phoenix
#

a user sends a message like this @earnest phoenix

dull bobcat
#

yeah?

earnest phoenix
#

so I get the @earnest phoenix and put it in varaible

marble needle
earnest phoenix
#

and I want to get the tag by the varaible

dull bobcat
#

Use args or message.mentions.members.first()

#

and to get the tag

earnest phoenix
#

oh

dull bobcat
#

a user has a tag property <user>.tag

earnest phoenix
#

thanks message.mentions.members.first() was the thing I was looking for

dull bobcat
#

This is literally what we have been saying to you the whole time

#

You really need to learn JS man

earnest phoenix
#

actually I did not had a user object, but a string

#

like var a=userobject.toString()

marble needle
sinful lotus
#

what are you trying to do?

dull bobcat
#
let mentioned_user = message.mentions.members.first();
if (!mentioned_user) return //whatever the fuck you want to return here

message.channel.send(mentioned_user.tag)
``` @earnest phoenix
#

now, go learn NodeJS

earnest phoenix
#

@dull bobcat thanks

#

I tryed to get the mention by split

latent willow
#

.user.tag

marble needle
#

aren't you getting the guildmember with that

#

members dont have a tag property

dull bobcat
#

right

#

my bad

zinc pawn
sinful lotus
#

just a piece of advice, better learn more about the js if you want to make a public bot. as well how to read documentations and such. It would save you a lot of effort

dull bobcat
#

do mentioned_user.user.tag @earnest phoenix

sinful lotus
#

@zinc pawn did you try experimenting where the code stops?

zinc pawn
#

wdym?

sinful lotus
#

basically put console.logs there and figure out where the code execution stops

marble needle
#

asked differently: did you debug

sinful lotus
#

yes because asking us what happened without any errors would be hard, so thats why we asked you if you debugged it

zinc pawn
#

it stops on line 51

marble needle
#

console log the result

zinc pawn
#

the if(result.length === 0)

#

alright

marble needle
#

cant do things with a result if there aint any

dull bobcat
#

@zinc pawn what is result

sinful lotus
#

what is results.length?

zinc pawn
#

I'm logging now

marble needle
#

probably 0 if it returns on like 51 lmao

sinful lotus
#

or its undefined

#

who knows

dull bobcat
#

^

marble needle
#

debugging 101, if code returns on a line with a return statement the return condition is met heavythonk

zinc pawn
#

hm its returning []

inner jewel
#

is there any reason for those awaits if you're just using callbacks?

sinful lotus
#

ok so it means

#

results is 0

#

so it will return there

zinc pawn
#

yes

sinful lotus
#

then why ask us Thonk

zinc pawn
#

im now working out why it isn't finding it

sinful lotus
#

oh

#

ok, but as far as I can tell i dont know what ever is bot.rrdb.find this

zinc pawn
#

its stored like this {"serverid":"539058992136323082","reqlevel":"2","roleid":"539059104715374597","_id":"qzvq4GPKfQp3eWjI"}

#

the bot.rrdb is just a link to a nedb

dull bobcat
#

Elemental31, what is "result" defined as

zinc pawn
#

[]

dull bobcat
#

I dont want to know the content

sinful lotus
#

it isnt f inding what he wants

zinc pawn
#

^

dull bobcat
#

What are you trying to find?

sinful lotus
#

so your issue maybe is on how you FIND what you want

zinc pawn
#

yeah somethings wrong in the finding

dull bobcat
#

What are you trying to find..

#

sigh

zinc pawn
#

specifically here await bot.rrdb.find({serverid: message.guild.id, reqlevel: curlvl + 1}, async (oopsie, result) => {

sinful lotus
#

I never used that db so I'll be just saying try to debug how you find it. as well why await that

#

I dont think thats a promise

zinc pawn
#

nedb doesn't even return promises, its irrelevant whether you have it

#

yeah i got rid of it

sinful lotus
#

yes but I dont know why you await on non promise stuff

zinc pawn
#

it can't find a result for {"serverid":"539058992136323082","reqlevel":"2","roleid":"539059104715374597","_id":"qzvq4GPKfQp3eWjI"} when its searching serverid: message.guild.id, reqlevel: 2

sinful lotus
#

well maybe it needs the role id and the _id

marble needle
#

correct me if im wrong but you're searching for a number while it's saved as a string

sinful lotus
#

oh yeah thats a possibility ^

marble needle
#

2 != "2"

zinc pawn
#

yeah just realised that

#

so search like this instead? reqlevel: "${curlvl + 1}"

dull bobcat
#

uh

#

no

sinful lotus
#

you cant try using ==

#

can*

#

if thats applicable

dull bobcat
#

nope, you cant use ${} inside "

zinc pawn
#

no its inside `

dull bobcat
#
`${curlvl + 1}`
#

not with "

zinc pawn
#

it goes > reqlevel: `"${curlvl + 1}"` <

dull bobcat
#

no man

zinc pawn
#

it was discord formatting

inner jewel
#

remove those "

dull bobcat
#

^

marble needle
#

^

zinc pawn
#

ok

inner jewel
#
thing: `"a"` -> thing = "\"a\""
thing: `a` -> thing = "a"```
zinc pawn
#

oh it finally found it

sinful lotus
#

if you want to store pure numbers, store it without ""

#

so that you woudnt have issues about that in future

zinc pawn
#

new issue for(i = 0; i<result.length; i++){ if(!message.member.hasRole(result[0].roleid)) { message.member.addRole(result[0].roleid).catch(OOOH =>{}) } }
(node:5028) UnhandledPromiseRejectionWarning: TypeError: message.member.hasRole is not a function

sinful lotus
#

we are not your debugging childs sighs, but I think its because member is undefine try logging message.member

marble needle
#

is hasRole even a thing

inner jewel
#

there's no hasRole function in member

dull bobcat
#

You wanna use Template strings otherwise it cant contain placeholders

inner jewel
zinc pawn
#

roles.has

#

right?

dull bobcat
#

just read.

sinful lotus
#

try it

dull bobcat
zinc pawn
#

ah there we go

#

it worked!

#

thanks

dull bobcat
#

read the link i sent you

modern mural
#

H

dull bobcat
#

?

lofty hamlet
#

Hi how i can replace an item in array

#

?

keen drift
#

array[index] = newvalue

#

?

lofty hamlet
#

๐Ÿค” ?

#

@keen drift

keen drift
#

assuming it's js, just replace the value?

lofty hamlet
#

I can not make Test2 = Gall.Noms.indexOf(Dresseur.Famillier) and Test2 = "Blabla"

#

?

keen drift
#

...no?

#

Test2 would be an index

lofty hamlet
#

What ?

#

How i can so ?

late hill
#

Do you need to save it

keen drift
#

just told you, array[index] = newvalue

lofty hamlet
#

?????

late hill
#

๐Ÿ˜‚

lofty hamlet
#

Test2 = Gall.Noms.indexOf(Dresseur.Famillier) and Test2 = "Blabla" is equal

late hill
#

What are you trying to do

#

Do you just want to change the value

keen drift
#

is this js or py, the hell

lofty hamlet
#

Ex : replace Aqua in : Test:"Aqua", "Magma"

#

JS

keen drift
#

yeah array[index] = newvalue

#

pls

lofty hamlet
#

But I must define the place of Aqua because it is not the same place in all the world

#

@keen drift

late hill
#

Bruh

keen drift
#

feels like i'm getting trolled

late hill
#

Replace index in fishy's example with what you used for Test2

lofty hamlet
#

So ? : array["Aqua"] = "Aqua2" for this Test:"Aqua", "Magma" ?

keen drift
#

do you not know what an index is

late hill
#

xd

lofty hamlet
#

Yes is know

keen drift
#

@inner jewel i need some backup

dull bobcat
#

@keen drift ?

keen drift
dull bobcat
#

wha

inner jewel
#

cp fishy /backup/

#

done

keen drift
#

@dull bobcat what you want

dull bobcat
#

i thought u needed help

keen drift
#

no

dull bobcat
#

then lets not talk in here more since its offtopic

keen drift
#

i'd appreciate if you read the whole context beforehand

dull bobcat
#

i meant our convo right now, but sorry

#

its not development related at all

#

so can we change either topic or channel?

sick cloud
#

chatting

dusky steeple
#

new moderator? ๐Ÿค”

dull bobcat
#

Yeah but we're not even talking about development right now @sick cloud

#

I'm just following the rules

sick cloud
#

you aren't

#

your minimodding

dull bobcat
#

How am i not

dusky steeple
#

aka "mini-modding"

sick cloud
#

also rule 1

#

now we can all drop the subject

dull bobcat
#

I am not minimodding, i literally asked if we could change fucking channel since this is off topic, i want to have discussions about development here

#

I can aswell just call the mods here

keen drift
#

I was helping another user, when you randomly interrupted and pinged me and then proceeded to ask me to move to off-topic?

dull bobcat
#

No, i pinged you because i thought you needed help since you said "i need backup", i already told you this

#

Now can we pleace change topic or channel, just drop it

keen drift
#

Then I proceeded to tell you read the context

hushed berry
#

christ guys

#

calm down ๐Ÿ˜”

dull bobcat
#

Yeah i know but i apologized because i didn't do that, and that i miss understood

#

But can you drop this

#

before i call a mod in here

dusky steeple
#

๐Ÿค” lol

lofty hamlet
#

@keen drift and how i can delete a precise item in a array exemple i want delete Aqua in an array

keen drift
#

Obtain the index, then array[index] = newvalue

#

you can obtain the index from indexof

mossy vine
#
exports.remove = (array, element) => {
    if(!Array.isArray(array)) throw "Invalid input.";
    
    const index = array.indexOf(element);
    
    if(index !== -1){
        array.splice(index, 1);
    } else throw "Element not found in array.";
    
    return array;
};```
#

or this

#

of course it would be function remove()

#

but you get it

keen drift
#

for delete, you can use splice

#

update you can just use the index

lofty hamlet
#

How ? plz i have not really understood

mossy vine
#

i literally sent you a function that does it. i usually dont spoonfeed but you asking "how?" after we explained is just painful

lofty hamlet
#

Exuse me i have not see thanks i go test and understand

gentle lava
#

/money

dull bobcat
#

Ok so, i use enmap and i wanna make a command called reset, this command is supposed to delete all data in the database, the method to do this is enmap.deleteAll() but i'm not sure how i can define which database to delete the data on, those are the files i got and i dont know how i can remove the data from those, i guess enmap.deleteAll() wont work just using that.. Anyways, any1 who can help? Please DM me because i gtg, ill brb soon, my files:

sly wyvern
#

@dull bobcat Which language and database API are you using?

sick cloud
#

dont use enmap, easy fix tbh

dull bobcat
#

Discord.JS and wtf u mean by database API?

#

I use enmap

sick cloud
#

they mean what provider

dull bobcat
#

sqlite

#

?

#

@sick cloud why should i not use enmap lol

sly wyvern
#

(Sorry, I'm just not too familiar with the node libs, I realize now that the second bit should've been obvious.)

sick cloud
#

why not interact with sqlite yourself

#

enmap is just a glorified wrapper really, and it takes more space

sly wyvern
#

That or use a proper ORM.

sick cloud
#

^

#

something like sequalize

dull bobcat
#

I wanna stick with Enmap, are you guys gonna help or not?

sick cloud
#

nope, because nobody uses it

#

read the docs

dull bobcat
#

What has enmap with the docs to do wtf

#

if you mean enmaps docs, they dont provide examples and explinations on how to use enmap.deleteAll()

sly wyvern
dull bobcat
#

Yeah

#

Now tell me, where do you see an exmaple?

#

Or an explination on HOW to use it

sly wyvern
#

Have you tried just calling it on the enmap you're trying to delete all from?

dull bobcat
#

i havent tried anything because i dont know what im supposed to do, thats why i asked for help lmao

sly wyvern
#

Dude, just call the function on a test database and see if it did what you need.

#

Here's example code for how to delete all from an enmap called my_enmap:

my_enmap.deleteAll()
dull bobcat
#

so i need to define "my_enmap" right?

sick cloud
#

you replace it with whatever db you want to use it on

dull bobcat
#

basically filename?

sly wyvern
#

You should already have an enmap object that you've been calling methods from to insert and retrieve values and whatever. Just take that object and call this function from it.

dull bobcat
#

I use command handlers and event handlers

#

everything isnt in my index file

sly wyvern
#

Ok, so look at the line of code in one of those command/event handlers that actually puts data into the enmap. Copy whatever code it's using to get ahold of the particular enmap object, and use that to get ahold of the enmap object in the handler that needs to do the deletion operation.

#

Then call deleteAll on that enmap object.

#

Jeez this isn't that hard.

paper zinc
#

anyone good at php/mysql

sly wyvern
#

I'm pretty good at SQL, and I know enough PHP to do basic XSS and injection attacks...

dull bobcat
#
    const settings = message.settings;
    const defaults = client.config.defaultSettings;
    const overrides = client.settings.get(message.guild.id);
    if (!client.settings.has(message.guild.id)) client.settings.set(message.guild.id, {});
``` This is what i use when i store data in the database
#

this is my "set" command

paper zinc
#

MySQL connection fail! SQLSTATE[HY000] [2054] Server sent charset unknown to the client. Please, report to the developers
do you know what im doing wrong?

dusky steeple
#

posting an error with no explanation of what your doing?

paper zinc
#

oh wait

sly wyvern
#

@dull bobcat Well, obviously client.settings is the enmap object here, so what you want is client.settings.deleteAll().

paper zinc
#
<?php

require_once('../function.php');
dbconnect();
session_start();

if ($_SERVER['REQUEST_METHOD'] === 'POST') {

    if (attempt($_POST['username'], $_POST['password'])) {
        redirect('home.php');


    }
    else {
        redirect('index.php?error=' . urlencode('Wrong username or password'));
    }
}

?>
dull bobcat
#

@sly wyvern That will delete all the settings though, i want to delete ALL data in the db

sly wyvern
#

@paper zinc can you verify that MySQL is actually running?

dull bobcat
#
client.settings = new Enmap({name: "settings"});

This is in my index

paper zinc
#

yup it is

dusky steeple
#

what version mysql?

paper zinc
#

Server: MySQL 8.0 Server
PHP version: 7.2

sly wyvern
#

If you're using more than one enmap, you'll need to delete everything from the different enmaps separately. Or, you can try just deleting the enmap.sqlite and associated files and reinitializing enmap.

#

No guarantees it will work but this is your problem not mine.

#

@paper zinc I take it dbconnect is defined in function.php?

dusky steeple
#

its a common mysql error

#

I am reading about it right now

paper zinc
#
function connectdb()
{
    global $dbname, $dbuser, $dbhost, $dbpass;
    $conms = @mysql_connect($dbhost,$dbuser,$dbpass); //connect mysql
    if(!$conms) return false;
    $condb = @mysql_select_db($dbname);
    if(!$condb) return false;
    return true;
}
dusky steeple
#

happens a lot with mysql 8

paper zinc
#

really?

dusky steeple
sly wyvern
#

Also note that mysql_connect is actually deprecated, you should be using mysqli_connect instead.

#

(Assuming I'm understanding the docs correctly.)

paper zinc
#

so use the mysqli extension?

sly wyvern
#

Yes, although you also need to do what @dusky steeple said first about your my.cnf.

paper zinc
#

Where is that?

sly wyvern
#

It depends on your environment where exactly it's located.

#

You only need mysqli.

paper zinc
#

ok

sly wyvern
#

What OS and which package did you install?

paper zinc
#

What

#

I unticked mysql

#

Same error ๐Ÿ˜•

sly wyvern
#

I'd expect it to be somewhere like /etc/mysql/my.cnf but that's not the only place it could be.

paper zinc
#

I don't have that folder

#

also, the database is not localhosted

sly wyvern
#

Using mysqli isn't to fix this error, it's to avoid some other future possible errors.

paper zinc
#

ok

#

so, tick it again?

#

Wait. Do I need curl?

sly wyvern
#

No, really you don't want mysql, you want mysqli. For entirely different reasons from this issue.

dusky steeple
#

you might need to contact the host and have them fix the error.

paper zinc
#

What?

dusky steeple
#

who hosts your mysql?

paper zinc
#

Yes? whats wrong

sly wyvern
#

If it's not localhosted, where is it hosted?

#

You need to make the configuration change there, not on the PHP end.

paper zinc
#

currently.

#

i'm trying to move it local

marble needle
#

db4free OMEGALUL

paper zinc
#

CURRENTLY, not permanently?

sly wyvern
#

Ok, yeah, that's not an actual solution. Just install your own local mysql instance.

#

That's not hard to do.

paper zinc
#

Well, I have.

#

It's just not accepting connections

#

idk how to fix it

#

Is it really a db error?

sly wyvern
#

Are you unable to connect at all, or just not from your PHP code?

paper zinc
#

Just php

sly wyvern
#

Because if it's the latter you probably just need to make sure your db roles are configured correctly.

#

And make sure that the db you're trying to connect to actually exists.

paper zinc
#

it does

sly wyvern
#

(And all that fun db configuration stuff...)

paper zinc
#

what

#

Oh. After disabling the MySQL extension, the page stopped working

sly wyvern
#

Yeah, you need to change all the mysql_<something> calls in your code to mysqli_<something>.

paper zinc
#

oh

#

even this one?

#

$pdo = new PDO('mysql:host=

sly wyvern
#

Oh wait you're using an ORM?

paper zinc
#

wha

sly wyvern
#

oh wait no PDO is a database abstraction layer not an ORM, nvm.

#

But if you're using PDO for everything, you shouldn't need to directly connect to the db with mysqli at all.

paper zinc
#

so, what's wrong?

#

having 2 db connectors?

sly wyvern
#

It's not wrong per se, just usually superfluous.

paper zinc
#

hm

sly wyvern
#

@paper zinc do you have a github repo or anything so I can take a look at your code?

paper zinc
#

I can give you a zip

sly wyvern
#

nah

paper zinc
#

why not?

sly wyvern
#

that's too much effort for me.

paper zinc
#

well, ok. I'll upload it to github

#

DM me your github name, it's privated.

sly wyvern
#

It's the same as my username here.

paper zinc
#

How should I know?

sly wyvern
#

because I just told you in my last message.

#

Sorry if that came across as overly passive-agressive.

paper zinc
#

The files are uploading.

#

Added you @sly wyvern

sly wyvern
#

Also, how are you connecting to your local DB that's not via PHP?

paper zinc
#

phpmyadmin

#

only software working

sly wyvern
#

Ok, and you've created the appropriate user (trankery) with the correct password on your server, created the database (smm_paneling), and GRANTed your user the permissions needed to log in to and access that database?

paper zinc
#

yes

sly wyvern
#

Also you should probably edit the dbconnect function to use the same $dbname and the rest of those vars to construct its arguments.

#

the same way connectdb does.

paper zinc
#

wait, do you not have edit perms?

sly wyvern
#

Honestly it's better if I just tell you what's wrong and have you fix it, that way you'll learn.

paper zinc
#

okay

#

so what should I do

#
function connectdb()
{
    global $dbname, $dbuser, $dbhost, $dbpass;
    $conms = @mysql_connect($dbhost,$dbuser,$dbpass); //connect mysql
    if(!$conms) return false;
    $condb = @mysql_select_db($dbname);
    if(!$condb) return false;
    return true;
}```
#

this?

sly wyvern
#

Ok, so that's actually not the function you' got the error message from.

paper zinc
#

yes

#

probably

sly wyvern
#

The actual function is the one after that, called dbconnect, not connectdb.

paper zinc
#

oh ๐Ÿคฆ

#
        $pdo = new PDO('mysql:host=$dbhost;dbname=$dbname', '$dbuser', '$dbpass');```
#

like that?

sly wyvern
#

yeah.

paper zinc
#

ok

#

Page doesnt work still

#

HTTP ERROR 500

sly wyvern
#

Same message?

paper zinc
#

i don't see it.

#

the page is not working

#

wait a second

#

No, new error.

sly wyvern
#

well that's progress.

paper zinc
#

MySQL connection fail! SQLSTATE[HY000] [2002] php_network_getaddresses: gethostbyname failed. errno=0

#

Neither direct ip, nor hostname works

sly wyvern
#

Oh, you need to use a double-quoted string if you want variable expansion to work.

paper zinc
#

in the defined database values?

sly wyvern
#

Single-quoted strings don't get expanded.

paper zinc
#

$dbname = "ssm_paneling";

#

that's what i got

sly wyvern
#

No on the PDO('mysql:host=$dbhost;dbname=$dbname', '$dbuser', '$dbpass'); line

#

the single-quoted strings are being passed in verbatim without any variable expansion.

paper zinc
#

$pdo = new PDO("mysql:host="$dbhost";dbname="$dbname", "$dbuser", "$dbpass");

sly wyvern
#

yes.

paper zinc
#

thats what i did

#

now the page is not working

#

the entire page is not working

sly wyvern
#

Ugh you've got way too many double quotes. Get rid of the internal double quotes.

#

PDO("mysql:host=$dbhost;dbname=$dbname", "$dbuser", "$dbpass");

paper zinc
#

$pdo = new PDO("mysql:host=$dbhost;dbname=$dbname, "$dbuser", "$dbpass");

#

nvm saw it

#

New error!

#

MySQL connection fail! SQLSTATE[HY000] [2002] No such file or directory

sly wyvern
#

Sounds like you didn't actually create the database on the server...

sly wyvern
#

Like with an actual CREATE DATABASE query.

paper zinc
#

oh

#

no, not with a query

sly wyvern
#

I mean creating it with the UI is fine too.

#

Can you make sure you've created the user as well?

paper zinc
#

Should I create it with a query?

#

Where?

sly wyvern
#

IDK, can you open up a query shell?

paper zinc
#

Like, an sql query?

#

or the query query?

sly wyvern
#

Yeah. I'm more used to postgres and for that i'd be psql, but IDK what the equivalent is for MySQL.

sly wyvern
#

try running the query SELECT User FROM mysql.user;. Make sure the result includes your trankery user.

paper zinc
#

query query or sql query

sly wyvern
#

Also, try running SHOW GRANTS FOR trankery;

paper zinc
#

MySQL said:

#1142 - SELECT command denied to user 'trankery'@'localhost' for table 'user'

sly wyvern
#

ok, and the second?

paper zinc
#

GRANT USAGE ON . TO trankery@%
GRANT ALL PRIVILEGES ON smm_paneling.* TO `trank...

sly wyvern
#

Try SELECT default_character_set_name FROM information_schema.SCHEMATA S WHERE schema_name = "smm_paneling";

#

To see what the current character set actually is.

paper zinc
#

utf8

sly wyvern
#

Ok, not sure what the character set issue actually is then... this is weird.

paper zinc
#

I know...

sly wyvern
#

Can you go through the properties in the UI and make sure that everything is set to UTF8 anywhere it asks about a charset?

paper zinc
#

Maybe, do we need to define the charset in the panel, where the db is defined?

sly wyvern
#

Honestly what you should do first is find the my.cnf file and change the character set appropriately there then restart the database.

paper zinc
#

It is the default one

sly wyvern
#

Or if you're on windows it's actually c:\programdata\mysql\mysql server 8.0\my.ini

paper zinc
#

well, it is the default one...

split hazel
#

Im a started in html. I use sqlite in javascript for a database. How would i use the database in html

paper zinc
#

wait, lets just try a different db server

sly wyvern
#

You have the line default-character-set=utf8 in all of the relevant config sections in that config file?

paper zinc
#

looks like it

sly wyvern
#

because it's possible for the client to be set to a different charset than the database.

#

@split hazel You can't query a database directly from HTML.

#

That's just not how it works.

#

That's why javascript exists.

paper zinc
#

Moved it to a different host:

MySQL connection fail! SQLSTATE[HY000] [2002] No such file or directory

split hazel
#

Oh so I require it from the html file or something

#

And all the things are done in js file

sly wyvern
#

For that matter, you probably shouldn't be querying the database from the client-side javascript either.

earnest phoenix
#

learn how web deving works

#

you dont even underatand html which isnt even a programming language so you should backtrack

ruby dust
#

is it alright if I'll load a json file after every command, or is it recommended to load the contents on startup?

paper zinc
#

@sly wyvern
Moved it to a different host:

MySQL connection fail! SQLSTATE[HY000] [2002] No such file or directory

sly wyvern
#

IDK man.

#

Are you sure you have $dbhost set correctly?

earnest phoenix
#

@ruby dust how often is it updated

paper zinc
#

yes. should i use the ip or the hostname?

sly wyvern
#

Probably the hostname.

ruby dust
#

nearly to never, those are just response strings

paper zinc
#

Oh wait.

#

New errors

#
Notice: Undefined variable: dbhost in /volume1/web2/smm/function.php on line 33
Notice: Undefined variable: dbname in /volume1/web2/smm/function.php on line 33
Notice: Undefined variable: dbuser in /volume1/web2/smm/function.php on line 33
Notice: Undefined variable: dbpass in /volume1/web2/smm/function.php on line 33

MySQL connection fail! SQLSTATE[HY000] [2002] No such file or directory```
earnest phoenix
#

then once on startup and keep it in memory cache

#

you will save on resources

ruby dust
#

I'm just afraid of overloading my memory, in case there's a lot to cache?

sly wyvern
#

Ok, well there's your problem, you need to declare those as globals at the start of dbconnect the way you did in connectdb

paper zinc
#

wha

#

oh wait, you mean

global $dbname, $dbuser, $dbhost, $dbpass;

#

?

sly wyvern
#

yeah, that bit is what let the first function access those vars.

earnest phoenix
#

unless you are keeping the pentagon code in the json file i doubt text will overload the memory

ruby dust
#

fair enough

paper zinc
#

NO SHIT

#

THAT WAS THE WHOLE PROBLEM

#

@sly wyvern is worlds best legend

sly wyvern
#

glad I could help

paper zinc
#

he helped me, fixing a panel

#

for around 4 hours

#

and it works

#

jesus thanks

#

Can I give you a vouch or rep or so?

#

mcm?

sly wyvern
#

what? idk do what you want.

ruby dust
#

honestly, that's how large software run into problems like that, so 4 hours is almost nothing ยฏ_(ใƒ„)_/ยฏ

paper zinc
#

Huge vouch for @sly wyvern. Good PHP/SQL Developer. Cool guy.

ruby dust
#

rip dude, he's not gonna give you a break now

dull bobcat
#

@molten pewter Maybe you wanna install such module? lol

molten pewter
#

except it is installed

dull bobcat
#

code?

molten pewter
#

it's not in my code, it's in the code of prism-media

#

so it's a bug with that

dull bobcat
#

hm

molten pewter
#

and it happens every time my bot restarts

#

so my bot is down rn

dull bobcat
#

rip

sly wyvern
#

@molten pewter Sounds like you've found your way to dependancy hell.

molten pewter
#

yup

#

except it's a dependency in djs

sly wyvern
#

I guess just try rolling back versions on things until it works.

brisk epoch
#

How can not let my bot send messages on this server. Discord.py Rewrite

dull bobcat
#

ignore this server by id

sly wyvern
#

There's probably a fancy way to do it with a decorator, but basically you just need to check the guild_id against a blacklist that includes this server's guild_id, and if it matches then don't do whatever it was you were going to do.

dull bobcat
sly wyvern
#

Like if you want to be fancy you could implement a custom send_message function that does that check for you so you don't have to modify your code anywhere else, but ultimately one way or another it's gonna come down to checking if the guild_id is in the list and if so don't send.

brisk epoch
#

Why would this not work?

        blacklist = ["520633847583604746"]
        if guild.id == blacklist:
            return False
        embed=discord.Embed(title=f"Hello **{member.name}**, hope you have a good time in {member.guild}", description=f"Want this bot in your server? Go to fuzzybot.us.to", color=0x17B3FF)
        embed.set_footer(text=f"Need help type {self.bot.command_prefix}help. Not in these DM's!")
        await member.send(embed=embed)```
sly wyvern
#

I don't know, does it not work?

brisk epoch
#

no it dose not

sly wyvern
#

oh actually there's your problem you need to check for membership not equality

brisk epoch
#

i don't know what that means lol

sly wyvern
#

if guild.id in blacklist: rather than if guild.id == blacklist:

brisk epoch
#

ok

sly wyvern
#

it's possible you'll need to cast things to make sure they're of the same type

#

Also for performance reasons you probably want to use a set rather than a list.

brisk epoch
#

so what will fix it?

sly wyvern
#
        blacklist = {520633847583604746}
        if int(guild.id) in blacklist:
            return False
brisk epoch
#

same problem

sly wyvern
#

I mean, you need to actually retrieve the guild object, it doesn't automatically exist.

#

It looks like member.guild is probably what you want, assuming the rest of the code is correct.

brisk epoch
#

ok

sly wyvern
#

so int(member.guild.id)

brisk epoch
#

still dose not work ๐Ÿ˜ฆ

mossy vine
#

uhm

brisk epoch
#
        blacklist = {520633847583604746}
        if int(member.guild.id) in blacklist:
            return False
        embed=discord.Embed(title=f"Hello **{member.name}**, hope you have a good time in {member.guild}", description=f"Want this bot in your server? Go to fuzzybot.us.to", color=0x17B3FF)
        embed.set_footer(text=f"Need help type {self.bot.command_prefix}help. Not in these DM's!")
        await member.send(embed=embed)```
mossy vine
#

can you send your ful function?

#

oh uh

earnest phoenix
#

your logic is very foul

#

you're overwriting the list each time a member joins with only one entry in it

#

so... what's the point of a list?

#

just compare the ids directly

brisk epoch
#

idk

#

so how would i do that lol

earnest phoenix
#

shouldn't you know

brisk epoch
#

im bad with if statements

earnest phoenix
#

then backtrack and relearn that

molten pewter
#

he claims that javascript outside of a web browser is trash

earnest phoenix
#

although javascript requries negative iq to use it hence why a lot of newbies just stick to it, it's still a language lol

molten pewter
#

yeah

earnest phoenix
#

there's no "real" and "not real" languages

grim aspen
#

well fuck

#

SyntaxError: Unexpected end of input
at new Script (vm.js:51:7)
at createScript (vm.js:136:10)
at Object.runInThisContext (vm.js:197:10)
at Module._compile (internal/modules/cjs/loader.js:618:28)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
at Module.load (internal/modules/cjs/loader.js:566:32)
at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
at Function.Module._load (internal/modules/cjs/loader.js:498:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:695:10)
at startup (internal/bootstrap/node.js:201:19)

earnest phoenix
#

if a programming language is a programming language, it's a programming language

molten pewter
#

he says he tried to use node once and hated it

#

he uses java btw

#

And he also claims discord is trash because it uses js lol

mossy vine
#

says discord is trash on discord

earnest phoenix
#

uses one of the most unoptimized langugaes in the world

bashes other languages for not being able to comprehend with them

molten pewter
#

^

amber fractal
#

I dont want to just transfrom it either, because that would make it look weird on other devices, wouldnt it?

fierce thorn
#

Just align it to center using css

amber fractal
#

it is

#

but patreon has a different one

#

same stuff tho

#

so idk why it'd actually change

fierce thorn
#

margin: 0 auto;

amber fractal
#

Same

steel heath
#

why not just <center> mMlOL

amber fractal
#

I tried that

#

same thing

steel heath
#

owo

amber fractal
#

Screw it Ill just translate it

topaz fjord
#

@amber fractal have you tried justify content and align conten

amber fractal
#

Same

#

anyone know how wide the widget is mmLol

proper ember
#

Question-

#

I'm having a bit of trouble with the Oauth thing

#

I've gotten the code from the api/auth part, but trying to get the access token returns "invalid_grant"

amber fractal
#

well

#

you cant get a users token

proper ember
#

Hm. Perhaps I'm going about this the wrong way then-

#

Trying to do the login portion of my site like how the bot list does

#

Where it logs into the discord

amber fractal
#

actually, ignore everything I say

proper ember
#

Lol

amber fractal
#

I've never used Oauth2 for a website

proper ember
#

I'm rather unfamiliar with it myself truthfully

#

From my understanding of the discord api, it's along the lines of authorization URL (scope identify) > request access token using the returned code > use access token for neat stuff

#

Problem being, using the returned code based on how they describe doesn't quite work

earnest phoenix
#

i'm going to cp you a tag i made in dapi

#

in hastebin probably

#

nevermind hastebin is being weird

#

anyway;

#

First you are supposed to redirect the user to /api/oauth2/authorize with the required url parameters (client_id,redirect_uri,response_type,scope).redirect_uri must be a value which exists in your app's redirect uri list.If and when the authorization process is done it will redirect the user to your redirect url with a url parameter named code e.g https://domain.com?code=x.

In order to exchange for an access token you need to make a POST call to /api/oauth2/token with these values in the body; grant_type,client_id,client_secret,redirect_uri,code. They need to match the values that were used in /api/oauth2/authorize (first request you made) and for code you use the code you got in the url parameter (?code=).

If the request was successful, you'll get a JSON response which contains a access_token and a refresh_token field. You need to cache it. Cache the refresh_token too if you want to do automatic token refreshes. Access tokens usually last for a week so you can choose whether you want to make your sessions last a week or if you want to do automatic token refreshes.

Skip this paragraph if you don't want automatic token refreshes
When you've made your request to /api/oauth2/authorize (request above) the JSON response will also contain a expires_in field. It's saying how long until the token expires in seconds. You can cache it or put it in a database, however don't lose it. Once the token is expired, you want to exchange the expired token for a refreshed one. Repeat the process above and make a POST call to /api/oauth2/authorize except you're going to throw out code out of the body and replace it with refresh_token which you should have cached as said above.

Anyways, you use that access token in authorization headers now. For e.g to get info about your logged in user you call /api/users/@me with the Authorization header set to Bearer token

proper ember
#

Oh jeez

#

Right, so I've done that

#

I've got it giving the code from the authorization bit

#

I pass that through with all the info and can't seem to get the access token

#

Originally I was getting invalid_grant, but now I'm getting access_denied.

earnest phoenix
#

reassure the values match

proper ember
#

That's the post body

earnest phoenix
#

e.g if the user authorizes a redirect uri that's https://google.com you must exchange the same redirect url in the post request

#

it has to be valid json

proper ember
#

It is, that's just a quick copy & paste from bulk editing

earnest phoenix
#

ah

proper ember
#

So I needa use the same URI from before, then?

#

Or a URI from the list

#

Ah-

#

That was it

earnest phoenix
#

๐Ÿ‘

proper ember
#

Big thanks man

dense dove
#

Still wanna know why my css styling doesn't work well on the website, especially for phones

quartz kindle
#

What are you trying to do?

uneven pond
#

@steel heath boลŸ yere sizin EGGSY's Destek den banlandฤฑm -_-

amber fractal
#

and nothing, I tried that as well

marble needle
#

just change the border's color to match the background?

amber fractal
#

I did inherit

#

nothing

#

and the background color

#

same deal

dense dove
#

@quartz kindle you can check my code on my bots page for @kind pelican

#

How did you change the background colour. Mine stays white @amber fractal

amber fractal
#

thats my website

#

not dbl

dense dove
#

Even with !important lol

#

Ah

#

Same thing happened with me

amber fractal
#

why css the background

dense dove
#

Can't add background colour

amber fractal
#

well I did it different

#

I put a body in the body mmLol

dense dove
#

Smart

#

Lol

amber fractal
dense dove
#

But responsive design isn't working for me either

#

Cool

amber fractal
#

thats in my dbl site

#

dbl page*

dense dove
#

Gotcha

earnest phoenix
#

dont use tables for ordering content

#

either make your own grid system or use a css framework e.g bootstrap

amber fractal
#

I tried floating

#

Why not use tables tho

#

if I knew what I was doing

#

I probably wouldnt have this problem

earnest phoenix
#

because that's bad practice

amber fractal
#

Reason?

quartz kindle
#

@dense dove you mean the text overflow on mobile? Reduce the margins and padding and play arount with text-overflow, line-break and wrap rules

earnest phoenix
#

it's widely not applied, not strandardised, it looks ugly when someone snoops through your site's source and table appearance can be changed by altering browser's or os' settings

amber fractal
#

Im not trying to make a top tier site

earnest phoenix
#

which reminded me, tables are not responsive

amber fractal
#

I already know no one will go on it

earnest phoenix
#

grid systems are

#

grid systems utilize css' percentage system and max-width decorators

#

which makes your content responsive

#

you don't even need to spend time making your own

#

i'm pretty sure that at this point every css framework has it's own

#

to name a few; materializecss and bootstrap

quartz kindle
#

I always make my own

earnest phoenix
#

how do i add my bot to the server?

amber fractal
#

Im on it on my phone right now, it looks the same tho

quartz kindle
#

@earnest phoenix go to the website and click the add button

earnest phoenix
#

because you don't have a meta tag that tells the phone it's mobile friendly

amber fractal
#

Im not making a whole other thing for phones ๐Ÿคท

earnest phoenix
#

wat

amber fractal
#

No one is gonna use it anyways

earnest phoenix
#

who said you have to make anything for phones

quartz kindle
#

Use the device scailng tag or something like that

#

Scaling*

grim aspen
#

@quartz kindle i'm getting an error

#

SyntaxError: Unexpected end of input
at new Script (vm.js:51:7)
at createScript (vm.js:136:10)
at Object.runInThisContext (vm.js:197:10)
at Module._compile (internal/modules/cjs/loader.js:618:28)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
at Module.load (internal/modules/cjs/loader.js:566:32)
at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
at Function.Module._load (internal/modules/cjs/loader.js:498:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:695:10)
at startup (internal/bootstrap/node.js:201:19)
exit status 1

amber fractal
#

Well if it breaks on phones, why add a mobile friendly tag

quartz kindle
#

You have a syntax error in your code

grim aspen
#

hmmmm

earnest phoenix
#

well if it breaks on phones, why not fix the problem and not put a band aid over it and act as if nothing's wrong

quartz kindle
#

The device scaling meta tag is so the website is resized correctly on mobile, else you get desktop versions on all devices

amber fractal
#

because I dont really care about the website that much

quartz kindle
#

But if your website is not responsivr, dont use it

grim aspen
#

foun the error

#

/home/runner/index.js:185
});

amber fractal
#

I dont plan on anyone really using it anyways

grim aspen
#

it doesn't need to be in my code

amber fractal
#

people look at the bot page on dbl for like 5 seconds, retention is shit anyways

earnest phoenix
#

also a protip;

if your website looks like it's from 2009, it will probably affect the user's mentality and drift away the user from the product

school marketing classes actually came in use for once woah

amber fractal
#

I'm honestly fine with that

#

Im not a web dev

marble needle
#

if you throw in your own code and it stops working you are at fault and not some random module you didn't write to begin with

grim aspen
#

@quartz kindle me: been coding a discord bot and still shit

amber fractal
#

People dont use a bot for the website

quartz kindle
#

Dbl is not about retention, its about getting users back. Else they use other bot websites to search for bots

grim aspen
#

for a month*

earnest phoenix
#
TarpergonToday at 11:31 PM
People dont use a bot for the website

correct, but many do use a bot because it has a quality website

marble needle
#

dw, people code games for years and they're shit OMEGALUL

earnest phoenix
#

why do you think bots like mee6 have such a huge userbase for generic features

quartz kindle
#

Like EA

earnest phoenix
#

they have a rich and a very beautiful website

marble needle
#

fifa n+1

grim aspen
#

fifa is all kinds of mess

marble needle
#

yea cause its a football game, the sport itself is trash ๐Ÿ‘€

quartz kindle
#

Skate 3 best game

earnest phoenix
#

fifa has been the same game with grass texture updates every year

grim aspen
#

skate 3 is full shit-funny glitches

quartz kindle
#

Exactly

marble needle
#

they update grass textures? pog

amber fractal
#

I fixed it anyways

earnest phoenix
#

Why is not my bot inside the server?

amber fractal
marble needle
#

needs to be approved first if you submitted it

#

takes up to 7 days, glhf waiting

grim aspen
#

luckly i have patience

dull bobcat
#

^

solemn zephyr
#

Hello

#

How can i invite the reaction role bot?

grim aspen
#

to here?

earnest phoenix
#

@marble needle My bot has been approved but is not on the server

solemn zephyr
#

No in to my server

grim aspen
#

is that what you mean?

#

oh

dense dove
#

@quartz kindle I've set the width of the container quite less but it's not even working on phone

quartz kindle
#

Reaction role is not currently available i think, ask fishy, hes the owner of reaction role

grim aspen
#

there should be a page look-

#

or that

solemn zephyr
#

@keen drift Hello? Is the reaction role available now?

earnest phoenix
#

Why is not my bot inside the server?

quartz kindle
#

@dense dove im on mobile right now, so i cant check, but you should be able to decrease or disable margin and padding from the description container, so it streches some more. Use the element inspector find what is making it so narrow

mossy vine
#

@solemn zephyr iirc reaction role is being remade, thats why Fishy temporarily shut it down, to stop its growth

solemn zephyr
#

Oh

quartz kindle
#

@earnest phoenix did you add your bot in the website? Filled up the application form?

solemn zephyr
#

But in some severs they can use it

earnest phoenix
#

@quartz kindle yes

solemn zephyr
#

Like I cant invite it,.but some of my friends use it every day.GWragMonkaS

quartz kindle
#

Yeah he just removed the invite link so it stops growing

#

Until its stable again

solemn zephyr
#

Oh okay

quartz kindle
#

But ask him, be might give you a link

solemn zephyr
#

Thanks for the replay

quartz kindle
#

@earnest phoenix now you have to wait until its approved. It takes up to 7 days. You will receive a message from Luca

earnest phoenix
#

@quartz kindle hum

#

Ok

#

thanks

solemn zephyr
#

@keen drift I whuld like to talk with you, please tag me when you have Time for me.

#

Thanks

topaz fjord
#

@mossy vine that is why

#

im p sure that's why fishy removed his bot

amber fractal
quartz kindle
#

Tables are kinda confusing, have you tried adding it to tr instead of td?

amber fractal
#

I will

quartz kindle
#

Im on mobile, cant use the inspector now

topaz fjord
#

or just don't use tables mmLol

quartz kindle
#

^

topaz fjord
#

I prefer grids

#

or flex box

amber fractal
#

I dont even know what a grid is

quartz kindle
#

Unless you have actual tabular data and want people to be able to copy paste it into excel

topaz fjord
#

grids are actually a good alternative

amber fractal
#

Am I going to need to install something?

#

oh wait

#

is it just a tag (I dont know what it's really called)

earnest phoenix
#

markup language != programming language

amber fractal
#

I know.

#

Of course it works when I add important tho, idk what is over writing it tho

#

And now position: sticky; isnt working

#

Man I love html and css

#

Either way, I want to learn these grids

#

so I can make it responsive

#

I was just being dumb earlier

quartz kindle
#

The easiest way to go responsive is simply inline-blocks with % widths

amber fractal
#

Also, now things are going over my nav bar when it has a z-index

quartz kindle
#

Its very basic, but works nicely depending on your needs

amber fractal
#

It's going over the nav bar

#

it wasnt earlier

#

And now its like my css isnt even updating the page

stray wasp
#

how many applications can I use one token on?

#

discord bot tokens*

#

running at the same time?

keen drift
#

what

stray wasp
#

I'm wanting to connect my discord bot separately to my dashboard which both are connecting to the same bot token

#

is that considered api abuse or what do you reckon?

keen drift
#

I still don't get what you trying to do with the token

#

What you mean how many applications

stray wasp
#

I've got my bot running as a separate application

#

and I'm building a dashboard which is also connecting to the discord api with the same token

keen drift
#

as long as you don't exceed the ratelimits, you will be fine to use it anywhere

stray wasp
#

alright sweet thanks, question does discordjs auto ratelimit?

keen drift
#

prob

stray wasp
#

ok

spring ember
#

@stray wasp you will have problems, you need to only use a rest client to fetch data for the dashboard and a full bot for the bot part

#

Because libs also connect you to the websocket

stray wasp
#

a rest client on the bot itself?

spring ember
#

For the dashboard

stray wasp
#

sorry I men't creating a api on the bot itself to get data and management

spring ember
#

Then what

stray wasp
#

I'll look into rest clients thanks!

amber fractal
spring ember
#

Rest client simply put is a http client for serialized data @stray wasp

stray wasp
#

oh ok

spring ember
#

@amber fractal what code does the topbar use?

amber fractal
#

Do you want a screenshot or just a copy paste

stray wasp
spring ember
#

Looks great

#

Make sure to cache stuff

stray wasp
#

Just to understand the concept better what would be some problems I would run into if I use discord js for the dashboard

keen drift
#

Discordjs is meant to be a bot lib

stray wasp
#

yes but I'm planning on completing bot tasks like leaving a guild or is that possible with the rest client?

amber fractal
keen drift
#

@stray wasp yeah just make calls to the api

stray wasp
#

mmmm alright

spring ember
#

@stray wasp d.js will try to connect a web socket but to no avail because your bot is connected

#

But websockets are used for real time data which is not needed

#

Here

#

In this case

keen drift
#

You will actually get two ws connection in which Discord sends data to both

stray wasp
#

and the sending of data is ratelimited aswell? from discord to client*

keen drift
#

API calls are ratelimited, yes

#

pretty much everything is

stray wasp
#

ok

spring ember
#

@keen drift sometimes it just doesn't let me connect

amber fractal
spring ember
#

Looks great

#

Except the image