#development

1 messages · Page 1311 of 1

earnest phoenix
#

Heroku can't handle much, you might just leave it on 200 guilds

open zodiac
#

ok can somebody tell me the html code to add background image to description ?

rose warren
#

Website with PayPal link

earnest phoenix
#

???

#

Heroku is not stable

drifting wedge
#

I’m under 18 so patreon if it sends to PayPal, will need like bank approval

#

Website with PayPal link
@rose warren PayPal .me?

pearl trail
#

ah, python i don't that

#

don't know*

rose warren
#

Yeah. I use patreon but they take killer fees

drifting wedge
#

Heroku is not stable
@earnest phoenix yes it is

earnest phoenix
#

What

drifting wedge
#

I use it

rose warren
#

Heroku is not ideal but it's ok when you're starting out

earnest phoenix
#

Using it doesn't mean it's stable

open zodiac
#

hello can somebody help me with this "ok can somebody tell me the html code to add background image to description ?"

rose warren
#

But definitely move away from it soon

drifting wedge
#

Heroku is not ideal but it’s ok when you’re starting out
@rose warren fair, my heroku can hold like bot playing music at once in 50 servers

#

But o think my Ffmpeg dodged

pearl trail
#

i have to buy raspberry pi to host my bot. after that, i need a fast wifi provider.

drifting wedge
#

Died

earnest phoenix
#

Heroku wasn't meant for bot hosting, that's why you should move on

pearl trail
#

because i can't control my bot, can't see the log in heroku

drifting wedge
#

Im having issues with LAVALINK

#

Anyone understands it? I can’t start the ll server

earnest phoenix
#

heroku batter than glitch

pearl trail
#

yes

earnest phoenix
#

Heroku has a lot of memory leaks, and also can't install a lot of packages

pearl trail
#

but i don't know if it just happen to my bot or not. it restart once per day.

drifting wedge
#

Heroku has a lot of memory leaks, and also can’t install a lot of packages
@earnest phoenix wuts a mem leak?

pearl trail
#

so all the custom prefix is gone.

rose warren
#

so all the custom prefix is gone.
@pearl trail save custom prefixes in a db

earnest phoenix
#

Reasons why you shouldn't use Heroku for your bot:

  • Bots are not what the platform is designed for. Heroku is designed to provide web servers (like Django, Flask, etc). This is why they give you a domain name and open a port on their local emulator.
  • Heroku's environment is heavily containerized, making it significantly underpowered for a standard use case.
  • Heroku's environment is volatile. In order to handle the insane amount of users trying to use it for their own applications, Heroku will dispose your environment every time your application dies unless you pay.
  • And due to a lot of other issues....
drifting wedge
#

@pearl trail save custom prefixes in a db
@rose warren JSON FTW

pearl trail
#

i'm still searching how to save custom prefix in db GWvertiPeepoSadMan

earnest phoenix
#

Heroku doesn't support saving stuff

rose warren
#

Json can corrupt

drifting wedge
#

I’m joking

rose warren
#

😂

earnest phoenix
#

Heroku doesn't have support for external databases, that's why it doesn't save anything

pearl trail
#

json can corrupt pepowot

drifting wedge
#

I use humandb, i lock some kids in my basement and make them remember my bots database stuff

pearl trail
#

tf lmao

rose warren
#

I use humandb, i lock some kids in my basement and make them remember my bots database stuff
@drifting wedge sounds like a cheap alternative

earnest phoenix
#

JSONs are prone to corruption because of so many read and writes, the bigger it gets the worse

drifting wedge
#

It’s hard to get them there, I had to offer developer badge

earnest phoenix
#

I use humandb, i lock some kids in my basement and make them remember my bots database stuff
@drifting wedge quick.db china edition you meant i assume

pearl trail
#

mongoDB

rose warren
#

Sql

drifting wedge
#

Imma go

earnest phoenix
#

MongoDB is the best database for a bot

drifting wedge
#

MongoDB is the best database for a bot
@earnest phoenix I use it pogggggggg

pearl trail
#

yes

drifting wedge
#

I use atlas

#

Cuz of Heroku

thick gull
#

or just don’t use heroku :)

earnest phoenix
#

Mongo atlas is what most of us use

rose warren
#

You can use mongo on heroku too tho?

thick gull
#

not local

#

atlas is free not local

pearl trail
#

my bot's total size is 125mb ;-;

earnest phoenix
#

But atlas version of mongo requires clusters which might require money, there's a free cluster but not much to it

#

hi

static wraith
#

Can someone help me out?

earnest phoenix
static wraith
#

it shouldnt be a {

#

should be a ,

#

Or is the url for the image?

drifting wedge
#

for guild in client.guilds: client not defined?

static wraith
#

If anyone has any idea about putting a let in a code and a error bouncing back saying
"let channel = message.mentions.channels.first();
^^^

SyntaxError: Lexical declaration cannot appear in a single-statement context"

Would be helpful...

rose warren
#

@earnest phoenix remove line 20 and 21 and add a } after line 22 (after the message.channel.send function)

azure jolt
#

Hi, I need help with shortening command if statements

Code bellow is what i use now, it works but it gets very long and i dont like it

if (cmd === "command1") {
  dosomething()
}

I wanna do something like this
if for example msg.content matches "cmd1", i want to call cmd1 without explicitly calling it

var commands ['cmd1', 'cmd2']
if (msg.content matches cmd1, call command 1 without explicitly calling it) {
call[msg.content]
}

I havent tested it out yet but i have some ideas, im interested if someone has better way of handling commands

worn shard
#

dpy or d.js?

azure jolt
#

djs, python looks nothing like that ;d

worn shard
#

Okay lmao

#

It can... sometimes

#

I use dpy

rose warren
#

Should get you heading in the right direction

earnest phoenix
#

If anyone has any idea about putting a let in a code and a error bouncing back saying
"let channel = message.mentions.channels.first();
^^^

SyntaxError: Lexical declaration cannot appear in a single-statement context"

Would be helpful...
@static wraith Are you putting that inside an if statement wthout braces?

#

How can I create a channel invitation and send it in en embed message ?
@sand dune Which library are you using?

#

discord.js?

rose warren
earnest phoenix
#

Nope

#

wait actually yes

flint yew
#

Anyone know why tf getting error like that TypeError: Cannot read property 'prefix' of undefined

rose warren
#

👀

earnest phoenix
#

that's how you create an invite

rose warren
#

😂

earnest phoenix
#

Anyone know why tf getting error like that TypeError: Cannot read property 'prefix' of undefined
@flint yew The parent object is undefined

#

Send the code pls

flint yew
#

I am only doing setprefix command

earnest phoenix
#

Send the code pls

pearl trail
flint yew
#

Okay

#

Its commando

rose warren
#

How do you code like that? 👀

earnest phoenix
#

@earnest phoenix remove line 20 and 21 and add a } after line 22 (after the message.channel.send function)
@rose warren https://prnt.sc/uwpb9u - Is it that way?

Lightshot

Captured with Lightshot

flint yew
#

1min lol

rose warren
#

@earnest phoenix no that's not what i said. Look at your original screenshot

flint yew
#

@earnest phoenix

rose warren
#

@sand dune it literally has an example in the docs. Make your embed in the .then( part.

earnest phoenix
#

are there any good image generators

#

@earnest phoenix no that's not what i said. Look at your original screenshot
@rose warren can you write the error-free version of the incorrect part of the code because I couldn't understand what you said.

rose warren
#

Paste your code here please (only the if (response.data.... part)

#

It's a syntax error

static wraith
#

Anyone know what enmap is ?

azure jolt
rose warren
#

No problem @azure jolt it's a useful website. Take a look around.

#

@earnest phoenix paste your code i'm not going to type it all out

earnest phoenix
#

Paste your code here please (only the if (response.data.... part)

   if (response.data.length) {
      message.channel.send('🔦 Aranıyor...'.slice(0, 256),
          image:
            url: response.data[Math.floor(Math.random() * response.data.length)].images.original.url
      }
   })
});
rose warren
#

actually paste the whole thing

#

because that's not all part of the same function

flint yew
#

anyone know commando :/

earnest phoenix
#
const Discord = require('discord.js');
const client = new Discord.Client();
const request = require('request-promise-native');

client.on('message', msg => {
  if (msg.content === 'gif'){
   let Options = {
      url: 'api.giphy.com/v1/gifs/search',
      q: encodeURI(args.join('+')),
      limit: 10,
      offset: 0
   };

   let response = request(Options);

   if (response.data.length) {
      message.channel.send('🔦 Aranıyor...'.slice(0, 256),
          image:
            url: response.data[Math.floor(Math.random() * response.data.length)].images.original.url
      }
   })
});
pale vessel
#

what

rose warren
#

k

#

That should work

#

wait

#

you edited lol

flint yew
#

TypeError: Cannot read property 'prefix' of undefined. anyone help with this if u know commando i want to do setprefix command

rose warren
#

@earnest phoenix

#

TypeError: Cannot read property 'prefix' of undefined. anyone help with this if u know commando i want to do setprefix command
@flint yew show the code causing the issue and someone might be able to help. Without the code no-one can help.

earnest phoenix
flint yew
#
                                                         
const { Command } = require('discord.js-commando');
const fs = require("fs");



module.exports = class setPrefixCommand extends Command { 
  constructor(client) {
    super(client, {
      name: "setprefix",
      group: "admin",
      memberName: "setprefix",
      description: "Change the server prefix (mention will always work)",
      guildOnly: true,
      args: [
        {
          key: "newPrefix",
          prompt: "Please choose the new prefix you want to set.",
          type: "string",
        },
      ],
    });
  }

  run(message, { newPrefix }) {
    if (this.client.config.prefix !== newPrefix) {
      let localConf = this.client.config;
      localConf.prefix = newPrefix;
      fs.writeFile("../../configprefix.json", JSON.stringify(localConf, null, 3), (err) => {
        if (err) throw err;
        message.say(`Successfully updated prefix to \`${newPrefix}\``);
      });
      this.client.log(`Prefix Updated`, `New value: **${newPrefix}**`, 323295, message);
    } else {
      this.client.error("That already is the current prefix!", message);
    }
  }
};
``` anyone help TypeError: Cannot read property 'prefix' of undefined
pearl trail
#

ah, commando

digital ibex
#

this.client.config isnt a thing

swift idol
#

anyone how to link openssl to cmake

flint yew
#

this.client.config isnt a thing
@digital ibex wdym

digital ibex
#

this.client.config doesnt exist

earnest phoenix
digital ibex
#

same way this.client.vfdjnefirjrjirefjirejfijrfjjfrjjrfirjf isnt a thing

flint yew
#

this.client.config doesnt exist
@digital ibex then what must be

blissful coral
#

Just a FYI, MANAGE_SERVER is now MANAGE_GUILD

digital ibex
#

by default thats not even a thing

#

so you need to assign it to something

rose warren
#

Try this.

const Discord = require('discord.js');
const client = new Discord.Client();
const request = require('request-promise-native');

client.on('message', msg => {
  if (msg.content === 'gif'){
   let Options = {
      url: 'api.giphy.com/v1/gifs/search',
      q: encodeURI(args.join('+')),
      limit: 10,
      offset: 0
   };

   let response = request(Options);

   if (response.data.length) {
      const attachment = new MessageAttachment(response.data[Math.floor(Math.random() * response.data.length)].images.original.url);
      message.channel.send('🔦 Aranıyor...'.slice(0, 256), attachment)
   }
  }
});
#

@earnest phoenix

digital ibex
#

an object with prefix

flint yew
#

the prefix in config.json

digital ibex
#

then do that then

#

just do

#

this.client.config = { prefix: 'ur prefix here' }

#

and if u wanna add more data to the config object do the same thing

flint yew
#

@digital ibex but that will work for the setprefix command

rose warren
#

Is that working for you @earnest phoenix?

flint yew
#

It will change prefix and save it

digital ibex
#

yes, why wouldn't it?

#

that error has nothing to do with saving it

flint yew
#

Okay let me try

earnest phoenix
#

Is that working for you @earnest phoenix?
@rose warren request-promise-native module is now out of use, what can I do? :(

sage bobcat
#

One message removed from a suspended account.

digital ibex
#

just if u misunderstood me, adding that line of code doesn't save anything @flint yew

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

earnest phoenix
#

:/

digital ibex
#

what r u tryna do, eare?

rose warren
#

Use node-fetch @earnest phoenix

blissful coral
#

Seems fun right?

#

Totally didn't just accidentally change the config of 48 bots on a command and didn't notice until now

flint yew
#

@digital ibex still same error

digital ibex
#

show ur code

flint yew
#

I only added ur code

digital ibex
#

where

flint yew
#

Above this.client.config

static wraith
#

Someone help please im trying to install enmap and better-sqlite3 but it keeps coming up with this...

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! better-sqlite3@7.1.1 install: prebuild-install || npm run build-release
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the better-sqlite3@7.1.1 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! /Users/harrison/.npm/_logs/2020-10-10T14_22_22_618Z-debug.log

digital ibex
#

where did u get this code from?

#

@flint yew

#

you cant just copy the code without understanding it

flint yew
#

Yea ik

pearl trail
#

@static wraith i think that's because it can't be installed in discord.js v12

#

because i have the same problem before

flint yew
#

@digital ibex it's only a small code not even need anything else

pearl trail
digital ibex
#

it doesnt change anything, its code which you dont understand

static wraith
#

so @pearl trail how would i get it to work

#

because ive just dont all that

#

for it not to work?

pearl trail
#

yes i think, you need to downgrade the node.js

static wraith
#

how do i do that?

earnest phoenix
#

Use node-fetch @earnest phoenix
@rose warren i typed "gif cat" but the bot didn't send me a GIF. https://prnt.sc/uwpthu - I added the module to the code like this.

Lightshot

Captured with Lightshot

pearl trail
#

she said use nvm but i don't know how to use it, bcause i have never use it

tired panther
#

hi

rose warren
#

You need to re-write the request for node-fetch. It doesn't work the same way as the module you were using before

pearl trail
#

node version manager (nvm)

static wraith
#

Is it possible to degrade your npm?

earnest phoenix
#

node fetch sucks I'll use phin because my VPS has super less storage space

static wraith
#

or discord.js i mean

tired panther
#

yes xD

static wraith
#

How do i go down in versions?

tired panther
#

npm install discord.js@12.2.0

static wraith
#

thankyou

rose warren
#
fetch(url)
.then(r => r.json())
.then(data => {
  // discord message stuff here
})```
#

@earnest phoenix

tired panther
#

@static wraith checkt the versions online

pearl trail
rose warren
#

You'll find some good help online @earnest phoenix

pearl trail
#

too lazy to read it one by one mmulu

rose warren
#

Use the GIPHY API too

static wraith
#

Still got the fkn error

solemn leaf
blissful coral
#

What is the recommended amount for sharding?

solemn leaf
#

1000

earnest phoenix
#

Still got the fkn error
@static wraith the error isn't acting stupid it's you not trying to fix it 🙂

blissful coral
#

K so I am disabling sharding LMAO

#

Fuck this

#

I am at 48

solemn leaf
#

Spook wait a min

rose warren
#

Before you get to 2,500

blissful coral
#

I will have it ready for when I do grow

#

For now I am back to normal

solemn leaf
#

I'm getting up rn

blissful coral
#

Nah

#

To tired to work on it rn

#

Just disabling

#

It fucked up half of my bot overnight

#

All configurations for every server got messed up

static wraith
#

@static wraith the error isn't acting stupid it's you not trying to fix it 🙂
@earnest phoenix Well obviously i am trying or i wouldnt be here lmao

earnest phoenix
#
fetch(url)
.then(r => r.json())
.then(data => {
  // discord message stuff here
})```

@rose warren which line should I delete and write this in?

solemn leaf
#

My bot still working like a charm @blissful coral

earnest phoenix
#

It fucked up half of my bot overnight
@blissful coral me and the git bois reverting back changes be vibin'

blissful coral
#

:/

#

VPS

#

Not git

#

@solemn leaf It was something with my db paired with the way I changed some stuff

rose warren
#

@earnest phoenix

client.on('message', msg => {
  if (msg.content === 'gif'){
      // Re-write all of this using node-fetch methods
  }
});```
blissful coral
#

I think I found a fix just now but still getting really annoyed and I am super tired'

#
client.shard.broadcastEval('this.guilds.cache.reduce((acc, guild) => acc + guild.memberCount, 0').then(console.log)
#

Shard is launched

#

And I am not getting a result

#

From this

earnest phoenix
#

i see the error maybe

blissful coral
#

I am not getting one

#

Whatcha seein?

solemn leaf
#

My db still works lmfao

earnest phoenix
#

wtf does this line mean:

acc + guild.memberCount, 0'

especially the zero

blissful coral
#

I see it to code...

#

LMFAO

#

Sharding is weird

pale vessel
#

accumulated value + next guild members count @earnest phoenix

blissful coral
#

Syntax errors are fun

#

especially when in a string

pale vessel
#

that's how reduce works

static wraith
#

found the problem!

#

npm install discord.js enmap@5.3.2

blissful coral
#

huh

static wraith
#

you have to type that

blissful coral
#

what is enmap lol

earnest phoenix
#

why you need enmap

blissful coral
#

No but I am curious

pale vessel
#

shh, hindsight might see this

earnest phoenix
#

That's rickh presence

#

The playing games statuses are made with that

pearl trail
#

@earnest phoenix Thonk

#

the code that i give didn't work?

earnest phoenix
#

dont work

pearl trail
#

what is the problem?

#

it workin well in mine

earnest phoenix
#

i try host to not work

pearl trail
compact oriole
#

lmao

honest perch
#

@earnest phoenix you cant host it

earnest phoenix
#

i try host to not work
@earnest phoenix w h a t

honest perch
#

its a rich presence preview

compact oriole
#

that rich presence is for games

#

FOR GAMES

earnest phoenix
#

🥲

compact oriole
#

not for bots

#

if you play like Valorant it will show data

earnest phoenix
#

syh

pearl trail
#

@compact oriole well, we can use that manually

#

costumize it

compact oriole
#

not in bots :P

pearl trail
#

yes, not in bots,

compact oriole
#

but yes you can make any "application" use it

earnest phoenix
#

Bots are technically a sub-thingy of discord applications and rich presences are for ANY discord application so you can LITERALLY USE RICH PRESENCE FOR NOTS

blissful coral
#
client.shard.broadcastEval('this.guilds.cache.reduce((acc, guild) => acc + guild.memberCount, 0)').then(r => 
  client.user.setActivity(`${r} Users!`, {type: "WATCHING"})
  )
#

This look right?

sinful tangle
#

Anyone give me application code

compact oriole
#

no

#

you can't use custom rich presence for bots

earnest phoenix
#

Spoonfeeding

blissful coral
#

@sinful tangle No we do not spoonfeed

pearl trail
#

yes, that rich presence is for you

earnest phoenix
#

@compact oriole i need use main ac

blissful coral
#

Ayo that fixed it

#

Lets go

earnest phoenix
#

you can't use custom rich presence for bots
@compact oriole unless...you've got game dev license and you have a game in the exact same application as the bot

compact oriole
#

but no

#

bots can't have custom rich presence

sudden geyser
#

Extreme .broadcastEval returns a promise resolving to an array of anything.

sinful tangle
#

Bruh

pearl trail
#

what is the problem?
@pearl trail

compact oriole
#

period.

blissful coral
#

@sudden geyser Yeah I noticed that and just now fixed it

earnest phoenix
#

bruh

compact oriole
#

if bots could have custom rich presence, it would be insane news

pale vessel
#

reduce the reduced 5head

earnest phoenix
#

@compact oriole bruh i meant that people can have rich presence set for themselves through botums i didn't say bots can have custom statuses

blissful coral
compact oriole
#

that is false too

blissful coral
#

Looks alot better then the 19 I was getting lulw

compact oriole
#

a bot can't give you rich presence

#

only an application can

earnest phoenix
#

bruhhhhhh

compact oriole
#

that you run on your local machine

earnest phoenix
#

i-

pearl trail
#

nice typo lol

latent cosmos
#

any way to view server votes? view bot votes are documented in the api, bot cant find anything regarding server votes

earnest phoenix
#

literally said you can have rich presence even if there is a bot associated with the application

#

and discord is weird

compact oriole
#

of course

#

lmao

earnest phoenix
#

I'll be on the lookout for ways to have bots set your rich presence 🙂

pale vessel
#

no

compact oriole
earnest phoenix
#

that'll be cool tho

pale vessel
#

that's not possible

compact oriole
#

my game license app

#

with a bot

honest perch
#

you cant do that

solemn leaf
#

@blissful coral keep your index

honest perch
#

only the user can set rich presence

solemn leaf
#

You can edit your node file

pearl trail
compact oriole
#

only the user can set rich presence
yea

solemn leaf
#

To make bot.js be node .

earnest phoenix
#

@compact oriole WAIT YOU HAVE GAME LICENSE

compact oriole
#

yes?

honest perch
earnest phoenix
#

that means you develop games?

compact oriole
#

yes?

blissful coral
#

@solemn leaf I already did lol

earnest phoenix
#

why are we typing like this?

static wraith
#

can anyone help em insatll better-sqlite3 now because ive done enmap but i cant seem to get that one

pearl trail
#

ah, you run it in glitch

earnest phoenix
#

yes

honest perch
#

no?

#

it has to be local

#

to show presence

pearl trail
#

yes

static wraith
#

ah, you run it in glitch
@pearl trail thought that was to me then relized

blissful coral
#

Wait how do I get the shard ID

#

Of the current shard

pearl trail
#

actually, that's not my code. i'm trying to use heroku (yes, it's stupid things) so i upload it to my repo and it doesn't work

compact oriole
#

not sure for discord.js

earnest phoenix
compact oriole
#

I use kurasuta

#

ima check

earnest phoenix
#

@pearl trail lol

#

🥲

compact oriole
earnest phoenix
#

new emoji

pearl trail
compact oriole
#

and most likely one shard per process

#

so the first one of the array

earnest phoenix
#

@pearl trail what is solution

blissful coral
#

Thx @compact oriole

pearl trail
#

i don't have any solution for now until you run it on your own computer/laptop

earnest phoenix
pearl trail
#

even i download every python app in play store to run it

#

nothing works

earnest phoenix
#

sad

pearl trail
earnest phoenix
#

even i download every python app in play store to run it
@pearl trail you tried installing python...from google play store...which is for android stuff...yeah it's big brain time

pearl trail
earnest phoenix
#

laptop

#

?????

#

What are you trying to do?

#

rich-presence

#

this

#

Are you developing a game?

pale vessel
#

you
can't

limber flume
earnest phoenix
#

why?

static wraith
#

If anyone can help me with the Better-sqlite3 Please dm me

earnest phoenix
static wraith
#

no one?

slender thistle
#

-ask2ask

gilded plankBOT
#

Don't ask to ask.
Just ask your question, it wastes time if you say "i need help" or "can someone help me?" instead of just saying what the problem is. Save your time and other people's time and just ask the question.

Please read https://dontasktoask.com/ for an explanation on why this is an issue.

slender thistle
#

P.S. just state your issue here

static wraith
#

Well its just failing to install the script

earnest phoenix
#

Show error stack trace

azure jolt
#

quick question, do semicolons matter in js? if not used at all will it cause an unexpected error

static wraith
#

sorry it was more than 2000 letters

azure jolt
#

pastebin moment

limber flume
#

hastebin*

static wraith
#

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! better-sqlite3@7.1.1 install: prebuild-install || npm run build-release
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the better-sqlite3@7.1.1 install script.

earnest phoenix
#

Semicolons aren't needed in js but it's good practice to use them, it should be used on making invokable functions @azure jolt

static wraith
#

most important part ig

earnest phoenix
#

@earnest phoenix can you help me ?

#

how can I cast the command just by voting ?
@earnest phoenix What do you mean by that

#

@static wraith Do you have quick.db installed?

#

I have a command but I just want it used by voting

static wraith
#

No...

azure jolt
#

😑

static wraith
#

Is it just npm i quick.db --save?

earnest phoenix
#

You mean, it would only work if you vote the bot on top.gg?

#

yeah

#

You could use the dblapi.js and get the votes of your bot, if the user exists there run it, if not return, that's it

#

what is twitch emotes

#

🥲

solemn leaf
#

👍

earnest phoenix
#

Do you need to compile markdown into HTML before it can be displayed on browsers or do modern browsers have built-in ways to display markdown files?

carmine summit
#

how do I know if DM?

earnest phoenix
#

@solemn leaf how do our status

#

like

#

how do I know if DM?
@carmine summit message.guild is undefined in a DM message

#

Do you need to compile markdown into HTML before it can be displayed on browsers or do modern browsers have built-in ways to display markdown files?
@earnest phoenix Markdowns aren't displayed by default on browsers, it should be compiled to HTML

pale vessel
#

or use channel.type

carmine summit
#

message.channel.type?

pale vessel
#

yes

#

"dm"

carmine summit
#

capital

#

smo

pale vessel
#

no

carmine summit
#

l

earnest phoenix
#

Which program do I use to compile it to HTML?

carmine summit
#

oh so thats why it aint working

pale vessel
#

a parser code913

#

like on php it can be parsedown

earnest phoenix
#

@carmine summit message.channel.type returns dm for dms but it will return smth else for group dms
that's why we prefer the message.guild is undefined for dms method

pale vessel
#

you can't invite a bot to a group dm anyway

earnest phoenix
#

a parser code913
@pale vessel no don't parse me smh

pale vessel
#

but true

earnest phoenix
carmine summit
#

hm

#

message.guild === undefined

#

ok ok

earnest phoenix
#

markdown isn't compiled NotLikeThis

#

you can't invite a bot to a group dm anyway
@pale vessel you can if the bot is weird enough

pale vessel
#

!message.guild

earnest phoenix
#

Just

#

it's just parsed down to html

pale vessel
#

it's like calling js compiled

earnest phoenix
#

What is the fucking difference between compiling and parsing
They're both just converting one thing into another

#

compiling is translating into machine code

#

i.e. you compile c#, c++ etc.

#

but markdown to html compiling..?

pale vessel
#

no

earnest phoenix
#

it isn't compiling

pale vessel
#

it's parsing

earnest phoenix
#

because compiling by definition is translating into machine code

#

thanks

sudden geyser
#

I'd say compiling would be correct in that statement, but there are better words to choose from (parse).

earnest phoenix
#

one last thing
does GitHub have their own markdown parser?
they have their own version of markdown why won't they have a parser

pale vessel
#

github does

earnest phoenix
#

how do you think README is rendered

#

;

pale vessel
#

gfm is nice

#

all parsers should follow gfm

#

the table is the most convenient one

earnest phoenix
#

Does it work with normal markdown

pale vessel
#

yes

earnest phoenix
#

yeeeeeet

#

Clampy, why do you keep deleting your message

#

i used markdown-it in my react project

#

His code blocks aren't working

static wraith
#

I Kept making errors in explaining

pale vessel
#

github flavored markdown

static wraith
#

think i have sorted it now tho

pale vessel
#

it's not a parser

earnest phoenix
#

waitWhat
@earnest phoenix

this is a code block

` ``this is a failed code block```

pearl trail
#

do you know why it's happening?
Error: Status code: 429

earnest phoenix
#

Too many requests error that is

#

You're sending a request to an API too many times

pearl trail
#

i just turned on the bot, play music, and it appears

#

i need to restart the bot again

earnest phoenix
#

@pearl trail lower the interval between each request

pearl trail
earnest phoenix
pearl trail
#

hm, nvm i'm noob in js.

earnest phoenix
#

You're probably sending a request once every second or so right?

pearl trail
#

uh, yes i think

earnest phoenix
#

Send the code

pearl trail
#

uh, i'm using heroku

#

i can't see the log

#

or, the bot's code?

earnest phoenix
#

Heroku sucks
They're against bots

pearl trail
earnest phoenix
#

If you REALLY NEED A FREE HOST use repl.it

#

it's the only free host that's actually worth it

pearl trail
#

brb, imma search that

earnest phoenix
#

but you should NOT use it for big bots

pearl trail
#

oh

#

can raspberry pi handle it?

earnest phoenix
#

yep

pearl trail
#

but my wifi can't. suc

earnest phoenix
#

Then use an online host

pearl trail
#

the paid one

earnest phoenix
#

repl.it is a good TEMPORARY host but since you want a paid one I'd recommend Vultr or DigitalOcean

#

And Google Firebase's Firestore as a database

pearl trail
#

oh, google. wow doggowave

earnest phoenix
#

😂

solemn latch
#

galaxygate is also a good option for vps's

pearl trail
#

$2.5, not bad

#

still don't have a credit card

solemn latch
#

theres also a million good db solutions.

earnest phoenix
#

galaxygate pandasad

#

free??

solemn latch
#

dont use free database providers imo

earnest phoenix
#

I use repl.it as a host and quick.db as a database
TEMPORARY solution

#

(i type temporary like that so people don't scream at me)

solemn latch
#

omg thats a terrible permanant solution

#

what if your bot gets 1 billion users

#

how will quickdb handle it

pearl trail
static wraith
#

How would i add a reaction to a message

#

whats the code?

solemn latch
#

the docs for your lib will tell you

pearl trail
#

is bot take a lot of cpu usage if it's in so many guilds?

earnest phoenix
#

omg thats a terrible permanant solution
what if your bot gets 1 billion users
how will quickdb handle it
@solemn latch KEKW literally how people talk here

solemn latch
#

yeah

earnest phoenix
#

Honorable mentions:
cry, SHIVACOWO, misly, matthew, borboss

solemn latch
#

im on mysql, i can handle millions of rows with the amount of ram i have with minimal caching.
people still have told me not to use it because I will need to switch at some point.
meanwhile 6 months in i have 22k rows

#

oop, just passed 23k

pearl trail
earnest phoenix
#

as much as that was a joke, quickdb and free hosting can't handle 100+ active guilds lol

#

im on mysql, i can handle millions of rows with the amount of ram i have with minimal caching.
people still have told me not to use it because I will need to switch at some point.
meanwhile 6 months in i have 22k rows
@solemn latch i don't even have a working economy system let alone the database 🤣

#

but lets be honest

#

95% of people here that use free hosting have shitty bots that won't reach that kind of activity

pearl trail
#

i'm not using quick.db, so i'm fine GWsetmyxPeepoEvil

earnest phoenix
#

TEMPORARY HOST YOU DON'T HAVE TO SHIT ON ME AGAIN

boreal iron
blissful coral
#

im on mysql, i can handle millions of rows with the amount of ram i have with minimal caching.
people still have told me not to use it because I will need to switch at some point.
meanwhile 6 months in i have 22k rows
@solemn latch YESSIR MYSQL

earnest phoenix
#

ew oracle

pearl trail
#

raspberry pi using linux as the operation system right?

boreal iron
#

Aye debian

earnest phoenix
#

an rpi is a machine

#

it can run any os you put on it

pearl trail
#

oh

solemn latch
#

pretty sure they run windows now too

earnest phoenix
#

yup

blissful coral
#

mhm

solemn latch
#

probably a bad idea for this though

earnest phoenix
#

ew oracle
@earnest phoenix
Stuff lik Arc, Python, JavaScript, etc. don't suck
It's just that you don't like them
Stop screaming your opinion at other people
quoting my post from #memes-and-media that only got two stars :(

blissful coral
#

very

pearl trail
#

1,3ghz cpu with 4gb ram

earnest phoenix
#

oracle is a company

#

there's many reasons to hate them and to avoid their products

boreal iron
#

lmao

earnest phoenix
#

3 billion devices run oracle
@swift umbra *java

#

a number that hasn't changed since 2006 ™️

solemn latch
#

lol

pearl trail
#

i have to sleep bye all doggowave

solemn latch
#

mainly minecraft users now

#

gn

earnest phoenix
#

MINECRAFT IS MADE IN JAVA SO IF ORACLE DIDN'T EXIST MINECRAFT DIDN'T EXISTS AND WE WOULD BE DYING RIGHT NOW

#

im pretty sure minecraft ships an openjdk distribution with the launcher now

solemn latch
#

yeah it does

earnest phoenix
#

oracle isn't the only distributor of the jdk lol @earnest phoenix

#

also IBM

boreal iron
#

SO IF ORACLE DIDN'T EXIST MINECRAFT DIDN'T EXISTS what a nice future this would be

earnest phoenix
#

i am too lazy to eval <da message>.toLowerCase() and edit the message because i accidentally held down shift

#

yup

#

then oracle bought java from sun
@swift umbra the sun is a giant cosmic trader lmao

#

then came microsoft and slapped java's ass with c# mmLol

#

oh hrllo code913

#

I didn't expect you to still be chillin

#

this is my last exam day AND my favourite exam day

#

java is good for what it is

boreal iron
#

Bot declined
Reason Eww Java...

carmine summit
#

Hello

earnest phoenix
#

java is getting killed by its own users

#

Since Java is so fucking spaghetti no dumbasses try it only the good ones with great will do

#

many people just avoid updating beyond JDK 8

carmine summit
#

Bot declined
Reason Eww Java...
Bruh

earnest phoenix
#

real question out here how do you handle a database 24/7 if you host a bot

#

is there any providers that is sort of "all in one"

#

real question out here how do you handle a database 24/7 if you host a bot
@earnest phoenix Firebase has 24/7 database solution

#

you can also host a database server alongside your bot

carmine summit
#

quick.db

earnest phoenix
#

local smh

#

but it works for small scale

carmine summit
#

yeah

earnest phoenix
#

@earnest phoenix @boreal iron
Time to yeet my post here again:

Stuff lik Arc, Python, JavaScript, etc. don't suck
It's just that you don't like them
Stop screaming your opinion at other people bitch
This time I won't delete the word at the end

#

slight problem my database has very much outgrown small scale

carmine summit
#

I don't even knwo how to use MongoDB

#

I cannot use mySQL since its sign-up requirements

#

so yeah

#

im stuck with quick.db

solemn latch
#

mysql has sign up requirements?

#

tf?

carmine summit
#

yeah

#

business name

#

address

earnest phoenix
#

personal suggestions overhere, if you want to bother with SQL, postgresql is def the winner here, if not there are nosql databases i.e. mongo

#

currently I use Redis

carmine summit
#

smth like that

earnest phoenix
#

@earnest phoenix @boreal iron
Time to yeet my post here again:
This time I won't delete the word at the end
@earnest phoenix Aren't you the one saying "Java is so fucking spaghetti"

#

@carmine summit that's oracle but yes

boreal iron
#

Stop screaming your opinion at other people bitch Welcome to the real world.

earnest phoenix
#

looking at IBM Oracle for it but I don't know

#

this is why im super against oracle

#

I'd before an all in one solution

drifting wedge
#

if i have 3 shards on 90 servers

earnest phoenix
#

Firebase's both types of databases use Bigtable by Google which is based on mongo

drifting wedge
#

will it slow down the bot?

earnest phoenix
#

like 1 provider

solemn latch
#

it will increase ram usage

#

for no reason

carmine summit
#

So.... which DB is the best to use rn?

earnest phoenix
#

i'd personally suggest going for postgresql but pick whatever suits you the most

#

Redis does increase ram useagle

drifting wedge
#

mongo

carmine summit
#

mongo wtf

earnest phoenix
#

I mean I use Redis since I love speed

carmine summit
#

cant even connect my bot

earnest phoenix
#

I get off to efficient code

#

lowkey

#

@earnest phoenix Aren't you the one saying "Java is so fucking spaghetti"
@earnest phoenix reread my message
I'm not saying Java sucks because it's terrible to learn I'm saying Java is good for what it is but it's still a little bad. However that doesn't mean it's a terrible piece of shit everyone should uninstall from their computers

#

I am sorry but any coding language in modern times are all great

#

like the differences are basically so minor it doesn't even matter

#

clojure

opal plank
#

yes indeed Scratch is bery gud

earnest phoenix
#

Still, you said don't throw your opinions on other people, you still do, bruh

boreal iron
#

However that doesn't mean it's a terrible piece of shit everyone should uninstall from their computers You installed Java on your PC? lmao

solemn latch
#

Scratch best

earnest phoenix
#

nah not Scratch

#

but like JS Py C# etc

#

Yes I did

#

Hail Minecraft

slender thistle
#

What's going on here

opal plank
#

you get my point, not every lang is good. Its the right tool for the right job

earnest phoenix
#

all basically as powerful as each other y'know

#

btw i use cracked minecraft

solemn latch
#

discussing languages and databases

earnest phoenix
#

c# is king of modern x64/x86 development change my mind mmLol

#

just pick a language and you are good to go y'know

#

What's going on here
@slender thistle three conversations in the same channel turning it to spaghetti

boreal iron
#

Hail Minecraft
KEKW

opal plank
#

some langs are more powerful in specific tasks than others, compile times, flexibility, speed, theres a lot to consider

earnest phoenix
#

how to make efficent code
if
if
if

boreal iron
#

Oh that's the reason why.

earnest phoenix
#

yeah but like Erwin they are all capable

opal plank
#

capable isnt enough though

earnest phoenix
#

just pick a language and you are good to go y'know
@earnest phoenix absolutely
i went for javascript because i found it easy
and so did almost everyone else while choosing their languages

opal plank
#

try making an App in js, or a full on game, thats the wrong tool for the job

boreal iron
#

Thought Minecraft is something from 7 to 12... lel

earnest phoenix
#

@boreal iron fuck off fortnite player

opal plank
#

js is much better for backend and web development

boreal iron
#

Fortnitehaha yeet another joke

earnest phoenix
#

yeah but like Erwin they are all capable
basic running on RISC mmLol

#

I mean Fake what is up with the default pfp

boreal iron
#

also from 7 to 12 I guess

earnest phoenix
#

This channel is descending to hell

#

it's time to decend to hell

boreal iron
#

Well we're moving a little into game-"development"... no problemo

earnest phoenix
#

i use it more for client side
the only back-end thing i have is a node.js server and a database on firebade

boreal iron
#

Still "development"

earnest phoenix
#

also discord bot development is not as intense as making apps

opal plank
#

but any how, right tool for right job, langs have limitations and their pros/cons. generalising is bad, thats about it

earnest phoenix
#

so for making a bot they are all just as good

#

writing a bot in asm is actually doable

#

if you know asm

#

properly

#

since a bot is a glorified print statement with a database

#

but any how, right tool for right job, langs have limitations and their pros/cons. generalising is bad, thats about it
@opal plank @modums PIN THIS FUCKING PIN THIS

#

guys how do i write a discord bot in assembly?
@swift umbra You don't, you can but don't

#

i use it more for client side
the only back-end thing i have is a node.js server and a database on firebade
i'll never ever use node as my backend but i'm constantly using it for my frontend

#

I am using Script Editor of Google Forms. It is showing error in this line e.response.getItemResponses().forEach(function(i) { please help

#

a single language isn't the best per se ig

#

If all programming languages are basically human readable text compiled to binary assembly before running

is every single programming language a wrapper for machine language

#

yes

#

lmao wut

#

please help

solemn latch
#

isnt js written in like c#

opal plank
#

Binary is the universal programming language, change my mind

earnest phoenix
#

no

#

It's written in c++

solemn latch
#

ah

earnest phoenix
#

whats the matter don't code in 1s and 0s

#

are you weak?

#

are you really even a programmer?

#

I am using Script Editor of Google Forms. It is showing error in this line e.response.getItemResponses().forEach(function(i) { please help

#

Well, time to code a discord bot in binary itself

blissful coral
#

down

earnest phoenix
#

time to you already should be

#

isnt js written in like c#
@solemn latch the chrome engine is
btw it's c++ not seashark

#

people used to write machine code onto punch cards then feed it onto the computer
then we advanced to languages you know today, BASIC etc. that compile to asm
then C which compiles to BASIC
then C++ which compiles to C etc.

@earnest phoenix

#

whats the matter Volt are you new here or something?

#

newbie "programmers" smh

#

@green kestrel I am using Script Editor of Google Forms. It is showing error in this line e.response.getItemResponses().forEach(function(i) { please help

#

people used to write machine code onto punch cards then feed it onto the computer
then we advanced to languages you know today, BASIC etc. that compile to asm
then C which compiles to BASIC
then C++ which compiles to C etc.

@earnest phoenix
@earnest phoenix stop being my computer text book

#

What's this guy trying to say

flint yew
#

@earnest phoenix I must give up for this error?

earnest phoenix
#

Binary is the godly programming language change my mind

carmine summit
#

How do I define db in MongoDB?

blissful coral
#

Binary best lang

earnest phoenix
#

binary is not universal because instructions are different for each processor
this ^^

#

How do I define db in MongoDB?
@carmine summit var db = client.db("dbname");

#

that's it

carmine summit
#

oh

earnest phoenix
#

01110100 01100101 01111000 01110100 00100000 00111101 00100000 01010100 01110010 01110101 01100101 00001010 01101001 01100110 00100000 01110100 01100101 01111000 01110100 00100000 00111101 00111101 00100000 01010100 01110010 01110101 01100101 00111010 00001010 00100000 00100000 00100000 01110000 01110010 01101001 01101110 01110100 00101000 00100010 01111001 01100101 01110011 00100010 00101001

#

yeah I can code

#

@earnest phoenix I am using Script Editor of Google Forms. It is showing error in this line e.response.getItemResponses().forEach(function(i) { please help

#

we use high level languages today so we let the compilers behind decide which instruction sets to use, RISC vs CISC etc.

opal plank
#

@earnest phoenix you shouldnt be @'ing random people for support, read rules

solemn latch
#

probably should stop talking about other things when people have questions 🤔

earnest phoenix
#

sorry

flint yew
#

Yes

carmine summit
#

@carmine summit var db = client.db("dbname");
@earnest phoenix if dbname does not exist, will it automatically create a new?

earnest phoenix
#

@earnest phoenix if nobody is helping stop pinging random people
try going somewhere like discord .gg/plexidev or stackoverflow

opal plank
#

idk the answer, otherwise i'd answer

earnest phoenix
opal plank
#

i dont even know google had a script something

earnest phoenix
#

@earnest phoenix if dbname does not exist, will it automatically create a new?
@carmine summit i don't really know

carmine summit
#

aight

earnest phoenix
#

ask @Tim

#

@earnest phoenix Show an screenshot at least

#

function onSubmit(e) {
var discordPayload = {
content: 'Form submitted',
embeds: [{
type: 'rich',
title: 'Form submission',
color: 7506394,
fields: []
}]
}
e.response.getItemResponses().forEach(function(i) {
var v = i.getResponse() || 'None'
discordPayload.embeds[0].fields.push({ name: i.getItem().getTitle(), value: v })
})
UrlFetchApp.fetch('youknowwhatgoeshereanywaysandimnotinthemoodtoleakstuff', {
method: 'post',
payload: JSON.stringify(discordPayload),
contentType: 'application/json'
})
}

#

youknowwhatgoeshereanywaysandimnotinthemoodtoleakstuff
@earnest phoenix Lmfao

blissful coral
#

The question is

#

Is there a binary code block

earnest phoenix
#

Is there a binary code block
@blissful coral Yes there is

#

I saw Telk's pointless translate bot use that

#
000010101011110101```
#

Any colors?

carmine summit
#

MongoClient must be connected before.....

earnest phoenix
#

I'm on mobile can't see

carmine summit
#

How do I fix?

earnest phoenix
#

MongoClient must be connected before.....
@carmine summit of course

#

Make your code sync

restive furnace
#

or await them

earnest phoenix
#

And add the connect thing BEFORE you fetch databases

carmine summit
#
const MongoClient = require('mongodb').MongoClient;
const uri = "mongodb+srv://cwicks:NO@cluster0000.knta7.gcp.mongodb.net/Cluster0000?retryWrites=true&w=majority";
const clientDB = new MongoClient(uri, { useNewUrlParser: true });
clientDB.connect(err => {
  const collection = clientDB.db("test").collection("devices");
  // perform actions on the collection object
  clientDB.close();
})

const db = clientDB.db('db')
earnest phoenix
#

that'll be executed before

#

or await them
@restive furnace who really puts setup stuff inside an async function

#

Put an await before clientDB.connect(...)

#

That's not an async function I'm 100% sure

restive furnace
#

@restive furnace who really puts setup stuff inside an async function
@earnest phoenix global await? and you can always go with callback hell too wesmart

blissful coral
earnest phoenix
#

await keyword can't be used outside an async function

restive furnace
#

await keyword can't be used outside an async function
@earnest phoenix node.js v14.8+

earnest phoenix
#
(async () => {
// Promise here
})();```
#

@restive furnace I'm literally on Node.js 14.9.1

#

brrrrrrrrrrrrrrrr

restive furnace
#

and on node.js v 14.8 and higher you can do js await /* promise here */;

#

@restive furnace I'm literally on Node.js 14.9.1
@earnest phoenix for me it works

drifting wedge
#

so im making a giveaway command

earnest phoenix
#

so im making a giveaway command
@drifting wedge why

blissful coral
#

Ok

drifting wedge
#

how can i make it run the "end giveaway" function when the giveaway is done?

#

@drifting wedge why
@earnest phoenix BECUZ I WANT TO

blissful coral
#

dbs?

earnest phoenix
#

Regularly check if the giveaway has ended

#

If it has end the giveaway

#

don't check too often or too late tho

drifting wedge
#

well how can i make it like so you can do 3m

#

or 6d

earnest phoenix
#

@earnest phoenix Nice code, kappa
@earnest phoenix thanks hun

#

pretty advanced I know

#

@earnest phoenix are you using child_process.exec for the exec command

#

https://prnt.sc/uwr1k0

quick.db not install error
npm install --global --production --vs2015 --add-python-to-path windows-build-tools
npm install --global --production --add-python-to-path windows-build-tools node-gyp

I have done these before and have done it again, but unfortunately quick.db does not load.
Lightshot

Lightshot

Captured with Lightshot

#

@earnest phoenix of course

#

@earnest phoenix npm i quick.db

#

@earnest phoenix Is it installed in the same folder as the bot.js file?

restive furnace
#

@earnest phoenix it doesn't work with eval

#

since it's not inside async function

#

or global scope

earnest phoenix
#

wtf

#

That's not how it works

#

@earnest phoenix I DID NOT UNDERSTAND

#

@earnest phoenix I DID NOT UNDERSTAND
@earnest phoenix why are you screaming?

pale vessel
restive furnace
#

That's not how it works
@earnest phoenix well, i don't know what prevents you doing it, but I can do.

earnest phoenix
#

caps-lock left open

#

ok

#

@pale vessel Talking to me or

#

did you run npm install quick.db in the same folder as bot.js?

#

It should be there in package.json file in the same folder

#

error

pale vessel
#

nice ping

earnest phoenix
#

quick.db is spaghetti on windows

pale vessel
#

@earnest phoenix edited

earnest phoenix
#

i can't help with that i myself have been trying so long to install it on windows

azure jolt
#

is there any alternative to json? that has less chance of getting corrupted, no dbs

slender thistle
#

Properly handling open/writes is the only option in that case catshrug

azure jolt
#

ive never had json corrupted

#

im just worried it might

misty sigil
#

Then use a db?

slender thistle
#

As long as you don't open it a whole fuckton of times

boreal iron
#

Which can be corrupted as well.

azure jolt
#

so everyhing can be corrupted if not handled properly

misty sigil
#

It won’t corrupt as easily as a json file

boreal iron
#

There's no perfect solution but databases are quite the best solution.

#

Yes.

earnest phoenix
#

json is just a formatting, you're effectively still saving data in plaintext

boreal iron
#

handled properly just check all input/outputs for a json error and throw them "away" if so

#

or throw an error

azure jolt
#

is try catch a good way to do it?

boreal iron
#

well it will stop the script

#

I would log errors but that's my opinion

earnest phoenix
#
#1
sql = "INSERT INTO Blacklisted_IDs(user_id) VALUES(%s);"
    cursor.execute(sql, member.id)
    db.commit()

#2
sql = "DELETE FROM Blacklisted_IDs WHERE user_id = %s;"
    cursor.execute(sql, (member.id))
    db.commit()```

Anyone know if these look right?
sudden geyser
#

have you tried it

earnest phoenix
#

yh

#

it wont work 😦

honest perch
#

is it saving in the sql database?

earnest phoenix
#

idk, i've put db.commit() so i'd think so?

honest perch
#

can you run an sql console and check if the user is actually in there

earnest phoenix
#

idk a way to get into the db 😂 the Browser doesn't work on mac,

compact oriole
honest perch
#
SELECT * FROM Blacklisted_IDs WHERE user_id IS *
``` not an sql person but im pretty sure this would be it
compact oriole
#

yea Misly is right

#

you should actually check if the data is there

honest perch
#

if it is then its an error in your code

#

if it isnt, you arent saving it properly

#

or just ```sql
SELECT * FROM Blacklisted_IDs

drifting wedge
#

how do i like make a count down in python?

honest perch
#

have you tried googling it

#

pretty sure that would be something that could be answered in the first 5 results

earnest phoenix
compact oriole
#

bad question

#

you haven't shown any code, the ss is low quality/not cropped

honest perch
#

you have a ? where it shouldnt bee

solemn latch
#

those dang bees

compact oriole
#

ye, we just don't know the location

honest perch
earnest phoenix
#

no Data was saved,

honest perch
#

then you did something wrong

earnest phoenix
#

i cant figure out what though 😂

tardy hornet
#

how do i make that my bot status will refresh every 20s

sudden geyser
#

What library are you using

tardy hornet
#

js

sudden geyser
#

That's a language; not a library.

tardy hornet
#

oh lol sorry

#

then idk how do i check

solemn latch
#

libraries would be like discordjs, eris, djs-lite

tardy hornet
#

then discord.js

#

so someone knows how?

sudden geyser
#

Use setInterval to schedule something to be run every X milliseconds. See https://nodejs.org/api/timers.html#timers_setinterval_callback_delay_args

So, in your case, pass a function that'll change the activity to something else and pass as the argument the equivalent of 20 seconds. However, I recommend you change that 20 seconds to something longer, like a minute of 2

flint yew
#

Anyone know how to do a help command category like if I said !help fun it send only the fun command anyone know how to do that using commando :)

Ping me if you know xD

solemn leaf
#

This is the best fucking docs I have ever seen

flint yew
#

Lmaoo

solemn latch
#

check the args, if there is an arg, check if that arg is a command name

solemn leaf
solemn latch
#

or category

#

or whatever section

sudden geyser
#

Does commando's default help command not come with searching by category for the first argument.

peak osprey
#
else if (command === 'dog') {
  const fetch = require('node-fetch');

  const dog = async () => {
      const res = await fetch(' https://some-random-api.ml/img/dog').then(response => response.json());
      const data = res;

  const embed = new Discord.MessageEmbed()
    .setColor("#15f153")
    .setDescription(`Oh look i found a cute dog :dog:`)
    .setImage(data.url)
message.channel.send(embed)
  }
dog()
}
#

it wont send the image

solemn latch
#

you need to use .link iirc

#

{"link":"https://i.some-random-api.ml/3qbEVISTgQ.jpg"}
is the response

misty sigil
#

ayy it’s telk’s api

peak osprey
#

but i have a different cmd that is the same and it sends the image

drifting wedge
#

how can i make a timer on a message so like it counts down by editing the message?

misty sigil
#

but i have a different cmd that is the same and it sends the image
@peak osprey different responses

drifting wedge
#

or like calculate the time

peak osprey
#

ok

solemn latch
#

you have to check it per api.

drifting wedge
#
                                   args=[message.channel.id, message.id])``` wut does this do?
earnest phoenix
#

Hi can some one help pls

#

With html

solemn latch
earnest phoenix
#
<!-- Put this script tag to the <head> of your page -->
<script type="text/javascript" src="https://vk.com/js/api/openapi.js?168"></script>

<script type="text/javascript">
  VK.init({apiId: 7624533, onlyWidgets: true});
</script>

<!-- Put this div tag to the place, where the Comments block will be -->
<div id="vk_comments"></div>
<script type="text/javascript">
VK.Widgets.Comments("vk_comments", {limit: 20, attach: "*"});
</script>
#

this is widget

#

(comments)

#

1 sec

#

How to increase its size for phones

north briar
#

Any Java experts around?

earnest phoenix
#

here

#

i am

solemn latch
earnest phoenix
#

dm me @north briar

pure lion
#

im not getting node.js syntax in vscode after npm init

earnest phoenix
#

i can help with java

pure lion
#

anyone know how to help?

north briar
#

Oh wow, why am I famous?

earnest phoenix
#

@solemn latch yes but...

pure lion
#

you just got yee haw'd

earnest phoenix
#

i tried it

#

1 src

#

sec

flint yew
#

Ping me plez

#

Anyone know how to do a help command category like if I said !help fun it send only the fun command anyone know how to do that using commando :)

Ping me if you know xD
@flint yew

earnest phoenix
#

@solemn latch

solemn latch
#

whats your css look like?

earnest phoenix
#
  • {margin: 0; width: 100%!important; height: 100%; font-size 1000px;}
#

I changed the dimensions to maximum and still the Widget is very small

#

it isn't valid css

#

also

#

that's not you how you do responsive design

#

lmfao

#

that's not you how you do responsive design
@earnest phoenix 1 sec

#

first set the viewport meta tag

#

from phone

#

widget is big

#
<meta name="viewport" content="minimum-scale=1, initial-scale=1, width=device-width, shrink-to-fit=no" />
#

OH MY GOD

#

IT WORKS

#

THANKS MAN

north briar
#

Any Java experts around?

earnest phoenix
#

oh

earnest phoenix
#

i just got it

#

lol

pure lion
#

yes

#

thats why i sent the link jajajajaj

solemn latch
#

Any Java experts around who are willing to commit into looking into my problem, whatever that may turn out to be, even if it's not actually related to Java or if someone who doesn't know anything about Java could actually answer my question?

prime spruce
#

no

earnest phoenix
#

I have a question about Java but I'm too lazy to actually formalize it in words unless there's someone on the channel who might be able to answer it

north briar
#

Any Java experts around?

solemn latch
slender thistle
#

Are you stupid

blissful coral
#

lol

north briar
#

I don't know what else to ask.

#

I am Foobar.

#

Any Java experts around?

blissful coral
#

Your question

vapid oasis
#

FOOBAR

slender thistle
#

-m 743623808019202119 Idiotic trolling, sending the same question in all channels despite being told to state their issue | 5d

gilded plankBOT
#

🤐 Muted Foobar123#9867 (@north briar)

vapid oasis
#

SHIT

#

WHY DID YOU MUTE HIM

blissful coral
#

Stop

lament meteor
#

I presume you can read

slender thistle
#

I assume you can read if you saw the mute. I also assume you understand which channel you are in.

sage bobcat
#

One message removed from a suspended account.

vapid oasis
#

I mean

#

He's foobar

#

Isn't he supposed to be stupid?

slender thistle
blissful coral
#

Dude

#

Stop

slender thistle
#

thank you

sage bobcat
#

One message removed from a suspended account.

slender thistle
#

Better yet, cut it out. I muted him for a reason. 🙃

vapid oasis
#

what does 🙃 mean

#

i really dont get it

sage bobcat
#

One message removed from a suspended account.

slender thistle
blissful coral
slender thistle
#

Last warning to use appropriate channels

solemn leaf
#
static void UpdatePresence()
{
    DiscordRichPresence discordPresence;
    memset(&discordPresence, 0, sizeof(discordPresence));
    discordPresence.state = "Running";
    discordPresence.details = "Developing";
    discordPresence.startTimestamp = 1507665886;
    discordPresence.endTimestamp = 1507665886;
    discordPresence.largeImageKey = "icon2";
    discordPresence.largeImageText = "";
    discordPresence.smallImageKey = "jsicon";
    discordPresence.smallImageText = "Djs";
    discordPresence.partyId;
    discordPresence.joinSecret;
    Discord_UpdatePresence(&discordPresence);
}

Do I need
discordPresence.partyId;
discordPresence.joinSecret;

tardy hornet
#
 bot.user.setActivity(`${bot.guilds.cache.size} servers (!help)`, { type: 'PLAYING'}).catch(console.error).then (bot.setInterval(function(){
      `${bot.guilds.cache.size}`
    }, 10000));

})
```will it work?
misty sigil
#

Don’t do that

solemn leaf
#

mans you shut him down

misty sigil
#

Also it doesn’t even work

#

what the fuck made you think that’d work

tardy hornet
#

idk

blissful coral
#

um yeah don't do it every 10 seconds

#

Gonna get rate limited very quickly

tardy hornet
#

then 20?

solemn latch
#

mines on 300 seconds on startup

misty sigil
solemn latch
#

and 5 minutes to 1 hour after 1 day

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

earnest phoenix
#

Discord ratelimits, most are not known as they're dynamic

solemn latch
#

^ or only when you(the bot) join/leave guilds while not doing it more than once every 5 minutes.

#

or 1 minute

#

or whatever

earnest phoenix
#

Update it every 3 minutes

solemn latch
#

for guild count?