#development

1 messages Β· Page 406 of 1

halcyon abyss
#

relative path used from fs functions are taken from main script

#

not current file

fluid basin
#

@tulip kraken process.memoryUsage().heapUsed / 1024 / 1024 in MB

tulip kraken
#

thanks

fluid basin
#

Np

#

πŸ˜„

tulip kraken
#

wow

#

just noticed

#

im still running node 5.6

#

no good

#

no nvm

#

running 9.11.1

#

πŸ˜‚

fluid basin
#

LOL

#

btw 10.0.0 is out

topaz fjord
#

Yes

modest schooner
#

how would i add an exception to this code?

#

if message.content.startswith('?time'): timeinput = message.content[6:] tz = pytz.timezone(timeinput) gmt_now = datetime.datetime.now(tz) await client.send_message(message.channel, "The date and time in " + timeinput + " is " + str(gmt_now)[:16] + ".")

#

currently, this is what happens when there is an exception. the handler prints this: Ignoring exception in on_message Traceback (most recent call last): File "C:\Users\soyou\AppData\Local\Programs\Python\python\lib\site-packages\discord.py-0.16.12-py3.6.egg\discord\client.py", line 307, in _run_event yield from getattr(self, event)(*args, **kwargs) File "C:\Users\soyou\Desktop\komaeda\bot.py", line 52, in on_message tz = pytz.timezone(timeinput) File "C:\Users\soyou\AppData\Local\Programs\Python\python\lib\site-packages\pytz\__init__.py", line 180, in timezone raise UnknownTimeZoneError(zone) pytz.exceptions.UnknownTimeZoneError: 'the moon'

#

i want my bot to send a different message when someone puts an invalid timezone.

spring ember
#

Add exception?

#

Try & catch?

modest schooner
#

seems i was just putting "exception" on the wrong ident lmao...

#

ty @spring ember !

frail kestrel
#

no

#

i told u that u have to use a webserver

earnest phoenix
#

Oh ok

frail kestrel
#

direct them through there I think

#

@austere meadow confirm pls

austere meadow
#

?

earnest phoenix
#

Oh yeah my question was:
How do the webhooks work with dblapi? Are they like normal discord webhooks or?

I am a bit confused. If someone could help express it a bit more, would be appreciated.

lament meteor
#

dblapi webhook isnt a discord webhook

tulip kraken
#

uhm

austere meadow
#

webhooks are basically a little request that gets sent everytime someone votes for your bot
you setup a webserver, or some other place to collect the HTTP request, then when someone votes on your bot, the webhook will relay basic information, like user-id and bot-id to you through the request body

tulip kraken
#

anyone know a good API for anime gifs like Slap gifs

frail kestrel
#

weebsh

austere meadow
earnest phoenix
#

Oh alright. I understand now, thanks. I was just confused on how they worked

austere meadow
#

no problem kyle

frail kestrel
#

Kyle b

#

πŸ…±

tulip kraken
#

Anyone have an example on how to use it

#

πŸ˜‚

lament meteor
#

@tulip kraken u have to apply for a weeb.sh key

#

and ur bot has to be minimal 200 guilds

tulip kraken
#

ohh

#

damn

lament meteor
#

i only have an api for animal images and facts

mental solstice
#

@earnest phoenix are you trying to get info of the upvote sent to your discord webhook?

earnest phoenix
#

Not yet. I was just curious on how it worked for when I get to that area

mental solstice
#

ok, i wrote a page today to make it easy. still a work in progress, but if u create one it will give you a link to put in the DBL webhook field that will foward the userid to your discord channel

peak mountain
#

@tulip kraken @lament meteor we do make exceptions with who to accept into weeb.sh though ;)

#

This also goes for the guild count

tulip kraken
#

aight

lament meteor
#

@peak mountain ik but im not a weeb

peak mountain
#

It's not just for weebs

#

Feels welcomer man

lament meteor
#

ik but i dont rlly feel adding weeb commands to my bot

#

and i know most of the stuff of weeb.sh

tulip kraken
#

Where do i apply for an api key then?

peak mountain
#

ITS NOT JUST WEEBS

#

Aaaaaaaaaa

lament meteor
#

yes there is stuff that is not weeb realted

tulip kraken
#

REEEEEEEE

peak mountain
lament meteor
#

lol

tulip kraken
#

Aight, so

#

just email that address

peak mountain
#

Yep, add some infos like botname,guild count, website and so on

#

Makes it easier for me

tulip kraken
#

Alrighty

#

@tulip kraken

#

#3439

#

oki

#

@languid imp

#

Welp

#

thats done

upper ember
#

Can someone help me? I made a page on my site of profile, now there is a huge JSON of your servers, I want to make a table with all the servers that the user has administrator permission in them (I made it in PHP)

someone told me "Use a foreach loop to iterate through every server and then add a check in the foreach loop to check if the server permission is above or equal to manage server perms and you're done" I just don't know how to do it

tulip kraken
#

how would a "server" have permissions

#

only roles and members have perms

low owl
#

He probably implied a certain user.

lament meteor
#

@low owl nope discord oauth2

low owl
#

Ok, no idea

tulip kraken
#

oww

steep monolith
#

hello

lament meteor
#

dev talk here

steep monolith
#

da u know da way

lament meteor
#

@upper ember are u using discord oauth2?

tulip kraken
lament meteor
#

and it sends something like this

tulip kraken
#

You could read that

upper ember
#

yes

#

just see luki.xyz/me blobjoy

lament meteor
#

iirc u have to detect the permisions for each guild

upper ember
#

how?

#

πŸ˜‚

lament meteor
#

a for loop

upper ember
#

that's exactly what I asked

#

how do I make for loop, I HATE php

#

HATE

lament meteor
#

js loop

#

doesnt php supports js?

upper ember
#

idk

lament meteor
#

well it does so u can do a js forloop

upper ember
#

ok

elder rapids
#

@upper ember bit checking permissions property

earnest phoenix
#

i dont think you can do raw js in php

elder rapids
#

But for loop is like a regular one

#

Just Google it

lament meteor
#

^

gusty topaz
#

Dump the data into js with php

#

And let the browser js take care of rest

elder rapids
#

Use an API

#

Dumping data from PHP (echoing into HTML) is really bad

#

I've done that before and it's absolutely horrendous

#

I've moved away from PHP though now

upper ember
#
<?php
$_SESSION['guilds'] = get_guilds();
for ($i=0, $len=count($_SESSION['guilds']); $i < $len; $i++) {
                      
                                        if ($_SESSION['guilds'][$i]['permissions'] >= 268438561) {
                                        echo "<li class=\"list-group-item list-guild-item\">";
                                        echo "<div class=\"guild-item\">";
                                        echo "<a href=\"https://discordapp.com/oauth2/authorize?client_id=365958655926992896&scope=bot&permissions=2146958591&guild_id=" . $_SESSION['guilds'][$i]['id'] . "\">";                                        echo "<img src=\"https://cdn.discordapp.com/icons/" . $_SESSION['guilds'][$i]['id'] . '/' . $_SESSION['guilds'][$i]['icon'] . ".png\"/>"; 
                                        echo "<span>" . $_SESSION['guilds'][$i]['name'] . "</span>";
                                        echo "</div>";
                                        echo "</a>";
                                        echo "</li>";
                                       }
                                    }
?>
#

@lament meteor you can

spring ember
#

Oof the php echos

upper ember
#

it works @spring ember blobshrug

spring ember
#

Use active in css and js

upper ember
#

hell no

spring ember
#

Also just use one echo

upper ember
#

I tried to use 1 echo... something fucked up when I do it...

inner jewel
#

@upper ember don't check permissions that way

#

you can't just do a >=

#

you should check the bit flags

upper ember
#

bit flags? πŸ€”

inner jewel
#

if((permissions & PERMISSION_FLAG_YOU_WANT) != 0)

earnest phoenix
#

how do i downloa dsafety jim

#

<@&265158261945270273> <@&264889767072628742> how do i download saftey jim

languid dragon
#

ok for starters

#

try googling

#

for seconds, you dont need to tag the entire staff team

#

also you don't "download" bots, you invite them to your server

#

unless you mean downloading an open source bot from github

#

@earnest phoenix

restive silo
#

@uncut pagoda i hope aly explained everything to you by now

earnest phoenix
#

Anybody know what type of numbers work for both Rich Embed Colours and normal embed Colours? Is it hexadecimal or what, I don't know what it is.
They both must be integers too

spring ember
#

hexadecimal

#

but what lib do you use?

bitter sundial
#

if you know the hex eg. #FFFFFF you can write it as 0xFFFFFF

blazing stag
#

well according to the docs the data type for color is integer.

#

so that should be the case for whatever library you're using.

topaz fjord
#

That's if you posting directly to the api

spring ember
#

also hex numbers are infact integers...

uncut pagoda
#

@visual ginkgo

#

%help

restive silo
knotty steeple
#
msg.guild.channels.get("440160451829956609").fetchMessages({ limit: 1 })
        .then(message => console.log(message));

if i do this i get a collection
how do i get the message itself

elder rapids
#

By iterating the list

knotty steeple
#

how

halcyon abyss
#

doc is magic

#

in your case, .first()

#

bc there's just one elem

upper ember
#

What’s the best for rest api (php) (apache2), MySQL or PostgreSQL?

tulip kraken
#

How would i go about overwriting all channels with permissions for a mute role

night imp
#

Find all channels then loop through each

tulip kraken
#

yep

#

fixed it

novel bronze
#

(Not sure if this is exactly the best place to be asking this question; would #topgg-api be more appropriate?)

Does anyone know why two of my bots' online statuses are showing correctly, but WrightBot's isn't? I already tried regening the token from DBL and updating the bot accordingly.

earnest phoenix
#

why is @finite tendon down

shy verge
#

hmmmmmmmmmmmmm

#

i wonder

earnest phoenix
#

i really dont understand

tulip kraken
#

How can i get my bots uptime

#

in javascript

#

node js

austere meadow
#

@novel bronze it means your bot was kicked from the server, check mod log

novel bronze
#

How would I get the bot readded after fixing it, seeing that it was kicked after a programming oversight on my part?

night imp
#

Ask a mod

static lynx
#

hey guys i’m bored give me something 2 code

night imp
#

a

#

food site

#

where people can upload food pictures and descriptions

#

With auth

static lynx
#

oh

#

i mean on my discord bot lmfao

night imp
#

πŸ‘€ K

grizzled isle
#

A discord bot that shares recipes.

static lynx
#

oh

#

i mean something that is useful on a non-cooking discord server haha

#

but thanks anyways

halcyon abyss
#

command a pizza irl and deliver it to your home just for you

novel bronze
#

Yes

#

Command not a pizza restaurant, but the pizza itself

halcyon abyss
#

ofc it has to be working in every country

#

except north korea, i'll be nice

novel bronze
#

@austere meadow Sorry to bother you again.

I checked mod-log, saw what was up, and made changes to my bot accordingly.
Should I contact someone else next to get the bot back in here, or should I go and fill out the New Bot page again?

vivid crest
#

What’s the best way to keep a bot online

novel bronze
#

Depends on where you're running it

halcyon abyss
#

not shutting if off ?

novel bronze
#

^

#

I always leave my computer on 24/7 anyway so I just run mine right off of my computer

#

Not really an issue

#

Not such a great idea for people with laptops or something, though

halcyon abyss
#

usually either you let your computer run either you use a server

novel bronze
#

You can either pay for a server or find some service that lets you host your bots for free on their end

#

I know someone that managed to do the latter but I forget the name of the site he used, rip

vivid crest
#

I have it on a laptop and didn’t know if I can run it off a hosting cPanel I have for my websites

elder rapids
#

Yeah.... that's probably a shared webhost and you don't have server access

vivid crest
#

Any ideas other than keep laptop on to keep these on please

mental solstice
#

Vps

#

What language are u writing in?

vivid crest
#

It was done via cmd

#

Or do u mean software like visual studio and python

#

If so then python

mental solstice
#

You can get a linux vps for like $5 a month

vivid crest
#

Thanks

mental solstice
#

Check the pinned messages

#

There are a few listed

vivid crest
#

Thanks for ur help

mental solstice
#

Np

#

Some people use rasperry pi ive seen. Idk how much those cost but i think they are fairly inexpensive

grizzled isle
#

30 bucks for your hosting, not good for large bots though

vivid crest
#

Im hoping to get a lot to use one bot but the other I don’t expect many to use it

austere meadow
#

@novel bronze sorry for the late reply, just ask another moderator to re invite your bot here if the issue is fixed

novel bronze
#

Alr

floral stone
#

@grizzled isle 30 bucks is a lot

grizzled isle
#

Its better than 31

floral stone
#

I pay only $10 for my bot

abstract mango
#

the pi is $35 one time

#

if you buy the 3b or etc

wet ferry
#

Hey, I need some help with arrays and lists

#

I have a var of commands, and I want to find the length.

#
var commands = {
//commands and stuff here
}
#

how would I find the length of the var?

grizzled isle
#

you might wanna use const b/c its better.

wet ferry
#

... but that doesn't solve my question

#

@grizzled isle

grizzled isle
#

if anything, try commands.size

wet ferry
#

ok?

young cradle
#

It's an object Zoth

#

<Object>.length; would be correct

wet ferry
#

??

grizzled isle
#

Sorry, I was thinking it was a collection.

wet ferry
#

@young cradle

#

wdym

young cradle
#

Exactly what I saif

#

said*

grizzled isle
#

commands is an object
object.length will give you the amount

wet ferry
#

commands.<Object>.length ??

grizzled isle
#

🀦

young cradle
#

<> is a placeholder

wet ferry
#

commands.length

young cradle
#

commands is an Object

#

Yes, correct

wet ferry
#

well I get undefined

#

when I run commands, I get an object tho

young cradle
#

It will return a number

wet ferry
#

it didn't

#

here's my code

#

ms!eval commands.length

#

...

young cradle
#

It can only return undefined if commands has no properties/methods

wet ferry
#

can u check if it does?

#

here's an example:

#
var commands = {
  balance: {
    aliases: ["bal","money"],
    usage: "ms!balance",
    description: "See your MakerCoins balance",
    permissons: "none",
    category: "eco",
    do: (message, content) => {
      let embed = new Discord.RichEmbed()
      embed.setAuthor("Your MakerCoins Balance",message.author.avatarURL)
      embed.setColor(0xF8B90E)
      embed.addField("Coins", data.coins[message.author.id])
      message.channel.send(embed)
      
    }
 }
}
#

@young cradle

topaz fjord
#

did you try .size?

young cradle
#

Then use Object.keys(commands).length;

#

If you want to iterate those objects, you could count how many when iterating

dusty sandal
#

can any one help me here, how would you send a custom emoji? this is for js

abstract mango
#

custom emojis are formatted <:name:id:>

novel bronze
#

got em

#

Like this:

abstract mango
#

oh it's

novel bronze
abstract mango
#

ye

novel bronze
#

If you want to find that the easy way

#

you can just do

dusty sandal
#

so how would i send one?

novel bronze
#

You need to get that string

dusty sandal
#

i can grab the id

novel bronze
#

and then you can just tell the bot to send it as is

dusty sandal
#

example?

novel bronze
#

Like how if you tell a bot to send <@userId>, it'll turn into a mention

dusty sandal
#

hmmm

novel bronze
#

For emotes you can find the stuff to copy by typing \:emote:

dusty sandal
#

so something like this? message.channel.send(`${id of emote} heres the emote`)

novel bronze
#

No

#

well

#

eh

#

Not really

dusty sandal
#

i tried that and it didnt work

novel bronze
#

So like for example

#

if you wanted to send

#

If you wanted to send that

#

you just tell the bot to send this string:

#

You send that as is.

#

Discord will automatically turn it into the right emote

dusty sandal
#

so message.channel.send(`${:tickYes:315009125694177281} heres the emote`)

novel bronze
#

Assuming you're in the right server πŸ˜›

#

You don't need to do ${}

dusty sandal
#

ok

novel bronze
#

it's literally justmessage.channel.send("![tickYes](https://cdn.discordapp.com/emojis/315009125694177281.webp?size=128 "tickYes") heres the emote")

dusty sandal
#

thanks

novel bronze
#

πŸ‘

dusty sandal
#

Yo james the Dem Soc, dont want to ping ya, but how would you get the id of a gif emote?

#

i cant do :nitro emote: because it just gives back :nitro emote:

#

really anyone can help me out here

frail harness
#

<a:emotenamehere:emoteidhere>

dusty sandal
#

for the emoji moving things

#

the gif emotes

#

i cant get the id

night imp
#

πŸ€”

dusty sandal
#

like :ditto:

#

like :ditto:

night imp
#

yeah someone has to post it

#

Who has nitro

#

To copy the id

#

Or some inspect element trickery

dusty sandal
#

do you know of this inspect element trickery?

lament meteor
#

wait u want the ditto emotes?

dusty sandal
#

well i want to know the method get any moving emote

#

\:ditto:

night imp
#

Oh I was thinking something different

dusty sandal
#

`:ditto:`

night imp
#

::ditto::

dusty sandal
#

<:ditto:>

lament meteor
#

iirc

#

if u try to use the old bug

dusty sandal
#

<:ditto:>

#

well i just want the id

#

im using ditto as an example

night imp
#

Or you could try selecting it in the emotes tab with inspect element

earnest phoenix
night imp
#

And see if there is a salvable id

dusty sandal
#

ok

night imp
#

:ditto:

#

':ditto:'

#

<a:ditto:"393547954168004608>

#

Remove the "

dusty sandal
#

how did you get the id?

night imp
#

Copied the text

dusty sandal
#

RIP

#

ima try the inspect element route

lament meteor
#

@dusty sandal i found a easier way

dusty sandal
#

whats that way?

lament meteor
#

u make a bot send all the emotes

#

u can get the id via there

dusty sandal
#

i dont want to use a nitro middle man

#

well i need the ids in the first place which i dont have

lament meteor
#

do u use js?

dusty sandal
#

yes

lament meteor
#
const emojiList = message.guild.emojis.map(e=>e.toString()).slice(0, 20).join(" ");
  message.channel.send(emojiList);```
#

u can just run that

dusty sandal
#

ok thanks

lament meteor
#

i did the slice(0, 20) so it doesnt go over the text limit

elder rapids
#

wat

#

What are you trying to do

lament meteor
#

he is trying to get emote ids

#

also @dusty sandal iirc u can get emotes via the name

dusty sandal
#

yes

elder rapids
#

Via code or just in general then?

dusty sandal
#

whatever works

elder rapids
#

I mean if it's just in general a backslash before the emote is fine 🀷

lament meteor
#

client.emojis.find("name", "name");

dusty sandal
#

well i want to get the ids for nitro emotes

lament meteor
#

@elder rapids but it doesnt work for animated emotes

elder rapids
#

:ditto:

lament meteor
#

c

elder rapids
#

I see why

lament meteor
#

cydle is dumb

elder rapids
#

It doesn't work because of Discords nitro bypass bug fix

#

It used to work

dusty sandal
#

thank the lord

lament meteor
#

ik

dusty sandal
#

telk

#

youre code saved my ass

#

i cant spell

elder rapids
#

They now properly check nitro and remove the raw emote

#

If you send an animated emote (escaped) you'll see for a VERY brief second that it shows <a:name:id> then disappears to :name:

#

Discord's bug fix in action 😩

lament meteor
#

also @dusty sandal i shows u another example how to get emotes using a bot in #commands

#

ikr

elder rapids
#

Tbh they just made developing with emote stuff harder (You now need a bot to try and fetch the ID)

#

It's a mild annoyance but you know... when people abuse features then it affects everyone

lament meteor
#

i agree

pallid smelt
low rivet
#

i dont see a reason why you can't.. except privacy reasons

shy verge
#

what is it with bot devs wanting to be the NSA all of a sudden

earnest phoenix
#

I fucked up.

lament meteor
#

?

bleak sapphire
#

is there any way to get the user using a id?
im using discord.py async
i tried using bot.get_user_info(id_goes_here)
but once i tried to get the user name it just gave me an error

'generator' object has no attribute 'name'
modest schooner
#

...anyone got links to tutorials to get a python bot to play music? tried this one https://www.youtube.com/watch?v=FpRzDY0-I1o and ended up getting mad and quitting because i just couldn't get the extension/cog to work.

lament meteor
#

this is just a suggestion but dont use python for a music module as it isnt efficient try java cause it has a audio thingy

primal comet
#

someone help get my bot to my server im nub .

#

get @random idol

#

when i click authorize it show beep. beep.beep. then nothing ....

modest schooner
#

youre probably right, is just everything my bot already does is in python

primal comet
#

@bitter sundial help...

bitter sundial
#

don't you see the captcha

primal comet
#

?

#

no

bleak sapphire
#

0_o

#

try using another browser

bitter sundial
#

check that you dont have an extension blocking captchas

primal comet
#

oh

modest schooner
#

why would someone have a captcha blocker? whats the point?

earnest phoenix
#

Idk

primal comet
#

idk i didnt do anything....

earnest phoenix
#

My bot will die soon.

lament meteor
#

reload the page

earnest phoenix
#

The apache log got deleted somehow.

primal comet
#

@bitter sundial how tho.? im using SAFARI on mac

#

how to disable it 😦

#

@bitter sundial

bitter sundial
#

try chrome

primal comet
#

i only have safari and firefox

#

i will download chrome...

bitter sundial
#

firefox should work too

primal comet
#

ok.

#

i have bad wifi so no chrome

mental solstice
#

jeff u on pc?

earnest phoenix
low rivet
#

@bleak sapphire u missed the await

tulip kraken
#

how would i make my bot send a message to the main channel upon joining?

#

in node js

modern garden
#

Guild create event -> get guild default channel -> send emssage

restive olive
#

I mean what's the lib?

tulip kraken
#

d.js

#

but

#

defaultChannel is deprecated

night imp
#

You could search for general and, if it exists, send a message to it

tulip kraken
#

true

low owl
#

no no no

#

You want the first channel that you have Send Message permissions to

#

Not every guild has general

tulip kraken
#

.systemChannel

#

is a thing

novel bronze
#

What does .systemChannel point to?

#

.defaultChannel still works btw; you'll just get deprecation warnings

#

Also need to put it in a try/catch since new servers return null when you try to do .defaultChannel on it

elder rapids
#

System Channel sounds like the channel join messages are sent to

young cradle
#

precisely

novel bronze
#

Hm. πŸ€”

lament meteor
#

MongoDB or sql vs enmap(with enmap level)? this is not rlly for discord bots but for a db in general

glossy sand
#

so really you're asking mongo vs mysql vs level

spring ember
#

I sent a url to choose a database yesterday

glossy sand
lament meteor
#

ok

floral stone
#

Anyone got better emojis?

wise bridge
#

Exchange colour and it should be okay

floral stone
#

In pillow python. how would I add a border to a transparent image?

spring ember
#

Mask on top?

fickle ibex
#

oi

spring ember
#

Not here please

floral stone
#

Not sure, just want a black border on a white transparent image.

#

What I get

spring ember
#

Looks good

floral stone
#

Not what I want though

#

The border needs to be even on every side

#
    img = Image.new('RGBA', (128, 128), (255, 255, 255, 0))
    font = ImageFont.truetype('/home/alice-bot/storage/KeepCalm-Medium.ttf', 110)
    draw = ImageDraw.Draw(img, "RGBA")
    msg = "1"
    W, H = img.size
    w, h = draw.textsize(msg, font=font)
    x, y = ((W-w)/2,(H-h)/2)
    draw.text((x,y), msg, fill=(255,255,255), font=font)
    img.save(fullpath, 'PNG', quality=100)
    img2 = Image.open(fullpath).convert('RGBA')
    newData = []
    for item in img2.getdata():
        if item[3] != 0:
            newData.append((0,0,0,255))
        else:
            newData.append(item)
    img2.putdata(newData)
    img = img.resize((112, 112), Image.ANTIALIAS)
    offset = ((img.size[0] - img.size[0]) // 2, (img.size[1] - img.size[1]) // 2)
    img2.paste(img, offset, img)
    img2.save(fullpath, 'PNG', quality=100)```
spring ember
#

Do you save and then reopen?

floral stone
#

I could just do img2 = img

spring ember
#

Yes

#

Or use img

floral stone
#

Stil thought, it's not about whether or not how it's coded.

#

It still doesn't work.

#

The border

#

Focus on the border

#

Saving it keeps the white

#

Anyways

#

I just need to know how to center it properly.

#

I need to resize the image more aswell

#

like stretch

spring ember
#

Also the offset is always going to be zero

floral stone
#

No

#

It needs to be in the center of the black #1

#

What needs to be done is make the width longer aswell.

#

Or if aanyone here have access to photoshop and wouldn't mind adding the borderrs for me?

young cradle
#

What do you need exactly?

#

I mean

topaz fjord
#

I have it to weeb

floral stone
#

@young cradle @topaz fjord one of you, dm me

young cradle
#

Why not here

restive olive
#

Its wiz

halcyon abyss
#

or

#

you dl gimp

#

easy & free

#

Β―_(ツ)_/Β―

floral stone
#

I don't understand gimp, I know photoshop.

halcyon abyss
#

they're quite similar though

floral stone
#

Β―_(ツ)_/Β―

glossy sand
#

you're just making a scaled up copy of the original image?

#

that's not really a proper way to produce a border

floral stone
#

I thought it would make it wider as well

earnest phoenix
#

oh

#

I just set up a simple site for my bot.

#

I still need to make some more commands.

#

Since my bot got declined.

spring ember
#

not the right channel

earnest phoenix
#

oof

frigid thistle
#

How would I get the dblapi to log to the console when it recieves a test

mental solstice
#

I think youd need a webook setup on your bot the check for test in the query string

frigid thistle
#

I'm using dblapi.js for my webhook

topaz fjord
#

check for test in query string

#

wtf does that mean

#

at the bottom

#

WebHook events

frigid thistle
#

My code: JS module.exports = (bot) => { const DBL = require('dblapi.js'); const dbl = new DBL(process.env.tok, { webhookPort: 5000, webhookAuth: process.env.whpassword }); dbl.webhook.on('ready', hook => { console.log(`Webhook running at http://${hook.hostname}:${hook.port}${hook.path}`); }); dbl.webhook.on('vote', vote => { if (vote.type == "test") { console.log("Test successful!") } else { if (vote.type == "upvote") { bot.channels.get('441710517460008960').send(`${vote.user} just upvoted <@${vote.bot}>!`) } } // Do what you need to do }); }

#

I've read that

#

but when I test the webhook on my edit page

#

nothing in the console.

topaz fjord
#

if your using localhost idk if it works with localhost

frigid thistle
#

I'm not using localhost

#

How would I get a hostname for my webhook

#

It's using the ip 0.0.0.0

#

@topaz fjord

topaz fjord
#

i can read

#

and see

frigid thistle
#

πŸ˜›

topaz fjord
#

so no need to ping

frigid thistle
#

fine

#

but

#

Maybe I should open port 5000 on localhost..?

#

helloooo

#

@topaz fjord hello??

#

URGH

#

can someone please help me

#

turle was no help at all

topaz fjord
#

honestly im offline for a reason

#

its not like i sit at this channel all day

frigid thistle
#

I need some help setting up my webhook, so can you help me?

#

help moi pl0x

#

aaa pls

#

@uncut slate can u help

uncut slate
#

Read the channel topic

grizzled isle
#

Do not @mention people randomly

frigid thistle
#

But can someone help

#

I need a webhook

night imp
#

I recommend getting an understanding of webhooks first^

topaz fjord
#

that works

#

and if you using js you can try setting it up with express.js

mental solstice
#

@frigid thistle https://www.pokecord.net/webhooks/ a little something i set up, im gonna allow custom webhook message soon. A few people use it now, just to send userid to their discord webhook when their bot gets an upvote

frigid thistle
#

TY @mental solstice!

mental solstice
#

Only way to tell its a test right now is if your userid votes more than once in 24 hours

frigid thistle
#

mhm

#

Is there any way to set the message that the webhook uses when the bot is upvoted?

mental solstice
#

I could do it in a little bit.. how do u want the message to look? Ill just add a parameter to the link youll put im the dbl webhook spot.. keep in mind it will only send userId botId query and type(which just says upvoted i believe)

mental solstice
#

@frigid thistle if you just use the password parameter with a current password youre using, you can set up to 5 webhooks with that password, and delete them as necessary

frigid thistle
#

I want the msg to be:

#
`<@${user}> just upvoted Hulkbot!`
mental solstice
#

your bot would have to turn the userid into the actual user

#

but i can make it say 1234567890 just upvoted Hulkbot!

frigid thistle
#

Hmm

#

Idk

#

k I guess

mental solstice
#

would be nice if dbl passed the username with the webhook

frigid thistle
#

Mhm

#

Instead of the id

#

Or like 2 separate objects like id and username

mental solstice
#

i notify players by grabbing the user id, and looping through _client.AvailbleGuilds and finding that user id

frigid thistle
#

it'd be a heck of a lot easier πŸ˜›

#

Hrm.

uncut slate
#

you can get the username from the id

frigid thistle
#

How?

uncut slate
#

discord api

#

/users/id

frigid thistle
#

Or just sending <@${user}> πŸ˜›

uncut slate
#

that doesn't give you the username

frigid thistle
#

No crap

uncut slate
#

that would need a human to read it

frigid thistle
#

but you can mention a user with <@id>

#

for instance

uncut slate
#

a mention is not a username, he asked for a username

#

a mention isn't going to be a mention either if the user isn't cached

frigid thistle
#

But

mental solstice
#

@frigid thistle i lied

frigid thistle
#

wat

mental solstice
#

u can mention someone

#

after a bit of googling, ill add it right now

frigid thistle
#

k

mental solstice
#

@frigid thistle at the end of generated link you put into the DBL webhook field add &option=1

#

save it..wait a few seconds and try testing

frigid thistle
#

kk

#

Yas it works

mental solstice
#

cool.. glad i took the time to look that up

visual escarp
#

!ftn help

mental solstice
#

anyone else, feel free to use my link to create dbl upvote to discord webhook

elder rapids
#

You actually made a system which logs DBL webhook to a discord channel Thonk

#

I find it sort of unnecessary. I mean do people really have a hard time making webhooks (even with open source projects people make specifically for it)?

mental solstice
#

ive tried setting up port forwarding, etc.. cant get it to send webhook to my bot.. so idk, found this way easier

#

its like 5 lines of code.. to send the dbl hook to discord.. i figure why not

bitter jay
#

it's been over 24hrs and my bot hasn't been accepted yet oof

novel bronze
#

oofio

bitter jay
#

mega oofio

elder rapids
#

wrong channel?

bitter jay
#

a possibility

mental solstice
#

off with his head!!

bitter jay
#

I would appreciate if I could keep my head

mental solstice
#

one cant simply post a statement in the wrong channel, and keep his head.. sorry

south finch
#

one could possibly catch a mute if they keep a conversation in here that has nothing to do with development

earnest phoenix
#

Im trying to ssh into my raspberry pi, i did >ifconfig in console, what ip do i use in putty?

#

local ip

fluid basin
earnest phoenix
#

wdym? theres wlan0:

#

with flags and stuff

elder rapids
#

Do you know how to read the ifconfig?

inner jewel
#

you'll want wlan/eth

fluid basin
#

wifi module: wlan
Ethernet: eth

inner jewel
#

eth = wired
wlan = wifi

fluid basin
#

Β―_(ツ)_/Β―

wet ferry
#

@south finch has the fake-tonku bot banner been finished?

inner jewel
#

you mean bo

south finch
#

this isnt dev talk

#

but i guess? hes not been back

earnest phoenix
#

netmask, inet, inet6, broadcast are all ips in the section of wlan

#

im gussing inet?

elder rapids
#

Here's example :p

#

oh no my local IP leaked

fluid basin
#

IPv4 inet, IPv6 inet6, broadcast is broadcast ip, netmask is mask

elder rapids
#

But that's what you want to look for in a ifconfig

earnest phoenix
#

so my i want my IPv4 in putty or v6?

#

im pretty sure V4

#

let me try that

elder rapids
#

Your LAN is likely V4

#

oh

#

Cute

earnest phoenix
#

zoomeyes i probs forgot to enable SSH

elder rapids
#

Probably, or a firewall is just refusing it

inner jewel
#

i just gave my pi a static ip

elder rapids
#

but I doubt the firewall part because ... it's not blocking by default

#

Also same natan

inner jewel
#

192.168.0.200

elder rapids
#

Mines what you see above ;P

earnest phoenix
#

idk how to do that

#

lol

elder rapids
#

Worry about static later

inner jewel
#

it's in router settings

elder rapids
#

Just get your stuff running

inner jewel
#

^

earnest phoenix
#

okie

#

so

#

i need a monitor for hdmi

#

ill be on mobile texting now :/

#

cus i need to go to a tv downstairs

#

okay

#

SSH is working

#

but idk how to start my bot with "node index.js" once im in the path because once i exit out of putty it exits the bot

elder rapids
#

Either create a service (preferred tbh) or nohup and disown it

fluid basin
#

yeah nohup and disown

earnest phoenix
#
nohup node index.js
nohup: ignoring input and appending output to 'nohup.out'
#

idk what disown is

fluid basin
#
nohup node index.js &
disown %1
#

and it'll run after you exit putty

earnest phoenix
#

I opened two by accedent zoomeyes

#

lol

elder rapids
#

I just do nohup node index.js & disown

#

then I echo the PID into a file

fluid basin
#

Yeah that works as well

earnest phoenix
#

how do i exit one? lmao

fluid basin
#

And you'll just need to kill it with the PID

earnest phoenix
#

eh

fluid basin
#

pgrep node

#

shows process ids

earnest phoenix
#

ye

#

2

elder rapids
#

I prefer echoing the PID to a file so I know it later

fluid basin
#

honestly just use something like forever or pm2

elder rapids
#

Then I just cat pid

#

Create a service instead ^^

#

Personally those are nicer

fluid basin
#

Β―_(ツ)_/Β―

#
Download: 3238.53 Mbit/s
Testing upload speed................................................................................................
Upload: 1407.26 Mbit/s```
![Thonk](https://cdn.discordapp.com/emojis/356771720863940608.webp?size=128 "Thonk")
earnest phoenix
night imp
#

Using
Sqlite3 (node.js, discord.js)

Want to
Check if row exists where name and id equal something

Error/Problem
No error. If I have if(row !== []) it sends false positives and if I have if(row == []) it never sends a positive. Row is equal to []

Code
https://hastebin.com/famowiduga.js

languid dragon
#

if (row[0]) {
exists
} else {
doesn't
}

night imp
#

wow I am dumb

languid dragon
#

because if there are no results

#

there will be no first result

#

otherwise it's always an array

#

and ur checking if it is an array or not

night imp
#

Yeah should of thought of that. Thank you

languid dragon
#

so it'll always reply with yes

#

no problemo

earnest phoenix
#

how to make discord bot

#

πŸ˜‚

languid dragon
#

i had a ctrl G macro for this moment

#

guess what it did

lament meteor
#

Β―_(ツ)_/Β―

jagged birch
#

how do i send a message to a specific channel using shards in discord.js? I tried this:

client.shard.broadcastEval(client.guilds.get(id).channels.get(id)).then(channel => {
    channel.send("message");
});```
but that didn't work ![GWfroggyBlobWokeThink](https://cdn.discordapp.com/emojis/398570327942365195.webp?size=128 "GWfroggyBlobWokeThink")
gilded blaze
#

doesn't it have to be a string

lament meteor
#

ids are a string not a number

gilded blaze
#

no

#

i mean client.guilds.get(id).channels.get(id)

#

this should probs be a string

jagged birch
#

it is

#

in my code

gilded blaze
#

well it returns an array

#

i think

#

containing response from each shard

bleak sapphire
#

how do i make a my bot send a message to a channel every 1 minute? i was able to get the channel id and store it in a database but i dont know how im gonna make the bot send the message using a on_ready event
heres my current code
im using discord.py async with mongodb


@bot.event
async def on_ready():
    print("ready")
    if db.messagetimers.find({"channel_id_by_timer"}).count():
        
#

i dont know what to do now after that

dense cape
#

i need help

#

Theres a module that wont download on Nodejs

lament meteor
#

what module?

#

node-gyp?

lament meteor
#

@dense cape wat wont download?

dense cape
#

Quick.db

#

@lament meteor

lament meteor
#

errors while downloading?

dense cape
#

Yes

lament meteor
#

wats the error Thonk

dense cape
#

While downloading Dependents

lament meteor
#

does it need node-gyp?

dense cape
#

integer@1.0.3 install C:\Users\user\node_modules\integer
node tools/install

C:\Users\user\node_modules\integer>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformToolsets\v140\Toolset.targets(36,5): error
MSB8036: The Windows SDK version 8.1 was not found. Install the required version of Windows SDK or change the SDK vers
ion in the project property pages or by right-clicking the solution and selecting "Retarget solution". [C:\Users\user\n
ode_modules\integer\build\integer.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\user\node_modules\integer
gyp ERR! node -v v8.9.4
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok

lament meteor
#

@dense cape iirc node-gyp was changed to node-gd so thats why it is erroring node-gyp is outdated and depreciated

dense cape
#

How does one fix?

lament meteor
#

use a different db

dense cape
#

Cant

lament meteor
#

why?

dense cape
#

This one is better than all of them

lament meteor
#

doesnt quickdb saves in a json

dense cape
#

All formats

lament meteor
#

use mongo or sql or enmap

elder stratus
#

@bleak sapphire
maybe just

    await bot.send_message(bot.get_channel("ID"), content="")
    await asyncio.sleep(60)```
bleak sapphire
#

ok wait lemme try

#

not sure if it would work though but lets see

elder stratus
#

I'm using this for twitch notification and it works for me

bleak sapphire
#

well its working but its only sending a message in one channel in the database when there are two channels

#
@bot.event
async def on_ready():
    print("ready")
    #data = db.messagetimer.find({"channel_id_by_timer"}).count()
    #channel = bot.get_channel(data)
    try:
        for names in db.messagetimers.find({}):
            channel = names['channel_id_by_timer']
            interval = names['interval_by_timer']
            message = names['message_by_timer']

        while True:
            await bot.send_message(bot.get_channel(channel), message)
            await asyncio.sleep(interval)
            
    except Exception as e:
        print(e)

current code

elder stratus
#

'channel' var is a list?

bleak sapphire
#

well yes

elder stratus
#

It's dictionary

#

Ok

#

One minute

bleak sapphire
#

ok

#

wdym by dictionary

elder stratus
#

I'm back

#
    await bot.send_message(bot.get_channel(channel), content="")```
bleak sapphire
#

sounds like its going to work

#

lemme see

languid dragon
#

can one of you quickly test something for me (nvm)

elder stratus
#

channels is a list of IDs

bleak sapphire
#

sadly it wont work

#

imma try to find a way on how to make it work

elder stratus
#

Could you print the content of 'channels' variable?

#

@bleak sapphire

bleak sapphire
#

ok srue

#

wait

#

im having issues printing it but it basically prints it like this

4
4
1
5
7
6
5
5
6
0
9
6
2
5
8
0
5
2
#

and it only prints one channel ID

#

@elder stratus

elder stratus
#

Could you send whole on_ready?

bleak sapphire
#
mongodb_host = "localhost"
mongodb_port = "27017"
client = MongoClient(mongodb_host + ':' + mongodb_port)
db = client['messagetimers']

bot.remove_command('help')

# Start

@bot.event
async def on_ready():
    print("ready")
    #data = db.messagetimer.find({"channel_id_by_timer"}).count()
    #channel = bot.get_channel(data)
    try:
        for names in db.messagetimers.find({}):
            channel = names['channel_id_by_timer']
            interval = names['interval_by_timer']
            message = names['message_by_timer']

        for channelxd in channel:
            print(channelxd)

    except Exception as e:
        print(e)

    #payload = {"server_count"  : len(bot.servers)}
    #async with aiohttp.ClientSession() as aioclient:
    #    await aioclient.post(dbl_url, data=payload, headers=headers)

    await bot.change_presence(game=discord.Game(name="Successfully connected"))
    await asyncio.sleep(10)
    await bot.change_presence(game=discord.Game(name=f"{len(bot.servers)} Servers | ts help", type=3))
#

it pretty much prints the last channel id

#

in the db

elder stratus
#

Looks like 'channel' var is just one ID

#

Not list of IDs

bleak sapphire
#

hmmm

#

wait i remember reading a stackoverflow post about printing the entire thing

#

lemem find it

elder stratus
#

I've never used db

spring ember
#

Then it's the time to start lul

elder stratus
#

Yeah...

bleak sapphire
#

this is harder than i thought

#

getting the channel id and putting it in the db using a command was easy though

#

but damn it

elder stratus
#

Use txt files instead of db XD

bleak sapphire
#

lol

elder stratus
#

God damn, my laptop has problems with internet connection

#

And I'm not at home

spring ember
bleak sapphire
#

is it possible to run mongodb on heroku xD

elder stratus
#

Wait

spring ember
#

Use mlab

#

Free hosting

elder stratus
#

I probably know how to fix this

#
    try:
        for names in db.messagetimers.find({}):
            channel = names['channel_id_by_timer']
            interval = names['interval_by_timer']
            message = names['message_by_timer']
            channels.append(channel)

        for channelxd in channels:
            print(channelxd)```
#

@bleak sapphire

bleak sapphire
#

lets see

elder stratus
#

It should work

charred quarry
#

btc

earnest phoenix
restive silo
#

but yea lavalink works fine

#

must be your connection/vps

earnest phoenix
#

probably my local internet connection, because when I was testing, i was testing with GCP's IP

#

not with localhost

#

and my internet's quite slow here

restive silo
#

hmm

earnest phoenix
#

maybe it was because of that

slender thistle
#

tfw your bot and dbl library aiohttp versions are incompatible so you manually post the server count with only aiohttp.

earnest phoenix
#

wait what?

#

really?

slender thistle
#

Yes. GWchadThink

#

Managed to get more errors for one function than overall in my entire life. GWchadThink

earnest phoenix
slender thistle
#

All those fucking multidicts and shit. GWchadThink

#

At least it works.

#

Or not.

#

Yay, asyncio gave up on life.

earnest phoenix
#

just use snekfetch

#

or request-promise

restive silo
#

snekfetch for python Thonk thats not a python thing

#

its js only

slender thistle
#

It works fine on start but not after 30 minutes.

#

😦

#
import aiohttp as snekfetch
karmic parcel
#

lol

charred quarry
#

(DIscordGo) Hi, I need help. Can someone tell me how do I check response time for my bot?
DM me

low owl
#

Checkout DAPI

uncut slate
#

just ask your question

#

I'd suggest a paste tool

karmic parcel
#

I know a good one

ivory niche
#

Hi

shy verge
#

hi

fluid basin
#

hi

sand roost
#

hi

ruby dust
#

bans = await guild.bans() is this the right way to get a list of banned users?

stray cedar
#

Hey all. Which service do you use to host your bot? I tried Zeit, but it spins down the app after a few hours

uncut slate
#

I use DigitalOcean

bitter sundial
#

same

#

wait no

stray cedar
#

Interesting. Never heard of it

bitter sundial
#

my bot is on Vultr now

stray cedar
#

Are both free / paid?

bitter sundial
#

paid

stray cedar
#

And do they sleep if no-one pings it in x amount of time?

bitter sundial
#

they dont

stray cedar
#

How much, if you don't mind me asking?

bitter sundial
#

lowest tier in DigitalOcean $5/month
Vultr $2.5/month (only in some regions, maybe, often out of stock; next tier is the same as above)

stray cedar
#

Cool. I don't expect anyone to actually use it, so I'll try Vultr

bitter sundial
#

also

stray cedar
#

Ideally I'd like a free service that doesn't sleep with x free executions / month

bitter sundial
#

are you a student

#

good luck finding a free one like that

#

they dont exist and if they do, only for a short amount of time

uncut slate
#

you can get $50 in DigitalOcean credit if you're a student

solemn obsidian
#

When something is free to you, someone else pays for it in some way

bitter sundial
#

oh and protip

#

if you register a vultr account and wait, they'll email you a promo code to get $20 free credit

spring ember
#

someone here knows vue and can help me with it?

ruby dust
#

you can host on github thing (forgot how it's called) for free if you are a student

spring ember
#

digitalocean

#

8 months

ruby dust
#

skysilk has a free plan which is enough for a bot with like 500 servers

earnest phoenix
#

What u think is the best way to make a help command that looks the best?

#

Discord.js <-----

minor elm
#

Try ```

earnest phoenix
#

I mean should I make it a embed or something else

minor elm
#

For an image? You do what you like most

earnest phoenix
#

For bot command

minor elm
#

Embed is for images

earnest phoenix
#

hmm

#

is it

#

πŸ€”

minor elm
#

Probably other files as well

earnest phoenix
#

good beginning for my bot 6 commands

#

What is the safest way me to upload my bot to github?

halcyon abyss
#

put a gitignore to the file which contains token & logins

#

or private repo

tulip steeple
#

Brb, gonna configure my bot

toxic oracle
#

preferrably both

elder rapids
#

@spring ember still need that vue help? Can help in like an hour if it's not a quick question

uncut slate
#

I'd suggest just asking your question

#

anyone who knows will answer

spring ember
#

yes I still need help

#

Aeth it's not that simple

bitter jay
#

lol

elder rapids
#

Been like past an hour but hi I'm here @spring ember

earnest phoenix
elder rapids
#

pro-tip don't use files (json files) as a way to store that data

earnest phoenix
#

Meh

#

it works for me

elder rapids
#

For scalability it is horrendous

earnest phoenix
#

It worked like 3 days ago though

trim plinth
#

json is never good as a db/storing data like xp

elder rapids
#

writing to a file thousands of times a second is terrible

earnest phoenix
#

that and I've only ever used js and json

#

so it'd be a whole new territory

elder rapids
#

You'll bottleneck pretty damn fast the way you're doing it

earnest phoenix
#

Ok

trim plinth
#

I suggest using a db instead of json because I can tell you from now, you'll most likely regret using json for a db

earnest phoenix
#

so it'd be xp.db?

trim plinth
#

no

earnest phoenix
#

oh

elder rapids
#

A database is a program

earnest phoenix
#

database

#

ok

elder rapids
#

It's a program that runs in the background 24/7 that manages... the obvious of data

earnest phoenix
#

what program do you guys recommend?

elder rapids
#

Choosing a database is really up to what your needs are

trim plinth
#

rethinkdb, sqlite, etc are good ones

earnest phoenix
#

I need it to store xp systems

trim plinth
#

mongo is good too

earnest phoenix
#

but nothing else really

elder rapids
#

NoSQL is probably nicer for XP systems

trim plinth
#

yeah

#

so you'd go for something like MongoDB or RethinkDB

elder rapids
#

Since you're writing a lot and remove unnecessary indexing and other relational stuff

earnest phoenix
#

now its not even adding xp to anyone

elder rapids
#

Depending on your bot size you're likely bottlenecking with this

earnest phoenix
#

prob

elder rapids
#

If several message events are being triggered you'll bottleneck VERY fast

earnest phoenix
#

True

elder rapids
#

You have to consistently keep reading the file and then consistently write to it

#

Both having a lock mechanism

trim plinth
elder rapids
#

Terrible on performance

earnest phoenix
#

so what database should I use and how would I get it to work with my bot?

elder rapids
#

You have to pick yourself

#

We mentioned Mongo and Rethink (NoSQL databases)

#

Do some research yourself and what might be best for you and what you'd prefer

earnest phoenix
#

Ok

elder rapids
#

I'm going to personally say I'm using MongoDB for everything in my bot and that means XP system too

trim plinth
#

rethink is easy

toxic oracle
#

if he comes back and asks if something like sqlite is good imma kms

elder rapids
#

But I have oodles of other stuff on top of it

trim plinth
#

at least sqlite is somewhat better than mysql

toxic oracle
trim plinth
#

just my opinion, don't murder me

toxic oracle
#

understandable

topaz fjord
#

i like mysql but sometimes i dont

#

i hate that no unicode support out of box

earnest phoenix
#

gah

#

I am stuck trying to figure out how to add a meme command

topaz fjord
#

Β―_(ツ)_/Β―

earnest phoenix
#

pretty much

knotty steeple
#

everytime i try to install better-sqlite3 i get an error

night imp
#

Can you post the error

knotty steeple
#
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\oaf\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack     at emitTwo (events.js:125:13)
gyp ERR! stack     at ChildProcess.emit (events.js:213:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\oaf\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\WINDOWS\system32\node_modules\integer
gyp ERR! node -v v8.7.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open 'C:\WINDOWS\system32\package.json'
npm WARN system32 No description
npm WARN system32 No repository field.
npm WARN system32 No README data
npm WARN system32 No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! integer@1.0.3 install: `node tools/install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the integer@1.0.3 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\oaf\AppData\Roaming\npm-cache\_logs\2018-05-04T21_14_54_150Z-debug.log
topaz fjord
#

did u install node-gyp correctly?

knotty steeple
#

node-gyp?

topaz fjord
spring ember
#

it seems it is a prerequisite

topaz fjord
#

use option 2

elder rapids
#

use option uno

topaz fjord
#

no

#

try 2 before you try 1

elder rapids
#

one 😠

topaz fjord
#

two

spring ember
#

try both

elder rapids
#

Two is for people that want to build it themself

#

Terrible

knotty steeple
topaz fjord
#

because most people seem to succeed with option 2

elder rapids
#

One is just an easy one line install

spring ember
#

delete system32 problem fixed

elder rapids
#

You can't

topaz fjord
#

npm install --global --production windows-build-tools

#

well

#

dont want to argue

#

with novus

#

so do that

#

as admin

#

pls

elder rapids
#

mmLol turtle ish joke

knotty steeple
#

yes ik

elder rapids
#

Obviously second is nicer because you'll succeed more

knotty steeple
#

i installed build tools wrong then

elder rapids
#

But it's the problem that they'll have to pain with getting all the deps for it or the build tools to make it etc..

knotty steeple
#

i still get errors

knotty steeple
#

Error: Cannot find module 'better-sqlite3'

#

and i literally installed it like 3 times

spring ember
#

Then check if this is the package name

knotty steeple
#

it is the package name

spring ember
#

Make sure it is in the node_modules

knotty steeple
#

i installed it globally

spring ember
#

And you did npm install --save

#

Why?

knotty steeple
#

i dont know anymore