#development

1 messages ยท Page 446 of 1

quartz kindle
#

check if the hierarchy reaches the element, or if its being overwritten

#

if its being overwritten, specify the hierarchy: #id .class .class .is-flex
or use !important

kind garnet
#

ah thanks

quartz kindle
#

more specific selectors have higher priority, so .parentclass .childclass will overwrite .childclass

kind garnet
#

How can I change the upvote button text color

#

I cant figure out what to change :(

quartz kindle
#

use the element inspector

kind garnet
#

well yea

#

but I dont know what I change it with in html

quartz kindle
#

what do you mean?

kind garnet
#

I need to change the text

quartz kindle
#

use the css area of the inspector

#

this is whats important

#

you see, its a button element which contains an img and a span

kind garnet
#

yea

quartz kindle
#

you can also test the css by writing it directly in the field below

#

if you write it where it says "element.style", it will apply directly to the element

#

so you can find which element you need to change

#

and if you click the + button, you can test the css selector, so you can find the correct selector to target the element

#

once you've found it, just copy paste it into your style code

#

but as you can see, the "up arrow" in the upvote box is not a text element, its an image element

#

so you cant do stuff like change the arrow color, but you could replace the image

earnest phoenix
#

What permission is needed to remove all reactions from a message?

ruby dust
#

manage messages lets you manage reactions on messages as well

earnest phoenix
#

cheers ๐Ÿ‘Œ

slender thistle
#

Sorry for the SSH link in screenshot

slender thistle
#

Nvm recloning helped

languid dragon
#

Gg

sick cloud
#

@uncut slate, was just wondering if level can store objects, I had no success.

glass linden
#

How do i install canvas?

tulip snow
#

How do you install canvas

sick cloud
#

npm i canvas @glass linden

keen drift
#

Quick question, for <Role>.position, is higher the value the higher the role is in the hierarchy is lower the value the higher?

#

If my memory serves right, the higher the value the higher in the hierarchy, but I want to make sure

sick cloud
#

Higher the value is higher the role iirc.

#

@everyone is position 0.

glass linden
#

Thanks @sick cloud

sick cloud
keen drift
#

that leads me to another question

#

How would I find the Role that Discord creates for the bot automatically

#

In cases that it's renamed & it's not the only one managed by external services

#

I guess what I could do is check the bot's self roles and get the first role that's managed

sick cloud
#

you can do that probably

drifting haven
#

.

earnest phoenix
#

How do i change the colour of the title.

#

I tried looking in inspect element but couldn't figure out which part of the css i need to add

earnest phoenix
#

@quartz kindle

earnest phoenix
#

for when a member leaves isit guildmemberleave

austere meadow
#

guildMemberRemove

earnest phoenix
#

ok

#

thanks

#

00F

#

(node:16824) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): DiscordAPIError: Cannot send messages to this user

(node:16824) [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.

restive silo
#

you cannot send a message to a user which you dont share a server with

earnest phoenix
#

://///

earnest phoenix
#

hello,
does anyone know how i would go arround making a bot list all the channel ids from the servers that the bot is in
thx ๐Ÿ˜„

earnest phoenix
#

Me @earnest phoenix

earnest phoenix
#

On the bot page what css do i write to change the bot title,

#

hi

#

does anyone know how to make rpg bot

#

gb!help

#

gb!bars

#

gb!ping

native narwhal
#

Bots only have permissions to write in the testing channels

uncut slate
#

@sick cloud level only stores arbitrary byte arrays so anything you want to store has to be stringified

native narwhal
earnest phoenix
#

who can help me with my ping command i am using the program discord bot maker

slender thistle
#

You should learn to code on your own

#

But well... what's the code

#

And is it not working? Not working properly?

#

Numbers, Mason, what do they mean?

ruby dust
#

DBM is js for sure

native narwhal
#

People abusing

ruby dust
#

no

#

selfbots weren't even discord's idea, that's how they are not suppose to exist in the first place

uncut slate
#

that's the thing though, they are

earnest phoenix
#

but the thing is people can make them abuseable

#

so you can say "yeah i only use it for simple embeds"

#

but then create a raid command

ruby dust
#

either way, it's not for a normal user to decide how they want to automate a discord server, if they want such automation then bot accounts exist for that specific reason

#

I'm pretty sure discord devs came up with bot accounts just because they didn't like the idea how people were automating user accounts

spring ember
#

Userbots' existence causes loopholes in Discord ToS

quartz kindle
#

it was their way to give us what we wanted, and we love them for it

#

and a good way for them to control it so it doesnt go out of hand

#

if they wanted to, they could simply not allow bots in the first place

ruby dust
#

but that's not possible

quartz kindle
#

but we love them because they didnt, while most other messaging services ban all kinds of automation

ruby dust
#

your account relies on api, if account will be restricted from using api then you won't be able to use discord anymore

#

the best thing they can try to do is to rebuild the client so it's no longer possible to open inspect element

#

exactly

#

you are still technicaly using a selfbot Thonk

quiet bobcat
#

are you using one rn?

#

selfbot

ruby dust
#

that's still selfboting imo

#

I mean, you technically just showed off yourself

#

jonas?

quiet bobcat
#

how old are you?

ruby dust
#

I see 2 tos violations here

#

nvm 1

#

1 is still a violation

earnest phoenix
#

how would i make my bot change the bitrate

#

of vice

#

channals?

knotty steeple
#

library?

earnest phoenix
#

fat python

knotty steeple
#

and idk if you can zoomeyes

earnest phoenix
#

oo

#

o_O

#

@ruby dust i dont think they can rebuild it so that you cant open inspect i dont think its possible

ruby dust
#

ik

quartz kindle
#

you can

#

at least nwjs has a dist which doesnt include dev tools

#

probably electron has one as well

#

pretty sure discord uses electron

uncut slate
#

it does

earnest phoenix
#

^

earnest phoenix
#

Umm so do I make my bot change bitrate

#

Of a voice channel

inner jewel
#

library?

ruby dust
#

Pretty sure it's documented

earnest phoenix
#

English francis

#

Python

#

Sorry for the bad joke

ruby dust
#

English isn't even a language sigh

#

So it's a bad joke

earnest phoenix
#

English is a language used to talk with humans

ruby dust
#

Wait I confused myself even, I meant library

earnest phoenix
#

XD

earnest phoenix
#

Sweet thanks man, I will give it a check

ruby dust
#

Do keep in mind that this is an edit action on a VoiceChannel object, they have different parameters on what you can update than in TextChannel objects

earnest phoenix
#

I couldn't find itthonkku

#

But I learnt a few new things

quartz kindle
#

its right there

ruby dust
#

Learn how to use the browser's search feature

earnest phoenix
#

Right

#

@quartz kindle thanks

languid dragon
ruby dust
#

No ken

earnest phoenix
#

Thank you too @ruby dust

steel heath
#

anybody know how to use custom fonts with canvas in d.js?

bitter sundial
#

what does d.js have to do with that

small mango
#

if I have the permission integer of a user, how do I check for certain permissions

sullen path
#

you google it

small mango
#

i tried

sullen path
small mango
#

i am

#

i dont understand how those values translates to a single permission number

sullen path
#

I'm not sure either

small mango
#

i normally let eris do it but as im doing oauth2 i cant do that anymore

sullen path
#

๐Ÿค”

ruby dust
#

with sqlite3, does fetchone() return a list of tuples even though it's only one tuple?

waxen quest
#

What do people use to make the profile images?

steel heath
#

i think register font does not exist in canvas anymore

#

i tried that lots of times

earnest phoenix
#

its in the alpha version

steel heath
#

ooh

#

ok thanks ill try

earnest phoenix
flint river
#

question, if i applied to get my bot accepted, and then the denied it due to GitHub having my token, after applying back, am i on an extended wait list or are applications looked at randomly? srry just curious

steel heath
#

it's not random, there's an order, you have to wait until we review bots before yours

flint river
#

kk, just wondering since the application processing period is longer than the first time around . Thanks for the answer and quick response btw

slender thistle
#

@ruby dust No lists

#

iirc it's just one tuple

ruby dust
#

k thanks

sick cloud
#

Ohh makes sense, okay thanks @uncut slate hart

granite hedge
#

is it possible to remove all perms from a channel for all users?

shrewd hedge
#

            const getemoji = client.emojis.find("name", args[0]);

            if (getemoji === null) {
                message.channel.send('That is not an emote smh');
            } else {

                if (!args[0]) {
                    message.channel.send("I need an emote, I'm not arkinator lul");
                } else{ 
                    message.channel.send(`Here's your emote: ${getemoji.url}`);
                }
            }
        }```
This command works fine, but it only works if you write the name of the emote without the colons, is there any way to make it work with them?
sick cloud
#

Spice off the colons?

shrewd hedge
#

Hm?

sick cloud
#
const arg = args[0].split(':')[0];
shrewd hedge
#

Oh

#

Thank you

sick cloud
#

that should allow you to use name and :name: iirc

#

No problem.

shrewd hedge
#

Gonna test it

#

I have the same issue as before lol

#

@sick cloud

sick cloud
#

Ohhhh I think I know why. Give me a minute.

shrewd hedge
#

Oh

#

Okay

knotty steeple
#

replace split with slice

shrewd hedge
#

Oh

#

Thanks

sick cloud
#

Nah, not that, custom emojis are different.

#

<:emojiname:emojiid>
they're stored as that

shrewd hedge
#

Hm

#

So what should I add in my code?

#

Oh wait

#

I had an idea

#

(why did I pinged myself lol)

knotty steeple
#

(why did you ping me lol)

inner jewel
#

the name doesn't have to match btw

#

if you're sending it

shrewd hedge
#

I was intended to ping ThatTonybo

#

h

#

Also nevermind I tested the thing above and it doesn't work

sick cloud
#

hm

#

if you can extract the ID

#
`![thonk](https://cdn.discordapp.com/emojis/449945743885598720.webp?size=128 "thonk") (Args here)`.split('<').join(' ').split(':')[2].split('>')[0]

its messy but works.

#

gets the emoji ID

#

then just use .get(id) instead of .find( ... )

drowsy lily
#

@hushed berry oi im looking at the rewrite rn

hushed berry
#

๐Ÿ™

drowsy lily
#

first question: Why return Futures?

#

instead of CompletionStages

hushed berry
#

CompletionStages?

#

havent seen them before

drowsy lily
#

Future are very limited

hushed berry
#

hmm, let me take a look

drowsy lily
#

CompletableFutures/CompletionStages are a lot better

hushed berry
#

It does use CompletableFutures btw

drowsy lily
#

CompletionStage is the interface to CompletableFuture so it would be the most "correct" one to be using

#

unless there is a reason to roll your own implementation

#

which I highly doubt

hushed berry
#

hmm

#

tbh, i would love to have something like JDA's rest action

#

but that seems really overboard

drowsy lily
#

plz dont lol

hushed berry
#

lmao

drowsy lily
#

CompletionStages are Javas async thing

hushed berry
#

right

drowsy lily
#

Futures were the previous implementation which has ben superseded

shrewd hedge
#

Ok so

hushed berry
#

so should I change the return type to CompletionStage<whatever>

shrewd hedge
drowsy lily
#

what JDA does is meh

shrewd hedge
#

Is this right?

hushed berry
#

hm

drowsy lily
#

so should I change the return type to CompletionStage<whatever>

yeah that should be the goal

hushed berry
#

Alright ๐Ÿ™

drowsy lily
#

luckily JDA offers submit() which returns a completion stage

shrewd hedge
#

@sick cloud

#

Should this work?

sick cloud
#

no, my code gets the ID

drowsy lily
#

JDAs queue() thing is bad because it encourages ppl to write shit code imo

shrewd hedge
#

Oh

#

Hm

sick cloud
#

so you'd need to set it to .get()

#

or I can modify it to use the name

shrewd hedge
#

Alright

drowsy lily
#

instead of learning the proper way to use CompletionStages

hushed berry
#

lmao

shrewd hedge
#

Wait

#

Wrong screenshot

#

@sick cloud like this?

sick cloud
#

smh. Remove const pp, = ... and replace arg = pp with arg = args[0].

shrewd hedge
#

Ok

#

Gonna test this

#

Hold on

#

(I'm adding that note until I fix this)

#

@sick cloud

sullen nymph
#

You need to add the name?

#

hi!emoji <name>

drowsy lily
#

nik, other part of the code looks solid imo

one thing to watch out with gson is that it might have issues transforming longs correctly

#

lemme find the link

sick cloud
#

facepalm

shrewd hedge
#

@sullen nymph

sullen nymph
#

Well there ya fuckin' go.

shrewd hedge
#

But... This is not what I want to do

#

Well, sorry if I'm wasting your time

drowsy lily
sick cloud
#

@sullen nymph, don't be rude to users that are asking for help.

sullen nymph
#

@shrewd hedge Do you want to use the actual emote?

shrewd hedge
#

Yes

sullen nymph
#

@sick cloud I'm not being rude lmao, i just said there ya go.

shrewd hedge
#

Basically

drowsy lily
#

the problem is that JSON, or at least some JSON clients, interpret numbers as doubles

sick cloud
sullen nymph
#

you wanna be able to do:
hi!emoji <emoji>?
@shrewd hedge

drowsy lily
#

so you need to be extra careful when sending discod snowflakes as longs

#

personally im doing what the discord api does and send them as strings

shrewd hedge
#

Yes

sullen nymph
#

Hmm...

#

Ok

drowsy lily
#

after getting rekt by gson

shrewd hedge
#

If you need it I cand send the full code of the command

hushed berry
#

@drowsy lily jeez, completionfuture has a lot of stuff hahhaha

drowsy lily
#

its pretty dope

hushed berry
#

Is there a method in it thats like the .queue(successCon, failureCon)

drowsy lily
#

yes

#

several actually

hushed berry
#

hmmm

drowsy lily
#

depending on what you need

#

the closest one is probably whenComplete()

hushed berry
#

that takes a biconsumer though

drowsy lily
#

well none of the methods take two independent consumers

#

but you could easily write a static wrapper for that

hushed berry
#

hmm

#

Meh, i dont care that much

#

also

#

whats the diff between whenComplete and whenCompleteAsync

drowsy lily
#

the Async suffixed methods allow you to provide an executor on which the next step should be run

shrewd hedge
#

Welp, @sullen nymph, I need to close my laptop

#

I'll work on the bot tomorrow

drowsy lily
#

as an example: in case you wanna do some blocking thing it maybe shouldnt be happening on the databasethread that returned the previous result

sullen nymph
#

@shrewd hedge I'll DM you the code

#

Are you using Discord.js or Eris or something else?

shrewd hedge
#

discord.js @sullen nymph

hushed berry
#

ahhhh, okay ๐Ÿ˜Š

sullen nymph
#

@shrewd hedge Great!

shrewd hedge
#

Yay

#

My bot is also kinda a challenge

#

Because, seriously, no offense, I love every bot, and I know everyone puts a lot of effort on them, but sadly many js bots are generic

drowsy lily
#

*many bots are generic

FTFY

quartz kindle
#

i agree, i like purpose specific bots much more

shrewd hedge
#

Can I show my current commands?

quartz kindle
#

sure

shrewd hedge
#

Ok

#
 - hi!ping look at how slow is my bot lol.
 - hi!support sends an invite to my server in the DMs (to avoid other bots deleting it in the server.
 - hi!invite allows you to invite me to your sexy despacito roblox server.
 - hi!avatar (optional @mention) sends the avatar of the mentioned user (if there's no mentions I will send your avatar instead)
 - hi!feedback (text) if you have any ideas for my bot, or you want to report something, use this command. Your feedback will be logged in my support server.
(WARNING: you can get blacklisted from using this command if you abuse this command for shitposting or making innapropiate feedbacks)
 - hi!help-owner shows my owner commands, for if you're curious.
 - hi!server shows your server's info.
 - hi!about shows a boring text about me and Mama.
 - hi!say (text) makes me repeat what you said, then I'll the message.
 - hi!yomama just try it.
 - hi!8ball ask something to the magic ball (you can suggest more answers!!)
 - hi!hitomi sends a random hitomi pic (They are supposed to be SFW, however, if you want to report a picture, send a feedback including the number of the pic)
 - hi!genoauth generates an invite link for the mentioned bot
 - hi!stats shows my server/member/etc count as well as my uptime```
sick cloud
#

though tbh it looks like a general bot

shrewd hedge
#

I'll try to add better stuff

#

Also the yomama command doesn't actually do anything

drowsy lily
#

whats the purpose of your bot?

quartz kindle
#

my suggestion would be to think about something specific that you want to offer, and focus on that

shrewd hedge
#

It's a joke

#

@drowsy lily generally fun stuff

quartz kindle
#

for example, a bot for cryptocurrency, a bot for a specific game, a bot for scrapping a specific information

drowsy lily
#

wew

#

"fun stuff" is suuuuper broad

shrewd hedge
#

Meh

drowsy lily
#

heck it means something different to each person out there

shrewd hedge
#

Actually the hi!genoauth command is useful

#

At least for me it is

flint river
#

super meme creator using a genetic algorithm and using the entirety of google as a data base

shrewd hedge
#

But the bad thing is that I'm not that good at js, I only learnt it by doing stuff on my bot

flint river
#

๐Ÿ˜„

shrewd hedge
#

@flint river nice

flint river
#

it actually might not be that bad

#

have a meme template data base that can append new meme image templates from a few sources

shrewd hedge
#

Hm

#

I think there's already a bot for that

#

But you didn't have a bad idea

sick cloud
#

How I started out: I accidentally stumbled upon discord.js.org, put the example in Atom, ran it and boom, bot. Wew, I made some fun with that.

#

i have a discord bot idea that no one has ever done

shrewd hedge
#

๐Ÿค”

flint river
#

then a neural networking app that takes the top text and bottom text while doing an image recognition software

#

and boom

#

memes

inner jewel
#

NN for a discord bot more like waste of cpu/gpu

flint river
#

i myself just have a Pathfinder Combat Feat Search Engine that scrapes data from the d(twenty)pfsrd website and organizes it and makes it accessible via the search parameters

#

-my "two" key is messed up so i couldnt use the actual number

#

ok im really upset realizing something ๐Ÿ˜‚

#

d20pfsrd has a database page which wouldve much much more easily been scraped

quartz kindle
#

worst thing with bot ideas: have an incredible idea that "no one has ever done", then find a bot that does exactly that

drowsy lily
#

@hushed berry btw i think some of those dependencies can be removed from the rewrite. I didnt really find where you're using retrofit / jda / jackson in there

sick cloud
#

@quartz kindle i've searched >:3

hushed berry
#

Oh yeah, forgot about that

#

ty

drowsy lily
#

when you remove jda youll probably have to add okhttp instead

hushed berry
#

oh shoot youre right

#

I totally forgot about these deps tbh

warm prairie
#

Anyone know if there is a listener that detects who in particular added the bot?

hushed berry
#

no, discord doesnt give that info

drowsy lily
#

^

warm prairie
#

Hmmm, was hoping to DM the user with information

sick cloud
#

@warm prairie the best you can do is DM the owner or send a message to the first channel in the new server the bot has access to.

warm prairie
#

@sick cloud thanks.

sick cloud
#

No problem.

#

I'd suggest the latter personally, seeing as it covers everyone + DMs can be disabled.

shrewd hedge
#

Or check who owns the server

hushed berry
#

@drowsy lily Would you say its a bad idea to have both org.json and gson as deps?

shrewd hedge
#

Also @sick cloud mind if you tell me your idea in the DMS? I promise I won't steal it or tell others about it

#

I'm really curious

drowsy lily
#

depends
some things dont require using full blown objects

#

or rather mediocre

#

but still a lot better than to deserialize to objects

warm prairie
#

I can't actually get the Bot to send a DM to the owner on guildCreate

shrewd hedge
#

Hm

hushed berry
#

hmm, alright

shrewd hedge
#

Maybe guild.owner.send()?

#

Idk

warm prairie
#

thats what I tried, even logged out the promises and its not actually logging anything

shrewd hedge
#

Oh

#

Hm

warm prairie
#
guild.owner.send("Thanks").then(() => {
        logger.info("DM Sent Successfully");
      })
      .catch( (e) => {
        logger.error("Error sending DM ... ", e);
      });
shrewd hedge
#

Weird

#

But ok

sick cloud
#

@warm prairie

try {
    guild.owner.user.send('message');
}
catch(err) {
    console.error(err);
}

^^works well if you use async/await

#

You can only send to a user iirc

uncut slate
#

you have to actually await it though

#

that could easily slip out because you aren't awaiting it

warm prairie
#

hmmm

warm prairie
#

Ahh got it working with my original code (was missing .user.)

sick cloud
#

On discord.js v2/dev/master, does roles.create accept hex codes?

msg.guild.roles.create({
    data: {
        name: 'Verification',
        color: '#ffffff',
    },
    reason: 'created role',
});
quartz kindle
#

ColorResolvable
Can be a number, hex string, an RGB array like:
[255, 0, 255] // purple

sick cloud
#

okay thanks ^

warm prairie
#

What exactly does user.createDM() do for me?

sick cloud
#

I think it returns a DMChannel @warm prairie, basically like using msg.channel, just your getting a DM.

#

So const dm = user.createDM(); dm.send('hello'); would make a DM and send it.

warm prairie
#

can you respond to the bot's dm ?

quartz kindle
#

yes

warm prairie
#

hmm

quartz kindle
#

the bot receives dms the same way as any other message, but the structure of the message is a bit different

#

it wont have message.guild for example

warm prairie
#

trying to figure out how to listen for messages from a dm

quartz kindle
#

it will come in the same on('message') as all other commands

#

and can be replied with the same message.channel.send

#

a dm is also a "channel"

#

basically, all your commands should already work in dms, unless you specifically disabled dms

warm prairie
#

I'm logging out every message that comes to the bot, but it seems that when I send a DM to the bot it doesn't show up in the logs

sick cloud
#

Do you have a check to ignore messages that don't have a guild?

#

(such as if (!msg.guild) return;)

warm prairie
#

the logger is at the top of the listener before any logic checks

quartz kindle
#

can you show the code?

#

the logger and the on(message)

warm prairie
#
    bot.on("message", async (message) => {

        logger.info(`[${message.author.tag}] ${message.cleanContent}`);
        ...
    }
#

oh wait

#

$help

#

woops

#

its coming now, never minddd

quartz kindle
#

alright

long forge
#

Does anyone else know of an issue with YTDL-Core that wont allow them to skip more than one song without it glitching out?

sick cloud
#

You don't "skip songs" using ytdl, so no, than wouldn't even exist. Your code is probably calling the end/finish events or functions too much.

long forge
#

How could I fix it then? I only call the end function twice in all of my command files, and only once in that skip command specifically. I dont know why it would be that...

flint river
#

is doing (At)Name of the mod who checked your bot rood if i say i think i fixed the mistake?

earnest phoenix
#

*rude

restive silo
#

if you fixed the mistake just readd the bot

#

you dont need to tell the mod since its not sure that the same mod checks your bot anyway

#

and we see why it was declined before aswell from other mods

flint river
#

read the bot? i think i fixed my error that was listed by him/her

restive silo
#

then just resubmit the bot on the website

flint river
#

also, i used rood because i read too many memes

restive silo
flint river
#

kk

#

ty ty

#

could i run the fix by you?(i.e. the reason and the fix)

restive silo
#

what do you mean with "run the fix by you"

#

as i said

flint river
#

see if it works?

#

like if it addresses the issue correctly before i repost it

restive silo
#

oh uh shouldn't you be able to test that yourself

flint river
#

well the reason was not having an " (working) help command or obvious point of entry. Please make sure your bot has a help command or has an explanation in the bot description"

#

so im wondering if by adding an example me of running the bot (in the bot description) might address it, as well as adding notes to the bot posts on how you should respond

restive silo
#

oh yea thats fine then thumbUp

flint river
#

ty ty

#

and now the wait begins anew :w

#

me sleep. nighty night

earnest phoenix
#

How do i get my bot online im stupid

#

@earnest phoenix Wdym

#

Have you not done any coding?

#

Mk im very confused

#

Plz help

#

Okay

#

Do you have a basic knowledge of any programming languages?

#

nOpE

#

Idek what language u just spoke

#

I only understood languages

#

@earnest phoenix

#

Okay.

#

You're going to need to choose a lib to program your bot in

#

To completely honest, In my own personal opinion the api wrapper known as discord.py is the easiest to learn and use

#

Oof thanks

#

I have a few links if you'd like to learn the basics

#

Yes plz

#

If you have questions feel free to dm me

#

Aye thx

fervent apex
#

Is this support channel

austere meadow
#

is stacking setTimeout's bad practice

restive silo
#

why would you ever stack them

austere meadow
#

i wanted to time animations so that they sync up good

restive silo
#

hmm

#

but yea i would say stacking them is bad practise

austere meadow
#

yeah

#

i suppose it works for now but ill try and find another way if possible

naive totem
#

Someone can tell me how to create a clikable text?

ruby dust
#

this is called a hyperlink, and it only works in embeds

#

[text](link)

naive totem
#

Ty

#

If i place it in addField(), it will work?

quartz kindle
#

yes

naive totem
#

๐Ÿค” Sooo .addField([text],(link)) ?

quartz kindle
#

addfield(title,description)

#

text link goes anywhere you want it to be

naive totem
#

Okk

quartz kindle
#

in the middle of description, in the footer in the title, etc

naive totem
#

I'll try

ruby dust
#

no it only works in descriptions

naive totem
#

Oh ok

cinder stratus
#

is any mistake in this code

#

the code didnt works

quiet bobcat
#

We aren't going to spoonfeed you

ruby dust
#

@cinder stratus you are missing await in the catch

#

I think

#

I'm not js

lament meteor
#
  1. @cinder stratus what is the error
  2. spoonfeeding isnt allowed nor a gud pratice
  3. ur not giving full information and asking us whats wrong
ruby dust
#

this isn't spoonfeeding

#

and I just literaly helped them

gilded blaze
#

I don't think you need an await in the catch.

ruby dust
#

have you seen the code?

gilded blaze
#

yes

lament meteor
#

yes

ruby dust
#

it's a send function on both

cinder stratus
#

@lament meteor i am not asking to spoonfeed me

lament meteor
#

not saying u are but cause u dont give any other information except the code it makes it sorta of spoonfeeding

ruby dust
#

spoonfeeding means giving the whole code without them letting to think, but even they don't know what is the issue so that's why they gave their code sigh

cinder stratus
#

yes

quartz kindle
#

what doesnt work? any error message?

cinder stratus
#

no

#

it dosent give the role to user

lament meteor
#

no perms?

stiff juniper
#

yeah the bot needs the Manage Roles perm

#

and the role to give to the user has to be lower than its highest role

quartz kindle
#

shouldnt await(rMember.addRole(gRole.id)); be await rMember.addRole(gRole.id);?

lament meteor
#

do u rlly need the await?

stiff juniper
#

its called async

lament meteor
#

cause when i made a command like that i didnt need to use it

stiff juniper
#

they chose to use async

#

ยฏ_(ใƒ„)_/ยฏ

#

i use it

quartz kindle
#

you dont need await, even with async

stiff juniper
#

really?

quartz kindle
#

because await means you're waiting for something, here you're not waiting for anything

#

you're just sending

stiff juniper
#

well yeah true

#

when you put await you're awaiting the function to return something

lament meteor
#

thats what i remember

quartz kindle
#

you would use await if you would send the message then do something with the message you just sent

lament meteor
#

cause i havent been coding for a while cause of holidays....

stiff juniper
#

@quartz kindle right

quartz kindle
#

in any case i've never seen await being used like await()

stiff juniper
#

yeah me neither

#

not even in JS

#
await function();
#

is what i've seen

quartz kindle
#

exactly

lament meteor
#

same

quartz kindle
#

that will probably cause problems and could be the issue in his code

stiff juniper
#

like yknow

#

async is not a function

#

๐Ÿค”

quartz kindle
#

yup

cinder stratus
#

hey if my bot will get authorized luca will message me

quartz kindle
#

yes

lament meteor
#

unless u have dms blocked

sullen path
#

You get tagged in #logs as well

earnest phoenix
ruby dust
#

you don't

#

you can markdown the whole link, which means putting characters around the link

#

but anything that you put inside the link will be part of the link itself

earnest phoenix
#

too bad

#

can't you escape it somehow?

ruby dust
#

try \, idk

earnest phoenix
#

I tried, but I guess I didn't do it the correct way

plush mortar
#

hello where i get a code for bot, sorry i'm newbie

ruby dust
#

you won't "get" a code, you have to create/write it yourself

#

you can start off by learning a programing language

night imp
#

There are many free programs online. I recommend node.js for beginners

#

You can learn through things like codeacademy

#

(or udemy/sololearn)

ruby dust
#

python is a confirmed best choice for coding simple AI programs

plush mortar
#

node.js thank

#

i usually code c#

ruby dust
#

you can use what ever you want

#

every language is good

quartz kindle
stiff juniper
quartz kindle
#

no idea, i dont know c#

shy verge
#

better than d.js lol

west raptor
#

so this works perfectly fine js bot.on("message", async message => { if (message.author.bot) return; let antiinviteset = JSON.parse(fs.readFileSync("./settings.json", "utf8")); if (antiinviteset[message.guild.id].antiinvite == "true") { if (message.content == "discord.gg") { message.delete() } } }); but it has to contain discord.gg and lets say the message is discord.gg/ it won't delete it, how can i fix this?

earnest phoenix
#

That does not work perfectly fine

  • Reading file with sync method on every message
  • will respond to bots
  • .contains is not a property of the message
  • checking if the value of antiinvite is equal to the string "true"
    WutFace
#

and more but holy moly

languid dragon
west raptor
#

damnit i forgot i had .contains

#

i was testing

#

well

#

this was obviously the wrong place to ask

#

well im sorry to bother you

quartz kindle
#

if you compare strings using "==" or "===", you're comparing the entire string at once

#

you have to use something like indexOf to compare a part of a string

#

message.content == "discord.gg" will only work if the message content is exactly discord.gg nothing more nothing less

stiff juniper
#

yeah

#

.includes() works too

earnest phoenix
#

or the other things i listed before trying to fix the command, probably more important

quartz kindle
#

yes, but not directly related to his question

#

he can deal with those later

turbid tiger
#

Hello. I'm having trouble putting my new bot online. I just installed the dependencies for my bot project in my project folder botF, using the Terminal command npm install discord.io winston --save and then I tried to run the command node bot.js in Terminal under the cd directory of my botF folder, but I recieved the error:

#

Here's bot.js in my botF folder

sick cloud
#

Anyone good with Rethink/rethinkdbdash? All my requests are returning this issue:

(node:6922) UnhandledPromiseRejectionWarning: RangeError: Maximum call stack size exceeded
    at /home/tony/node_modules/rethinkdbdash/lib/term.js:2364:40
    at Object.loopKeys (/home/tony/node_modules/rethinkdbdash/lib/helper.js:56:14)
    at Function.Term.expr (/home/tony/node_modules/rethinkdbdash/lib/term.js:2362:12)
    at /home/tony/node_modules/rethinkdbdash/lib/term.js:2364:40
    at Object.loopKeys (/home/tony/node_modules/rethinkdbdash/lib/helper.js:56:14)
    at Function.Term.expr (/home/tony/node_modules/rethinkdbdash/lib/term.js:2362:12)
    at /home/tony/node_modules/rethinkdbdash/lib/term.js:2364:40
    at Object.loopKeys (/home/tony/node_modules/rethinkdbdash/lib/helper.js:56:14)
    at Function.Term.expr (/home/tony/node_modules/rethinkdbdash/lib/term.js:2362:12)
    at /home/tony/node_modules/rethinkdbdash/lib/term.js:2364:40
    at Object.loopKeys (/home/tony/node_modules/rethinkdbdash/lib/helper.js:56:14)
    at Function.Term.expr (/home/tony/node_modules/rethinkdbdash/lib/term.js:2362:12)
    at /home/tony/node_modules/rethinkdbdash/lib/term.js:2364:40
    at Object.loopKeys (/home/tony/node_modules/rethinkdbdash/lib/helper.js:56:14)
    at Function.Term.expr (/home/tony/node_modules/rethinkdbdash/lib/term.js:2362:12)
    at /home/tony/node_modules/rethinkdbdash/lib/term.js:2364:40
(node:6922) 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: 1)
(node:6922) [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.
warm prairie
#

@sick cloud are you trying to store a value that's size exceeds the set limit?

sick cloud
#

I don't even know if there is a limit.

shell blade
#

Sorry for interrupting, but does anyone know how to get the URL for the last attachment sent in a channel?

winged osprey
#

@sick cloud are you trying to store an object that has a reference to itself?

warm prairie
#

@shell blade I think something allong the lines of ...

    const attachmentUrls = [];
    message.attachments.forEach( (a) => {
        attachmentUrls.push(a.url);
    });
shell blade
#

I'll give it a go. Thank you.

#

I'm just getting an empty array @warm prairie.

warm prairie
#

are you logging out the contents of 'a' :MessageAttachment

sick cloud
#

@winged osprey, I don't think so. This is what I'm trying to do:

        await r.table('giveaways').insert({
            id: msg.id,
            startedAt: startedAt,
            startedDate: startedDate,
            setTime: setTime,
            endsAt: endsAt,
            startedBy: msg.member,
            prize: prize,
            channel: channel.id,
        });
winged osprey
#

Honestly I would recommend just storing the properties of the member object that you actually need and not the whole member

sick cloud
#

Is that what would be causing it?

shell blade
#

@warm prairie no, I was just consoling the ended result. I'll try that.

#

I'm still getting nothing.

winged osprey
#

Well the member probably contains references to other objects that have references to themselves

sick cloud
#

Ah..

warm prairie
#

@shell blade you're sure you're sending attachments?

shell blade
#

Yeah. I sent an image a few seconds before executing the code.

warm prairie
#

Hmm, i'm able to get the contents of message.attachments

#

is there any logic before your attachment check?

shell blade
#

Only

if (command == 'test') {
  const attachmentUrls = [];
   message.attachments.forEach( (a) => {
    attachmentUrls.push(a.url);
    console.log(a.url);
  });
}
warm prairie
#

Oh, you're adding it on a command

fluid basin
#

uhh

night imp
#

you are using a message object

fluid basin
#

attachmentUrls is a freaking const

#

that won't do

sick cloud
#

I don't think that matters owoThink

night imp
#

if the message doesn't have an attachment it won't have any ๐Ÿค”

warm prairie
#

const on arrays are fine

fluid basin
#

I don't think you can modify constants

#

well idek

warm prairie
#

as long as you dont' try and initialize them again

night imp
#

^

shell blade
#

You can't modify constants.

night imp
#

you can

#

you can't init them again

#

Into a new value

warm prairie
#

array.push() does work with const

night imp
#

same diff

shell blade
#

I guess :p

#

And yeah, arrays work normally with constants.

warm prairie
#

anyway crazy, are you adding the attachement when using the command you specified?

shell blade
#

No.

#

I'm sending the image then running the command.

warm prairie
#

That's why, you're trying to find something that's not part of that command

shell blade
#

That's what I said.

warm prairie
#

wait

#

the hell

#

OH

fluid basin
#

lul

warm prairie
#

hang on, I know what you need

shell blade
#

Okay.

fluid basin
#

Does it work

#

Or does it not

#

AHH

#

@shell blade message.attachments is a collection

#

not an array

warm prairie
#

@shell blade you'll probably have to do channel.fetchMessages

fluid basin
#

So you'll need to do message.attachments.array().forEach(...)

sick cloud
#

can't you do const thing = Array.from(msg.attachments);?

warm prairie
#

The message you're seeing is the message of the command, its not going to see the attachment from the previous message

warm prairie
#

@shell blade this is a bit dirty, but try this out

if (command == 'test') {
        const attachmentUrls: any[] = [];
        const chan = message.channel;
        chan.fetchMessages({ limit: 2 })
        .then(messages => {
          const msgWithAttachment = messages.find( msg => msg.attachments.size > 0 );
          msgWithAttachment.attachments.forEach( a => {
            attachmentUrls.push(a.url);
          });
        })
        .catch( e => console.error(e) );

      }
bitter jay
#

hmm

#

i just have no luck with detecting when messages are edited

#

sucks xd

fluid basin
#

@frail harness Traceback (most recent call last): File "main.py", line 9, in <module> client = discord.AutoShardedClient() AttributeError: module 'discord' has no attribute 'AutoShardedClient'

#

ยฏ_(ใƒ„)_/ยฏ

frail harness
#

Are you on async?

fluid basin
#

yeah I guess?

frail harness
#

You need to be on rewrite

fluid basin
#

wait wait I'm confused

#

python3 -m pip install -U discord.py isn't this rewrite

frail harness
#

Nope

#

That's async

fluid basin
#

rip

frail harness
#

so do python3 -m pip uninstall discord.py

fluid basin
#

yeah ik that

#

just tell me the correct module

frail harness
#

and then do python3 -m pip install discord-rewrite

fluid basin
#

spent nearly 1/2hr installing qt4

#

(โ•ฏยฐโ–กยฐ๏ผ‰โ•ฏ๏ธต โ”ปโ”โ”ป

#

lol

#

cuz QT4

opal fox
#

โ”ฌโ”€โ”ฌ ใƒŽ( ใ‚œ-ใ‚œใƒŽ)

frail harness
#

Lol

fluid basin
#

rip now aiohttp is giving problems

slender thistle
#

pip install -U git+https://github.com/Rapptz/discord.py@rewrite#egg=discord.py[voice]

fluid basin
#

yeah

blissful reef
#

FFMPEG not installed

#

HMMMMMMMMMMMMMMMM

#

sure looks like its installed

fluid basin
#

LOL

#

if you are using discord.js make sure to install ffmpeg-binaries via npm

earnest phoenix
#

Anyone know how to change the colour of the bot title on the website to a colour-changing rainbow thing. Like I know how to set it but not changing

#

Ping me if you respond

fluid basin
#

CSS?

earnest phoenix
#

Yeah

#

But how. I said i know how to change it but not to color-changing rainbow kinda thing

fluid basin
#

Well I'm not that good in CSS so I don't think I can tell you much

#

But generally its using animations and yeah

earnest phoenix
#

Mk

#

Ty

earnest phoenix
#

i need help with the help of commands ๐Ÿ˜„ so hard if i must update my help command after i add a new command GWaobloChildPepeCry

#

anyone have a way for me?

lament meteor
#

@earnest phoenix is your bot in 1 file?

earnest phoenix
#

commands/file.js

#

command handler

lament meteor
#

I presume u know how to use fs then

#

Read all the files in โ€œcommandsโ€ file and make that into your help command

earnest phoenix
#

how about the category

earnest phoenix
#

Guys i need help

quiet bobcat
#

With?

earnest phoenix
#

let memberz = message.mentions.members.first(); and message.memberz.avatarURL didnโ€™t work since im new at coding and i suck at everything

#

Acutually im getting used to it i mean if iโ€™m new why is my bot even approved

quiet bobcat
#

think that your let replaces with the value you put it as

#

so rn it's message.message.mentions.members.first()

earnest phoenix
#

O

#

Let me try

#

It didnโ€™t work @quiet bobcat this happened: UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'mentions' of undefined

quiet bobcat
#

if i'm not wrong it's message.members.mentions.first

#

idk though

earnest phoenix
#

Hm

lament meteor
#

its message.mentions.users.first() @earnest phoenix not message.members.mentions.first()

earnest phoenix
#

Ok

turbid tiger
#

Quick question: I'm a bit new to bot-making, but I'm doing it in JS. How can I access the channel object so I can access stuff like id and type?

quiet bobcat
#

if it's with message just do message.channel

lament meteor
#

well it is <MESSAGE>.channel then u can check the id by message.channel.id and so on

knotty steeple
#

you can check the docs for more stuff

#

btw

turbid tiger
#

Yeah. Once I get channel ill work on other things like users, etc

#

Ill edit my code real quick, but here's what I have beforehand:

lament meteor
#

@turbid tiger i presume u should see https://discord.js.org/#/docs/main/stable/general/welcome

turbid tiger
#

Haven't seen that webpage yet. Ill try it, thanks

#

I'll be sure to let u all know if it worked ๐Ÿ˜„

earnest phoenix
#

Now it said UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'username' of undefined

quartz kindle
#

that means whatever you have before .username is empty

earnest phoenix
#

Secs ago something happened with avatarURL and now something happened with message.memberz.username

quartz kindle
#

why are you doing message.memberz? if memberz = message.mentions.users then message.memberz = message.message.mentions.users

#

which is pretty much wrong

earnest phoenix
#

With let memberz = message.mentions.users.first();

#

Oh ok i get it

knotty steeple
#

you can remove message in message.memberz.username

quartz kindle
#

if first() returns the user collection, then all you need is memberz.username

earnest phoenix
#

K

knotty steeple
#

sometimes you have to do something like memberz.user.id

#

to get id

quartz kindle
#

depends what does first() give you

#

if it gives you the entire collection or something else

turbid tiger
#

Sorry to interrupt, idk if I'm missing something here, but my console told me that channel is undefined. Here's a code snippet:

var Discord = require('discord.io');
var logger = require('winston');
var auth = require('./auth.json');
// Configure logger settings
logger.remove(logger.transports.Console);
logger.add(new logger.transports.Console, {
    colorize: true
});
logger.level = 'debug';
// Initialize Discord Bot

var bot = new Discord.Client({
   token: auth.token,
   autorun: true
});

bot.on('ready', function (evt) {
    logger.info('Connected');
    logger.info('Logged in as: ');
    logger.info(bot.username + ' - (' + bot.id + ')');
    logger.info('CookieLord Bot is Ready to Bake some Cookies!');
    logger.info(channel.client);
});```

The second-to-last line is where I have problems.
quartz kindle
#

i've never used first() so idk

knotty steeple
#

what do you use

quartz kindle
#

i dont have any command that needs mentions from a message

knotty steeple
#

woah

lament meteor
turbid tiger
#

Oh

knotty steeple
#

yes

turbid tiger
#

What should I replace it w/? ๐Ÿ˜‚

knotty steeple
#

discordie is dead also i think

#

discord.js

quartz kindle
#

or eris

knotty steeple
quartz kindle
#

and channel is indeed undefined

#

what are you trying to get there?

earnest phoenix
#

Didnโ€™t work UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'mentions' of undefined

quartz kindle
#

post your code

earnest phoenix
knotty steeple
#

that is some emoji right there

quartz kindle
#

lmao

knotty steeple
#

do bots have permission to change their nickname?

quartz kindle
#

username yes, nickname depends on server permissions

earnest phoenix
quartz kindle
#

...

#

why do you have message.message

knotty steeple
#

no here

earnest phoenix
#

You said Message.message

#

wth

knotty steeple
#

do they have perms here

quartz kindle
#

no i said, the way you were doing was the same thing as trying to do message.message

#

which is what was giving you problems

earnest phoenix
#

Ok

inner jewel
#

why do you have message.memberz?

quartz kindle
#

message.memberz is not gonna work

inner jewel
#

memberz is a local variable

#

not a property of message

earnest phoenix
#

Then what

inner jewel
#

you use it properly in one line

quartz kindle
#

you want the avatarURL, where is the avatarURL?

inner jewel
#

and wrong on the next

quartz kindle
#

avatarURL is a propriety of the user collection

#

where is the user collection?

#

you assigned it to memberz

earnest phoenix
#

So just remove the message?

knotty steeple
#

message.message.nentions.users.first()? wat

quartz kindle
#

so memberz contains avatarURL

#

message does not contain memberz

inner jewel
#

setAuthor(memberz.username) // correct
setThumbnail(message.memberz.avatarURL) // wrong

knotty steeple
#

the piece of code i sent is also wrong

earnest phoenix
inner jewel
#

also, js x(`${y}`)is the same asjs x(y)

earnest phoenix
#

Oh

#

why tf did i do that

knotty steeple
#

idk

earnest phoenix
shell blade
#

@warm prairie apologies for the late reply, I had to get off my computer. I'm getting an issue with const attachmentUrls: any[] = []; because of the semicolon. Did you mean to put that there?

inner jewel
#

that's probably typescript

#

for js just remove the : any[] part

shell blade
#

Oh, okay.

spring ember
#

What is bot

lament meteor
#

^

simple bramble
#

in .net, what is the type used to put who typed/sent the command into the embed response?

warm prairie
#

Yeah I was using Typescript @shell blade

restive silo
simple bramble
restive silo
#

iirc its a SocketUser

#

from Context.User

earnest phoenix
#

whats 1

#
  • 1
#

?

uncut slate
earnest phoenix
#

right

#

sorry

ruby dust
#

in python, if I'll use continue in a for loop that is inside a for loop, will it continue the whole loop or the one inside it?

quasi marsh
#

The one you are currently in

worn warren
#

Any suggestions on wich NodeJS Discord library to use?

long forge
#

discord.js

quasi marsh
#

d.js or Eris

#

I think discordie is severly out of date

worn warren
#

Thanks

long forge
#

Anyone know what this is about?

    throw err; // Unhandled 'error' event
    ^

Error [ERR_UNHANDLED_ERROR]: Unhandled error. ([object Object])
    at Client.emit (events.js:171:17)
    at WebSocketConnection.onError (/home/ubuntu/Kaneki/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:374:17)
    at WebSocket.onError (/home/ubuntu/Kaneki/node_modules/ws/lib/event-target.js:128:16)
    at WebSocket.emit (events.js:182:13)
    at WebSocket.finalize (/home/ubuntu/Kaneki/node_modules/ws/lib/websocket.js:185:12)
    at ClientRequest._req.on (/home/ubuntu/Kaneki/node_modules/ws/lib/websocket.js:641:12)
    at ClientRequest.emit (events.js:182:13)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:546:21)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:109:17)
    at TLSSocket.socketOnData (_http_client.js:432:20)
``` Was working fine up until here and it looks like its a npm error. Im just unsure how to fix...
restive silo
#

handle the error event

#

๐Ÿ‘€

knotty steeple
#

@long forge might be because of the outage

#

i got the same error

long forge
#

o. mk. Im confused with how to catch error in my command files... idk

frosty sleet
#

Yo. Is there a way to check if user have voted for my bot using .net library?

knotty steeple
#

@long forge

#

its an event

#

so just do it like all other events

#

and make it log the error in console

long forge
#

Add .catch(console.error); to the end or something then console.log(e)?

knotty steeple
#

just add an error event

long forge
#
client.on("error", (e) => console.error(e));
  client.on("warn", (e) => console.warn(e));
  client.on("debug", (e) => console.info(e));```
knotty steeple
#

ye

#

wait console.info()?

long forge
#

thats a thing lol. or console.log idk

#

either work im assuming

#

@knotty steeple Each command file I have needs that right cause it wont just run from the main file?

knotty steeple
#

no

long forge
#

I just need the event in the main one?

#

ok

knotty steeple
#

TypeError: Cannot read property 'exec' of undefined huh?

        let cmd;
        if(bot.commands.has(command)) {
            cmd = bot.commands.get(command)
        } else if (bot.aliases.has(command)) {
            cmd = bot.commands.get(bot.aliases.get(command))
        }

    cmd.exec(bot, msg, args, config)
uncut slate
#

chances are bot.aliases.get(command) isn't returning one of the command names

knotty steeple
#

works on my other bots gud

#

and that errors when i run the main file

#

not when i try to run a command

raw wharf
shell blade
#

@warm prairie sorry again for the late reply. I get this error when I run the command.

TypeError: Cannot read property 'attachments' of null
at chan.fetchMessages.then.messages (/app/bot.js:237:25)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:182:7)
ruby dust
#

does .get_guild() raise anything when the guild is not found?

autumn slate
#

AnyOne Know any good Meme Or Pepe Apis?

keen drift
#

How do you guys handle restarting a specific shard?

#

Like via a command or like something else

flint river
#

i have a question

#

if my bot was denied due to being easily spammable

#

(my bot post embed Feats for pathfinder)

#

so it will post 5 feats, then ask you if you want to go to the next set of 5

#

would the issue be solved if instead of posting 5 new embed messages, i simply replace those 5 feats with the next set upon command

shell blade
sick cloud
#

@flint river, you can just add all the results to one embed.

#

Sending 5 embeds at once is near on API abuse.

flint river
#

too much info

sick cloud
#

Then only send one at a time?

#

Or just send what the user requests, ie. !result 1 would show the first one.

flint river
#

but results can range in the 30's

#

so i thought that method might be a bit inefficient

#

but my method now is too inefficient and spam-like

autumn slate
#

Thanks @shell blade

shell blade
#

np

quartz kindle
#

what are pathfinder feats? are they text? an image? how big is it?

earnest phoenix
night imp
#

Is it NSFW / has the NSFW tag?

earnest phoenix
#

yes

quartz kindle
night imp
#

Remove the NSFW tag or any NSFW content on the bot page. Also thanks Tim ^

earnest phoenix
#

ohh thanks

#

Hello!

quartz kindle
#

message.content.length?

earnest phoenix
#

Thanks

quartz kindle
#

barbar do you have nsfw commands in the bot description page?

earnest phoenix
#

I couldn't find it in the docs

quartz kindle
#

.length is basic javascript

#

can be used for any array or string

earnest phoenix
#

my bot have nsfw command, i need to remove it to?

quartz kindle
#

you dont need to remove the command, but you need to remove it from the description in the website

flint river
#

Pathfinder Feats are in an almost table format

quartz kindle
#

the website does not allow nsfw content

earnest phoenix
#

but there is nothing nsfw in description or tag

quartz kindle
#

then idk, ask a mod

earnest phoenix
#

;-;

quartz kindle
#

@flint river almost table?

flint river
#

not physical table, but organized in the same pattern(i.e.)

#

''' Names: Feat Name

#

Category: Feat Category

#

Index: Feat Index

#

Prerequisites for Feat: Feat Prereq

quartz kindle
#

but as text?

flint river
#

yes

quartz kindle
#

how big is the text?

#

total character count

flint river
#

hmmm, i assume you mean from an embed msg of a feat

#

letme check

quartz kindle
#

because if is not something like 1000+, you can put more than one in the same embed

#

which is ideally what you should do instead for sending a separate message for each one

#

another option is to use pagination

flint river
#

the character count's upper average(most wont get larger than) is about 560 - 600 character

#

how would pagination work?

quartz kindle
#

using emojis and message edit to make it work like pages

#

its a bit more complex to do tho

flint river
#

that is what i was considering(i think)

#

deleting old 5 embed msgs and then sending the next 5 in its place(but at he beginning)

quartz kindle
#

thats still too much, better to send just one embed containing like 2-3 of them, and then go to next page and edit the embed content to display the next 2-3

flint river
#

some or most of the feat embed msg's character count is substantially lower, at around 100 to two hundred (my two key broke)

sick cloud
#

Are there any databases out there that have a web viewer like RethinkDB+Chateau?

warm prairie
#

a web viewer?

sick cloud
#

Yeah, where you can view databases/tables/data from a website.

meager flower
#

Why doesn't <center> </center> work in .md files....

#

And what would you replace it with?

sick cloud
#

Because that's HTML lmao

meager flower
#

Headings and everything else works in .md files ยฏ_(ใƒ„)_/ยฏ

sick cloud
#

And there isn't a way to centre in Markdown iirc.

warm prairie
#

is that something you are planing on seeing in a production environment? or just for local dev?

sick cloud
#

That's for development only?

#

I have Chateau installed on my dedi, for development and such.

#

It shows all the records and such.

warm prairie
#

Most databases come with some sort of way to view their schemas

sick cloud
#

I've never found any that do.

#

RethinkDB has Chateau, but it's an external/optional thing to install and run.

heady zinc
#

RethinkDB has its own web dashboard

ruby dust
#

how do you even define per-server prefixes?

warm prairie
#

MongoDB might

sick cloud
#

@heady zinc, yeah but it doesn't show the actual data.

warm prairie
#

@ruby dust I'm using a datastore for that

sick cloud
#

@ruby dust, you literally store a prefix string for each guild, and on the message event get that guild's prefix.

ruby dust
#

ik that, but what's the code-base for that

heady zinc
#

well you can query it through the data explorer but i see what you mean

warm prairie
#

thats up to you to build out

sick cloud
#
on message
prefix = guilds.get guild.id
if no prefix for guild return;
else guildPrefix = guild.prefix

.. code

something like that lmao

warm prairie
#

lol

heady zinc
#

SQL-based databases have viewers iirc

sick cloud
#

I hate SQL tbh

heady zinc
#

i do too dw

warm prairie
#

I love sql

heady zinc
#

it's ugly rite

warm prairie
#

Go with a NoSQL db then

#

You might like MongoDB

sick cloud
#

Rethink is awesome. await r.table('users').get({ username: 'tony' }).update({ awesome: true }); :3

heady zinc
#

mongodb doesn't seems to have a built-in web dashboard

sick cloud
#

Eh, yeah.

#

And the fact I need something really lightweight.

warm prairie
#

looks like its based off the KnexJS framework

inner jewel
#

rethink is all but lightweight

heady zinc
#

ok natan go away

#

shit on rethink somewhere else

warm prairie
#

๐Ÿ˜†

#

๐Ÿ’ฉ

heady zinc
#

but yeah

#

best bet would be to write one yourself

sick cloud
#

But it run's on a different server than mine, so it's ok :^)

warm prairie
#

I've just been using Postgres, because Heroku has a very nice implementation

knotty steeple
#

please get a real host

warm prairie
#

not a fan of PaaS?

flint river
#

so, would a bot be considered too "spam-able" if it can post 5 embed messages, then asks if you would like to go to the next 5, if you say yes, it deletes the last 5 embed messages, then post 5 more(1 to 5 more)

earnest phoenix
#

well after it posts 5 messages it would have to wait to send more. i think the ratelimit is 5msg/5s per channel or something

flint river
#

it is

earnest phoenix
#

so you would hit ratelimit fast

flint river
#

i know that bit, but is it posting too much

earnest phoenix
#

if ur hitting ratelimit from 1 command from 1 person yeah

quartz kindle
#

well, my bot has a command that posts like 8 messages

earnest phoenix
quartz kindle
#

its basically a database dump

#

it does have a warning and confirm dialog before tho

earnest phoenix
#

oh yeah i mean my broadcasteval command posts maximum 1 message per cluster

#

but its locked to me only

flint river
#

mine is essentially the same, it have around 4000 character - 784 terms - database that it sifts through and allows the user to search through it

#

but if i make it only do 1 term at a time when a search can have around 30 results, that is just a bit too tedious

earnest phoenix
#

use a massive embed (max 6000 characters through the embed) and have reactions to change page

#

and make it edit the message

quartz kindle
#

^