#development

1 messages · Page 910 of 1

neat ingot
#

fml im drunk or something, sec..

#
if (!args[0] || !!args[0]) {
    return message.reply(`:warning: Please give argument!`)
}```
#

there

#

use that one

zenith orchid
#

I think he didn't understand.

copper cradle
#

don't do double negation

neat ingot
#

^ explaination of the 'notnot' 😄

#

lol

copper cradle
#

smh

neat ingot
#

😄

amber fractal
#

in a medium article

copper cradle
#

do !!!!!

neat ingot
#

hey, it was first when i googled

#

im not here to cater good articles 😄

tardy estuary
#

i hate medium

copper cradle
#

well the bang bang is true

#

so

neat ingot
#

tbh, it was the tagline that got me 😄

copper cradle
#

it's not wrong

tardy estuary
#

on medium you are free to state your opinions, regardless of how awful it might be. which is.. fine. but it just clutters usefulness

lofty vine
#

Can I modify my bot's page look using css by using it in bot's description?

neat ingot
#

yes

lofty vine
#

Thanks!

neat ingot
#

my bot (dekbot) does the same on its dbl page

#

a lot of the code i 'borrowed' from the pokecord and medal pages. 🙂

lofty vine
#

xD

neat ingot
#

i think you have to keep all elements visible, and arent allowed to hide ads, but i think thats all

copper cradle
#

I made a pretty cool page imo

#

but I'm not a webdev

neat ingot
#

whats your bot?

copper cradle
#

just another music botum

tardy estuary
#

i wanted to do something on mine, and I am a webdev. but I also got bored and just discarded my changes

quartz kindle
#

i also didnt bother modifying mine

#

the only thing i did was changing "ONLINE" to "ONLINE AS FUCK" lmao

neat ingot
#

lol

quartz kindle
#

but then it got deleted anyway because i fetched description from github

neat ingot
#

your bot got deleted, or the 'online as fuck'?

quartz kindle
#

my css

#

because i pulled my github's readme, which doesnt have it

neat ingot
#

ahhh lol

quartz kindle
#

and i didnt bother adding it back

neat ingot
#

should re-add it 😄

slender thistle
#

I thought you used JS to connect CSS from github for a second

quartz kindle
#

i need to rewrite my both my github and my description anyway

#

since i launched a big update a couple months ago, and didnt update the docs lmao

neat ingot
#

lol, nice

quartz kindle
#

nobody reads those anyway

tardy estuary
#

READ THE DOCS

slender thistle
#

I mean I would say I don't but rtd doesn't load for me so I just can't

tardy estuary
#

haha

#

sad sad

neat ingot
#

anyone here use some kinda lootbox system?

#

i wrote my own, but i'd like to check what features others have 😄

tardy estuary
#

i always thought about doing something like that, and then I ask myself whats the point lol

neat ingot
#

i have actual purchaseable lootboxes. my point was to keep track of how many ive sold,, the profit ive made from them, and to handle the opening of them with weighted odds 🙂

tardy estuary
#

oh interesting

#

i just thought it was digital currency or something

neat ingot
#

also has a 'safe' mode, so it will never pay out an item with more value than half the total earnings of the lootbox

#

like, if the lootbox only made say 5$, and you would have got an item worth 10$, it will keep rerolling till its an item with a value of $2.50 or lower

#

cant be paying out what i dont have, ya know? 😄

earnest phoenix
#

what

tardy estuary
#

ill claim rigged every time i lose

#

XD

earnest phoenix
#

using IRL money?

neat ingot
#

tbh, all lootboxes are rigged 😄

earnest phoenix
#

^^^

#

can confirm ( I play alot of games with lootboxes)

neat ingot
#

yes, its possible to use irl monies with my system, but it doesnt handle actual financial transactions, only keeps record of the box events

#

like umm

quartz kindle
#

cheater

earnest phoenix
#

bruh moment

neat ingot
earnest phoenix
#

who’s the cheater

neat ingot
#

^ that box costs 1.99, it has items worth as much as 4.99

#

it keeps track of total earned from 'purchases' and total lost from 'openings'

#

it has the 'safe' flag, so will never payout more than half its total earnings

earnest phoenix
#

If I was really doing something like that, I’d do IRL prizes and that money can go straight to charity

neat ingot
#

tbf, when i initally wrote it, it was for a real life lootbox game that sent you the prizes direct from amazon 😉

#

amazon capacha are a dick tho

#

and didnt want to pay some service to do my capachas

earnest phoenix
astral yoke
#

Okay so no one is answering over at there server

#

so i thought i should bring it here

#

im attempting a version command only for me so i can set a version for like the status and stuff

#

my code

#
const { specialid } = require("../../loaders/reader");

module.exports = {
    config: {
        name: "version",
        usages: "db!servers",
        aliases: ["v"]
    },
    run: async (bot, message, args) => {
        if (message.author.id !== ownerid) return;
        let version = args[0];
        if(!version) return message.reply("what do you wanna set it to?")
        let dog = bot.db.set(`version`)
        message.channel.send(`Set as ${version}! Expect it in the status shortly. ${dog}`)
    }
}```
#

Error

#
    at Object.set (C:\Users\Cools\discord-dogbot\node_modules\quick.db\bin\handler.js:55:36)
    at Object.run (C:\Users\Cools\discord-dogbot\src\commands\owner\version.js:14:26)```
quartz kindle
#

no value specified

astral yoke
#

value?

quartz kindle
#

db.set() requires a key and a value

#

.set(key,value)

astral yoke
#

ah

quartz kindle
#

if you want to use it as a key, yes

#

the key is what you use to later get that value using .get() or .fetch() depending on your db

astral yoke
#

how would I be able to change it?

#

from db.set() to something else?

quartz kindle
#

what do you want to do here?

astral yoke
#

I want it to store it in the database, then be able to use it somewhere else. Like in a stats command where it shows like owner and version and etc.

quartz kindle
#

you want to save a version specific for a guild, right? so you need to use .set()

copper cradle
#

don't do that in 2 lines, you can import multiple things by doing this { thing1, thing2 }

astral yoke
#

done.

#

tys for that.

copper cradle
#

so const { ownerid, specialid } = require('../../loaders/reader');

#

np

astral yoke
#

@quartz kindle I want it to save it for the bot entirely, like it's for the bot usage it's self, not for you know guilds showing stuff.

quartz kindle
#

yes, but its a version for one specific guild right?

#

not for all guilds

astral yoke
#

like if you do stats it shows different for a specific guild compared to a different guild?

quartz kindle
#

i mean, i dont know what exactly you want to do, but its as simple as this:

db.set("a","myversion")
db.get("a") // myversion
neat ingot
#

is that the quick db thing? i see a lot of bot devs using that

astral yoke
#

mhm.

#

Good idea.

#

I'm gonna test that.

hollow saddle
#

That definitely looks like quick.db with that advertising in the error message

#

I've always hated that package

knotty steeple
#

i hate quick.db

#

cuz its bad and sql isnt hard to learn

neat ingot
#

is it actually 'bad' though?

hollow saddle
#

Yes

neat ingot
#

what makes it so?

#

i mean, it seems used a ton, so it cant be 'that' bad, right?

knotty steeple
#

its easy for people not experienced

#

thats the only reason why its used

neat ingot
#

ahh yea, there is a fair amount of newbie coders who try to make bots

knotty steeple
#

multipurpose bots with copied code

#

yez

#

yes

neat ingot
#

lol yea

#

but i mean, not everyone wants the same from their database

#

if it works, isnt buggy, and is easy

#

then is it really 'bad'?

hollow saddle
#

They advertise in their error messages, their tutorial videos teach new coders bad practices, and overall the package itself is just bad and not efficient

neat ingot
#

ahh, hadnt noticed the advert 😄

knotty steeple
#

what advert

neat ingot
knotty steeple
#

cool

quartz kindle
#

also their docs are all over the place

#

lots of undocumented stuff used in guides

knotty steeple
#

if i attempt i could make a better one

#

no docs cuz im lazy

neat ingot
#

your one to talk, mr updated months ago and ignored the docs 😄

quartz kindle
#

lmao

hollow saddle
#

lol

quartz kindle
#

at least i have the best help command

neat ingot
#

my help command sucks 😦

quartz kindle
#

xD

astral yoke
#

this is prob a simple fix

#

but im confused for it

#
    let version = bot.db.get(version)
    bot.user.setStatus('available')
    bot.user.setPresence({
        game: {
            name: `Version ${version} | db!help`,
            type: "PLAYING"
        }
    });
});```
#
    at Client.<anonymous> (C:\Users\Cools\discord-dogbot\src\index.js:23:30)```
hollow prawn
#

@astral yoke you're trying to access database version?

astral yoke
#

long story short i have a version command and trying to have it get from database then put it in the status

lyric mountain
#

Version is a reserved keyword

hollow prawn
#

that's easy to do, but what you could do is:
${bot.db.get(version)}

#

without the let version = that

#

also ye, it might be reserved keyword

astral yoke
#

ah.

#

ty.

hollow prawn
#

just set up your own versions on the db in your main table

#

then manually change it with an update command or something of the sort like I do
and code in if you want it to also update status when you change it

astral yoke
#

yeah that's what I'm gonna do.

#

Ty.

hollow prawn
#

no probs

astral yoke
#

version is not defined.

#

You were talking about putting it in the name: ?

hollow prawn
#

ye, where do u get ur version from?

#

is it database?

astral yoke
#

well, it should get it-

#

yeah.

hollow prawn
#

then you'd wanna do a query

astral yoke
#

This is my version command.

#
module.exports = {
    config: {
        name: "version",
        usages: "db!servers",
        aliases: ["v"]
    },
    run: async (bot, message, args) => {
        if (message.author.id !== ownerid) return;
        let version = args[0];
        if(!version) return message.reply("what do you wanna set it to?")
        message.channel.send(`Set as ${version}! Expect it in the status shortly.`).then(bot.db.set(`version`,"version"), bot.db.get(`version`))
    }
}```
hollow prawn
#

that's a bit weird Thonk

lyric mountain
#

Very weird

hollow prawn
#

if bot.db is the connection to the database, I havent used version, i've used query

#

to change the version with it

quartz kindle
#

did you define version at all?

astral yoke
#

for?

quartz kindle
#

version is not defined

#

you're trying to use version before its defined

lyric mountain
#

Lol

quartz kindle
#

if your key is "version", then you need to use it as a string

#

not as a variable

#

.get("version")

#

and you didnt set your version properly either

#

you set it as "version" lol

astral yoke
#

i can see that

#

lol

queen needle
#

eveytime i try to play something with my bot it says this

#

I could not join the voice channel: Error [VOICE_CONNECTION_TIMEOUT]: Connection not established within 15 seconds.

earnest phoenix
#

Anyone ever heard of the issue of bots going offline for a few seconds then back on without any errors lol

astral yoke
#

I mean do you start it then stop it

earnest phoenix
#

Seriously?

astral yoke
#

🤷‍♂️

earnest phoenix
#

Of course not lol

sudden geyser
#

Is your bot just going offline or is your app exiting as well.

earnest phoenix
#

Just going offline @sudden geyser

#

It goes off for like 2 seconds then back on

astral yoke
#

Well what’s your code big man

raven urchin
#

It doesn't reconnect

sudden geyser
#

@earnest phoenix What library are you using?

earnest phoenix
#

Js

sudden geyser
#

that's not a library.

#

that's a programming language.

earnest phoenix
#

I'm using node lol

raven urchin
sudden geyser
#

That's still not a library. A library for example would be Discord.js, Eris, etc.

earnest phoenix
#

that's what I meant by js lol

#

But yeah discord.js

neat ingot
#

maybe your bots struggling to maintain internet connection which is why the bots going offline but the app isnt?

sudden geyser
#

Listen to the disconnect and error event and log its contents to your console. See if something is going wrong.

raven urchin
#

Me?

sudden geyser
#

noop

astral yoke
#

Do you guys think amazon is a good vps because I’m gonna switch to it tomorrow

earnest phoenix
#

Perfect will do

#

Thanks

raven urchin
#

Do you know why it won't reconnect though?

neat ingot
#

amazon isnt bad, they offer a lot of things. i recently tried contabo for bot hosting and am really happy with it so far 🙂

sudden geyser
#

Sadly not but what do you mean by "It works but doesn't reconnect"?

astral yoke
#

I feel like amazon is a trusted vps.

neat ingot
#

lol

#

sec

raven urchin
neat ingot
raven urchin
#

When it closes it doesn't reconnect

neat ingot
#

thats how many domains are registered to a single ip address i have with amazon

#

that suggests they cram as many users into a single server as possible

#

tbf, that is via heroku, which uses amazon.. so could be their fault.

raven urchin
#

Any ideas on how to fix where if I close it, it wint reconnect

sudden geyser
#

You destroyed the socket but then try to resume it?

raven urchin
#

Oh

sudden geyser
#

Well you called this.destroy()

raven urchin
#

Ohhh

sudden geyser
#

What is socket? I want to look it up

neat ingot
fair seal
#

sa

#

türk varmı

raven urchin
#

It's a websocket

neat ingot
#

from what though?

fair seal
#

ım turkish no speak english

quartz kindle
#

@raven urchin you need to check your close codes

#

not all closes are resumable

#

for example if you get an invalid session close code, it will keep trying to resume forever and will always get an invalid session

raven urchin
#

How can I fix it?

quartz kindle
#

check your close codes

raven urchin
#

Aight

queen needle
#

if i put css in the description while submitting my bot will it show up?

quartz kindle
#

yes

earnest phoenix
#

what's a good package for a music bot that runs on linux

#

it's a heroku machine

hollow inlet
#

Hi

gritty pecan
#

hi

copper cradle
#

nice

#

I made a small game in cpp

lyric mountain
#

Hm, I don't think you have ssh access to heroku

copper cradle
#

you're a # and your life is all about collecting 0's

lyric mountain
#

I've once made a snaker game using only canvas and java objects

#

And threading

copper cradle
#

lol

earnest phoenix
#

dunno how I'd run lavalink on heroku

near ether
#

how can i use custom emojis for all shards of my bot?

earnest phoenix
#

@near ether go to your server, type your emoji but with a backslash

near ether
#

i have it working and using custom emojis, the issue is when i shard

#

bc all but one shard will be in that emoji server

#

how can i get the other shards to use emojis found in one server only?

earnest phoenix
#

like so

#

you copy that emoji and use it like so

near ether
#

so you dont necessarily need to be in a server to use their emojis?

earnest phoenix
#

and when I input $csadcat on another server, It'll output it there

near ether
#

nonono i think im explaining it wrong or im missing something

#

so lets say

#

i have shard 0 and shard 1 of my bot

neat ingot
#

your bot can use any custom emoji from any server its in

#

oh, idk how shards would affect it tho

near ether
#

so shard 1 can access emojis from a server that only shard 0 is in?

earnest phoenix
#

huh

#

I dunno much about sharing

queen needle
#

im having trouble with the css on my bots page when i try to add font-weight: bold; to the p.bot-description it doesnt work

winged osprey
#

so shard 1 can access emojis from a server that only shard 0 is in?
Shards don't affect the emojis that your bot can use. It can use any custom emoji from any server that it's in as long as it has the use external emojis permission

near ether
#

ah i see

#

thanks man

copper cradle
#

on

#

no*

#

afaik you can't just try to use the emoji id and name to send it to another shard

#

there was a method you could use

#

You could spawn the server the emoji is in every shard

#

but I don't know if that would work

queen needle
#

does any one know why css p.bot-description{ font-weight: bold; color: black; } this doesnt make the text bold on my bots page?

neat ingot
#

is that a thing? like, having a particular server in more than 1 shard? doesnt seem like it'd be allowed, maybe tho idk

near ether
#

damn

#

bc i have some custom emojis critical to using my bot but i cant access those custom emojis unless the shard is in the same server as the emoji

neat ingot
#

yea thats a thing thats now concerning me, since yesterday i added custom emojis for my bot to be using in the servers hes in 😄

near ether
#

haha yeah i legit just added it a few days ago but not sure how to progress

neat ingot
#

but maybe the emoji are tied to the bot client, and not the servers?

near ether
#

i wonder how bots like mudae do it, with the whole kakera thing

neat ingot
#

client.emojis.cache.map(mapper);

#

that suggests any client has all the emojis, no>?

near ether
#

lemme read the docs rq

neat ingot
near ether
#

oooo yea thats a good point

neat ingot
#

is the tester function i use to get all my bots custom emojii

near ether
#

so do you think that we could broadcastEval the cache to all the shards?

neat ingot
#

i've honestly no idea

#

not yet had the need to shard lol

near ether
#

ah

neat ingot
#

i has only newbie botum 💔

near ether
#

lmao itll grow dont sweat it

neat ingot
#

lmao, maybe it would if it wasnt buggy, my server counts been hovering at 80 for a few weeks 😄

#

im in the process of rewriting the entire thing for node 12 and discord.js 12

#

so no quick upload of the new version till its done 😦

tardy estuary
#

i didnt bother implementing sharding because I know my bot wont hit anywhere close to enough guilds to need it

#

im at like 47

neat ingot
#

my bot will eventually

#

i has faith!

cosmic girder
#

hay question how do i add a link to my embed?

#

discord.js btw

neat ingot
#

regular link, or fancy link?

cosmic girder
#

regular

neat ingot
#

just add a url as a field value? 😄

#

doesnt that work?

cosmic girder
#

in a way yes but i want it seprate from it

neat ingot
#

[shownname](https://www.dekbot.com "when you hover i will appear")

#

^ use that as the field value

#

and it will be a fancy link

#

that wont show the link url, it will show 'shownname' and has hover text

cosmic girder
#

ok

neat ingot
#

make sure its contained within a string

#

using ` or '

cosmic girder
#

yuh ok ty very much

neat ingot
#

np 🙂

cosmic girder
#

how do u get dev role

neat ingot
#

green bot dev role? auto gets added when your bot gets accepted to top.gg

cosmic girder
#

oh ok

humble vessel
#

I am here to tell you the tragedy of

async def on_message(ctx)```
#

and how I thought I ruined my code

#

so I reverted all changes through github

#

and then realized I forgot to add
await bot.process_commands(ctx)

#

thus all was lost.

#

It was a three hour process.

onyx hare
#

The N/A in the blue how does it get activated? I tried googling but got bots like “captcha bot” appear 😂

oak cliff
#

-servercount @onyx hare

gilded plankBOT
#

@onyx hare

To have your bot's server count displayed on DBL, please read the documentation on server/shard posting. Click here to see the docs.. You may also find #312614469819826177 useful; however it is strongly discouraged as most of the examples are extremely outdated.

neat ingot
#

what would be the most efficient way to turn an object into a regular string in javascript? i know i can just JSON.stringify it, but that results in random unwanted characters as shown:

#

i mean, it works ofc, but it'd rather not have to regexp and replace after stringifying if possible

#

i guess i could just pull the id and keep it simple

#

but there is a chance that more than just the id would be needed, converting the object seemed safest

pale vessel
#

i see no random unwanted characters

humble vessel
#

python dictionary to json and vice versa conversion be like:

neat ingot
#

lol, they are unwanted by me 😄

#

all the {, }, ", :

pale vessel
#

dude that's json

earnest phoenix
#

Those are how objects are are structured though

pale vessel
#

yeah

neat ingot
#

yea its json, i know this, i said this above

pale vessel
#

try map then

neat ingot
#

im asking for an alternate way to convert an object to a string that isnt json 😄

earnest phoenix
#

Stringifying JSON is gonna give you stringified json

lucid pasture
#

hey, does anyone know how to do a like kill (member) command. because mine is simply just not working

queen needle
#

send the code

sudden geyser
#

what is not working about it

queen needle
#
 if(message.isMentioned("700608658416861236")){
   message.channel.send("my prefix is:" + prefix)```
neat ingot
#

what is it intended to do?

queen needle
#

when i mention the bot it doesnt send anything

neat ingot
#

'kill' seems vague imo

lucid pasture
#

just like a kill command

#

like dank memer

sudden geyser
#

What library? What version?

queen needle
#

send the code

lucid pasture
#

js and lates

queen needle
#

so we can help

lucid pasture
#

how do i send code lol

queen needle
#

copy paste?

lucid pasture
#

bot.on('message' , msg=>{
if (msg.content == Pyro!kill ${member})
msg.channel.send(Kills ${member});

})

queen needle
#

paste bin

neat ingot
#

ive no idea what dank memer does, i dont use discord bots often 😄

sudden geyser
#

Where did you define member

lucid pasture
#

ohh so that might be the problem

queen needle
#

shouldnt it be ===

neat ingot
#

do msg.member

lucid pasture
#

== works

sudden geyser
#

== is loose, === is strict.

neat ingot
#

^

sudden geyser
#

They both work but === is 99% better.

neat ingot
#

^^

lucid pasture
#

kk

queen needle
#
 if(message.isMentioned("700608658416861236")){
   message.channel.send("my prefix is:" + prefix)
  }```
#

when i mentioned my bot it doesnt send the prefix

sudden geyser
#

is isMentioned a thing.

#

Are you on v11

queen needle
#

yes

sudden geyser
#

The argument should be the instance.

#

Not the resolvable.

#

If you want to check if a user was mentioned, check message.mentions (MessageMentions)

queen needle
#

so

neat ingot
#

is message.mentions.has(member) valid for v11?

#

i use it in v12, but idk about 11

queen needle
#
if(message.mentions === "<bots id>"){
code
}
sudden geyser
#

That's not valid Dekita.

neat ingot
#

ahh, works in v12 😦

#

^ i use it for checking my bot mentioned 😄

#

message.isMemberMentioned( member ); is what i used in v11

sudden geyser
#

It's all fun and games until a channel/role/user has the same ID somehow

#

I just like checking the collection strictly.

neat ingot
#

one would think discord doesnt allow such things to happen

#

one would hope* lol

queen needle
#
if(message.mentions.users.first().id === "<bots id>"){
code}
#

wouldnt that work

sudden geyser
#

If you want to check if the bot was mentioned, I recommend you use mentions.users.has(id)

neat ingot
#

why not do

if (message.isMemberMentioned( guild.me )) {
  // code...
}```
queen needle
neat ingot
#

your bots member within that guild

#

user* w.e

#

i guess technically its the member, but yea, w.e

queen needle
#
if(message.mentions.users.has("700608658416861236")){
   message.channel.send("my prefix is:" + prefix)
  }```
#

doesnt work

neat ingot
#

if you only check for the mention though, then someone could do a bunch of other words and then tag your bot, which would be allowed unless you check for that

queen needle
#

well i really want to check if thats the first thing

#

cause i have a kill command and if they mention the bot in that command i dont want it to send that

neat ingot
#

do have a means of checking command args ?

#

just check that the args are empty as well as bot mentioned

queen needle
#

how would i do that?

neat ingot
#

depends on how your code is implemented

#

my arguments are stored in an array of strings for each argument. i just check its length === 0

queen needle
#

so how i define args?

neat ingot
sudden geyser
#

the example should work but it may depend on how you implement it

neat ingot
#

args - in the way i am meaning, are just the extra words that are typed whena person uses a command. for example <prefix>commandname arg arg arg

#

to get the arguments, i parse the message content, and store each word in an array

#

that array is my args.

queen needle
#

well

#

wouldnt i check if args[0] exist

#

if it does do nothing

neat ingot
#

!args.length kinda does that exact thing, just slightly different logic

#

args.length is equal to how many elements are within the args array

#

if its 0, then javascript counts it as 'false'

queen needle
#

i

neat ingot
#

so if its !0, then its true

#

thus, if any argument exists, !args.length would return false

#

questioning my own logic now, perhaps im not the best person to simplify this 😄

queen needle
#

well i still need to get the mention to work

neat ingot
#
if (message.isMemberMentioned( guild.me )) {
  // code...
}``` should work fine
queen needle
#

guild not defined

copper cradle
#

dekita

#

why are you using snake_case in js

neat ingot
#

bad habit from my ruby days 😛

copper cradle
#

when the naming convention says camelCase for vars and functions

#

and Pascal case for classes

#

lol

#

I mix naming conventions in cpp

#

but like

#

cpp's naming convention is make-shit-as-you-go

neat ingot
#

i use camel for functions, variables i do 'snake'

copper cradle
#

hmm

near ether
#

aaaaaa i still cant figure out how to share custom emojis across shards and ive looked everywhere

neat ingot
#

unless its gloabl, in which case its full caps

near ether
#

does anyone have any ideas?

neat ingot
#

neelio, you can umm

#

sec

copper cradle
#

spawn the server where the emoji is

#

but in every shard

near ether
#

how do you spawn servers like that?

copper cradle
#

Idk

neat ingot
#

thats a custom emojii from idk where

copper cradle
#

Never done that before

neat ingot
#

you can just have some database of those link urls maybe?

copper cradle
#

or you can get the emoji from that url

#

yeah

#

you can just store the emotes into mem

#

and then use them like that

neat ingot
#

the emojii id there isnt the same one that discord would use with the :identifyer: thing

near ether
#

i have them saved to memory on the shard that serves the emoji server, but the rest of the shards cant access it and i cant figure out how to import the emojis to other shards

neat ingot
#

see 🙂

copper cradle
#

lol

#

I never noticed that

neat ingot
#

@queen needle , yes, 'guild' isnt defined because you have not defined it.

#

you can get the guild from the message

queen needle
#

ik

neat ingot
#

message.guild

queen needle
#
if(message.isMemberMentioned(message.guild.me)){
   message.channel.send("my prefix is:" + prefix)
  }```
#

like that?

neat ingot
#

assuming 'message' is valid, yea

queen needle
#

doesnt work

neat ingot
#

ofc

#

show me your code?

queen needle
#

thats the code

sudden geyser
#

the file

neat ingot
#

^

queen needle
#

are you sure i dont use a command handler so its kinda a lot?

neat ingot
#

just the code for that command

queen needle
#
if(message.isMemberMentioned(message.guild.me)){
   message.channel.send("my prefix is:" + prefix)
  }```
#

for the command is that

neat ingot
#

rip my lyfe

#

lmao

sudden geyser
#

Can you show the entire file's contents.

#

Not the snippet, the whole thing.

queen needle
#

so all of my files code?

sudden geyser
#

No, just that single file.

neat ingot
#

i think all the code is in one file

queen needle
#

it is

neat ingot
#

in your umm

sudden geyser
#

yeah so show that

neat ingot
#

client.on('message') part

#

can you copy that part?

queen needle
#

yes do you just need that?

neat ingot
#

hopefully

#

😄

queen needle
#
client.on("message", async message => {```
neat ingot
#

ok, so message should be defined. what is the error your getting when you try to use the command?

sudden geyser
#

you just paste the file in this channel, it's not hard.

neat ingot
#

he might not want us to steal his awesome command ideas 😛

queen needle
#

nah

#

i just dont want yall to judge my code

neat ingot
#

ahh fk that, just post it lol

#

gets ready to steal all the things

#

make sure to remove any bot tokens before pasting

queen needle
#

bot token is in seprate file

neat ingot
#

ahh mmk good

queen needle
#

prepare yoiursel

#

2100 linme file

neat ingot
#

wont fit in discord

#

lmao

queen needle
#

haste bin

neat ingot
#

i hate how that site gets more traction than pastebin now

earnest phoenix
#

what??

#

hastebin is more superior than pastebin

queen needle
#

yeah

neat ingot
#

in what way?

earnest phoenix
#

literally any other paste service is more superior than pastebin

pale vessel
#

by looks and usability

#

why would you use shitty pastebin

queen needle
#

what about ghostbin

#

that kinda sucks

neat ingot
#

can i change the theme on hastebin?

#

this syntax highlighting is ass

#

lol

pale vessel
#

no because it doesn't need any modifications

earnest phoenix
#

dark theme by default,simple and intuitive UI, no ads, no trackers, no paywall features

queen needle
#

perfect

pale vessel
#

and you can even host it yourself

#

what more do you want

neat ingot
#

wow dude, you really need a command handler in amongst this 😄

queen needle
#

ik

neat ingot
#

A boy stands knee-deep on heron-thin legs

#

😄

queen needle
#

shush

pale vessel
#

leaked

neat ingot
#

lol

queen needle
#

dont go through and read all the commands lol most suck

near ether
#

so it turns out custom emojis are shared across shards when youre just sending them to chat like Sadkek but not as reactions

neat ingot
#

i assume its this part?

queen needle
#

what?

neat ingot
#

awww wth neelio, thats lame af

#

reactions are the whole point of them!

near ether
#

i know you can definitely do it, ive seen mudae and plenty of other bots do it

#

i have no clue how they got around that tho

earnest phoenix
#

need a good music plugin that would work on heroku dynos (linux-based)

neat ingot
#

why wouldn't it work on a heroku dyno?

near ether
#

never thought such a specific question would be answered in the actual guide lol

neat ingot
#

oh, thats quite a read there 😄

near ether
#

haha yeah its a full-on tutorial, but its very informative

neat ingot
#

so yea you basically have to eval each shard then

near ether
#

which really sucks bc its not that efficient but im sure theres a way to cache them

neat ingot
#

that solution likely wont work for me, as my bots contained within a docker container, and the intent was that, when i need to shard, ill be using multiple docker containers, one for each shard

#

which i dont think i could then broadcast anything without custom implementations

near ether
#

damn

near ether
#

lmfaooo

ebon dune
#

how to verify on chasity bot?

vestal sequoia
pale vessel
#

what's that library

#

@vestal sequoia

vestal sequoia
#

JDA

earnest phoenix
#

this music command is stressing me out

#

: (

neat ingot
pale vessel
#

@vestal sequoia i have a friend who knows jda and he said that:

the class that has that function should extend ListenerAdapter and be registered as JDA#addEventListener(<class extends ListenerAdapter>)

neat ingot
#

random af: anyone know if waifu2x works with gifs?

pale vessel
#

if you want to talk to him i can give his tag

#

he's not in this server

vestal sequoia
#

I allready have that, my commands is working in same class

#

Yeah sure 🙂

pale vessel
#

second isn't a function lol

#

just use #first(2)#last()

neat ingot
#

answer to my question incase anyone is interested: not by default, but there is an exxxtension with gui that supports both gif and video. 🙂

earnest phoenix
#

ok

ebon dune
#

how to get a server verified?

full warren
#

:/

#

idk

narrow kettle
#

[python] hey, so i have a string that for example is:

200:ANSWER:date=06/05/2020&city=Eilat&temp=22.15&text=sky is clear

so how can i make a function that gets the string and returns a tuple that is: (22.15, "sky is clear"), which is the temp and text, but the text, temp, and city can always change so i cant use slicing

pale vessel
#

use split

earnest phoenix
#

aren't those just url parameters

pale vessel
#

yes

#

or qs or something

#

although i never used that

#

they're useless

ebon dune
#

how to get a server verified?

pale vessel
#

he also might need to use decodeURIComponent

neat ingot
#

i thought only bots and bot devs could be verified?

narrow kettle
#

wait wym split?

pale vessel
#

have you ever heard of DSL @neat ingot

narrow kettle
#

nope

pale vessel
#

split("&") returns an array

earnest phoenix
ebon dune
#

thanks

pale vessel
#

that's server oh I'm stupid af

earnest phoenix
#

chances are you don't qualify for verification though

neat ingot
#

googled DSL and urban disctionary has some interesting results 😄

pale vessel
#

discord server list

#

aren't those closed

neat ingot
#

ooooohhh, you mean on top.gg, the server list, and being verified there

pale vessel
#

along with partners

neat ingot
#

ok, i see now 😄

#

or not, hmm

pale vessel
#

yes

#

exactly what i meant

neat ingot
glacial thicket
#

can anyone help, i know this is simple but i dont know why the top code, circled in blue, will run perfect, but the one in red wont work as a command event though i think i typed it in correctly. same as a tutorial i was watching

pale vessel
#

that's server oh I'm stupid af

glacial thicket
#

anytime i make a command using @client.command() it doesnt work

earnest phoenix
#

watching
there's your issue, stop using youtube tutorials and follow official docs

glacial thicket
#

i am doing that too. just this code is simple and is working for everything that ive seen, just not for me

#

i wrote this all though, didnt copy straight from anything

copper cradle
#

don't you need to pass in the context?

glacial thicket
#

im reading the docs rn and ill check but i think youre right

green kestrel
#

Ah beaten to it

#

I heard applications for verified servers are now closed btw

ebon dune
#

thank you sir

#

ye i saw that

neat ingot
#

currently trying to use waifu2x to convert a 360p video to 1440p 😄

#

thinking of writing a super simple bot that uses the waifu2x to upscale user images for them 😛

pale vessel
#

assuming every users have anime display avatar /s

#

that's kinda true though

neat ingot
#

waifu can do 3d now too 😛

#

taking an insane amount of time to upscale this south park episode tho. almost 10 minutes and not even 1% :/

pale vessel
#

south park already looks fine

neat ingot
#

not at 360p...

pale vessel
#

unless you're talking about older episodes

#

oh

neat ingot
#

😄

pale vessel
#

yeah I see what you mean

neat ingot
#

its te one episode i have that isnt at least 720p lol

pale vessel
#

just ask

neat ingot
#

^

pale vessel
#

no point of asking to ask

#

make it return if the message doesn't start with the prefix

neat ingot
#

^^

pale vessel
#

no

#

sadly we can't

neat ingot
#

which code language?

pale vessel
#

learn programming language

neat ingot
#
if (message.content.startsWith(prefix)){
    // run code
}```
pale vessel
#

why

#

stop

#

:(

neat ingot
#

but yea you should learn why that works

pale vessel
#

they could've learned something

neat ingot
#

and take some time to understand javascript basic fundimentals

pale vessel
#

okay

neat ingot
#

isnt everyone online a 'he'?

#

thats the rule i go by anyway 😄

pale vessel
#

that's not a good assumption

#

but yes mostly

neat ingot
#

until ( . ) are seen, everyone is male to me 😄

pale vessel
#

i just don't want people to be triggered

wispy parrot
#

I won't mind people being a little triggered

earnest phoenix
#

you use they/them when you don't know the gender out of respect and it's grammatically correct lol

neat ingot
#

pfft, even if you know someones birth gender now tho, thats not safe to use

#

they may identify as a refrigerator or some such

earnest phoenix
#

shut up

pale vessel
#

we're getting way off topic btw lol

neat ingot
#

how long have you guys been developing your bot?

wispy parrot
#

A couple months maybe?

#

SuperGamblino is mine :b
@neat ingot How about you?

#

We're a team of 3 ish though

neat ingot
#

i started just near the end of december thinking 'this wont take long...'

wispy parrot
#

Haha

pale vessel
#

last December too

earnest phoenix
#

i've been doing bot development since like late 2016 mmLol

neat ingot
#

😮

earnest phoenix
#

couple of months after discord introduced the bot api

neat ingot
#

an OG up in here

mossy vine
#

OG

wispy parrot
#

My first commit was on Mar 13 (on this bot)

neat ingot
#

i like the previews for the upcoming features theya re adding

pale vessel
#

the selfbot times

earnest phoenix
#

god knows when they'll implement that, if they do

neat ingot
#

i really hope they do 😦

pale vessel
#

just learn javascript

wispy parrot
#

Which library are you using?

pale vessel
#

why do you expect people to spoonfeed you

neat ingot
#

hes js, so likely discord.js or eris

wispy parrot
#

It might be a problem if he's not using a javascript library 😛

pale vessel
#

that would be sad

neat ingot
#

im sure he said js, maybe i just assumed lmao

mossy vine
#

more like impressive lmao

pale vessel
#

how

wispy parrot
#

Why would that be sad?

Ahh okay, my bad

pale vessel
#

do you know what a library is

wispy parrot
#

Do you? 🙂

neat ingot
#

in your js file, do you require'discord.js', or 'eris'?

pale vessel
#

that's what you call a library

neat ingot
#

yea then your using discord.js library

wispy parrot
#

I'm using DSharpPlus, which is "A C# library for making bots using the Discord API. "

pale vessel
#

yes dsp

neat ingot
#

that sounds painful 😄

pale vessel
#

not really if you're familiar with cs

wispy parrot
#

Haha, it's not painful at all, I prefer C# over JS any day :b

neat ingot
#

genesiz, what is the code for your client.on('message') handler?

#

(assuming you got one of those)

#

31 minutes into upscaling, and ive done 10/1324 seconds worth :/

#

my keyboard

wispy parrot
#

My mind mostly

#

Keyboard is secondary 😄

#

Visual Studio

neat ingot
#

^

wispy parrot
#

VS Code when I'm doing JS

neat ingot
#

ive used vs code since sublime text had an update that made it uses 30% cpu on my trash laptop

pale vessel
#

i use notepad++

wispy parrot
#

VIM if I do bash

neat ingot
#

ppfft, try wordpad!

#

😄

pale vessel
#

i mean it's a js bot

#

then you need to learn javascript instead of discordjs

neat ingot
#

ok that is the same, the client is your bot instance. 🙂

#

i do agree learning some javascript would go a long way into understanding how to make your bot, and make it better 🙂

#

pretty hard to do so without learning it imo

pale vessel
#

you need to

wispy parrot
#

Do you know any programming languages?

pale vessel
#

it's not like it's optional

wispy parrot
#

There's libraries for all kinds of languages

pale vessel
#

i know html

wispy parrot
#

Lol

pale vessel
#

html is not a programming language lol

earnest phoenix
#

that's why i make my bot in css

wispy parrot
#

Haha

neat ingot
#

i know how to code in jsfuck 😄

pale vessel
#

yeah css is one

neat ingot
#

best language

earnest phoenix
#

see sharper sharp

neat ingot
#

needs a discord api tbh

pale vessel
#

brainfuck you mean

mossy vine
#

jsfuck is literally js so theoretically speaking, you can use d.js with it

pale vessel
#

that's new. cs...s?

neat ingot
#

lol yea, but its not written in jsfk, that'd be the icing

pale vessel
#

need to look it up

neat ingot
#

could probably run it through a converter though lol

pale vessel
#

yikes

wispy parrot
#

Searched what up?

pale vessel
#

yeah you need to take a step back

neat ingot
#

impressed user: wow this bot is awesome, how did you code it?
bot dev: well, my dad taught me how to copy and paste... so...

#

^ has never happened

wispy parrot
#

Well ... Copy and pasting is a part of it haha

neat ingot
#

shh, thems trade secrets! 😛

#

omfofmfgmgggf fk u waifu

wispy parrot
#

🤣

neat ingot
#

after 40 mins

#

trash ass program

wispy parrot
#

rip

neat ingot
#

it did upscale 2x 10 second chunks to pretty good detail tho 🙂

wispy parrot
#

Why are you processing a movie into images?

#

Ahh

neat ingot
#

was just testing waifu2x ability to upscale a cartoon 😄

#

from 360p->1440p

surreal notch
#

Can we make apps using discord.ja

#

.js

earnest phoenix
#

discord.js is a library to interact with the discord api

#

not sure where you're getting at

#

@neat ingot are you trying to use the waifu2x-extension?

pale vessel
#

he is

neat ingot
#

yea

earnest phoenix
#

GWossuKannaSip try changing the engine

neat ingot
#

i did, to cunet model and 'new version fp16p'

#

i guess its still using vulcan tho

#

i could try with the anime4k upscaler option

earnest phoenix
#

show me your settings

neat ingot
earnest phoenix
#

hmm

neat ingot
#

i think ill make a shorter clip for testing with till i find something that works

earnest phoenix
#

wtf i just updated mine, i want the old version back

neat ingot
#

lmao

#

i used portable version to avoid that 😄

#

i have other waifu programs running older builds that i didnt wanna risk overwriting some setting, the path to waifu or some crap

pale vessel
#

that sounds very different

#

oh not the SQL guy again

earnest phoenix
#

Me bot was going in loads and loads server now al sudden no one has added it I'm confused

#

Hahahah shut up lol

#

worked perfectly for me

neat ingot
#

you were probably featured on dbl for a while

pale vessel
#

sounds like your name

neat ingot
#

wait, it finished upscaling a video for you already?

pale vessel
#

almost

earnest phoenix
#

good guess

pale vessel
#

yeah missing "it"

earnest phoenix
#

problem is

#

using waifu2x kinda fucks up the video framerate

neat ingot
#

:/

earnest phoenix
#

Dumb question but it's there a way to see If it was featured

pale vessel
#

by going to top gg? was featured

neat ingot
#

if it isnt anymore, i dont think so

earnest phoenix
#

split the video into frames with ffmpeg, rescale each pic with waifu2x and then reassemble with ffmpeg i guess

#

that is literally what waifu2x extension does

#

oh

neat ingot
#

lol

#

it didnt do that with my south park clip

earnest phoenix
neat ingot
#

although, it crashed with that and didnt finish...

earnest phoenix
#

It gained 400 servers in 2 days does top recognise that for features or is it done by how much votes

pale vessel
#

the latter

earnest phoenix
#

It must of been featured it was growing rapidly like I went to bed woke up with 100 servers added and now I done the same just woke up and none so

#

It must of been featured

neat ingot
#

yea it probably was

#

i remember when my bot was featured it grew tons of servers super fast, then iw as sad when it wasnt featured 💔

wispy parrot
#

I got 70-80 servers pretty fast, I assume it was featured, things have been pretty stall after 😄

neat ingot
#

whats your bot do?

wispy parrot
#

It's just a gambling bot, made as an open source alternative to existing gambling bots

neat ingot
#

oh nice 🙂

earnest phoenix
#

Yeah kind of sucks growth has completely stopped going at the past it was

neat ingot
#

i was talking earlier about my lootbox system, trying to get ideas from other peoples lootbox'es 😄

wispy parrot
#

I'm using an airdrop system, which isn't really like a lootbox system though 😛

#

What does your bot do?

neat ingot
#

other than die, crash, and provide me problems? not much

#

just the typical rpg bot i guess

#

battle little npc enemies and pvp other players etc

wispy parrot
#

I know the struggles :b

Like Idle RPG / DiscordRPG =?

#

Ahh nice

neat ingot
#

kinda, but i made it more with the focus ofpvp

wispy parrot
#

Ahh

neat ingot
#

and being able to kill and temp silence other members

wispy parrot
#

So if I loose in a duel, I'm muted? 😄

neat ingot
#

yea for a minute 😄

wispy parrot
#

Nice haha

neat ingot
#

and the winners name turns red, and they get 'killer' role for 2 minutes

wispy parrot
#

What do you mean "made for"? 🙂 @earnest phoenix

That's nice 😄

#

How do you make pvp "fun" with a difference in level / gear?

#

If it's based on level and gear lol

neat ingot
#

yea, level, equip, skills, etc

#

its really hard to balance tbh

wispy parrot
#

Well my bot is used for gambling?

I could imagine

#

If that's what you mean 😄

earnest phoenix
#

welp having the same problem now GWhurpySip

#

Im trying to update owners on top.gg but its not working where to report

neat ingot
#

💔

earnest phoenix
#

whats the error @earnest phoenix

neat ingot
#

maybe its just longer videos it has issues with

wispy parrot
#

Gotta get back to work, see ya

neat ingot
earnest phoenix
#

becaus that person is not here

#

After and before updating its same

#

luca cannot update them

#

Ok

#

they have to be in this server

#

Same not working

#

user is in server now

#

ItzRockstarYT has deleted his account he cant join

#

Well duh

#

if someone deleted that account, it cannot update

neat ingot
earnest phoenix
#

image uploader

#

file uploader etc

neat ingot
#

ahh, interesting

exotic lotus
#

Then what should i do

#

I want to add Vampire instead of ItzRockstarYT

#

can any staff help?

earnest phoenix
#

whos the main owner of that bot

#

aka who submitted it

exotic lotus
#

Im main owner

earnest phoenix
#

contact staff

restive furnace
#

but did u submit it?

exotic lotus
#

I did

restive furnace
#

on this acc?

exotic lotus
#

Im creator and submitter

#

yes

restive furnace
#

k

#

contact staff then

neat ingot
#

i like your avatar freestyle 🙂

restive furnace
#

thanks :)

neat ingot
#

reminds me of my father...

exotic lotus
#

Which staff ? 🤔 Admin or mod

restive furnace
#

mods answer quicker, admin may not answer in weeks (i dont really know)

exotic lotus
#

Ok

neat ingot
#

i think website admins only, but idk if they would be happy being tagged 😄

pale vessel
#

you need an admin to help actually

earnest phoenix
#

dont tag the role please, just dm one admin

exotic lotus
#

Ok

restive furnace
#

or ping here and wait for answer

ebon dune
#

admins don't respond lol

neat ingot
#

the mythical admin response. it does exist!!

exotic lotus
#

Waiting for response from tonkuu

#

And Nicole

#

Btw bot with only 75+ servers can get verified?

earnest phoenix
#

another stupid question but if i dm a moderator for the website are they able to tell me if my bot was featured at one point

pale vessel
#

yes

neat ingot
#

discord verification, or top.gg?

pale vessel
#

probably not

#

he would've said certified

earnest phoenix
#

and yes you can start the verification process at 75 guilds

neat ingot
#

ahh yea fair point

exotic lotus
#

Ok

summer torrent
exotic lotus
#

I will try to ask my friends to add bot I also want that cool badge 🤩

pale vessel
#

is client.uptime in milliseconds

#

also, try .humanize(), just in case the other plugin was somehow not imported correctly

summer torrent
#

is client.uptime in milliseconds
@pale vessel probably yes

pale vessel
#

it should be in djs

summer torrent
#

moment.duration().humanize() ?

pale vessel
#

yes

#

it should work

summer torrent
#

invalid date

pale vessel
#

interesting

#

try console.log(client.uptime)

summer torrent
#

client.uptime is 17057964

pale vessel
#

thanks

neat ingot
#
!!eval require('moment').duration(client.uptime).format('D [days],H [hours], m [minutes], s [seconds]')```
summer torrent
neat ingot
#

(i had to require the moment as its not included in my eval file by default)

#

using the uptime value you gave*

#

so in short, it should be working. idk why it isnt for you :/

summer torrent
#

what is your djs and moment version

neat ingot
#

"moment": "^2.24.0",

#

d.js v 12

earnest phoenix
neat ingot
#

lmao

#

what upscaling engine are you using?

summer torrent
#

@neat ingot lol fixed when I reinstall discord.js

neat ingot
#

lmao

#

well, that fixes that then 😄

summer torrent
#

yeah ty

neat ingot
#

np, was hard work, but i pushed through it, and everyone is better off for it imo 🙂

earnest phoenix
#

now it seems to work(?)

neat ingot
#

also, i've upscaled another 10sec chunk to 1440p, and it doesnt look any kinda wonky at all 😮

earnest phoenix
neat ingot
#

it pays for that spot via #bids

earnest phoenix
#

yeah i just looks at partners and stuff

neat ingot
#

idk if its through bids or privately, but it pays for the spot, most do that via bids, but idk if medal has some special deal or w.e 😄

earnest phoenix
#

dank memer paid 2k dafuq

neat ingot
#

thats for a week.

earnest phoenix
#

what what

#

for a week?

neat ingot
#

yea, you read me correctly

earnest phoenix
#

dafuq

neat ingot
#

ikr 😄

earnest phoenix
#

they must rack in cash

pale vessel
#

especially dat premium feature

earnest phoenix
#

owners like that lol

neat ingot
#

tbf, if they are paying that much for the spot, they clearly make more than that back from doing so

#

else they wouldnt keep doing it 😄

earnest phoenix
#

yep

neat ingot
#

i cant find the info for it, but im sure theres a command for it

earnest phoenix
#

how do people even bid anyway

neat ingot
#

@gilded plank tell me your commands

pale vessel
#

it's bids

neat ingot
#

yea but i forget the prefix 😄

pale vessel
#

you can't use it anyway

neat ingot
#

ah, f

#

lol

earnest phoenix
#

how much does a spot usually go for i wanna be on front page again

summer torrent
#

you have to apply for auctions

neat ingot
#

ahh, way too slow with that link there lol

earnest phoenix
#

well i obvs cant compete with people slamming down hundreds of dollars so im not even gonna attempt it

neat ingot
#

thats only front page tho