#development

1 messages ยท Page 320 of 1

spare spruce
#

what else expect do

jagged plume
#

pls

spare spruce
#

says there

#

collection.find('username', 'Bob');

#

thats what i did

jagged plume
#

noo

spare spruce
#

thats what says on docs

#

not lieing or anything

misty anvil
#

๐Ÿ˜ฌ

sinful jolt
#

You just want to get a emoji from id? js let nekoe = await bot.emojis.get("342750455513874442"); msg.chanenl.send(nekoe.toString())

umbral pelican
#

awaiting a .get HYPERTHONK

karmic parcel
#

msg.chanenl

tawny lava
#

mmm

bitter sundial
#

yeah get is sync so you dont need to await it

sinful jolt
#

The await was just part of my function I have a function that I keep 15-20 common emotes in

weary shoal
#

You only have to await things that usually return promises like edits and message sending etc

opaque bison
#
 DiscordAPIError: Missing Permissions
``` but it never logs where the error is caused
tawny lava
#

your bot doesn't have permission to do what you're trying to do

opaque bison
#

I am not doing anything lol

#

It's someone else

tawny lava
opaque bison
#

Using my bot

tawny lava
#

Idk

opaque bison
#

is there any events for noPermissions in D.js?

bitter sundial
#

check for required permissions before doing any action

harsh zenith
#

Just found out I can run multiple scripts as the same bot and it still works

#

lol

earnest phoenix
#

...

harsh zenith
#

^^

sinful jolt
#

You can also run multiple Bots from the same script

earnest phoenix
#

^

sinful jolt
#

Ie bot and userbot

abstract mango
#

wew

earnest phoenix
#
client.user.setPresence({ game: { name: 'test', type: 0 } });``` For anyone wondering how to set playing status with Discord.js now
misty anvil
#

hey guys, if i'm using

module.exports.test = function(a,b,c){

}
#

is there a way to use that test function again within it?

earnest phoenix
#

Why would you want to do that

misty anvil
#

so like let's say i have it checking a number

#

and i feed it 5 numbers

#

it does it, then checks if there's another one

#

inb4 use a loop

#

can't use loop in this situation ๐Ÿ˜ฆ

#

figured it out

keen anvil
#

how bout we chill out

misty anvil
#

it was a joke

#

:/

#

reason why i deleted it

toxic oracle
#

How would I go about getting ID's of users that voted for my bot?

umbral pelican
toxic oracle
#

Jacz' thing?

umbral pelican
#

Nah, bit higher

toxic oracle
#

I'm surprised I didnt see that ๐Ÿ˜›

#

Thanks!

earnest phoenix
tawny lava
#

same

earnest phoenix
#

Oh look I'm in development

tawny lava
#

indeed

earnest phoenix
#

wew that was a mistake

#

a good one

#

I was gonna post in general but

#

stupid discord channel switcher

karmic parcel
#

Lol

#

Best help command

#

Or command list

#

Both actually

earnest phoenix
#

mm

sinful jolt
#

Anyone having image embed issues?

#

ie broken af

warm canopy
#

How do i get my token?

vital lark
wanton plover
#

For people using Datadog, with shards, what method you use to send your server total count? Gauge?

weary shoal
#

Just get total value and gauge

toxic oracle
#

-bots @wanton plover

gilded plankBOT
#
viction#4028
Bots

@marsh condor

toxic oracle
#

I'm his bot Thonk

#

Oh wait, DISCORD MOBILW

sinful jolt
#

is there a way to get djs to use more then one core? It hits 100% on one code for a 32 core dedi then dies :/

umbral pelican
#

shard it I think

weary shoal
#

@sinful jolt either sharding or maybe cluster mode on pm2. I've never tried it like that though.

sinful jolt
#

guess I'll need broadcast eval for my guild logs

#

Welp Ty~

weary shoal
#

Use webhooks

#

Please

#

If you broadcast eval logs then CPU is fucked

#

I checked the dump of my bot when I did broadcast logging and it was just spamming trying to find the channel

sinful jolt
#

I actually have webhooks setup

weary shoal
#

Legit 70% cpu usage before I even added music. Now it's like 20% with music lmao

sinful jolt
#

but like I have 32 cores you think it will be a issue useing broadcast eval?

#

I guess it would huh as 1 core per shard I'm guessing

indigo notch
#

\

#

i played this since i was 3

#

has been shut down a year ago

#

or 2

weary shoal
#

It's much easier to use the built in d.js webhook as a separate file then require it @sinful jolt

sinful jolt
#

Nahh because I use webhooks on disconnected

#

The built-in won't work if client is disconnected

#

That's how I know it's ded

#

It pings me in a webhook ๐Ÿ˜‚

weary shoal
#

Yeah it will, web hook is separate client

sinful jolt
#

huh it just spamed my console

#

I'll try it again

karmic parcel
#

@sinful jolt try to use ChakraCore

sinful jolt
#

What's that

karmic parcel
#

It think I read it has some sort of multithreading

sinful jolt
#

Ooo

#

I will check it out

karmic parcel
#

It's a build of nodejs that uses ChakraCore instead of V8

sinful jolt
#

Neko is offline rn

#

I can't keep it up

#

And had to work

karmic parcel
#

Which is the backend for Microsoft Edge

#

But it's supposed to have multithreading built in

sinful jolt
#

I will indeed check it out

karmic parcel
sinful jolt
#

@karmic parcel that looks hot ty โค๏ธ

keen anvil
#

lemme know if you try it and how it goes @sinful jolt

sinful jolt
#

Will do

#

I will when I get home

keen anvil
#

Sweet. It looks like all you have to do is rebuild node with this and then bam, done?

sinful jolt
#

That's what I got outta it

#

I'm going to do it on vps without node Installed and see what happens

bitter sundial
#

isn't there prebuilt ones too

karmic parcel
#

Yeah

#

There are prebuilt

keen anvil
#

@karmic parcel have you used it?

karmic parcel
#

You can hot swap with nvs

#

I used it a bit for a little

#

But I turned my VPS into an instance of GitLab

keen anvil
#

any major bugs, issues, features I should be aware of if I try it?

karmic parcel
#

Uhh I was reading something about promises in their wiki, but I don't recall if there was any hitch about it

#

Actually it shouldn't be bad because I used it with my self bot on my tinkerboard

keen anvil
#

Did you test how the multi-thread performance was?

#

thats the biggest eye catcher for me

karmic parcel
#

Naw, I don't have anything heavy enough to test it with lol

keen anvil
#

okay haha

#

I can throw my image generation server on it to try

karmic parcel
#

My boat is only on 1k servers

bitter sundial
#

test with dank memer for memes

karmic parcel
#

Lol

keen anvil
#

memes don't need more than one core lul

karmic parcel
#

If you do end up testing it under a heavier load, lemme know! I'm curious myself

bitter sundial
#

if it breaks you can blame memes

keen anvil
#

Will probably tonight @karmic parcel, I'm setting up a new image gen server so :P

karmic parcel
#

Okee

bitter sundial
#

I'd like to try it too but I don't have anything significant to test on

karmic parcel
#

my selfbot runs at like minimum cpu usage and like 20mb of ram

#

so it's like meh

sinful jolt
#
if (!bot.owners.includes(message.author.id) || !message.member.permissions.has("MANAGE_GUILD")) return;``` shouldn't this work for perms i want to be able to override like guild prefix
vital lark
#

How about MANAGE_SERVER

karmic parcel
#

Is anyone having issues with users in a voice channel updating the mute and def status on a server?

vital lark
#

No, I never done Music before

#

but I played marv

#

in the US-West

#

omg

karmic parcel
#

and uh, depending on when that if fires might be the issue

vital lark
#

๐Ÿ˜๐Ÿ”ซ

#

in a vc

karmic parcel
#

Crystal

sinful jolt
#

i havent

#

also

#

its guild

#

its using the || as a && :/

earnest phoenix
#

@sinful jolt It's MANAGE_GUILD btw

vital lark
#

you mean MANAGE_SERVER

earnest phoenix
#

no

#

MANAGE_GUILD

#

is correct

sinful jolt
#

ik lul

earnest phoenix
#

oh

#

I blind

tawny lava
#
**Input**
message.guild.me.permissions.has('MANAGE_GUILD')```
**Output**
false```
#

hmm

earnest phoenix
#

damn

#

lol

umbral pelican
#
!bot.owners.includes(message.author.id) || !message.member.permissions.has("MANAGE_GUILD")

is the same as

!(bot.owners.includes(message.author.id) && message.member.permissions.has("MANAGE_GUILD"))

iirc

vital lark
#

Why is this happening? ```js
Adding all variables
[Sat Aug 19 2017 14:07:35 GMT-0700 (US Mountain Standard Time)] - An Unhandled Rejection has occured!
events.js:238
throw new TypeError('"listener" argument must be a function');
^

TypeError: "listener" argument must be a function
at _addListener (events.js:238:11)
at process.addListener (events.js:298:10)
at Object.<anonymous> (C:\Users\USER\Documents\Discord\Boats\Mio-chan\src\Mio.js:79:9)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Function.Module.runMain (module.js:605:10)
at startup (bootstrap_node.js:158:16)```

umbral pelican
#

it says why... listener argument must be a function

tawny lava
#

show line 79

vital lark
#
bot.on('error', (e) => {
  console.error(`[${time}] - An error has been unexpected!\nError Logs > ${e.stack}`);
});
bot.on('warn', (e) => {
   console.warn(`[${time}] - An warning for me is unexpected!\nError Logs > ${e.stack}`);
});
process.on('unhandledRejection', console.error(`[${time}] - An Unhandled Rejection has occured!`));

bot.login(config.keys.Discord);``` Line 79 = Process.on
bitter sundial
#

the second argument for process.on must be a function

#

you are giving it the return value of console.error() which is undefined

#
process.on('unhandledRejection', () => console.error(`[${time}] - An Unhandled Rejection has occured!`));
#

@vital lark

vital lark
#

Thanks

earnest phoenix
#

You are logging that there is an error but not giving any other details

#

nice debugging skills

fiery goblet
#

nice no linter

hallow harness
#

can anyone help me with postgresql and js :c

earnest phoenix
#

sure

#

good luck

tawny lava
hallow harness
#

sIIIGH

#

google was no help

earnest phoenix
#

hi im still learning discord.js so how do i add when was the user created field
i got the id part
so basically .addField("ID", message.author.id)

#

.addField("Created At", new Date(msg.author.createdAt).toUTCString())

#

@earnest phoenix

#

thanks

#

also msg is supposed to be message

#

not msg

#

to me it worked with message

sinful jolt
#

i never did use ChakraCore i just removed pm2 and the bot is fine

#

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

karmic parcel
#

lol

earnest phoenix
#

What are some cool Node.js & Websocket applications that I could put on https://passthemayo.space/ ? I currently have a chat and hastebin running.

sinful jolt
#

d zone of course

karmic parcel
#

You have a chat?

keen anvil
#

I'm going to keep testing and will let you know if anything changes, but as of right now, I'm finding that snekfetch is in fact not the fastest http lib for node.

karmic parcel
#

did you try chakracore?

keen anvil
#

ha no, passed the hell out. Have it installed, just need to set up the image server

fierce raven
#

i seen people in here using the old discord.js embed builder, this is now outdated and the new way is ALOT more effective and looks alot more sexy

message.channel.send({embed: {

  }
});

for example

#

message/ping me if you wanna know more about this

keen anvil
#

what

#

you mean raw embeds?

fierce raven
#

yup

#

there alot better

keen anvil
#

Thats not d.js. That's raw discord.

fierce raven
#

and the embed builder is getting removed

#

rlly? ๐Ÿค”

keen anvil
#

yup

#

second

fierce raven
#

oh damnn

#

you learn something new everyday ๐Ÿ˜„

keen anvil
#
msg.channel.createMessage({
        embed: {
            color: Memer.colors.lightblue,
            thumbnail: { url: Memer.randomInArray(trumpers)},
            description: `\n${msg.author.username}: ${question}\n\nTrump: ${answer}`
        }
    })
#

like this?

fierce raven
#

nope, i dont think so

#

ill screen shot a section of my code

keen anvil
#

mk

fierce raven
keen anvil
#

those are raw embeds

umbral pelican
#

the "new way" you talk of, is kinda the old way

keen anvil
#

same as my code

fierce raven
#

damn

#

๐Ÿ˜„

tawny lava
#

Hmm

fierce raven
#

RIP my knowledge..

#

@umbral pelican its still the better way in my opinion

umbral pelican
#

same

keen anvil
#

looks better + works across libraries

fierce raven
#

most other people i ask use the .addField('', '') bullshit

#

which is ok

#

but looks like ๐Ÿ’ฉ

tawny lava
#

I prefer the builder myself tbh

fierce raven
#

๐Ÿ˜ฆ

tawny lava
#

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

keen anvil
#

and also it's part of d.js which is a memory hog

fierce raven
#

hehehe

fiery goblet
#

i like how u got my old profile picture

fierce raven
#

have i? ๐Ÿ˜„

fiery goblet
#

ye

fierce raven
#

haha

tawny lava
#

Shit I thought that was you lol @fiery goblet

fiery goblet
#

really? lul

fierce raven
#

lol? ๐Ÿ˜„

sinful jolt
#

lol that's how I always used them the builder never worked right for me

fierce raven
#

lol

warm scroll
#

'cause im stuck

umbral pelican
#

the fuck is that HYPERTHONK

#

looks like some sorta tutorial

#

maybe rewatch video lol

fierce raven
#

what lang is that? ๐Ÿค”

earnest phoenix
#

js

fierce raven
#

๐Ÿค”

keen anvil
#

@sinful jolt @karmic parcel I have two servers set up, one has chakracore and one has regular node

karmic parcel
#

OwO

keen anvil
karmic parcel
#

which is which?

keen anvil
#

the four triggers are chakra

#

the last is regular

sinful jolt
#

wew

karmic parcel
#

holy fuck

keen anvil
#

yup

karmic parcel
#

chakra op

keen anvil
#

multithread op as fuck, node just got so much better for me

karmic parcel
#

yeeee, that's beautiful

#

good shit

#

now I'm just gonna stick with chakra

gentle reef
#

the hecks chakracore?

sinful jolt
#

welp Guess I'll just go switch to that โค๏ธ

karmic parcel
#

I thought it was supposed to support multithread, that's op

#

danx, melmsie

keen anvil
karmic parcel
#

I never had a large enough load to test the multithreaded on

sinful jolt
karmic parcel
#

but I knew it was pretty nice from when I used it

#

Crystal, when you try it, can you let me know how it works for you as well?

sinful jolt
#

Will do

fiery goblet
#

how to make an array in sqlite?

weary shoal
#

@fiery goblet push json with array then parse maybe? There's probably an easier way lmao

#

{"array": [ 1, 2, 3 ]}

#

Then
JSON.parse(result).array[1] === 2

toxic oracle
#

Anyone know how I could make a function that checks if the user is Upvoter or not?, that I can use anywhere without having to add like 20 extra lines

#

I got the functions down, but idk about the upvoter one since the only thing I can think of is snekfetch, but it closes it before its called. So its undefined when the function is actually called

vital lark
#

Why the acutal fuck why u need a function WaitWhat

bitter sundial
sinful jolt
#

I store them in a list

indigo notch
bitter sundial
#

oh really

#

that shouldnt be there...

#

why cant people understand

#

what the channel is for

indigo notch
#

sorry xD

karmic parcel
#

@keen anvil were the results using chakra consistently better?

keen anvil
#

so far they have been

earnest phoenix
#

How do i allow a bot to only be in a certain channel

#

instead of all of them

bitter sundial
#

go to each channel's settings, and set the read messages permission to deny for the bot

earnest phoenix
#

sick thanks

keen anvil
#

t

coral mortar
vital lark
#

lol

earnest phoenix
#

rip

tawny lava
#

hmm

coral mortar
weary shoal
#

Mmm can't wait for source release and ctrl f all the Vapor stuff and change to Mercy FuckedUpThonk

tawny lava
#

lol

abstract mango
#

mmmmmmmm

keen anvil
sinful jolt
#

Is that on a image upload?

#

Only time I got that was uploading images over the size limit

keen anvil
#

no clue what it's on tbh.

#

looks like it's something voice related

zenith ocean
#

why this ? Error: RSV2 and RSV3 must be clear

#

can you help me ?

sinful jolt
#

I get those when discord ws is acting strange and a resume fails

primal ore
#

Why know python?

karmic parcel
#

@weary shoal bby

#

can you has test my webhook service when I finish it

#

?

vital lark
#

ol

karmic parcel
#

henlo

vital lark
#

henlo mr ronin

karmic parcel
#

henlo henlo, you don't use GitLab, do you?

vital lark
#

I use Gitlab

#

for VPS

karmic parcel
#

OwO, wanna test my service out then at some point?

vital lark
#

Sure

sinful jolt
#

is there a js equivalent to await asyncio.sleep()? Basically I need a function to wait a few seconds without blocking everything else

karmic parcel
#

setTimeout I think

#

but that's maybe different

tawny lava
#

setTimeout works similarly

sinful jolt
#

Ahh Ty~

#

setTimeout( func here,3000) ? that doesn't error but it also doesn't work

karmic parcel
#

what doesn't work about it?

#

is it not executing at the end of that time?

tawny lava
#

I believe it's setTimeout(() => func here, 3000)

#

try it

#

or not nvm

sinful jolt
#

It just never executes at all

karmic parcel
#

hmm

#

and the function works otherwise?

sinful jolt
#

yep I'll mess it more when I get internet back at home Fucking Comcast :/

delicate zephyr
#

@sinful jolt try

setTimeout(function() {
    console.log("This was run")
}, 1000);

Just to check that it is being run
if not right this

runTimeout()
function runTimeout() {
    setTimeout(function() {
        console.log("This was run")
    }, 1000);
}
slate patrol
#

So I was starting up my bot, and it gives me both the error message and the success message when changing the server count on the website. My code is
``` snekfetch.post(https://discordbots.org/api/bots/${client.user.id}/stats)
.set('Authorization', config["dbotstoken"])
.send({ server_count: client.guilds.size })
.then(console.log('Updated dbots.org status.'))
.catch(e => console.warn('dbots.org down spam @fossil oxide'));

#

And it doesnt update the server count on the website

vital lark
#

Use it in the guildCreate & guildDelete so the API won't die anymore weSmart

#
.set('Authorization', config.keys.oliyBots) // My Config thingy
slate patrol
#

Is config a json file?

#

If so, I've never seen that way of reading json files

vital lark
#

Config is a JSON file

#
{
   "prefix": "<",
   "api_keys": {
     "Discord": "token",
     "oliyBots": "token"
   },
   "devTag": "<tag>"
}``` Example of my config.json file
slate patrol
#

What do you have your config variable set to?

fiery goblet
#

nice token thx

vital lark
#

var config = require('./config.json');

#

if u using jsweSmart

slate patrol
#

But the main question still is, how do I fix my issue

vital lark
#
client.on('guildCreate', guild => {
  snekfetch.post(`https://discordbots.org/api/bots/${client.user.id}/stats`)
    .set('Authorization', config["dbotstoken"])
    .send({ server_count: client.guilds.size })
    .then(console.log('Updated dbots.org status.'))
    .catch(e => console.warn('dbots.org down spam @fossil oxide'));
});

client.on('guildDelete', guild => {
   snekfetch.post(`https://discordbots.org/api/bots/${client.user.id}/stats`)
    .set('Authorization', config["dbotstoken"])
    .send({ server_count: client.guilds.size })
    .then(console.log('Updated dbots.org status.'))
    .catch(e => console.warn('dbots.org down spam @fossil oxide'));
});```
slate patrol
#

Okay

#

@vital lark didnt help

vital lark
#

Need error code

slate patrol
#

and the code I used is the code u gave ne

#

me**

fiery goblet
#

not verified bot

slate patrol
#

my bot? It is

fiery goblet
#

idk

#

-bots @slate patrol

#

o ye

keen anvil
#

that would be why

slate patrol
#

Im pretty sure my bot is

fiery goblet
#

it is aswell

faint cedar
#

NodeJS, Effective way to store a persistant value? Anyone know?

left wagon
#

is persistant changing or not, sorry dont know this word

faint cedar
#

It doesnt reset after reboot

left wagon
#

json

#

but do you mean editable values

faint cedar
#

Like I need to write and read

left wagon
#

database then

#

sqlite is good

sinful jolt
#

If you plan to make a ton concurrent read/write sqllite my not be up to par

vital lark
#

TOo make a SQLite thing weSmart

sinful jolt
#

ye but sqllite can be slow for something like prefixs

#

That saves it to a json db but it loads it into memory so it's rather fast

uncut slate
#

Isn't it better to load db into a Map on boot

#

and read prefixes from the map

#

and when changing, writing to db and map

earnest phoenix
#

SQLite saves the db to memory I think, I don't think it reads it every time

vital lark
#

const sql = new Map(); weSmart

karmic parcel
tawny lava
#

nice

median lintel
#

ikr

vital lark
#

noice

karmic parcel
#

I just have to uh do pipeline, wiki page, and one more event then it's finished for now

#

and it can be used by anyone

#

all you have to do is change discordapp to dickswordapp on the webhook in GitLab and then add /GitLab to the end

#

and it is https

median lintel
#

yup

#

its ez

karmic parcel
vital lark
#

@karmic parcel Buy me Nitror blobkissheart

#

Nitro*

karmic parcel
#

you aren't using my service lol, how do you know it's easy?

median lintel
#

idk

#

seems like it

fiery goblet
#

how do i do multiple steps on await messages, should I do collector event over and over again?

sinful jolt
#

@karmic parcel does your thing do datadog webhooks ?

karmic parcel
#

I can add them after I'm finished with GitLab

#

they have webhook docs?

#

hmm, looking at it now. Seems like you can already create a custom payload

#

but if you don't have it open, I will support a custom endpoint as well

sinful jolt
#

i tried a few times to get it to post them it never actually worked

#

Or gave a error

karmic parcel
#

to post to Discord?

#

or for the webhook to post?

#

crystal bby

sinful jolt
#

sry phone died

#

To post to Discord

karmic parcel
#

okeee, I'll add a /Custom part where you just feed me the embed

#

and I can post that

#

sound Gucci? I can actually to that like real quick probably, lemme see

#

@sinful jolt lemme know when you can test it

sinful jolt
#

At work so a few hours from now

karmic parcel
#

okee, I'm testing it now and a JSON message with the embed is working

#

so you can use the /Custom endpoint if you just wanna send the embed to my endpoint

#

and it'll handle all the rest

#

webhook spit out

bitter sundial
karmic parcel
#

yeah, I'm gonna once I get the actual site up

#

right now it's just a service

#

I don't feel like making a site rn lol

fiery goblet
#

so can anybody use it?

karmic parcel
#

yeah

fiery goblet
#

do a tutorial on how to use it

karmic parcel
#

I don't have the actual docs site up yet, but if you have a webhook, just change it to https://dickswordapp instead of discordapp

#

and then add /Custom

#

at the end to do what I just showed

#

You'll just need to send JSON as the body, and the JSON should be an embed object

fiery goblet
#

what about GitLab?

karmic parcel
#

oh, GitLab you just do /GitLab

fiery goblet
#

would that be slack or an actual webhook

karmic parcel
#

actual webhook

fiery goblet
#

thought so

karmic parcel
#

yeah,no funky shit

fiery goblet
#

and how long u been working on this for then?

karmic parcel
#

a day

#

I'm gonna finish up the last 3 events today

#

and GitLab and Custom will be fully supported and I'll keep the service up

fiery goblet
#

what events work?

bitter sundial
#

hmm

#

if you have custom be an embed object is there really any point tho

karmic parcel
#

all but wiki pages, pipelines and build events

bitter sundial
#

if you send an embed to the custom you could just send it directly to discord

karmic parcel
#

Neko said they had problems with it

#

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

#

I'm gonna finish up the events today to fully support GitLab by the end of today @fiery goblet

fiery goblet
#

cool

karmic parcel
#

so if you want me to let you know, I can?

fiery goblet
#

sure whatever

karmic parcel
#

idk, you seemed interested. Maybe just curious

#

lol

fiery goblet
#

lul

#

i try it when the events are done

karmic parcel
#

okee

slate patrol
#

How can I get a json file, then get a part of it and turn it into a string? Like

"idk": 1,
"test": {
    "test1": null,
    "test2": null,
    "test3": null
}

It would get everything inside of the "test" area and turn it into a string

karmic parcel
#

@fiery goblet it's all up. It should be all set good, but there may be some changing of how the embed looks

#

if you end up using it, feedback would be nice, if not that's cool too

#

just change the first part of the URL to https://dickswordapp.com and add /GitLab at the end of the webhook URL as well in GitLab for GitLab

fiery goblet
#

oki thanks, i test rn

karmic parcel
#

Okeee

fiery goblet
#

it says http request 400

karmic parcel
#

eyers for what event?

fiery goblet
#

Push

karmic parcel
#

It works on mine

#

Did you have the right url

#

?

fiery goblet
#

show how link should be

#

i added /GitLab

karmic parcel
fiery goblet
#

ye

karmic parcel
#

https://dickswordapp.com/api/webhooks/number/token/GitLab

fiery goblet
#

mine is the exact

karmic parcel
#

And that's what you put in the GitLab webkook spot, not Discord?

tawny lava
#

I'll test it 1 sec

karmic parcel
#

Kkz

#

I'm watching the terminal, I'm logging for debug

fiery goblet
#

ye

karmic parcel
#

Can you try yours again too?

#

400

fiery goblet
#

bad request

karmic parcel
#

It's the icon urls

#

I use gravatar

#

So they were already urls

#

But the stock avatars aren't the same

#

Rip, I'll fix that when I get back to my computer

#

Would you guys mind testing after I fix that in a bit later?

tawny lava
#

same

#

400 bad request

#

I think it's cuz creating webhooks on ptb makes the link different or some shit like that

karmic parcel
#

I didn't fix it yet lol

#

No, it's because the avatar url isn't valid because I didn't check for them not being gravatar

tawny lava
#

mmm

karmic parcel
#

Because mine is a gravatar image

tawny lava
#

wait so if I created the webhook on ptb should I add that or remove it?

#

like ptb.dickswordapp

karmic parcel
#

Remove the ptb

tawny lava
#

ye that's what I did

karmic parcel
#

Yeah, so it won't work until I fix it when I get back to my pc

tawny lava
#

sad

karmic parcel
#

Lol, it'll be in a bit. I'm at work

fleet epoch
#

Ooo

simple lagoon
#

I think it will take me longer than I thought, I still can not find the example code for the help command But at least add the command "Avatar" and repair the pin code, ยฟAnyone know where I can find an example for the help command?

slate patrol
#

Library?

karmic parcel
#

@tawny lava eyers

#

I fixed it

tawny lava
#

mm

simple lagoon
#

.js

karmic parcel
#

@fiery goblet

tawny lava
#

let's ee

karmic parcel
#

can you has tests pwease

fiery goblet
#

k

karmic parcel
#

OwO

slate patrol
#

@simple lagoon which library

#

d.js?

simple lagoon
#

discord.js

fiery goblet
#

It worked @karmic parcel

karmic parcel
#

yey

#

It works for my hosted version as well without gravatar

fiery goblet
#

change the footer to Dicksword

karmic parcel
#

ya

#

lol

tawny lava
#

oo nice works

karmic parcel
#

kek,I changed the footer

#

I'm leaving it up

#

So it should be on all the time afaik

#

you are free to use it if you want

#

if not, that's cool too. I'm using it for my personal projects

tawny lava
#

I'm gonna use it cuz it looks better than the normal webhook xd

karmic parcel
#

I'm gonna throw a site in for documentation in the next few days, I only started working on it yesterday lol

#

if you have any issues with it, like it displays funky or doesn't look right, take a screenshot and lemme know what I should fix and I'll do it

#

if you want more services, lemme know

tawny lava
#

alright

simple lagoon
#

My eyes hurt, of course it's because I have not stopped working in my bot for 3 days without sleep,And I will continue talking to myself?, discover it in my next life

tawny lava
#

sad

#

that's how you learn

#

you do stuff yourself

sinful jolt
#

copy, paste , duck tape, repeat

earnest phoenix
#

same

karmic parcel
#

@sinful jolt The service is up now, if you have time we can see what's up with your webhook from datadog

sinful jolt
#

Still at work for a few hours

karmic parcel
#

oi, okeee

#

rip work

#

I just got home

karmic parcel
#

@sinful jolt

sinful jolt
#

ya idek working for me on diff Guild

karmic parcel
sinful jolt
#

Tf is 6

#

I'll fix now

#

@karmic parcel there's no emotes on that Guild is there?

karmic parcel
#

uh, lemme check

#

correct

#

no custom emotes

sinful jolt
#

Fixed ๐Ÿ‘Œ๐Ÿผ

karmic parcel
slate patrol
#

When I do the evaluate command sometimes(d.js) the output is over 2000 characters, how can I solve this>

sinful jolt
#

most of us post it to some kinda of hastebin

slate patrol
#

I wanna use github gists

#

but I cant seem to find any npm packages

karmic parcel
#

might just have to use the REST

#

if you mean can't find any APIs you mean like NPM modules or whatever?

slate patrol
#

I mean npm packages

sinful jolt
#

meh more overhead

#

Just use snekfetch

#

Also a fast Google just linked like 7 gist npms

slate patrol
#

@karmic parcel Im really dumb but Im not sure how to get just the url part of the output

sinful jolt
karmic parcel
#

or that if you are using js

slate patrol
#

@sinful jolt I'm looking at quick gist but its the same problem as @karmic parcel 's suggestion problem

sinful jolt
#

hmm?

slate patrol
#

Scroll up

sinful jolt
#

Is it a json response?

slate patrol
#

I think its an object

sinful jolt
#

Console log it

slate patrol
#

Why

sinful jolt
#

to see what the object looks like

slate patrol
#

It gives an example on the package page

earnest phoenix
#

wut

slate patrol
#

?

#

How can I get one line from an object?

earnest phoenix
#

git gud

#

Google how to get a property from an object

earnest phoenix
bitter sundial
#

@earnest phoenix stop pinning stuff like thatยจ

fiery goblet
#

how do i do multiple steps MessageCollector?

earnest phoenix
#

Lolsorryk @bitter sundial

sinful jolt
#

@fiery goblet I'm pretty sure a message collection array is part of the JS idiot's guide

fiery goblet
#

nah

#

i think i got multiple steps anyway

karmic parcel
#

@fiery goblet @tawny lava I'm making the services lowercase

#

so /gitlab instead of /GitLab

tawny lava
#

alright

#

tell me when to change em

#

or should I do it now?

karmic parcel
#

yee, gonna do it in a sec

#

I fixed up how issues and wiki page embeds look a little too

karmic parcel
#

all changed now

#

and you can request https://dickswordapp.com/api/services for a list of services

slate patrol
#

how can I get a section of a json file and turn it into a string? Javascript btw

karmic parcel
#

you can require the json file

#

and then use it like an object

#

or if you have the json file already loaded and want it as a string, JSON.stringify

#

what context are you doing this?

slate patrol
#

It'll send a message of that part of a json file

karmic parcel
#

so did you already load in the json file?

slate patrol
#

I required it if thats what you mean

karmic parcel
#

okay, so what part of the file do you want in a string then? you can do jsonfile.member to access things in it

#

it's like a regular object once you load it in

slate patrol
#

The json file looks like

{
  "auserid": {
       "someoptions": null
  }
}

I want to send everything inside of "auserid"

karmic parcel
#

jsonfile.auserid

slate patrol
#

is that automatically a string?

karmic parcel
#

It'll be an object

#

so you'll have to format it the way you want

slate patrol
#

okay

karmic parcel
#

oooooooo, you want to access it like that?

slate patrol
#

yeah

karmic parcel
#
jsonfile[message.author.id]
slate patrol
#

and I can do that with the require right?

karmic parcel
#

so you're getting message.author.id from your lib, and you want to access that portion of the jsonfile?

slate patrol
#

ye

karmic parcel
#

uh, I haven't tried it, so idk

#

I don't think it'll work like that

#

you can just require it

#

then access the info like that

slate patrol
#

okay

vital lark
#

@karmic parcel HawkBot API when bloblul

karmic parcel
earnest phoenix
#

Why does it need an API?

vital lark
#

idk

#

lol

tawny lava
#

Why not gg

#

Just make everything into an api

vital lark
#

YumiBot API bloblul

earnest phoenix
#

how do I make my bot say hi? bloblul

tawny lava
#

what lang / lib

fiery goblet
#

by dieing

tawny lava
#

lol

earnest phoenix
#

the lib is discord.batch

fiery goblet
#

he's joking

earnest phoenix
#

obviously

tawny lava
#

ok

#

what you need to do

#

Idk I can't think of anything ULTRALUL

earnest phoenix
#

here

#

discord.exe

#
@echo off
set message="Hi"
start "discord.bat.exe" --send message
#

there

#

thats easier

#

actually

#

I have an idea, what if I made discord.batch LULUL

#

discord.dll

delicate zephyr
#

What would be a good way for the bot to clear its own messages? I cant figure it out.
Library: d.js

jagged plume
#

fetchMessages using a filter to check if the author's id == bot's id then bulkdelete the array of messages you get from the promise

#

@delicate zephyr

delicate zephyr
#

oh

#

Ok

#

Thanks @jagged plume

jagged plume
#

no problem

earnest phoenix
#

@vital lark ._.

#

copying id

vital lark
#

:3

earnest phoenix
#

help

#

isnt message already defined

#

in discord.js

#

i even did var sender = message.author; but that didnt owkr

#

work*

vital lark
#

The error says it

#

Fefine message

#

Define*

earnest phoenix
#

did

jagged plume
#

no u didnt

earnest phoenix
#

now i did

#

ok it works

delicate zephyr
#

I keep getting this error on my bot, idk why. Someone help?

earnest phoenix
#

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

faint cedar
#

I dont do WS so I dont knw

earnest phoenix
#

how do you not use a websocket?

vital lark
#

I don't use a websocket

earnest phoenix
#

yes you do

#

@vital lark

#

you have to

#

or your bot wont work

fiery goblet
#

websockets are u used by discord.js

keen anvil
fiery goblet
#

u don't need them in ur part of code but discord.js's part of code does

vital lark
#

๐Ÿ‘€

karmic parcel
#

I just put up the docs page and finished the home page for dicksword

#

@fiery goblet You wanna let me know what you think?

earnest phoenix
#

wew

fiery goblet
#

that's actually neat

earnest phoenix
#

:3

#

I like the docs button, how it turns invisible when I hover @karmic parcel

#

eh

#

sometimes

#

and nice logo

karmic parcel
#

turns invisible eyers

earnest phoenix
#

sorta

#

then flashes

#

then bold

karmic parcel
#

hmm, it did that the first time I loaded the page

#

hmm

#

I'll see if I can figure that out

#

oh and I did this just now

tawny lava
#

good job

karmic parcel
#

gotta get that embed in there

tawny lava
#

I'm proud

vital lark
tawny lava
#

hot

karmic parcel
#

yeah

vital lark
#

hot

karmic parcel
#

lick me all over

fiery goblet
#

same

tawny lava
#

yis

earnest phoenix
karmic parcel
#

but yeah, wha tyou think about the site and docs site?

#

anything really shitty?

tawny lava
#

we're talking about his development :/

vital lark
karmic parcel
#

lol, that was in college

#

but like, the site

tawny lava
#

java is eww :;/

karmic parcel
#

pls

#

What you think about the site, good so far?

tawny lava
#

it's very nice tbh

karmic parcel
#

The docs site is legible?

#

it has a table of contents on the right for tablets and desktop, just not mobile

keen nest
#

<@&264889767072628742> Wat are the said requirements to get a lib on the site instead of other?

#

(for future refrence)

keen nest
#

:/

vital lark
#

There from the Discord API doe

keen nest
#

Ah okay

#

wasnt sure

#

Forever in other

delicate zephyr
indigo notch
#

which OS?

delicate zephyr
indigo notch
#

Windows don't want to install node-opus

#

oh

#

hmmmm

#

idk why then

vital lark
#

I'm using Ubuntu bloblul

earnest phoenix
#

@delicate zephyr sudo apt-get install build-essential

#

Then try after installing that

vital lark
#

what are the parts of an embed in JSON OwO

earnest phoenix
#

Everything on the discord docs was changed, so it no longer documents embed structure @earnest phoenix

#

@vital lark

#

right ping

#

wat

#

for me, it's called Embed Limits and it says the char limit for embeds @earnest phoenix

#

no embed structure

#

oh

#

I see

#

yeet yeet

karmic parcel
#

lol

#

what was changed?

earnest phoenix
#

the docs

karmic parcel
#

o

#

yeah, a bunch of stuff added

#

and some stuff changed eyers

#

I hope izy can keep d.io updated

delicate zephyr
#

@earnest phoenix You are a fucking legend, I googled for feckin hours trying to find that

earnest phoenix
#

it was the first result lol

sinful jolt
#

@karmic parcel @keen anvil I'm going to move chakracore later today I'll let you guys know how it works. Neko is slow af and uses 100% of a core after a few minutes of being booted

karmic parcel
#

Yey, lemme knooow!

earnest phoenix
#

lol

neat flower
#

i've played a bit with chakracore, and then i discovered that @google-cloud package has some issues with it

#

grpc seems to go bananas if i compile it using chakracore instead of V8

karmic parcel
#

what version were you using?

neat flower
#

8.4.0

karmic parcel
#

hmm

neat flower
#

everything else runs great tho. I even manage to build SASS with chakra

#

it is just google cloud API that crashes without any error message, I was too lazy to investigade so i just switched back to V8 instead

karmic parcel
#

lol, fair enough

#

Melmsie tried with an image server and he said it was great

#

Uh, can you do custom metrics for datadog?

sinful jolt
#

Ye you can

karmic parcel
#

I'm setting up datadog for Dickswordโ„ข

#

I can just increment it and it'll be gucci? like the data will be saved?

sinful jolt
#

Ya they hold on to for a lil bit

#

Free accounts 24hrs Worth I think

karmic parcel
#

So I don't need to actually keep count in my server?

sinful jolt
#

nahh

karmic parcel
#

okeee, gud

sinful jolt
#

Unless you want it for history or some s***

#

Pass the 24hrs that is

#

Or whatever time frame

karmic parcel
#

naw, I may just check it on occasion to see how heavily it's getting used

sinful jolt
#

Same

#

I just use it for the Command heatmap tbh

karmic parcel
#

you ever figure out that webhook from datadog?

sinful jolt
#

I didn't

#

Haven't had a chance to touch it

karmic parcel
#

I can't think of something I'd use a webhook for from datadog

sinful jolt
#

Going to use it for event/alarms ie when a core is stuck at 100% for 5 mins

karmic parcel
#

oiii, naisu

vivid silo
#

How can I make my bot send a random picture ?

tawny lava
#

from an api?

#

what lib / language

vivid silo
#

node.js

tawny lava
#

what's the api

sinful jolt
#

somelistofurls.random()

foggy tangle
#

should i post al of my code here or only the part that needs work

#

or just a link to a github page

karmic parcel
#

Start with the part that there is an issue with

earnest phoenix
#

or GitHub link works fine too

foggy tangle
#

Right now the code works but a carton portion does not work the way I want it to work. The part the doesn't work is changing a voice channels name by typing in !party name (text).

#

It will change the name but it will not get ride of the previous name that was set

#

I want to have

Party 1 (text) but instead it does party 1 text text

earnest phoenix
#

lol

#

fixed

fiery goblet
#

@karmic parcel GitHub with Dicksword?

karmic parcel
#

Discord already supports it, so you don't need me as a middle man for that bby

earnest phoenix
fiery goblet
#

u pin odd things

earnest phoenix
#

thats dev related

fiery goblet
#

ik

#

but why bots shouldn't use ! as its prefix isn't

bitter sundial
#

no moose no

#

mod not psa

#

ffs

earnest phoenix
#

lmao

#

What's wrong with random pins?

#

not like anyone reads them ๐Ÿ‘€

umbral pelican
#

maybe they would be read if weren't all random HYPERTHONK

opaque bison
#

DiscordAPIError: Unknown Message

#

that is spammed all over my logs

#

and that's when my VPS overloaded and started responding super slowly

tawny lava
#

are you trying to edit a deleted message?

#

I'm guessing fetching a message and doing stuff without when it doesn't exist does the same thing

earnest phoenix
#

@opaque bison you're trying to manipulate a message, but your message cache is too low or disable

#

d

opaque bison
#

I don't have any command that does that

sinful jolt
#

You could also be trying to delete/edit/get a message that no longer exists

opaque bison
#

There is really no command which does that in a loop

#

If the promise returns an error, It'll just stop

neat flower
#

that means you are not handling the promise rejection

earnest phoenix
#

i have recently install node-opus and when ever i try to use the play command i get this error (node:7720) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: spawn EACCES i have tried running the bot as sudo and still same error, would anyone be able to help me out?

karmic parcel
#

in what context are you using it?

#

play command of what?

earnest phoenix
#

@karmic parcel whenever he tries to connect to voice channel

#

that's the error

karmic parcel
#

what lib?

earnest phoenix
#

prob d.js, it uses node-opus @karmic parcel

weary shoal
#

@karmic parcel I found a new webhook to add to dicksword

karmic parcel
#

gib

weary shoal
karmic parcel
#

signing up for it now to test, when I signed in with Google it said that there was an error and couldn't sign into Twitter drakelel

karmic parcel
#

is that all they fucking have for webhook documentation? lmao

#

@weary shoal are you actively doing stuff that would make the webhook go off?

#

if you are, lemme make an endpoint and see what the webhook payloads look like

weary shoal
#

Sure, all you have to do is commit to a repo and wait for it to check the commit, I think I'm done tho but send me the endpoint

karmic parcel
#

okee, lemme add it quick

#

Have you used any of the others?

#

I guess I can update the site too

#

it's on the site to gen the link

#

it's just /codacy at the end of the dickswordapp replacing discordapp

weary shoal
karmic parcel
#

OwO

earnest phoenix
#

So i do the command %play <youtube url> and it connects fine but it errors when trying to play the song

fiery goblet
#

sudo?

#

admin perms

earnest phoenix
#

ive tried using sudo

fiery goblet
#

try dabbing on it?

karmic parcel
#

@tawny lava those commits

tawny lava
#

lol

#

y u track my commits? :/

#

don't expose me like that

karmic parcel
#

I'm like figuring out the codacy stuff, and I'm just getting messages from all the payloads sent

#

cuz I'm trying to see what the payload looks like for codacy

tawny lava
#

hmm

karmic parcel
#

I'm not keeping them, I'm just looking at the codacy payloads and then I saw that there were commits by lizard lol

#

I don't read them

#

I was just looking for Codacy stuff

#

๐Ÿ˜ญ

tawny lava
#

mhm

#

that's what they all say :|

#

my eslint went down for some reason so I missed alot of stuff ULTRALUL

earnest phoenix
#

and i have a question can somewane make a bot wen a player joins a voice channel that he say user join your channel and user leavt your channel
like teamspeak

karmic parcel
#

it's up

#

I'm gonna update the docs real quick, then test it with my codacy project

#

it's p wew

#

wew

#

weeeeew

weary shoal
#

Weeeeew

karmic parcel
#

dood, my magic to do that was wew

#
let link = this.body.attachments[0].title_link;
let slimmedTitle = this.body.text.replace(link, '');
let commit = slimmedTitle.match(/<\|[0-9a-z]+>/g)[0].replace(/[<>|]/g, '');
let markdownCommit = `[${commit}](${link})`;
let title = slimmedTitle.replace(/<\|[0-9a-z]+>/g, markdownCommit);
tawny lava
#

Beautiful coding

karmic parcel
#

that's just for the codacity title

vital lark
#
let markdownCommit = `โฏ [${commit}](${link})`;``` is better
karmic parcel
#

what are you even saying rn

#

it's fine

#

lol

#

that was just for the git commit hash masked link

earnest phoenix
#

He likes that symbol :3

karmic parcel
#

lol

vital lark
#

its a unicode symbol

sinful jolt
karmic parcel
#

Is it out yet tho?

sinful jolt
#

Idk

karmic parcel
#

I don't think it is yet Sadgery

opaque bison
#

Hey guys, if it's okay with you guys, can you tell me how you do your Level Ups (XP) system? I figured out giving away XPs but now I need to do Level Ups, I can't think of a good way of doing it though.

bitter sundial
#

level up messages are annoying

#

keep that in mind haha

opaque bison
#

Well it's about development so

#

The traditional if else statements doesn't seem right for this.

sacred knoll
#

What do you mean by that MiniThonk ?

bitter sundial
#

that's right

opaque bison
#

Ohh I see

sacred knoll
umbral pelican
surreal peak
#

@opaque bison use fooking switch

#

or an exponential amount of xp per level

fiery goblet
#

@opaque bison heard of anidiotsguide?

opaque bison
#

Switch or if and else, it's gonna do the same god damn thing lol, I was giving an example @surreal peak

inner jewel
#

some langs switch is faster

opaque bison
#

Yes but I never bothered to read everything in it @fiery goblet, Only read it when I was starting out and then I learnt how to read docs xD

earnest phoenix
#

and i have a question can somewane make a bot wen a player joins a voice channel that he say user join your channel and user leavt your channel
like teamspeak

#

i realy need that

earnest phoenix
#

Aren't the user joins & user leaves sounds enough?

vital lark
#

no

#

bad

idle mountain
#

tatsumaki can do that iirc

#

just set it up to log voice chat leaves/joins to a certain text channel

earnest phoenix
#

thats not what he wants

copper heath
#

@earnest phoenix Can easily be made.

#

You'd need the audio files and the bot to be in that voice channel.

earnest phoenix
#

Can u make that ? @copper heath

copper heath
#

@earnest phoenix Yeah,

earnest phoenix
#

Nice

#

Hiw long does it take

#

I have 6 servers for the bot xD

idle mountain
#

oh whoops, misunderstood your question sorry D:

earnest phoenix
#

@copper heath ? Can u make it for me? (Not only me)

copper heath
#

Okay.

sacred knoll
vital lark
#

lol

humble bolt
#

.

earnest phoenix
#

!!!play louis louis