#development

1 messages · Page 369 of 1

wispy axle
#

should i remove it?

frail kestrel
#

remove wot

wispy axle
#

the "URL"

#

i mean its sending mine and not my friend avatar

frail kestrel
#

oh

#

well

#

it doesn't know what to do if you mention someone

#

because it's msg.AUTHOR

wispy axle
#

mentions?

frail kestrel
#

message.author.displayAvatarURL sends the message author's avatar(url)

#

so you'd check for mentions

#

and if there's a mention

#

give the avatar of the user you mentioned

wispy axle
frail kestrel
#

show code

wispy axle
frail kestrel
#

no

#

<msg>.mentions.members.first()

#

first user mention within the message

unique star
#

users.first()

frail kestrel
#

o

unique star
#

members doesnt have an avatarURL object

frail kestrel
#

heck

#

o oki

#

oh right

#

it doesnt

heady zinc
#

member.user

frail kestrel
heady zinc
#

ez fix

unique star
#

kek

wispy axle
frail kestrel
#

did you do

#

first()

#

or

#

first

#

@wispy axle

#

btw it'd be helpful if you showed code

wispy axle
frail kestrel
#

mentions.users.first()

#

<msg>.mentions.users.first().avatarURL

wispy axle
#

It worked

#

ty

frail kestrel
#

might wanna add a catch if no mention is provided

heady zinc
#

might wanna remove all the useless spacing too

#

and the return

wispy axle
#

the "ms" thingy

languid dragon
#

client.ping

wispy axle
languid dragon
#

do u know how javascript works?

wispy axle
#

a little bit.. bcz im kinda new to coding

languid dragon
#

client.ping is a variable

#

you put it inside a string

#

which wont get the variables value out of it

earnest phoenix
#

lool

languid dragon
#
// Ways to get the variables value:

"string " + variable.value + " another string" // also works with other quotes

`string ${variable.value} same string` // only works with `
#
// an example for `client.ping`

"Pong! `" + client.ping + "ms`"

`Pong! \`${client.ping}ms\``

// (note the backslashing for extra `'s 
#

that would output:

Pong! 000ms

#

where "000" would equal your clients "ping"

spare spruce
#
const update = () => {
  require('superagent').post('https://bots.discord.pw/api/bots/BOTID/stats')
    .set('Authorization', config.authorization)
    .send({ server_count: dclient.guilds.size })
    .end((err, res) => { 
    if(!err) { console.log('Updated Server Count to https://bots.discord.pw/'); return; }
        console.error(`Failed to Update Server Count for https://bots.discord.pw/`, err);
    });
    
    require('superagent').post('https://discordbots.org/api/bots/BOTID/stats')
    .set('Authorization', config.authorization1)
    .send({ server_count: dclient.guilds.size })
    .end((err, res) => { 
    if(!err) { console.log('Updated Server Count to https://discordbots.org/'); return; }
        console.error(`Failed to Update Server Count for https://discordbots.org/`, err);
    });
};

dclient.on('ready', update);
dclient.on('guildCreate', update);
dclient.on('guildDelete', update);```
#

here @earnest phoenix

#

change info need

#

so easy man no jokes and dont need command even thow auto updates self

earnest phoenix
#

oh

#

lemme try dta in a while

spare spruce
#

kk

#

remember change dclient what ever ya client is for discord thow

#

and other things too

earnest phoenix
#

nah i got it

#

york gave me code

wispy axle
earnest phoenix
heady zinc
uncut slate
#

message.users isn't a thing

#

is it

heady zinc
#

no it isn't

#

its message.mentions.users which is what they use atm

#

but of course doesn't catch if there is no mentions

wispy axle
#

so i need to mention someone then it will work?

umbral pelican
tiny turtle
earnest phoenix
#

Then why do you want a JS bot?

tiny turtle
#

Its DBM I am still learning how to use it but want those commands to work until I get it all figured out, why is that an issue?

#

Figured id ask the smart people

earnest phoenix
#

I dont see any reason why you would want to convert it

tiny turtle
#

DBM doesnt take C#

earnest phoenix
#

I dont even know what DBM is

tiny turtle
earnest phoenix
#

Oh my god

glossy sand
#

uhhh

quiet bobcat
#

...

earnest phoenix
#

Someone delete this guy's bots

glossy sand
#

I guess what you want is to convert the c# bot to a discord bot maker project as opposed to just js

#

but if you're proficient in C#, then why do you want to use DBM?

tiny turtle
#

Wow, if you cant do its cool, but wow

quiet bobcat
#

🤔

tiny turtle
#

Bash Bash and Bash for asking for help lol, So could you guys even do it or like nope to hard ill make fun of this guy for knowing C# but not JS

glossy sand
#

I just want to know why you'd prefer DBM over C#

#

I won't make fun of you for it lol

#

(unlike some other people in this server)

tiny turtle
#

It will be easier in the long run for me to keep it updated

#

I can add my own JS and use the custom stuff it already has

#

I have to learn way more JS but it took me 3 days to do that one file and I got lucky, figured if somone already knows both they could do it quick

glossy sand
#

if you ask me, I'd say using DBM won't necessarily make the bot more maintainable

#

you're more or less doing the same thing as when you're programming in C#, but just in a more roundabout manner

heady zinc
#

on the long term it will even be worse

tiny turtle
#

Its just an option for now until I learn more JS and make it from scratch

heady zinc
#

learning JS to make it from scratch will take you ~20-30 hours

tiny turtle
#

Sadly I work 52 hours a week and this is just a side hobby with running my guild

heady zinc
#

52h wtf

tiny turtle
#

20-30 hours will take me a couple months

#

Haul Truck driver for a coal mine

earnest phoenix
#

Sucks

tiny turtle
#

100%

heady zinc
#

where the fuck do you live

tiny turtle
#

The least populated state in America

#

WY lol

heady zinc
#

oh wtf america again

#

why the only country that sucks this much is the USA

glossy sand
#

but the reason is something something capitalism I imagine

tiny turtle
#

Tell me about it, I am a liberal and I work at a coal mine. but it pays well

earnest phoenix
#

Let me drink fanta

tiny turtle
#

sorry

heady zinc
#

but yeah im not sure if you can mix custom JS and DBM like that

#

as DBM is pretty limited

#

won't do well

tiny turtle
#

But yea, if anyone has the knowlage I have a $20, if asking for help in this manner is against the rules I can delete it

#

Yea the bot is just for a game called ESO and its just for my guild I think 8 other guilds use it atm

earnest phoenix
#

Elder Scrolls Online thinknohands

tiny turtle
#

yup I am the guild master of Magical Society and this bot came from that

wispy axle
heady zinc
#

yes

south finch
#

Yes? Obviously? It’s the help page for the bot

wispy axle
#

Mk

south finch
#

Everyone does their help commands differently. As long as it’s not pointing to some malicious site and actually shows commands and stuff, it’s fine.

umbral pelican
wispy axle
#

is it a clone?

glossy sand
#

I mean what's questionable about it

#

@umbral pelican

umbral pelican
#

lol, nothing was joke blobthinkeyes

glossy sand
#

oookay

umbral pelican
south finch
#

mmLol was being a smartass, i see

earnest phoenix
deep parrot
#

fs-nextra?

#

nextra?

umbral pelican
#

you haven't installed the module 🤷

deep parrot
#

[[help

quiet bobcat
deep parrot
#

oops

#

xD

earnest phoenix
#

what is wrong with this:

      msg.channel.send(msg.content.replace(prefix + 'say ', ''));
  },```
void mirage
#

hi there! I have a couple of music questions. I tried finding this in the faq but didn't see it. I'm looking to replace another bot that I'm not particularly happy with (ayana).

Does this bot have vote skips?
Does it allow skips for the person who queued the song without special perms?
Does it have a DJ role or feature

earnest phoenix
#

wrong server bud

void mirage
#

oh? sorry

#

I was told to go here with general questions lol

#

I thought it was strange... development doesn't seem like a place to do that

earnest phoenix
#

if you want to join ayana server use =server or =support

void mirage
#

no no, I'm not asking about ayana. I don't like ayana

earnest phoenix
#

o

void mirage
#

I'm looking at astolfo

#

I want to replace ayana

earnest phoenix
#

you cant

void mirage
#

I have rhythm as my primary, but I want a better secondary

#

can't?

earnest phoenix
#

replace?

#

what do you mean

void mirage
#

meaning boot out ayana and invite a new bot to take over music duties

earnest phoenix
#

DM me cause were not in the right chat

#

@south finch whats wrong with this?

      msg.channel.send(msg.content.replace(prefix + 'say ', ''));
  },```
south finch
#

um

#

im not the person to ask honestly

earnest phoenix
#

:(

#

your the most talkative

south finch
#

yeah but doesn't mean im the best person to ask lmfao

#

@scenic crest halp

earnest phoenix
#

who is?

umbral pelican
#

you haven't said what the error is mmLol

earnest phoenix
#

prefix isnt defined

glossy sand
#

there's your problem then, right

earnest phoenix
#

what

scenic crest
#

not JS person

earnest phoenix
#

that makes no sence to me

glossy sand
#

there's no variable called prefix so you can't reference it

south finch
#

ok well zoomeyes

#

ty guys

steep warren
#

how i can get avatar url of a bot? (with the id only) (no lib discord.js etc)

elder rapids
#

Https request the user

#

I don't know the exact endpoint but look at the docs

#

I mean if you authenticate as the person it's /users/@me

steep warren
#

but is not a user

elder rapids
#

I think

steep warren
#

is a bot

elder rapids
#

Doesn't matter

south finch
#

bots have ids™

elder rapids
#

Same endpoint

#

Bots are users to discord with a special flag set to true

#

Aka bot flag boolean

steep warren
#

but using /users/@me the users needs to login?

#

tru?

south finch
#

if the bots online? its logged in?

steep warren
#

Aly - Hoje às 15:59
bots have ids™, sup

#

i want to get the bot avatar url

#

via the id

south finch
#

it's same concept

#

?

steep warren
#

yea i found

cerulean zinc
#

Anyone know any good ways to make/generate widgets and/or graphs in NodeJS?

glossy sand
#

node is serverside

#

do you mean like ascii art graphs in cli?

cerulean zinc
#

I mean like making a png or svg (or similar)

gleaming summit
#

hi

earnest phoenix
#

hi

glossy sand
#

@cerulean zinc you can just use something like jimp and a lot of math

#

it's relatively trivial stuff if you know your trig

cerulean zinc
#

I'll look into it, see if I can figure it out

deep parrot
steep warren
frozen sail
#

@void mirage why you wanna replace Ayana NicoSmug

#

Nah I already know the answer

quiet bobcat
#

How do I get upvote information for my bot?

cerulean zinc
#

Anyone have any good program ideas? Because I want to make something other than just a bot...

uncut slate
#

write a mini OS / desktop environment

quasi marsh
#

You could get into app development

cerulean zinc
#

OS is way beyond what I can do, but the only issue for me with making desktop (or mobile) apps is I can never think of a good idea

uncut slate
#

@quiet bobcat GET /api/bots/:id/votes

#

you'd be surprised, I don't mean a full-fledged OS

cerulean zinc
#

Ik, but I wanna make some sort of program, not really an OS yet

quiet bobcat
#

Thanks @uncut slate

rustic plinth
#

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

cerulean zinc
#

...

glossy sand
#

@rustic plinth can you........ not do that

void mirage
#

@frozen sail because I'm having loads of trouble with it. skips are not working on a vote basis. I would also like to have a bot that can allow skips to the people who queued the song playing without a special role

#

It's possible I just don't understand the settings yet. I've been messing with it for awhile now. It has loads of permissions. But when I fall back to the Rhythm bot, my life is just easier lol

topaz fjord
#

Then code it mmLol

void mirage
#

Rhythm already does it ^.^

#

haven't tried FredBoat yet, but that one seems to be popular too

cerulean zinc
#

I wanna make some cloud related and/or connected app... 🤔

#

Any ideas? Cuz I can never think of any NotLikeCat

thorny hinge
#

Is there a way to delete all duplicate rows in a sqlite table? I'm trying to switch databases but there's a heck ton of duplicates GWjustinNotLikeCat

#

Using node.js

topaz fjord
#

What db

#

Are u switching to

glossy sand
#

just hit it with a query like this

thorny hinge
#

@topaz fjord probs redis

#

Or another nosql db

topaz fjord
#

Mont mmLol

#

Mongo

thorny hinge
#

Maybe

topaz fjord
#

Mongoose is very sexy

#

And easy

cerulean zinc
#

What would be a desktop app I could make that people would actually use? I'm sorry if I've asked this too much but idk it's just driving me crazy that I can't think of any ideas

elder rapids
#

another Discord

cerulean zinc
#

I've thought about that, but I don't think I really wanna do that

topaz fjord
#

yes you do

cerulean zinc
#

No.

topaz fjord
#

yes

trim plinth
#

make a music platform like spotify or soundcloud but free and good

elder rapids
#

Good joke

topaz fjord
#

but

elder rapids
#

Will require a ton of licensing

trim plinth
#

mmyeah

topaz fjord
#

he would need to go through tons of licensing

#

probs would make him go crazy

elder rapids
#

I just said that

topaz fjord
#

idc

elder rapids
#

no u

glossy sand
#

make an otome vn game

elder rapids
#

a what game

trim plinth
glossy sand
#

👉 😎 👉

elder rapids
cerulean zinc
#

I don't really wanna make a game for say... Just some kind of cloud based interactive app

elder rapids
#

remote desktop but for gaming (oh wait that's Parsec)

cerulean zinc
#

That's already a thing

elder rapids
#

(oh wait that's Parsec)

glossy sand
#

heard of zeit now?

cerulean zinc
#

No?

glossy sand
#

it's a serverless deployment platform for node.js apps

trim plinth
#

@cerulean zinc you could ask people for what kind of cloud based interactive app they want then make a poll for all the choices given

cerulean zinc
#

Maybe.

glossy sand
#

build something like that, but open source and with greater flexibility

cerulean zinc
#

But I'll check that out phanta

elder rapids
#

Actually

cerulean zinc
#

Hm?

elder rapids
#

Not an app per-say but you should make a Discord overlay for games (text-chat, not voice only)

#

Something like Steams Overlay but for Discord

cerulean zinc
#

But is it really necessary?

elder rapids
#

yes

cerulean zinc
#

Plus that I'm not sure how to make

#

That requires alot

elder rapids
#

same, that's why I threw it out there lol

glossy sand
#

no way to do it without breaking tos

cerulean zinc
#

True

elder rapids
#

What's in the ToS preventing that

#

rip :c

glossy sand
#

that would require building essentially a third party client, which discord is vehemently opposed to

cerulean zinc
#

Hmmm

glossy sand
#

it's essentially a selfbot

elder rapids
#

RPC

glossy sand
#

...is entirely unrelated to this

elder rapids
#

RPC can do what you want without making it a selfbot?

topaz fjord
#

build a rpc plugin for text editors mmLol

cerulean zinc
#

I said an app. Not a plug-in

glossy sand
#

the rpc interface exposes nothing about the client afaik

#

it only exposes the rich presence api

#

and that's unidirectional

elder rapids
#

wrong

#

Well actually one thing RPC can't do is messages

#

so nvm

#

But it can do just about everything else

#

Voice channel join/leave/interactivity, getting guilds, channels, etc..

#

Oh wait RPC can get message updates but can't send on behalf

cerulean zinc
#

Anyways...

#

What would be cool or useful as an app,..

trim plinth
#

hmm

elder rapids
#

I honestly don't have a clue since mostly everything I would need is already made. Can't help you out here

cerulean zinc
#

Maybe I could remake it idk

topaz fjord
#

Make a text editor

#

kek

elder rapids
#

But there is already really good ones out there

trim plinth
#

Ik!!!!!

elder rapids
#

You would need to be really innovative with making a new text editor

trim plinth
#

actually nvm

cerulean zinc
#

Exactly

#

Like I could make a chat app or something but what's the point

topaz fjord
#

for fun

elder rapids
#

One thing I always looked at and semi-enjoyed was an all-in-one game management app

topaz fjord
#

to learn ™

cerulean zinc
#

Like steam @elder rapids ?

trim plinth
#

< . <

topaz fjord
#

also

elder rapids
#

I mean yes... but there is also other platforms so combine those

topaz fjord
#

this is unrelated

cerulean zinc
#

What if i make my own Discord ablobthinkingfast

topaz fjord
#

but does anyone know what extends does in Java

cerulean zinc
#

Nope

topaz fjord
#

@cerulean zinc Already done, Slack™

trim plinth
#

turtle search it up

cerulean zinc
#

Slack is shit tho

topaz fjord
#

but discord copied slack

cerulean zinc
#

So can i

topaz fjord
#

then do it

elder rapids
#

extends in java is creating a new class extending another

cerulean zinc
#

How does that sound tho

#

With reactions, vote should I make my own discord like platform?

topaz fjord
#

yes

trim plinth
#

make a group messaging app but make it cool

topaz fjord
#

use electron kek

elder rapids
#

Make a Discord but P2P

cerulean zinc
#

Holy shit

#

That's not bad

#

Cloud or P2P mode

topaz fjord
#

P2P?

trim plinth
#

make a discord clon1!!!!!

elder rapids
#

I had that idea for a long time and wanted to do it myself

cerulean zinc
#

Peer to peer

topaz fjord
#

o

elder rapids
#

But I don't have motivation to do it

#

So if you want to experiment and do it be my guest

cerulean zinc
#

Shit I might do it

topaz fjord
#

open source it kek

cerulean zinc
#

I might

trim plinth
#

we got derp an idea zoomeyes

elder rapids
#

I would open source it if it's P2P

trim plinth
#

go for it

elder rapids
#

Trust issues zoomeyes

trim plinth
#

¯_(ツ)_/¯

cerulean zinc
#

Omg I actually have an idea I wanna do

topaz fjord
#

so we can all help

cerulean zinc
#

Thanks guys

trim plinth
#

yw

elder rapids
#

lol yw since I probably gave you the idea

cerulean zinc
#

I might open source it once I get it going decently

#

Yea

topaz fjord
#

k

#

@cerulean zinc make it discord but will all the features that discord wont add

elder rapids
#

~~P2P Discord is best Discord so it never goes offline cough ~~

cerulean zinc
#

Ikr

topaz fjord
#

add clear dm history

cerulean zinc
#

Ikr

topaz fjord
#

and use mongo kek

cerulean zinc
#

... eh

#

I've never used mongo

#

Don't even know where to start

topaz fjord
#

i have mmLol

#

pretty easy

elder rapids
#

I've used Mongo

topaz fjord
#

search up mongoose

#

^ best wrapper

elder rapids
#

eh

cerulean zinc
#

I'll be back in a bit, gotta do some stuff

topaz fjord
#

k

#

@elder rapids its pretty easy once you learn how to make a schema

elder rapids
#

Come back with that P2P Discord zoomeyes or not at all

cerulean zinc
#

?

#

I'm gonna have a P2P option (user decided)

trim plinth
#

ok

cerulean zinc
#

But I'd need to use websockets, right?

elder rapids
#

Not necessarily

trim plinth
#

¯_(ツ)_/¯

topaz fjord
#

i could help with db shit

cerulean zinc
#

What would I use instead of websockets

trim plinth
#

hmmmmmmmm

elder rapids
#

Regular sockets

cerulean zinc
elder rapids
#

You can program your own binary socket transporation

trim plinth
cerulean zinc
#

How tf

topaz fjord
elder rapids
#

What you mean how tf 😂

cerulean zinc
#

Idk how

elder rapids
#

Just make up your own header system and then do that

cerulean zinc
#

But anyways I'll be back later and experiment with making the app and let u guys know the status

trim plinth
#

this is interesting

topaz fjord
#

kk

cerulean zinc
#

Wouldn't it be better to use websockets tho

elder rapids
#

Speaking of I might just program my own binary transporation for my bot (internal communication)

#

WebSocket is for ease of use

#

If you want fast sockets you'll need regular custom TCP/UDP sockets

trim plinth
#

i put my support on derps app thing

cerulean zinc
#

... welp

elder rapids
#

You can just send raw messages too if you want

cerulean zinc
#

Ayy

elder rapids
#

You get more control over the socket if you go raw

cerulean zinc
#

Oof

trim plinth
#

socket

cerulean zinc
#

What's the best library for websockets

topaz fjord
#

accepted derp 😃

cerulean zinc
#

Wat

topaz fjord
#

fr

cerulean zinc
#

?

#

O

topaz fjord
#

u cuck

cerulean zinc
#

Gotcha

#

U WOT

#

Jk

topaz fjord
#

U WOR M8

#

*WOT

elder rapids
cerulean zinc
#

Just what's the best library for websockets...

topaz fjord
#

ye

#

pretty sure

elder rapids
cerulean zinc
#

Same

elder rapids
#

I've looked at it a few times and it's nice

topaz fjord
#

its what many people use

#

this whole thing is gonna be node right?

cerulean zinc
#

That's what I'll start off with and yes

topaz fjord
#

oke

trim plinth
cerulean zinc
#

No python

topaz fjord
#

^

trim plinth
#

I have no input on sockets

topaz fjord
#

hmm

#

socket works with express

#

@cerulean zinc tell me when db stuff comes in. I love working with db's

elder rapids
#

Tell me about sockets, I love working with sockets ( ͡° ͜ʖ ͡°)

topaz fjord
#

kek

#

discordapp is just a browser that doesnt look like a browser

cerulean zinc
#

Oof

#

The site will be discordapp.us

topaz fjord
#

name it somethin gud

cerulean zinc
#

Yea I need a good name

#

When you think of the idea too much and then start double guessing it

topaz fjord
#

dont

#

believe in urself

cerulean zinc
#

Ok

topaz fjord
#

gonna learn some java pong if needed

languid dragon
#

@topaz fjord

#

i need to know if u C#

cerulean zinc
#

I've used C#

topaz fjord
#

@languid dragon ik js and java🔜

languid dragon
#

smh

cerulean zinc
#

Anyone have any name suggestions for the platform?

elder rapids
#

I know C# quite well

cerulean zinc
#

I think I still remember c#

#

ChatNet mmlol3D

elder rapids
#

lamest name I ever heard

cerulean zinc
#

Ik

#

DerpNet mmlol3D

elder rapids
#

iDerpNet ;))

cerulean zinc
#

hehe

#

Biscord

#

Nah but seriously, lemme know if you have any name suggestions.

#

ChatCloud?

glossy sand
#

skype 2.0

cerulean zinc
#

Ha! Yea but then it will be seen as a meme

#

Blurbal?

glossy sand
#

i mean you basically are just rewriting skype right

cerulean zinc
#

Idk

#

Maybe Discord rewrite

#

But how bout Blurbal?

#

@elder rapids any input?

elder rapids
#

Blurbal?

cerulean zinc
#

Yea

elder rapids
#

I mean that's an interesting name

cerulean zinc
#

Ik

elder rapids
#

It's not a bad name but it's also weird for a name. Give me time and I'll probably get used to it. It's how I was with Modulo I never liked the name and now it's what I stick with and kept

cerulean zinc
#

Ok

elder rapids
#

But for a current name. Go ahead it's not bad

cerulean zinc
#

Also Blurbal Bl-ur-bull

elder rapids
#

You always can change it later on if you find something better

cerulean zinc
#

True

heady bough
#

Anyone else having troubles with ytdl-core?

glossy sand
#

have you updated it recently?

elder rapids
#

Did ytdl ever update for the YouTube sigs?

#

(that too)

glossy sand
#

youtube messed with some stuff on their side so old releases are no longer functional

elder rapids
#

I wonder if my library still works

#

I bet I'll need to update it

#

Oh cool it still work 👌

heady bough
#

I just updated and it worked

elder rapids
#

I guess my regex for YouTubes signature shit works almost every time if they change it

#

I will never give you guys my special regex which seems to always work even if YouTube updates their signatures zoomeyes

topaz fjord
#

@cerulean zinc BlurBall Thonk

inner jewel
#

sed updates in 10m

#

to fix stuff

topaz fjord
#

updating ytdl-core for me does shit

#

o_0

#

it works

#

Thonk since when dont i use filter audio

potent spindle
earnest phoenix
#

Is there a reason my bot joins a voice channel then immediatly disconnects? it worked earlier today ;-;

#

Also, its in JS

topaz fjord
#

@earnest phoenix u use ytdl-core?

earnest phoenix
#

yea

#

@topaz fjord

topaz fjord
#

do npm i ytdl-core@0.20.1

#

should fix it

earnest phoenix
#

okay, thanks man!

#

now it says ffmpeg not defined but in the coding of this bot i dont remember using ffmpeg

#

How do I get the users name in
let = userName = ‘’

#

=.=

#

message.mentions.users.first();? @earnest phoenix

topaz fjord
#

does it say ffmpeg not found? @earnest phoenix

inner jewel
#

let userName

earnest phoenix
#

yeah @topaz fjord

inner jewel
#

not let = userName

topaz fjord
#

are u on linux @earnest phoenix

earnest phoenix
#

Visual Studio just crashed

#

I have a linux ubuntu 17.04 vps

#

@topaz fjord

topaz fjord
#

go onto the vps and do sudo apt-get install ffmpeg

earnest phoenix
topaz fjord
#

kek

earnest phoenix
#

Fun

#

I love watching black dcreens

#

Screens

#

it keeps returning 404 not found 😂 @topaz fjord I'll search this error up real quick.

topaz fjord
#

tf

cerulean zinc
#

After thinking about it, should I really make my own chat platform? Would anyone really use it? Or should I make something else...

topaz fjord
#

@cerulean zinc We would have to make it good for people to use it

cerulean zinc
#

Ik, but should I just do something else?

#

Hmm

#

I wanna have something that uses the cloud tho

topaz fjord
#

cloud storage mmLol

cerulean zinc
#

Nah

#

Too many of those

earnest phoenix
#

oh wtf, ubuntu 17.04 ended its support on janurary 28th... wuttt didnt it just get released??

#

@earnest phoenix

thorny hinge
earnest phoenix
#

Oh, you want the author

#

One second I got this

inner jewel
#

ubuntu 18.04

earnest phoenix
#

message.channel.send("Why hello there" + message.author) should work @earnest phoenix

#

or

var user = message.author;
message.channel.send(`Why hello there ${user}`);
#

Tell me if you have any issues

#

-.-

thorny hinge
#

Or just

message.channel.send(`Why hello there ${message.author}`);
topaz fjord
#

sudo add-apt-repository ppa:jonathonf/ffmpeg-3 @earnest phoenix try this

earnest phoenix
#

oke

#

Can’t I do
let = userName = ‘message.author’
msg.channel.send(‘Why hello there ‘ + userName + ‘! How are you?’);

inner jewel
#

no

earnest phoenix
#

you dont do let = userName =

inner jewel
#
  1. wrong type of quote
  2. let = x = y isn't valid syntax
earnest phoenix
#

😂

#

let userName =

#

It works

#

Sooooo

inner jewel
#

it doesn't

earnest phoenix
#

No it won't

#

I sends a message

inner jewel
#

wait it does

earnest phoenix
#

Ya

inner jewel
#

WTF JAVASCRIPT

#

WHY THE FUCK DOES THIS EVEN WORK

earnest phoenix
#

Nvm

earnest phoenix
#

Bots not in this server

inner jewel
#

i want to beat the hell out of whoever was the retard that allowed this

glossy sand
#

because js lets you use keywords as var names

inner jewel
earnest phoenix
topaz fjord
#

@inner jewel ur bad at js

earnest phoenix
#

Well

bright spear
#

@earnest phoenix did you use "
use ` instead

thorny hinge
#

Put it in back ticks

bright spear
#

👀

inner jewel
#

you had a single job javascript

#

a single job

#

and you failed

topaz fjord
#

its var b = "c"

#

u cuck

inner jewel
#

if you replace var with let

#

it works

thorny hinge
#

Does it work with const?

inner jewel
#

nope

earnest phoenix
thorny hinge
#

Rip

inner jewel
#

only let

bright spear
#

@earnest phoenix no

#

ugh

#

did you use " around the text?

earnest phoenix
#

No

inner jewel
#
const text = `hello ${userName}! How are you?` ```
bright spear
#

didnt you see @thorny hinge's example?

#
message.channel.send(`Why hello there ${message.author}, how are you?`);
earnest phoenix
#

Yes

thorny hinge
#

Copy paste that exact thing

bright spear
inner jewel
#

js has 3 ways of declaring strings

earnest phoenix
#

Fine, I wanted to try something different

inner jewel
#

"a"
'a'
`a`

thorny hinge
earnest phoenix
#

FAIL

glossy sand
#

/a/.source

earnest phoenix
#

Why does my bot only like msg why not message

cerulean zinc
#

Anyone have any service (server and client) suggestions other than a chat platform?

thorny hinge
#

@earnest phoenix maybe cuz one of them isnt defined

earnest phoenix
#

@inner jewel is 9 commands good enough for you

#

I mean I can add music that don’t work

inner jewel
#

commands that don't work just make it worse for you

topaz fjord
#

@earnest phoenix did it work?

inner jewel
#

also if those 9 commands are actual features

#

eg not userinfo/serverinfo/ping/help/etc

topaz fjord
#

natan

#

can i ask u somethin

earnest phoenix
#

I have owner

#

xD

#

Can someone fix my music

#

I mean, it works but

topaz fjord
#

whats happening

inner jewel
#

stuff

earnest phoenix
topaz fjord
#

@inner jewel can u explain to me what @Override does?

inner jewel
#

literally nothing

topaz fjord
#

then whats the point ?

inner jewel
#

it's just to say "this method overrides a method in a superclass"

#

but it'd still override even without the annotation

bright spear
#

hey did you say serverinfo isnt a feature

#

u wot

glossy sand
#

the point is to make your code readable

scenic crest
#

override annotations make it a lot easier to determine if you're a beginner

inner jewel
#
class Parent {
    void myMethod() {
        System.out.println("Parent.myMethod()");
    }
}

class Child extends Parent {
    void myMethod() {
        System.out.println("Child.myMethod()");
    }
}

Parent p1 = new Parent();
Parent p2 = new Child();

p1.myMethod(); //prints Parent.myMethod()
p2.myMethod(); //prints Child.myMethod()
#

but it's good practice to add @Override when a method overrides a superclass/implements an interface method

earnest phoenix
#

Can anybody fix mah moosic?

scenic crest
#

did you update your music lib

earnest phoenix
#

My what

topaz fjord
#

@inner jewel is extended like adding to a class

scenic crest
#

beep boop that makes your audio work

inner jewel
#

no

topaz fjord
#

o

scenic crest
#

like ytdl

earnest phoenix
#

🤔 how

inner jewel
#

you create a new class

#

that inherits everything the super class (the extended class) has

sick cloud
#

@earnest phoenix what lib are you using

inner jewel
#

but you can override methods to change behaviour

scenic crest
#

if you don't know how to update your music library then I can't help you further

earnest phoenix
#

d.js

sick cloud
#

oof ok thats cool

earnest phoenix
#

@topaz fjord nah, reinstalling my vps to a better version of ubuntu

topaz fjord
#

kk

sick cloud
#

um, i probably wouldnt be a help since my music code is based on arrays and sucks 🤔

heady bough
#

I am trying to fetch my token from my SQL database, so that I can eliminate the .jsons completely

#

My problem is, when I try to get the row containing my token, I get "TypeError: Cannot read property 'get' of null"

glossy sand
#

that's... not a good idea

heady bough
#

How so?

glossy sand
#

sql for data, json for configuration

#

each data format has its own distinct applications

#

you really don't want to mix them

heady bough
#

The token is data

#

I want to be able to change it through my database, if needed

thorny hinge
#

Token in a database? thonkku

glossy sand
#

it's not really data, no

#

it is information in the conventional sense, but it's not data for the sake of your bot's function

#

i.e. it's not data that's read from/written to during operation

#

so it should be stored in a config format like json

#

as opposed to a database like sql

heady bough
#

Alright

scenic crest
#

i store non-token keys in redis

cerulean zinc
#

What program should I make eyeshake

scenic crest
#

so multiple clusters can access the same data, and so it can be changed in real time without restart

cerulean zinc
#

Should I make a password manager Thonk

trim plinth
#

make an anime calculator app

#

jk

cerulean zinc
#

Honestly, I need ideas NotLikeCat

thorny hinge
#

Do you have global, personal, custom command aliases?

cerulean zinc
#

?

thorny hinge
#

Custom command aliases that are set by users and will only work for the user who set it

cerulean zinc
#

Should I make a File Cloud App, Chat App, or what NotLikeCat

trim plinth
#

file cloud

#

chat app

#

what

cerulean zinc
trim plinth
#

ok I put my vote on chat app

cerulean zinc
#

Ok. Im gonna make it

trim plinth
#

ok

thorny hinge
#

Just clone discord

trim plinth
#

steal discords api

#

jk dont

cerulean zinc
#

Im gonna make my own

topaz fjord
#

@cerulean zinc make chat app or succ

cerulean zinc
#

Im MAKuNG\ Itn

topaz fjord
#

Good

#

Like I said tell me when db shit comes

bright spear
#

@sick cloud hi

sick cloud
#

uh hi

bright spear
#

so, you want to find out who upvoted your bot?

sick cloud
#

yeah

#

basically to get votes, so only users that have upvoted my bot can use certain commands

elder rapids
#

Go away

#

👀

#

Not to be rude but upvote locking commands is pretty shitty

south finch
#

Not to be rude, but if this conversation doesn't exactly pertain to actual development then please move it to #general or #memes-and-media. whichever you prefer.

sick cloud
#

so no ones got an answer to my question?

heady zinc
#

you do some basic GET on the votes endpoint that is described on the docs

sick cloud
#

thats kind of what i'm asking though, how. i've never worked with an api like that before

heady zinc
#

wat

leaden bane
#

@sick cloud

#

I have a solution...

sick cloud
#

ok?

leaden bane
#

On your browser.

#

Eh? You there @sick cloud ?

sick cloud
#

i use discord.js

leaden bane
#

Do you see the id attribute?

edgy vale
#

Do you guys know if discord image links are permanent (or only last for a few months)? I'm working on a bot that saves the URL of good rated memes so when somebody types something like $meme they get a random meme. I dont wanna download memes tbh cause i only have 16gbs on my rpi 👀

leaden bane
#

That's all what you need.

sick cloud
#

yes

#

@edgy vale i think they remain forever

#

ok so how do i use the id?

leaden bane
#

Get the content.

#

It it a Python array of dictionaries...

sick cloud
#

dunno how to use them

leaden bane
#

I would use this code in Python:

# GET THE VOTERS
voters = requests.request(
    'GET',
    'https://discordbots.org/api/bots/BOT_ID/votes',
    headers = {
        'Authorization': 'API KEY ON DISCORD BOTS'
    },
    ).content
exec('global upvotes; upvotes = '+voters.decode('utf-8'))
# CHECK IF AN USER IS IN THE LIST
def is_voter(user):
    global upvotes
    for upvote in upvotes:
        if user.id == upvote.get('id'):
            return true
    return false
#

I don't use JS so you might have to do it yourself...

austere meadow
#

i know JS

#

whats the issue

leaden bane
#

He wants to check if an user is in the bot's upvoters.

#

In order to use some certain commands...

austere meadow
#

first of all i dont necessarily approve of upvote locking but thats besides the point
you need to get the response from /api/bots/:id/votes, turn it into an object using JSON.parse() and then iterate over the object and see if the id is equal to the users id

sick cloud
#

ok

#

still dunno how to do it really but i'll have a play around with it

leaden bane
#

GL and HF to you...

#

😉

austere meadow
#

returning the results is pretty easy
then if you use JSON.parse to turn it into an object it should just be as simple as a for loop over the object, and comparing the id's

leaden bane
#

It's so funny to know JSON has some points are the same as Python... xD

earnest phoenix
#

How do you run a bot on multiple servers on a host? 🤔

austere meadow
#

do you mean like sharding?

earnest phoenix
#

Like

#

You can make multiple servers on a host, I use vultr

#

Can you run them on multiple servrers?

#

servers*

austere meadow
#

im not sure honestly

#

why do you need to run the bot on multiple servers?

earnest phoenix
#

Just wondering

#

If it ever comes to it, I can have the knowledge. But I guess I can just look it up. 😛

austere meadow
#

yeah im not too knowledgable when it comes to stuff like that so sorry

#

but i would imagine it wouldn't be possible

sick cloud
#

ok then

heady zinc
#

it is possible

#

or at least theoretically

edgy vale
#

What @heady zinc?

heady zinc
#

wat

edgy vale
#

Oh nvm

#

I read it as is it possible

heady zinc
#

angry murlock noise

whole mural
#

@low rivet got my "you've used all your free hours" email from heroku, shit still running lul

sick cloud
#

how can you add a @mention prefix to your bot

#

(discord.js again :p)

edgy vale
#

@sick cloud

#

Thats what the bot sees as a mention

sick cloud
#

ok

edgy vale
#

(Thats your mention now)

#

Just do \@ThatTonybo#1234

#

or \@mentionyourbot

sick cloud
#

i did try that. i did

var prefixmention = '<@[id]>';

but it didnt work

edgy vale
#

Did you type @mention help or @mentionhelp when you tested it?

sick cloud
#

oh darn, might of just noticed that yeah, forgot a space

#

🤔

edgy vale
#

@sick cloud

#

(Sec was just testing the mention)

sick cloud
#

👌

edgy vale
#

Does it work tho?

sick cloud
#

yup

edgy vale
#

🎉

earnest phoenix
#

does animated emojis work on discord bots?

gusty topaz
#

yes

earnest phoenix
#

my bot cant send the emoji thou

#

is it because i dont hv nitro?

inner jewel
#

no

#

<a:name:id>

#

you have to send that

earnest phoenix
#

oh. . . it needs an a

#

dats where i went wrong

#

ty

sick cloud
#

why would this be happening and how do i stop/fix it?

 OpenError: IO error: /home/tony/data/boat_gems/LOCK: No such file or directory

its breaking my bot rn

heady zinc
#

i mean

#

its pretty

#

i mean

#

obvious

sick cloud
#

but

#

its setup to make it

#

and it doesnt

low rivet
#

Is there a Python equivalent for nodemon?

uncut slate
#

pm2 works with both

low rivet
#

always thought it was a node only, does it have auto-restart upon save files though?

restive silo
#

yea it has a "watching" option

low rivet
#

perfect, thanks

earnest phoenix
#

wow vultr are fucks

frail kestrel
#

whenever I install pm2

#

it doesn't work

#

OH

#

NOW IT WORKS

#

THOT BEGONE

potent lily
#

zoomeyes 🤷

slow elk
#

Anyone knows how to list all people with a certain role?

potent lily
#

yes

#

just check if the members have a role

#

if true add it into a list if false do nothing

scenic crest
#

@slow elk what library are you using

austere meadow
#

btw the reason for the crash was a syntax error in a command i ran, but that wasn't logged so its weird

unique star
#

@austere meadow do you run the commands in a seperate file?

austere meadow
#

yeah

unique star
#

node doesnt always catch errors from a different file

#

unless you have a listener for unhandeled stuff in that file aswell

austere meadow
#

ah alright

#

damn

#

could i add a listener in my command handler maybe?

unique star
#

that would work

slow elk
#

@scenic crest I use discord.js

unique star
#

as your command goes through that

austere meadow
#

and its weird because it works fine on linux (with node 8.2.1)

#

but ill give that a go

unique star
#

linux node works a bit different in that case i think

austere meadow
#

thanks for the help blobthumbsup

unique star
#

i had the same issue when testing on windows

#

while it worked fine on linux

austere meadow
#

ah okay

unique star
#

so node is just being meme

#

¯_(ツ)_/¯

austere meadow
inner jewel
#

node is a meme

unique star
#

@inner jewel you are the true meme

inner jewel
#

no u

low rivet
#

do u think djs should have snowflakes as numbers?

glossy sand
#

no

earnest phoenix
#

Why does it keep saying prefix is not defined

glossy sand
#

you end up with floting point representation issues because js has no dedicated integer type

#

@earnest phoenix presumably you haven't defined a variable named "prefix"

earnest phoenix
#

How do I do that

#

Then

glossy sand
#

um

#

you have the bot developer role but you don't know how to declare a variable?

earnest phoenix
#

let toSend = msg.replace(prefix + ‘shout ‘, ‘’);

#

What’s wrong with that

glossy sand
#

well nothing

#

assuming msg and prefix are defined

earnest phoenix
#

What does that even mean

glossy sand
#

well when you write something like

#

@weak parrot shut up

#
console.log(x + 1);
#

you're taking the value stored in a variable x and doing something with it

#

but if there is no variable called x, obviously this won't work

earnest phoenix
#

So how do I define prefix

glossy sand
#

i mean the same way you declare any other variable

earnest phoenix
#

...

glossy sand
#
let x = 1;
let y = 2;
console.log(x + y); // prints "3"
#

or something

#

right...?

earnest phoenix
#

It has let

#

So just let = prefix; @glossy sand

glossy sand
#

uh no?

earnest phoenix
#

Idk

glossy sand
#

what do you think let = prefix does?

earnest phoenix
#

Let’s the prefix

#

Idk I’ll figure out when I do it won’t i

glossy sand
#

ok I think there are some misconceptions here you hold about how variables work

#

what do you think variables are

earnest phoenix
#

No

#

A vegetable

#

🍎🍎

#

🍌🍒

glossy sand
#

um

south finch
glossy sand
#

we can't really move forwards unless you can accept that you're missing some knowledge here

south finch
#

dont be a smartass towards people actually trying to help you

uncut slate
#

@austere meadow by the way, any particular reason you're not just doing err.stack || err

gleaming summit
#

Can anyone help me with enmap?

#

🤦🏼

earnest phoenix
#

dose this work

#
{
  "name": "setgame",
  "permissions": "NONE",
  "restriction": "4",
  "actions": [
    {
      "info": "1",
      "infoIndex": "1",
      "storage": "1",
      "varName": "game",
      "name": "Store Command Params"
    },
    {
      "channel": "0",
      "varName": "",
      "message": "Set game to ${tempVars(\"game\")}",
      "storage": "0",
      "varName2": "",
      "name": "Send Message"
    },
    {
      "gameName": "${tempVars(\"game\")}",
      "gameLink": "",
      "name": "Set Bot Game"
    }
  ],
  "_id": "YxtBw",
  "comType": "1"
}```
gleaming summit
#

yes

earnest phoenix
#

k thx

gleaming summit
#

There is no err with JSON

#

Can anyone help me with enmap?
🤦🏼

earnest phoenix
#

enmap?

gleaming summit
#

DBs are so.. 🤦🏼

#

difficult to me

thorny hinge
#

mongo, rethink, or redis?

#

🤔

topaz fjord
#

Mongo

uncut slate
#

whatever you like

#

also pls don't use redis as your primary db

thorny hinge
#

I was leaning on either rethink or mongo

#

idk

inner jewel
#

i use redis as the single db

uncut slate
#

.

thorny hinge
#

I'll go with rethink I guess

topaz fjord
#

NuDeS

elder rapids
#

Mee6 used redis as a primary db

#

Not anymore

thorny hinge
#

What does it use now

deep parrot
#
var time = process.uptime();

    function dhm(ms) {
        days = Math.floor(ms / (24 * 60 * 60 * 1000));
        daysms = ms % (24 * 60 * 60 * 1000);
        hours = Math.floor((daysms) / (60 * 60 * 1000));
        hoursms = ms % (60 * 60 * 1000);
        minutes = Math.floor((hoursms) / (60 * 1000));
        minutesms = ms % (60 * 1000);
        sec = Math.floor((minutesms) / (1000));
        return days + ":" + hours + ":" + minutes + ":" + sec;
    }
message.channel.sendMessage(dhm(time));

send 0:0:0:0 but doesnt update

elder rapids
#

Mee6 uses redis and Mongo now

cerulean zinc
#

Should users in my chat platform have:
🇦: Usernames that can only be used on one account
or
🇧: Discord like username system

surreal peak
#

Making ur own chat platform

#

Topkek

cerulean zinc
#

yep

surreal peak
#

Gl

cerulean zinc
#

thx

drowsy yarrow
#

multiple usernames!1!!1!1! GWcorsairAWAUKEN

earnest phoenix
#

anyone knows how to make a setmax music queue time?

#

like max queue time is 1hour

#

max song adding is 10mins/song

#

so if 10min each song 6songs will do 1hour

inner jewel
#

check song length on add

#

keep total queue size somewhere

topaz fjord
#

@cerulean zinc When will db stuff come in

#

im bored

#

hurry up

cerulean zinc
#

soon

#

idk

#

I gotta experiment a bit with it first

vital lark
#

lol

prime cliff
#

August is a bot dev 👀

topaz fjord
#

august is gai

uncut slate
#

your ms to dd:hh:mm:ss parser is bad and you should feel bad

scenic crest
#

@thorny hinge redis

austere meadow
#

@uncut slate responding to the err.stack thing, its just old code and i will update it now blobthumbsup

uncut slate
#

alrighty

steep warren
prime cliff
#

most libraries can do that with client.currentuser.getavatarurl() or something similar to that

steep warren
#

but i not using any libary

prime cliff
steep warren
#

i using only express

#

^^

umbral pelican
#

send api request to get user avatar hash https://discordapp.com/api/v6/users/:user_id with authorisation header
then shove it in the url http://images.discordapp.net/user_id/avatar_hash

thorny hinge
#

Converted my sqlite db into jsons for each table. How do I use those jsons and get them working in rethink?

pale light
#

also how to use rethinkdb

thorny hinge
#

Same

echo geyser
#

.

supple kernel
#

it's a good idea to make sure your bot ignores other bots.

keen anvil
#

Looking for some js devs wanting a fun project. Aka working on a top 15 discord bot as far as size. Dm me