#development

1 messages · Page 458 of 1

bitter sundial
simple bramble
#

i mean like restart the bot's application using commands

quartz kindle
#

idk about .net

#

but usually for restarting, people have an external service/script that restarts it automatically if it stops working, so people just make an quit command

#

for example in nodejs i would do process.exit() and let my external script restart it automatically

#

but if you use this method, you cant shut it down permanently unless you stop the external script before

uncut slate
#

you can also have your external script check for the exit code

quartz kindle
#

oh yeah, i didnt think about that

neon swift
#

Using something like systemd is recommended. Everything else has side-effects like memory leaks or running out of requests to discord. Just my 2c

inner jewel
#

systemd/whatever comes with your system is generally the best approach

quartz kindle
#

i just use a while do loop lol

neon swift
#

Which gives you no control over it

#

and can easily call discord 100x a second and get you ratelimited

quartz kindle
#

nah it loops on a 5s timer

#

and if the process crashes in a way that it cant start, it never reaches the login phase

tulip snow
#

Does anyone know how to find the coordinates for a image?

@ me

static lynx
viscid falcon
#

How do you create the timer for something like a temp mute/ban command

#

In discord.js

grizzled isle
#

get the time into milliseconds, add it to the current date, set a timeout with that time, then remove the ban/mute role if the date in milliseconds is equal to the one with the time added.

viscid falcon
#

Set a timeout?

sick cloud
#

no, don't use setTimeouts

#

1, if you have lots of users temp muted at a time, thats a tonne of memory usage
and 2, if the bot dies or crashes or has to reload, they aren't muted anymore since those timeouts are gone

viscid falcon
#

So how do I use it?

#

Or what do I use

sick cloud
#

honestly what i do is make a new date, add on the time in ms that their banned for, and have one setinterval that checks every few seconds to see if anyones mute has expired. then it peforms whatever needs to be done

quartz kindle
#

i highly doubt having a set interval is more performant than having timouts

#

the interval will be fired many times for no reason while the timeout will only be fired then its actually gonna do something

#

timeout memory usage should be next to nothing anyway

heady zinc
#

at a large scale an interval may be the best way, having thousands of timeouts doesn't sounds exactly right

quartz kindle
#

at large scale yes, probably at the hundreds of thousands mark

manic elk
#

help me my bot wont go online

sick cloud
#

how do you get the unicode emojis for 1⃣ 2⃣ and 3⃣?

#

i can't get them using the standard \:emoji: method

manic elk
#

please help me

#

i cant get approved

sick cloud
#

maybe posting your code and errors instead of blankly asking for help will help

zealous veldt
#

Google them @sick cloud

#

That's what I do for emoji

sick cloud
#

mkay

manic elk
#

wdym

#

hello

#

i really am struggling

sick cloud
#

read what i said

quartz kindle
#

do you have any code to show? @manic elk

manic elk
#

no its hidden

sick cloud
#

then we can't help

manic elk
#

well i have github

quartz kindle
#

what is your bot coded in? which language and library?

zealous veldt
#

What even is the issue?

manic elk
#

j.s

#

and my bot wont go online

quartz kindle
#

we cant help you if you dont show us your code

manic elk
#

also its not approved

quartz kindle
#

it will not get approved if it doesnt work

manic elk
quartz kindle
#

that doesnt look like javascript at all

#

did you actually make that or did you just copy it?

manic elk
#

made

#

i looked up some basic examples

#

but basically ,ade

quartz kindle
#

i dont use c# so i cant help you

#

but what happens if you try running it?

manic elk
#

if you join my support sever i can how you

quartz kindle
#

no thanks, i just wanna know what happens if you try running it

earnest phoenix
#

anyone here can help me out with eris?

manic elk
#

ya its says offliner

#

my friend can

#

@earnest phoenix

earnest phoenix
#

ok?

manic elk
#

ill contact him

#

@quartz kindle do you know wats wrong with it

inner jewel
#

@manic elk you need to learn the language before making a bot

#

you have botmodule.js but the code there is c#

#

two different languages

manic elk
#

i know it but thats not the problem the problem is it still says My Application and its offline

inner jewel
#

because you're not running any code

#

if you don't run any code your bot won't ever be online

quartz kindle
#

where does it say "my application"?

sullen path
#

more "how do I get bot online" drama?

manic elk
#

exAMPLE?

quartz kindle
#

look, im not sure what you're trying to do and i dont want to assume too much, but i believe you are missing some important points

#

a bot needs to run inside a program to work

#

you need to code a program, and execute it, and have it running 24/7 for the bot to work

manic elk
#

i have a program with code which is running

quartz kindle
#

is it running in your computer?

manic elk
#

ya

quartz kindle
#

does it login to discord?

manic elk
#

yes you can invite and it has token

quartz kindle
#

yes, but the token is just your bots login code

#

your bot has an "account"

#

but the program needs to "login" to that account

#

so in your code, you need to have a login function with your token

#

for your bot to work

manic elk
#

i do

quartz kindle
#

well its clearly not working, else your bot would be online

#

where is your login function?

sick cloud
#
(node:1169) UnhandledPromiseRejectionWarning: DiscordAPIError: Unknown Emoji
    at parseResponse.then.data (/home/tony/musicbot/node_modules/discord.js/src/rest/handlers/RequestHandler.js:110:15)

yeeeah, any help here?

knotty steeple
#

whats the code

sick cloud
#
await m.react('1️');
await m.react('2️');
await m.react('3️');
await m.react('❌');
#

also those aren't just numbers, those are the apparent unicode emojis

knotty steeple
#

you can do :one: instead

sick cloud
#

didn't think i could?

#

i thought m.react only accepted unicode

knotty steeple
#

yes but that also works

#

not for custom ones tho

sick cloud
#

ohk

quartz kindle
#

await m.react('1️⃣');

#

thats the right unicode

heady zinc
#

^

neon swift
#

use \u please

final remnant
#

Does anyone here use glitch to host thier bot?

sick cloud
#

I tried, it works ok for very small basic bots i guess

final remnant
#

mine is pretty basic especially since i'm not really in a place to pay for a better hosting solution, but can you add json files to glitch for like custom prefixes, because I can't find anything on the internet about it

sick cloud
#

you can, glitch doesn't have any restrictions

#

but honestly, don't use json

final remnant
#

what should i do?

#

I'm new to the whole bot development thing, like I have a good bot and it's growing fast but I want to give more

sick cloud
#

just use a database or sqlite even, dunno

#

json is easily corruptible

inner jewel
#

"a database or sqlite" sqlite is a database

sick cloud
#

oh yeah true

final remnant
#

do you have any documents I could use to learn about that?

sick cloud
#

google it?

inner jewel
#

sqlite is a good choice for beginners

#

if you want more of a k/v storage without a set schema and your dataset is small maybe redis

final remnant
#

Okay thank you

#

I'll look into it

knotty steeple
#

you can use redis on glitch?

inner jewel
#

unless they block child processes you can

earnest phoenix
#

if you use redis as a persistent database you might want to look into configuration for data failures

serene plover
#

Hello, Anyone got any suggestions on what API I should use for image manipulation?

manic elk
#

(hi)

serene plover
#

Hey

south finch
#

dont speak in here in general context @manic elk you can to go #general for that

sick cloud
#

@serene plover what language?

hardy fiber
#

what emoji are you trying to use?

serene plover
#

@sick cloud JS

sick cloud
#

The best is canvas-constructor imo, but there's also traditional node-canvas and JIMP I believe. Canvas-constructor is the best though tbh, it's quite literally new Canvas(width, height).addImage(img, x, y, x, y).addText('Hi world', x, y) and so on.

#

Like an embed builder. 👀

heady zinc
#

though you still need node-canvas for canvas-constructor

restive silo
static lynx
#

oh cool jw

#

i do too

sick cloud
#

@restive silo where's this API located?

#

(╯°□°)╯︵ ┻━┻

heady zinc
#

oh do you yuki, nice i have a few questions about it

restive silo
#

how comes you ask me about that, guess you know my bot?

#

ask away paradox

heady zinc
#

i've heard kitsu's API tends to change often, is it true ZoomEyes

static lynx
#

because i was trying to use my bot and we share the same prefix lol

restive silo
#

@heady zinc i wrote the code like 7 months ago and since then it works fine

#

👀

heady zinc
#

sweet, thanks nekoheartanimated

restive silo
sick cloud
#

.-.

heady zinc
sick cloud
#

oh cool, thx

static lynx
#

The API is nice, but still working on ittt

sour perch
#

hey, im having the strangest problem, some of my commands stopped working. i had all the commands working, then i tried to make custom prefix work, but i didnt manage to work it out so i removed all the code to reset it, and now some of the commands stopped working with no error, its like the files isnt even run in the first place... im using discord.js

#

would love to know whats going on

neon swift
#

next time mention the lib first, not last

sour perch
#

ok, thanks

sick cloud
#

you've probably buggered up your command handler or something

#

try reverting the changes and seeing if that fixes it, then adding the code in one-by-one bits

#

see what causes it

sour perch
#

ok, i will, thanks

viscid falcon
#

How would I create a role on join and set the perms, ik it's on serverCreate, but I've had trouble with the role creation/editing

sour perch
#

@viscid falcon https://anidiotsguide_old.gitbooks.io/discord-js-bot-guide/content/information/understanding-roles.html this might help you

viscid falcon
#

Thank you

sour perch
#

np

kindred sequoia
#

:woah:

old swallow
#

Would a spank action command be considered NSFW?

restive silo
#

most likely

#

👀

sick cloud
#

if its from nekos.life, yes defs

old swallow
#

Alright, thanks 👀

knotty steeple
#

the api has sfw stuff

old swallow
#

guess that's one more one for the NSFW bin

restive silo
#

@knotty steeple even some of the sfw stuff is kinda nsfw

knotty steeple
restive silo
#

i prefer the nekos from wolkes api

#

they are 100% sfw afraik

heady zinc
#

even though most of them are from nekos.life

restive silo
#

yea but only the sfw one's iirc

heady zinc
#

yeah i've only seen nsfw ones with the nsfw filter to true

sick cloud
#

I like setting nsfw to "yesyesomgplsssss" or true

heady zinc
#

and then wolke publicly shames you because you make bad requests

restive silo
#

what

heady zinc
#

no he doesn't say who does the requests but he happen to leak bad requests in the server meguEyes

restive silo
#

well i never got a 400 response and my wrapper was written vetting the docs

#

so i should be fine

#

👀

supple plaza
#

Hey I'm using glitch and I can do the basic: reply commands getting it online but could somone dm me about other commands and the playing (Message) code I would love some help

Thanks

knotty steeple
#

no one is going to give you code

viscid falcon
#

this is for discord.js

#

idk what library u using

supple plaza
#

Glitch

viscid falcon
#

oh ive never heard of that sorry

knotty steeple
#

glitch isnt a library

#

what library do you use to interact with the discord api

supple plaza
#

discord.js

viscid falcon
#

🤦

#

use that link i gave u

knotty steeple
supple plaza
#

Thanks guys

knotty steeple
#

np

#

but if you need to look at anything else, check the docs https://discord.js.org

cobalt breach
#

yes i need help getting MEE6 on my server

#

every time i add him he leaves shortly after

ruby dust
#

Maybe something's kicking it off the server, check audit logs

cobalt breach
#

thanks

#

wait wut do i need to do

#

ik how to get to audit logs

#

but does it have to me on or off

ruby dust
#

Basically check the recent logs if mee6 was kicked by someone or not

cobalt breach
#

how?

#

nvm

#

i found out

#

but nothing says any1 kciked mee6

warm prairie
#

hmmm

cobalt breach
#

i added him and he left

warm prairie
#

lol

restive silo
#

could be that your guild is blacklisted for some reason

ruby dust
#

Either discord is fucking up, or it's leaving for a reason, for example your server was blacklisted from using that bot

restive silo
#

would recommend you asking on the support server of mee6

cobalt breach
#

blacklistinh>

#

wtf us blacklisting

#

i just want bots on my server

ruby dust
#

Ask in their support server then

restive silo
#

bot owners can blacklist servers when people abuse commands/spam them with user/selfbots

cobalt breach
#

ok

sick cloud
#

note to self: add blacklist feature

warm prairie
#

same 😆

earnest phoenix
#

@restive silo how exactly?

restive silo
#

how what

south finch
#

@restive silo yes

warm prairie
#

if blacklisted, leave guild, else say hello

restive silo
#

^

sick cloud
#
// on join guild
if (blacklistedGuilds.has(guild.id) return guild.leave();
restive silo
#

something like that

#

i have blacklisting for users & guilds

warm prairie
#

except for me its going into my database schema

serene plover
#

Interesting

restive silo
#

yea i also made it persistent with my db

serene plover
#

Hmm

#

Interesting

restive silo
serene plover
#

💭

worldly sigil
#

would it be redundant to make a bot that allows you to subscribe to certain users and be notified whenever they play a game that you have in common

serene plover
#

It's not redundant if it has a purpose.

warm prairie
#

🤔

worldly sigil
#

i guess you're right

#

but what im scared of is that nobody will use it

quartz kindle
#

nobody makes a bot to get users

#

if you code with that mindset you're bound to give up from not meeting your own expectations

#

code for your own challenge instead, for your own gratification that you made something awesome

timber jackal
#

wise words

serene plover
#

I like Tim. Be like Tim.

sick cloud
#

yes lets all be like @quartz kindle. good words <3

static lynx
#

hi does anyone need any LeftArrow or RightArrow emojis lol i made them for @mystic bison

sick cloud
#

⬅ ➡

#

.-.

wild plover
#

@neon schooner How do I become a Developer?

neon schooner
#

You make a bot

wild plover
#

aright

zealous veldt
#

that exchange was 👌

wicked gate
#

!play

#

!play boom

#

lol

#

!play boom

earnest phoenix
#

this idiot spamming bot in voice channels @neon schooner ^

wicked gate
#

!stop

#

!sop

#

!stop

sour perch
#

im using d.js, i have a problem with some of my commands not working, all of the commands worked, then i tried to add custom prefix, but didnt manage to so i reverted all the changes. then just the old commands worked, so the new files doesent work although i reverted everything back to when they did.

sick cloud
#

@sour perch already dealt with, theres no need to try and mini-mod

sour perch
#

though i would tell him :/

earnest phoenix
#

whats the method for createrole on master

sick cloud
#

guild.roles.create

earnest phoenix
#

kk

bright spear
#

everything got more organized so just try stuff like that

#

like addrole -> roles.add

earnest phoenix
#

yeah, was looking at docs and found nothing lol

slender thistle
bitter sundial
#

.atag::after

slender thistle
#

No hover needed?

#

Or would that kinda break it in some way?

bitter sundial
#

hover and no hover hare different

slender thistle
#

Aight

earnest phoenix
#

how do you install discordjs master, on my mac its installed but when i go to my vm its not

quartz kindle
#

you have to install it in there too, the same way you installed it on your mac

earnest phoenix
#

yeah i have no clue how i did that

#

lol

#

i totally forget

#

whats the thing to install it

#

thats my question

quartz kindle
#

it should be npm install hydrabolt/discord.js

earnest phoenix
#

kk

#

thanks

earnest phoenix
#

These are fields in an embed. I can't get map() to not add a newline after each iteration of the array of commands

#

make sure your embed fields are inline. i dont think inline fields are supported on mobile though

#

nope, they aren't supported on mobile

sour perch
#

how do i foolproof my bot in d.js? i want to save one of the arguments in a command, but i want this argument to be relevantfor what im using it for so how do i make sure they dont type some bullshit?

austere meadow
#

what do you define as "bullshit"

#

you want the argument to be something that you're expecting (ie. a number) and nothing else is allowed?

quartz kindle
#

use regex to detect characters you dont want to allow, check length if you need a specific length, or build an array of possible options if you only want to allow specific arguments

sour perch
#

yea

desert bough
#

could someone help try to explain to me how to use the discord web api ive tried researching but dont really understand

hushed berry
#

@misty pawn lets move here

misty pawn
#

ok

merry sierra
#

How does one create a bot on mobile?

misty pawn
#

uhm.... Not really possible I guess @merry sierra
Could be wrong tho

hot eagle
loud salmon
#

there are some crappy discord bot creator apps iirc

#

im not sure how good they are

hot eagle
#

you can conceivably develop any python project from anywhere on there

#

and you can even host the bot

knotty steeple
#

who says he wants his bot to be python

loud salmon
#

ascended bot hosting

hot eagle
#

its an option is all im saying

#

you could do it on a digital ocean droplet in a different language if you wanted

#

but it would be more difficult

misty pawn
#

@hushed berry Still there?

hushed berry
#

yeah im just writing up a small demo

misty pawn
#

ah ok

hushed berry
#
        post("/webhook", (req, res) -> {
            var body = req.body();
            var json = new JSONObject(body);

            var botId = json.getString("bot"); // the bot's id
            var userId = json.getString("user"); // the voter's id
            var type = json.getString("type"); // the type of vote ("upvote" or "test")
            var weekend = json.getBoolean("weekend"); // bool on whether its the weekend
            var query = json.optString("query"); // the querystring params that were on the user's vote page

            // do something with those values here

            return null;
        });```
#

@misty pawn

#

This is just a little demo of receiving it, parsing the value, and putting it into variables

#

If you want, you can even use Gson to parse it

#

I've included a Vote object in DBL that you can use

#
        var gson = new Gson();
        post("/webhook", (req, res) -> {
            var vote = gson.fromJson(req.body(), Vote.class);

            // do something with the vote object here

            return null;
        });
#

heres that

knotty steeple
#

Gson?

hushed berry
#

Google's json parser

knotty steeple
#

oh

misty pawn
#

That looks like js for me...

#

With all those "var"

hushed berry
#

its java

#
import com.google.gson.Gson;
import org.discordbots.api.client.entity.Vote;

import static spark.Spark.post;

public class Test {

    public static void main(String[] args) throws Exception {

        var gson = new Gson();
        post("/webhook", (req, res) -> {
            var vote = gson.fromJson(req.body(), Vote.class);

            // do something with the vote object here

            return null;
        });


    }

}
#

lmao

#

Here, this will work with <j10

#
        Gson gson = new Gson();
        post("/webhook", (req, res) -> {
            Vote vote = gson.fromJson(req.body(), Vote.class);

            // do something with the vote object here

            return null;
        });```
misty pawn
#

oc you use java 10 🙄

hushed berry
#

whats wrong with java 10 hahah

#

its required for my bot to work hahaha

#

pre java 10 sucks for running jvms in container

misty pawn
#

Do I have to take care of anything else? Like special settings on my VPS, certain DNS-settings, ...?

hushed berry
#

Not really

#

as long as Spark's default port is open

#

4567

#

So that means that would be available at [vps ip]:4567/webhook

#

and thats what youd put into dbl

gaunt blade
#

How do i host bot on mobile? Like lua?

hushed berry
#

like your phone...?

topaz fjord
#
  1. you dont
gaunt blade
#

Ye

hushed berry
#

please dont

gaunt blade
#

wh

#

Why?*

#

How do i assign ranks to myself or get?

#

why shouldn't i? @hushed berry

topaz fjord
#

what ranks

loud salmon
#

probably that cool looking green one

topaz fjord
#

there 2 mmLol

gaunt blade
#

How do i get the ranks?

#

I am bot developer for my bot..

loud salmon
#

knew it

gaunt blade
#

How do i get like age rank etc?

#

Im 13

topaz fjord
#

age rank is a meme

gaunt blade
#

Really?

loud salmon
knotty steeple
#

wrong channel also

earnest phoenix
#

ye

topaz fjord
#

bot developer you need to add a bot to the website

#

and it needs to get approved

gaunt blade
#

oh k :)

#

Imma do it within next week xD

topaz fjord
#

ok

earnest phoenix
#

muy bien!

quartz kindle
#

hosting a bot on a phone?

#

is that even possible? lmao

#

apparently you can install termux, or some terminal emulator for android

#

and install node in there

topaz fjord
#

i use termux

#

but for a diff thing

quartz kindle
#

how interesting would it be to host a bot on a phone somewhere in your house

#

instead of an old pc

#

Lol

earnest phoenix
#

ye. i have an old phone that i could probably use if the battery would work, so i might try it

gaunt blade
#

i wanna host my bot on Phone & with the library discordia.

earnest phoenix
#

that would suck eggs dude, you should pay for a reliable VPS

quartz kindle
#

a lua lib?

#

can that even run on a phone?

earnest phoenix
#

ye

#

lua can run on just about anything

quartz kindle
#

discordia runs on luvit

#

can luvit run on a phone?

earnest phoenix
#

idek

#

never heard of it

#

never tried it either

#

but most languages can run on android's vm

#

so it could be possible

#

and for pete's sake, linux is getting its first mobile OS soon as well

quartz kindle
#

finally, about time

earnest phoenix
#

ikr it totally deserves it

quartz kindle
#

but yeah, a rooted android could probably find a way to run it, but idk about stock

earnest phoenix
#

ye, it would def. require root access.

topaz fjord
#

stock wouldnt be able too

earnest phoenix
#

no other way, and most people don't know how to handle a rooted device

topaz fjord
#

it would need access to the internal files

earnest phoenix
#

that is why it would need root

topaz fjord
#

stock android only lets you go so far with a terminal

earnest phoenix
#

ik it sucks ass

topaz fjord
#

i should probs test installing node on my nexus

earnest phoenix
#

i rooted my phone long ago, and every time i get a new one i instantly root it

topaz fjord
#

its rooted and useless

inner jewel
#

just compile luvit for arm

quartz kindle
#

can jailbroken ios do the same kind of things as rooted android?

inner jewel
#

and then it can run on android

#

¯_(ツ)_/¯

quartz kindle
#

like run terminal

topaz fjord
#

i dont think so

earnest phoenix
#

no, i dont think it can

quartz kindle
#

rip

earnest phoenix
#

sorry, mate.

quartz kindle
#

i dont have any iphone lol, just asking

earnest phoenix
#

ios is just too restricted

topaz fjord
#

for some reason i want a mac

earnest phoenix
#

no.

topaz fjord
#

for the externals

#

not the internals

earnest phoenix
#

no macs

topaz fjord
#

the shell looks sexy as fuck tho

earnest phoenix
#

both externals and internals of a mac suck ass

quartz kindle
#

make a dedicated hackintosh build

topaz fjord
#

nah

earnest phoenix
#

ye

quartz kindle
#

with mac compatible parts

topaz fjord
#

i turned my hp into a hackintosh

earnest phoenix
#

yes....................

quartz kindle
#

the problem with hackintosh is that most commercial machines will have at least 2+ incompatible parts with no drivers for osx

#

i tried it on my old asus laptop, no wifi

topaz fjord
#

mainly the wifi card

quartz kindle
#

yup

earnest phoenix
#

ye lol

topaz fjord
#

and on my hp i cant boot without injected kext

quartz kindle
#

so instead of a hackintosh i just stuck with a mac vm in vmware

#

works nicely

topaz fjord
#

because of all the graphical glitches

#

i built my bootable usb within my macos vm

#

since i needed a mac to do it

quartz kindle
#

yeah same

#

i need it for osx installs

earnest phoenix
#

i usually install a cellular card in my laptop when i get a new one. so i dont have to use wifi, and it comes right off my phone plan

topaz fjord
#

the thing is

#

mac is really picky with wifi cards

#

your best best is to buy a mac wifi card

earnest phoenix
#

yuck

topaz fjord
#

from ebay

quartz kindle
#

yeah, they only make drivers for the specific chips they work with on their machines

earnest phoenix
#

again, yuck

quartz kindle
#

they dont make drivers for everything and their mom like windows does

topaz fjord
earnest phoenix
#

yea thats why i still run win7 sometimes

topaz fjord
#

take a card that came out of a mac

#

but they are expensive

hot eagle
#

there was a deal for a 25 dollar raspberry pi 3 the other day

#

it might still be going on

misty pawn
#

@hushed berry Is there another way to get the amount of votes for the bot?
The one on the API-page is deprecated but I want to show, how many voted so far....

hushed berry
#

get the bot object ^^

misty pawn
#

uhhhhhhhh

hushed berry
#

should be like

#

.getBot(botId) -> whatever

#

lmao

misty pawn
#

Probably another Java 10 thing, since mine returns a error

#

I'll check github for some info

#

hmmmm... Looks like there's only a check for a single user...

#

That's the reason I hate API-changes

#

breaks stuff and makes other complicated

inner jewel
#

what

#

what relation does j10 even have with a method in a library

misty pawn
#

idk.

#

I just wanted to get the votes, but since the API changed....

gaunt blade
#

how? Do i host bot on phone with discordia?

topaz fjord
#

i thought we told you not too? Hosting on a phone is slow

gaunt blade
#

no, my phone is good

#

/ what about tablet?

#

My phone has 4gb ram

topaz fjord
#

any mobile device wasnt made for hosting a bot

gaunt blade
#

I want? How?

#

Plz?

#

spoonfeed XD theres a spoonfeed emoji

topaz fjord
#

why not just host on a vps

gaunt blade
#

? how?

#

I wanna host free

heady zinc
#

you don't host free

#

that's not how the world works

topaz fjord
#

good hosts are never free

hot eagle
#

^^

gaunt blade
#

Not true

topaz fjord
#

yes true

heady zinc
#

yes veri true

gaunt blade
#

My friend offers me free hosting

#

24/7

topaz fjord
#

does he pay for the server

heady zinc
#

then why do you want to host on a fken phone if you have friends who pay for you

#

wtf

gaunt blade
#

he homehosts 24/7 with strong pc

topaz fjord
#

he probs pays for a server and lets you host on it

#

he paid for the pc

#

therefore

#

not free

hot eagle
#

^^^

gaunt blade
#

He owns the bot GameManager

#

Its a #1 trending bot..

hot eagle
#

i feel like this is getting into shitpost territory

heady zinc
#

then keep your shit hosted on his shit

gaunt blade
#

?

heady zinc
#

and don't try a fucking phone

#

kthxbai

topaz fjord
#

@heady zinc calm down pawadowo

gaunt blade
#

I wanna try phone? Plz?

topaz fjord
#

let me tell you

#

if you host on a phone

restive silo
#

GameManager is not even here OMEGALUL

topaz fjord
#

is will run shitter than hosting on his pc

#

@restive silo it is dummy

#

@kind orbit

gaunt blade
#

Yea

restive silo
#

but i recommend you to not host on a phone it has a lot of disadvantages

topaz fjord
#

^

gaunt blade
#

i just wanna try & see

restive silo
#

memory is small, cpu is bad, uses a lot of resources

gaunt blade
#

With the lib discordia

restive silo
#

will heat the phone up

topaz fjord
#

also if your phone dies, the bot dies

restive silo
#

phone needs to be online all the time

gaunt blade
#

i just wanna test :) ?

restive silo
#

then test

gaunt blade
#

how?

#

Idk how..

topaz fjord
hot eagle
#

running web apps on phones is a gimmick thing like running doom on a toaster

gaunt blade
#

XD

hot eagle
#

if you don't know how to do it then you should probably start somewhere else

topaz fjord
#

did you even try to google how to host on a phone

restive silo
#

here you fo

gaunt blade
#

I have

topaz fjord
#

@restive silo they're using lua u dum

restive silo
#

oh

gaunt blade
#

I did not find a one that works with lua/discordia

restive silo
#

can you even run lua on android Thonk

gaunt blade
#

yea

#

i think Thonk

topaz fjord
#

compile lua for arm

gaunt blade
#

?

#

how?

#

Is there no app? Or..

#
  • i have files backuped ofc
#

Ummm Guys?

#

😢

restive silo
#

there is no app afraik

#

we can't really help you there buddy,

simple bramble
#

does the manage_channels permission mean that users can manage channel permissions?

gaunt blade
#

yea

restive silo
#

your only chance is to use google and find it out yourself

gaunt blade
#

i tried

#

Found= No way..

restive silo
#

dont think that anyone tried hosting lua on a phone before

#

well then its not possible or smth shrug

gaunt blade
#

btw Jonnygaming Tv#4235 is my friend

topaz fjord
#

i feel like there's no one who in their right mind who would host a lua application on android

gaunt blade
#

ok then, i need help with a annouce command for my bot

#

Like i use !annouce <text>

#

It does annouce in all guilds it is in

simple bramble
#

if you mean announce something to all the servers the bot is on, then that's not good

#

especially if anyone can use it

gaunt blade
#

No only bot-owner

loud salmon
#

yea.. mass messages would not be good

gaunt blade
#

*me

simple bramble
#

even if its locked owner only then thats still api abuse

loud salmon
#

i personally use the game as announcements

gaunt blade
#

no..

#

like i say vote for bot with link once month?

topaz fjord
#

even if the command is locked to the bot owner, its api abuse to send the announcement to all guilds

simple bramble
#

^

gaunt blade
#

😢

loud salmon
#

if you globally anounce to vote for your bot, lots of people will kick it

simple bramble
#

yes

topaz fjord
#

best bet is to create a support server

simple bramble
#

that's just playing dumb

topaz fjord
#

and mention it their

gaunt blade
#

ok, then join message?

loud salmon
#

join messages are iffy

gaunt blade
#

Like people invite the bot & it says something like the Rythm bot

ruby dust
#

why do you even want to promote yourself in such a way? just don't do that at all?

simple bramble
#

thats basically what i do

viscid falcon
#

What if you could have it so you could opt in and out of announcements

simple bramble
#

and i think join/leaving messages are ok

#

still no

#

cause then it'd send the message to all the opt in, which is still api abuse\

gaunt blade
#

like the bot joins a server and says vote for bot (once) & do !help for commands etc

simple bramble
#

no

ruby dust
#

but why

gaunt blade
#

Like that rythm bot

#

That bot has..

simple bramble
#

the bot wont just join the server and say pls vote for me on dbl here

ruby dust
#

rythm only does that on joining guild, not once a month to everyone

gaunt blade
#

not here

simple bramble
#

pengubot does that sometimes as well

gaunt blade
#

yea once joining only

#

pls?

#

in lua? I can't figure it out

#

It gets error when i test

#

Guys?

#

Plz?

simple bramble
#

once joining is ok

#

just as long as it doesn't beg for upvotes etc

ruby dust
#

it is still kinda begging

#

you are asking for upvotes before even letting the users decide wether they like using it or not, which would be the reason why they would upvote it in the first place

simple bramble
#

if it joins and says somethign like "my prefix is ! and type !help for my help list" that would be ok

ruby dust
#

but rythm has a built-in logic where to post that message on join, it doesn't just post it in the first or random available channel

gaunt blade
#

I want like rythm

#

:)

#

Plz :D

ruby dust
#

you have no creativity if you just want to copy other bots

gaunt blade
#

😢

#

Guys

#

?

#

Pls

#

😢

loud salmon
#

pls what

gaunt blade
#

i want to make a welcome message like rythm

#

:'(

#

My bot is coded in lua btw

ruby dust
#

then do it, why are you plsing?

loud salmon
#

we wont spoon feed you code

gaunt blade
#

idk how to....

#

😭

ruby dust
#

I'm not being rude here, but since you don't know how to do something to the point when you are just asking for free codes, I doubt you even have a decent bot that is worth such hassle of begging every server for upvotes in your mentioned way

earnest phoenix
#

Would anyone consider making a samejima mamimi bot?

ruby dust
#

bots listed here are made by devs that want to make them, not because they are being asked to make

gaunt blade
#

I found out it is= channel:join() but hmm im still confused

misty pawn
#

@hushed berry The thing you recommendet to me doesn't work 😦

hushed berry
#

how so

earnest phoenix
#

@gaunt blade go to your libs docs

#

and learn to read

misty pawn
#

idk.
I used the second code you showed me and added my stuff to it, but it doesn't work....

hushed berry
#

Did you set it up in dbl correctly?

misty pawn
#

I set it to [domain]:4567/vote and also tried with IP

gaunt blade
#

i wanna be= spoonfeed XD jk

#

Lol funny emoji

earnest phoenix
#

@ruby dust Okay don't lecture me because I politely asked... -.-

ruby dust
#

I was just saying the reason right away, just so there won't be any more questions like "why" or something

gaunt blade
#

ok i wanna make channel:join() pls?

#

Like that rythm message

#

XD

#

pls?

ruby dust
#

stop

earnest phoenix
#

@ruby dust -_- I'm not going any further into this with you.

ruby dust
#

what

#

ok... nice convo

gaunt blade
#

...

misty pawn
#

@hushed berry Nope... Tried different things...
Tried with IP, with domain, also added a sys-out to check if it reveives it at all... Nothing works...

hushed berry
#

Can I see your code?

#

@misty pawn

misty pawn
#

Ignore spaces


        Gson gsonVote = new Gson();
        post("/vote", (req, res) -> {
            //  for debugging...
            System.out.println("Vote received!");

            Vote vote = gsonVote.fromJson(req.body(), Vote.class);
            VoteUtil.voteAction(vote.getBotId(), vote.getUserId());
            return null;
        });
inner jewel
#

do you have cloudflare on the domain?

misty pawn
#

Not for SSH if you want to ask that

#

Only for DNS-stuff

hushed berry
#

@misty pawn You do run that spark code somewhere, right?

misty pawn
#

uhhhhhhhhh

#

ahhh

#

Missread it

#

Yeah

inner jewel
#

if you're behind cloudflare

#

you need to use one of their supported ports

misty pawn
#

I run it in the main[], where my bot starts

inner jewel
misty pawn
#

Where can I find those and what do I need to change in spark?

inner jewel
#

Spark.port(int)

misty pawn
#

Spark makes it through http?

#

or https?

inner jewel
#

unless you add the certificates to spark, http only

misty pawn
#

So first Spark.port(int) then the post?
Not that I mess something up

#

Doesn't work...

#

My bot stops...

#

And because of an issue, that idk, does it not print any error...

#

@inner jewel You know a way to find out, what ports are already in use?
I get a BindException with "adress already in use"

inner jewel
#

linux?

misty pawn
#

yes. ubuntu

#

16.04 iirc

#

Also ban case 8143 is just gold 👌

inner jewel
#

lsof -i :port

#

eg

#

lsof -i :80

misty pawn
#

Ahhhhh

#

RethinkDB uses the port I wanted 😂

#

That's why I had a feeling, that the port looked familiar

#

If there's no respond, does it mean, that the port is free @inner jewel ?

inner jewel
#

should be

misty pawn
#

wtf?!

#

For some reason does my bot now run with debug enabled....

earnest phoenix
#

(D.js master) msg.guild.roles.find throwing UnhandledPromiseRejectionWarning: TypeError: fn.bind is not a function

heady zinc
#

@earnest phoenix are you trying to do <roles>.find("name", "<name>") ?

earnest phoenix
#

if (!msg.guild.roles.find('name', 'Muted')) {

heady zinc
#

ye

earnest phoenix
#

ye

heady zinc
#

that's not a thing in v12

earnest phoenix
#

o i c

heady zinc
#

you have to pass a function

earnest phoenix
#

what it now

heady zinc
earnest phoenix
#

ah yeah

#

just searched it up

#

so this should work

#

!msg.guild.roles.find(role => role.name === 'Muted')

heady zinc
#

yes

earnest phoenix
#

kk

#

thanks

#

misty pawn
#

@inner jewel Still doesn't work...
I changed the port to a free one and as far as I can see does it set the port (bot doesn't stop)
But debugging shows, that bot still doesn't receive the vote

#

Are you sure it's post?

#

I also tried again with IP and domain....

inner jewel
#

check the logs

#

maybe an exception is being thrown

misty pawn
#

What log?

sour perch
#

how do i check if a variable is atleast one of several things?

quartz kindle
#

put them into an array and use indexof or includes()

uncut slate
#

if it's two (maybe three) things I'd just chain ||s, if it's more you could do either what tim said or use a switch statement with multiple cases

sour perch
#

thanks @quartz kindle

uncut slate
#

or if it's something like an ID that you don't want hardcoded, use an array

sour perch
#

its more than 3 and not an id, so ill try what tim suggested 😅

quartz kindle
#

also depends what you're gonna do with it

#

for example, if each possibility needs its own function, you need an if/switch instead

#

but if all possibilities use the same function, then array

sour perch
#

hm, an if/swich? could i get an example on that?

quartz kindle
#

like for example

#

you have argument1, argument2 and argument3

#

if each needs a different function

#

then ```if(arg1) { function1 };
if(arg2) {function2};
if(arg3) {function3};

//or switch
switch(arg)
case arg1:
function1;
break;
case arg2:
function2;
break;```

#

another thing you can do, although its a bit hacky, is to use eval and named functions

#

for example

#
possibilities = [arg1,arg2,arg3];
if(possibilities.indexOf(arg) > -1) { eval(arg+"()") }```
#

that would run a function with the same name as the argument if the argument exists in the list of possible arguments

#

i actually use this method in my bot

sour perch
#

what i want to do is basically i want to check if args2 is one of my options and if it is i want to save it to my storage.

#

oh, which bot?

quartz kindle
#

@oak sentinel

#

then yeah, you dont need functions

#

you just need an array

sour perch
#

oh, ok

quartz kindle
#
if(array.indexOf(arg) > -1) { save arg to storage }```
#

or instead of array.indexOf you can use array.includes()

#

i dont remember the includes syntax by memory, but you can just google it

#

also, if you need the argument to be case insensitive, use toUpperCase()

#

for example args = ["ARG1","ARG2","ARG3"]; if(args.indexOf(arg.toUpperCase()) > -1) { save arg }

sour perch
#

ok. but where do i like add options :/

quartz kindle
#

the args array

#

those are your options

sour perch
#

oh ic

quartz kindle
#

the function checks if the argument that the person used with the command exists in that array

#

and only continues if it does

sour perch
#

thanks a lot

#

and where do i select argument 2 then?

quartz kindle
#

what are you trying to do exactly? like type an example of the command you want people to run

#

and what it should do

sour perch
#

im making a settings command so -settings language english for example, and i want it to make sure that the second argument is one of my languages 😕

quartz kindle
#

so you have everything you need

sour perch
#

yes except that

quartz kindle
#
if(languages.indexOf(arg.toUpperCase()) > -1) { database language = arg }```
#

to get the arg you're looking for, you can use split

#

for example message.content.split(" ") // ["-settings","language","english"]

sour perch
#

hm, i split it into cmd(command) action(arg0) key(arg1) value(arg2) already

quartz kindle
#

alright, then the one you need should be arg2 already

sour perch
#

replace arg in your code with value?

quartz kindle
#

yeah

sour perch
#

thank you!

gaunt blade
#

@quiet bobcat, im really sorry for tag, but my Bot MysticGuard is gonna be online within 10 days :), im currently on vacation, Thank you, pls don't decline, dm me :) , wait untill the bot is online then decide, Thank You 😁 tickYes

zealous veldt
#

lol

topaz fjord
#

10 days

oblique sequoia
#

rip

quartz kindle
#

they wont do that lol

topaz fjord
#

👌

zealous veldt
#

you don't need to tell people lmfao

oblique sequoia
#

inb4 auto-decline

gaunt blade
#

Oh.. i don't?

#

?

quartz kindle
#

if the bot is only gonna be online in 10 days, then submit it in 10 days

gaunt blade
#

?

quartz kindle
#

bots will always be declined if they are offline

#

because its a public bot list, it only accepts bots that are ready for public usage

quasi marsh
#

If it's only gonna be online for 10 days don't even bother

gaunt blade
#

Oh.. It is, just im on vacation..

#

im back within 7 days

quartz kindle
#

then finish your vacation first

quasi marsh
#

There is no guarantee that we'll even get to it before it goes offline

quartz kindle
#

and apply again when you get back

gaunt blade
#

But bot will be in website, just private?

quasi marsh
#

No, we only accept bots that can be used by the public

gaunt blade
#

So i don't need to rewrite description etc

quasi marsh
#

Then save the text?

gaunt blade
#

... where?

quasi marsh
#

Notepad?

gaunt blade
#

Im on phone..

quartz kindle
#

phones have a notes app

#

save it there

gaunt blade
#

i did ty

#

xD

earnest phoenix
#

How do you get certified?

#

could anyone help me put the amount of servers where my bot is please?

quasi marsh
earnest phoenix
#

anyone can help me about a bot will send a message every 1 hours? i don't know what must i do

gilded blaze
#

Lang?

viscid falcon
#

If it's js I think setInterval would work

gilded blaze
#

Yes

viscid falcon
#

Cab someone tell me the syntax btw, I need it for a temp ban command

gilded blaze
#

?

viscid falcon
#

For setInterval

gilded blaze
#

setInterval(function, int)

viscid falcon
#

Thanks, does it have to be a function?

gilded blaze
#

Yes

viscid falcon
#

Ok

gilded blaze
#

You could do

#
//code
}, int)```
slow elk
#

That's how I use it all the time

viscid falcon
#

And the {} is the code I'm assuming

slow elk
#

Yes

gilded blaze
#

Integer is in milliseconds btw

slow elk
#

^

viscid falcon
#

K

#

What would be a good interval to check at for lower ram usage

gilded blaze
#

Depends on the task

viscid falcon
#

Temp ban and mute

gilded blaze
#

Well you would wanna use setTimeout

#

I would assume

viscid falcon
#

🤔

gilded blaze
#

Do you wanna wait and then unban?

viscid falcon
#

Yes or unmute

gilded blaze
#

Then use timeout

#

So it only happens once

viscid falcon
#

Ok what's that syntax

gilded blaze
#

Same

#

Just replace with timeout

viscid falcon
#

Interval is the amount of time to wait I'm assuming

gilded blaze
#

The 2nd parameter is the time to wait until function execution (in ms)

viscid falcon
#

K I'm going to wait till i get home to do this then forget about this, thx for the help

gilded blaze
#

Np

cyan wedge
#

test

marble niche
#

I finally fixed my bot "Tesla Bot" to stop spamming hi

earnest phoenix
#

how can you accidentally program a bot to spam hi?

idle mountain
#

Probably added it as a debug thing, then never removed it... or tried it as an autoreply to something but didn't set it up properly bingT I've done that before

earnest phoenix
#

or forgot a .bot check so after first hi then the bot would hi and that hi would trigger itself to hi and so on bloblul

west raptor
#
hasPermission(msg, { member }) {
        if (member.hasPermission("MANAGE_MESSAGES")) return 'This user is not allowed to be banned.'
}```
 any reason this would prevent the command from running?
earnest phoenix
#

hasPermission implies a bool result thonkku

#

anyways what do you mean prevent

#

what's the outcome

west raptor
#

nothing

#

no errors either

#

you know what

#

ignore that

#

i did get an error

earnest phoenix
#

good, analyze it and post it here if you can't figure it out

west raptor
#

alright

zealous veldt
#

Quick question:
Is it possible to access an array within itself? This is what I mean:

let commands = [];
cmds.ping = {
    name: 'ping',
    desc: 'ping command',
    func: (msg) => {
        msg.reply('pong');
    }
}

cmds.help = {
    func: (msg), => {
        let message;
        cmds.forEach((cmd) => {
            message += `\n**${cmd.name}** - ${cmd.desc}`
        }
    }
}

Note that the exampe code is just an example I threw together to better illustrate my question

#

and yes i know the help command is missing the name and desc values

quartz kindle
#

you mean the cmds.help part?

zealous veldt
#

yeah

#

can I access the array like that from within in

quartz kindle
#

in that case cmds is a global object reference, so yeah it can reference itself from within

zealous veldt
#

Awesome, thanks 😃

west raptor
#
(node:7516) UnhandledPromiseRejectionWarning: TypeError: Cannot destructure property `member` of 'undefined' or 'null'.
    at BanCommand.hasPermission (C:\Users\fazin\OneDrive\Documents\Coding\Dreams\commands\mod\ban.js:29:18)
    at CommandMessage.run (C:\Users\fazin\OneDrive\Documents\Coding\Dreams\node_modules\discord.js-commando\src\commands\message.js:142:38)    at CommandDispatcher.handleMessage (C:\Users\fazin\OneDrive\Documents\Coding\Dreams\node_modules\discord.js-commando\src\dispatcher.js:127:32)
    at CommandoClient.on.message (C:\Users\fazin\OneDrive\Documents\Coding\Dreams\node_modules\discord.js-commando\src\client.js:68:51)
    at emitOne (events.js:116:13)
    at CommandoClient.emit (events.js:211:7)
    at MessageCreateHandler.handle (C:\Users\fazin\OneDrive\Documents\Coding\Dreams\node_modules\discord.js\src\client\websocket\packets\handlers\MessageCreate.js:9:34)
    at WebSocketPacketManager.handle (C:\Users\fazin\OneDrive\Documents\Coding\Dreams\node_modules\discord.js\src\client\websocket\packets\WebSocketPacketManager.js:103:65)
    at WebSocketConnection.onPacket (C:\Users\fazin\OneDrive\Documents\Coding\Dreams\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:333:35)
    at WebSocketConnection.onMessage (C:\Users\fazin\OneDrive\Documents\Coding\Dreams\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:296:17)
(node:7516) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
(node:7516) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.```
#

code posted above

zealous veldt
#

lol

#

oof

earnest phoenix
#

second parameter of hasPermission is not an object but undefined or null (hence cannot be destructured)

#

but I am kinda sleepy so someone else can confirm

zealous veldt
#

sounds right

#

lol

visual surge
#

What would you guys recommend for a database? I'll need a user & guild db

quartz kindle
#

the simplest would be sqlite, you can also take a look at leveldb

#

enmap is also an option as a db abstraction

visual surge
#

Ah enmap. I am looking for shardable though. I'll look into sqlite and leveldb

uncut slate
#

sqlite is fucky with sharding

quartz kindle
#

enmaps are shardable will all dbs it supports except leveldb i think

#

but for better shardeability you'd be better of with something that accepts multiple connections

#

like mongo/postgre/rethink/mysql

visual surge
#

Alright, thanks :)

sick cloud
#

rethinkdb is the best for sharding @visual surge

#

it sends updates to all shards, and its really fast

zealous veldt
#

yeah

uncut slate
#

that's very subjective

heady zinc
#

not quite right but ye

uncut slate
#

there's really no such thing as "the best"

heady zinc
#

i would say rethinkdb is about one of the easiest to understand

#

and it does its job

#

though mongo is a wise choice too

zealous veldt
#

yeah

#

I love me some mongos

knotty steeple
#

😂

#

which is recommended for sharding tho

uncut slate
#

rethink isn't special when it comes to sharding

earnest phoenix
#

Is there a Ruby library for discord?

gilded blaze
#

Yes

uncut slate
#

discordrb

earnest phoenix
#

Yay

#

🎉

night imp
#

Thinking of using redis for storing data -- just want to confirm does it have nested tables?

uncut slate
#

no, you can only store direct strings/ints

#

there are hashes and lists, but you can't really use them like a traditional nested table

inner jewel
#

redis is a k/v storage

#

you can have up to k/k/v

#

but that's it

hasty talon
#

Does anyone know a random number generator 1-20 in the code whatever yagpdb uses I believe it is java don’t know

quasi marsh
#

@night imp Although I use Redis as my primary storage, you cannot effectively search by value in Redis

#

Which is a major downside

#

For now it suits my needs though, so I'm not that hasty on making the jump

night imp
#

What would you guys recommend then for a web app database for storing dynamic sets of data (and size) in node?

<id>
    <id>
        <rows of data with ids>
    <id>
        <rows of data with ids>
    <id>
        <rows of data with ids>
<id>
    <id>
        <rows of data with ids>
    <id>
        <rows of data with ids>
    <id>
        <rows of data with ids>
...etc
#

I have experience with Mongo but I am worried about speed and I've heard good things about more sql databases -- but with using mysql I don't think it has multi-layered tables

uncut slate
#

if you're worried about speed and you want to use SQL, postgres is the way to go

#

which is also json-schema-like

night imp
#

Thanks, I'll try it out! dhappy

warm prairie
#

I love postgres

restive silo
#

same

viscid falcon
#

whats a good api for getting fortnight stats
js btw

visual surge
#

rethinkdb js-
If I have an object as a value, can I update one of the properties without the need to pull it out, operate on it, and put it back in (or write the whole object in db.put) ?

hushed berry
#

Can anyone here help me with mongodb in JS?

warm prairie
#

just ask

hushed berry
#

my updates seem to go through but they sit blocking forever

#

its very weird

warm prairie
#

blocking?

hushed berry
#

yeah

#

like the promise never completes

#

even though the updates are reflected in teh db

warm prairie
#

really?

hushed berry
#

yeah

inner jewel
#

no rejections?

hushed berry
#

I dont believe so

#

I'm using google cloud functions, btw

#

hold on, i have na idea

#

one sec

warm prairie
#

whats the code look like?

hushed berry
#

one sec, friend

#

oh shoot, i think it got it to work

earnest phoenix
#

i have a problem: my installation of discord.js says its missing some dependancies (optional ones that just speed it up significantly)

hushed berry
earnest phoenix
#

when i try to install them with npm (root user) i get an error saying that it cant modify the folder

#

specifically for four of the dependancies

#

no other npm packages

sick cloud
#

you don't need the optional ones

visual surge
#

@hushed berry Hi Nik!
I mean, this for example

  if(req.header("Authorization") !== auth) {
      res.status(403).send()
    return
  }```
can be reduced to
```js
  if(req.header("Authorization") !== auth) return res.status(403).send()
hushed berry
#

right, right

visual surge
#

Idk the rest lol

hushed berry
#

The whole promise thing is throwing me for a loop

#

cos like mongodb's driver uses weird callbacks and promises

warm prairie
#

are you using promise and catch or async?

hushed berry
#

honestly, i have no idea

visual surge
#

Async, I see an await

warm prairie
#

save().promise( () => {} ).catch(err => console.log(err) ); ?

visual surge
hushed berry
#

the thing is

#

the println in the callback works just fine

#

but the promise that the actual update function returns seems to pend indefinitely

#

which seems very odd

#

wait...

warm prairie
#

println is java no?

sullen path
#

yes

warm prairie
#

he said it was js ...

hushed berry
#

i was just using it as a generic statement

#

meaning

#

"print to console"

warm prairie
#

ah

#

whats the save look like?

hushed berry
#

huh?

fluid basin
#

hmm

warm prairie
#

your code saving the object?

fluid basin
#

So whats the issue here