#development

1 messages · Page 1160 of 1

fierce stag
#

what would that if statement look like in code form? or where do I go to find out

solemn latch
#

id just start by console logging the result from
api()

#

because the lib isnt really clear about it

dense patio
#

if redditImage is a url than just filter out anything that ends with .mp4

fierce stag
#

but i dont know how ):

dense patio
#

i'm sure there's a better method but you can just use .endsWith()

ionic dawn
#

Java discord Lib?

dense patio
#

here's a terrible solution:

amber fractal
#

D4J

#

I mean, best way to do it would be to check the Content-Type

dense patio
#
let redditImage = ``;
while(redditImage.endsWith(`.mp4`)) {
  redditImage = await api(subreddit)
}
#

async while?

amber fractal
#

or is it mime type

solemn latch
#

it doesnt really say if it gives headers or anything

#

unless im looking at the wrong lib

amber fractal
#

Oh they using a lib for it

#

nvm

solemn latch
#

the real question, why is there a million reddit api wrappers?

#

is everyone actually that lazy

dense patio
#

yes

misty sigil
#

yes.

dense patio
#

goodbye money

earnest phoenix
#

Oof.

solemn latch
#

ffff

dense patio
#

hello better server

solemn latch
#

thats the day im afraid of

earnest phoenix
#

I currently limit myself to just $100 a month for servers & other services to run my shit, so I also worry about that day

dense patio
#

i'm going to soon be surpassing $100 a month

solemn latch
#

my vps provider is about to start providing 1tb of object/block storage for $15 a month, but for now they charge a ton for extra nvme space

#

so for now, i cant go past the space i have.

earnest phoenix
#

Yee, cheapest I've found is 10GB/$1 for Nvme, not that I've really looked around atm

sick cloud
#

does anyone know how to disable firefox's new weird security thing that redirects all POST requests on localhost to https (thus breaking it)

slender thistle
#

A smartass response would be to use Chrome...

misty sigil
#

I mean, it works

slender thistle
#

As for my personal response:
is that why I might be getting PR_END_OF_FILE_ERROR?

sick cloud
#

possibly, and yeah i've switched to chrome but it sucks

dire obsidian
#

Well so, im using a GitHub page, but i dont want the ppl see the code, how can i hide it?

earnest phoenix
#

you can't

#

how is the browser supposed to display the site if you don't provide it the code to display it waitWhat

solemn latch
#

you can look at the code for any website

#

the frontend*

earnest phoenix
#

inb4 how to hide token????

dire obsidian
#

Ok

#

Meh

#

Anyways my page will only information, so meh

solemn latch
#

🤔

#

heres youtube

ionic dawn
#

didnt find any video that explains d4j so... im using jda

#

you can look at the code for any website
@solemn latch Not all

sick cloud
#

they said front end @ionic dawn

#

server side code is obviously always hidden

ionic dawn
#

I know, but I actually think u guys were talkin about scrapping or something about that

#

excuse mua

sick cloud
#

can't find anything online about firefox's new dumb feature which bugs me

dense patio
#

the saga continues: my index was deleting itself simply because the disk ran out of space

honest perch
#

can't find anything online about firefox's new dumb feature which bugs me
@sick cloud hmm?

sick cloud
#

it redirects http requests on localhost to https @honest perch

#

which as its localhost, breaks it

honest perch
#

Oh damn

#

Thats fucked

sick cloud
#

yea

honest perch
#

Sure its not a plugin?

#

Also try deep settings?

sick cloud
#

so i have a register form on http://localhost/register and when i click submit (which should POST it to the same url) it tries to POST to https

#

no it's not a plugin and wdym

honest perch
#

about:config

#

I think

#

Search there

sick cloud
#

already have

#

i'm not dumb, i get firefox, but there's nothing about this

#

no settings, no obscure forum post

#

just started last night randomly

ionic dawn
#

apache config perhaps

sick cloud
#

what

#

where do you get apache config from a discussion about why firefox is breaking it

quartz kindle
#

discord's role positions are ordered from highest to lowest right? 0 would be the everyone role?

#

just making sure

earnest phoenix
#

yes

sick cloud
#

^

quartz kindle
#

thanks

sick cloud
#

hey tim do you have any idea about my issue

#

or do i just have to move to chrome for development now

#

how do i fix this

ionic dawn
#

jquery

#

isnt that a "boomer" thing?

solemn latch
#

yeah, boomer

sick cloud
#

how is that your business

#

i get to choose what i use

ionic dawn
#

Im just joking CBLoveU

solemn latch
#

most sites throw a few errors when you visit them anyway, just leave it KEKW

ionic dawn
#

well, if the thing dnst load maybe cause any issue on his website, who knows..

sick cloud
#

its localhost, lmao

#

but ok

earnest phoenix
#

thats the line that wont work for some reason i dont understand why

solemn latch
#

the colors tho

earnest phoenix
#

yuh

#

internal server errors aren't your fault

#

it's at discord's side

#

damn

#

so theres nothing i can do

#

you can't do anything but to wait for it to resolve and possibly have a mental breakdown if you feel like it

#

hm ok

#

if its not fixed within the next couple of days i will actually die

opal summit
#

how can ı post server statistics correctly

#

do you know

#

on dbl web site

honest perch
sick cloud
#

is it possible to issue ssl for localhost

earnest phoenix
#

yes

#

at least with dotnet

#

im pretty sure the cert generated with dotnet works locally everywhere though

#

dotnet dev-certs https --trust

tough relic
earnest phoenix
sick cloud
#

wdym dotnet

tough relic
#

I tried but I'm not sure

earnest phoenix
#

it's a part of .net core @sick cloud

sick cloud
#

f

#

@earnest phoenix is it part of .net 5

earnest phoenix
#

nope

#

it's been around since .net core 2.0

#

well, yeah it's a part of it

#

just not exclusive to it

sick cloud
#

yeah ok

#

do i click yes

earnest phoenix
#

yes

sick cloud
#

interesting

#

but alright

#

does it output the public and private files and things

earnest phoenix
#

wym

sick cloud
#

well to make a https server iirc http needs a public and private key file or somethig

earnest phoenix
#

...you just listen on the https port

#

also

sick cloud
#

yeah examples do

var key = fs.readFileSync(__dirname + '/../certs/selfsigned.key');
var cert = fs.readFileSync(__dirname + '/../certs/selfsigned.crt');
var options = {
  key: key,
  cert: cert
};
https.createServer(options, app);
#

so

earnest phoenix
#

the cert is probably for :5001

sick cloud
#

so i assumed i needed a key/certificate

earnest phoenix
#

yeah i've got no idea how well this integrates with other languages

#

on .net it works perfectly fine

sick cloud
#

alr

#

"firefox support not available"

#

why

earnest phoenix
sick cloud
#

mm cool

#

so it worked

#

but firefox doesnt think its real

little topaz
#

Is there a way to recreate streamkit's discord bot to set custom and larger pictures?

vivid ravine
#

someone know how to use case in discord.js

#

because i want to do a help command with reactions

opal plank
#

use 'case' ?

#

thats called pagination buddy

#

@vivid ravine

vivid ravine
#

no case

opal plank
#

because i want to do a help command with reactions
this sounds like pagination

ionic dawn
#

Him: CBCattoCry

solemn latch
#

case, like capitalization? 🤔

zealous vortex
#

Halo

valid glade
#

Hey devs,

I have a question related to You agree that your use of the Service will not include sending unsolicited marketing messages or broadcasts (i.e., spam).

I would like to add a "Use code CODEHERE in-game to support the bot!" Message that deletes itself after 10 seconds. The bots usage is specific for certain games and this code is provided to me by the game developers. I get a very small percentage from it. Anything I get would go towards keeping the bot online 24/7.

When someone does !invite (which can only be used in DMs), the bot would tell them "By using this bot you agree to receive solicited promotion in the form of a content creator code."

Would this break ToS? I see a lot of people do worse everyday haha.

ionic dawn
#

ToS questions shouldnt be sended in discord support server? or mail supporter?

grand crystal
#

does anyone know how i can get my chatbot's status to say how many people it is talking with?

valid glade
#

I guess? It's related to bot development and everyone here has bots that follow ToS, so I'd assume they'd be knowledgeable here.

ionic dawn
#

well, probably most of the owners of a bot here dnst even read the ToS once or even know what it is

#

im sure only 20% here read the Tos

earnest phoenix
#

I mean, it depends on the library @grand crystal

valid glade
#

Ah, I'm a server Admin so I have to know ToS PandaCrazy I'll try to ask elsewhere though.

grand crystal
#

what are libraries @earnest phoenix ?

blazing timber
#

okay then

earnest phoenix
#

Okay let me put it this way, it depends on the programming language you use @grand crystal

grand crystal
#

i use discord.js

#

@earnest phoenix

earnest phoenix
#

I swear everyone here uses JS, but never Python

grand crystal
#

lol

earnest phoenix
#

I don't know JS so you'll have to wait for someone who does, sorry

grand crystal
#

ok

#

thanks for trying tho

blazing timber
#

check your visual @regal tapir

sudden geyser
#

go away

#

I swear everyone here uses JS, but never Python
@earnest phoenix Python is bae

earnest phoenix
#

I've been very happy with Python so far, aside from a few things

sudden geyser
#

like what

earnest phoenix
#

Hmm

#

A language like C# can do a number of things better than it, for example it has Unity, & game modding is a lot cleaner than in Python @sudden geyser

#

Python also is kinda disappointing when it comes to desktop applications

#

More than kinda

sudden geyser
#

Yeah there are some areas where X may be preferred over Y (the right tool for the job), but for me, I like using Python for simple scripts or when what I'm doing is not advanced

#

I tried tkinter for desktop apps and it was quite painful

earnest phoenix
#

PyQT is better, perhaps you should try that

knotty steeple
#

using a specific language for the wrong reasons

#

🧠

earnest phoenix
#

Wym? @knotty steeple

knotty steeple
#

Python also is kinda disappointing when it comes to desktop applications

earnest phoenix
#

Yeah I figured you meant that

#

Thats literally what the discussion is about, idk if you read up or not

knotty steeple
#

yea like using js for desktop apps

#

cc electron

earnest phoenix
#

Electron

knotty steeple
#

just stop

earnest phoenix
sudden geyser
#

swiftui has been fun but that's pretty much one platform only

knotty steeple
#

lol swift

#

the macos lang

#

and ios? idk

sudden geyser
#

ios, macos, watchos, tvos, that stuff

knotty steeple
#

ok all of apple's shit

#

i see

zealous vortex
#

Halo guys

sudden geyser
#

yeah but it makes writing desktop apps on mac very easy. simple issue is that's only apple so you have to do something else for other platforms

coral stirrup
#

hey, so i tried some example code of ytdl core i found and implemented it into my bot.

the music plays fine and all, but after around 1 minute and 4 seconds, the audio stops. what could this be about?

const stream = ytdl("https://www.youtube.com/watch?v=p8vrRDLEg2Q&list=PLQppNW31XMyytTvTGfv0rFCfNU3pebctR&index=2", { filter: 'audioonly' });
const dispatcher = connection.play(stream);
knotty steeple
#

maybe ip banned

#

lol

coral stirrup
#

that doesnt make any sense at all, i would prefer real answers.

knotty steeple
#

that is an answer what are u on about

coral stirrup
#

how exactly would i have been ip banned? by youtube? as i can listen to the songs by myself?

#

that doesnt make any sense at all.

knotty steeple
#

that is the only reason i would know unless u can keep on playing it but it always stops after that time

#

who else would u get banned by? vimeo?

coral stirrup
#

then please dont write anything about that topic. its just spam at this point.

topaz fjord
#

@sudden geyser swiftui is good if you want 10.15+

sudden geyser
#

I'm on big sur and it makes 10.15 look smol

topaz fjord
#

same

#

but I also want to target 10.13

sudden geyser
#

rip supporting old versions

#

there's uikit but I'm never touching it

topaz fjord
#

but I'm still gonna use storyboards no matter what

#

they're much cleaner imo

#

and swift has terrible support for them

#

so I stick to objc

#

@sudden geyser

sudden geyser
#

I don't have much experience in storyboards sadly. Isn't that like with pages where it's done visually with minimal designing from code

topaz fjord
#

you design the ui in the storyboard file but all the logic takes place in the files

#

you can still add elements from code

#

but it mainly takes place in the storyboard file

karmic compass
#

how do i dm a specific set user

solemn latch
#

user.send()

karmic compass
#

how would i define user?

#

with an id?

sick cloud
#

Content Security Policy: The page’s settings blocked the loading of a resource at inline (“script-src”).
how can i disable this, to let me use local scripts

#

ie <script>...</script> in the html

solemn latch
#

^ has to be an actual User class

#

if you have a message from this user, it would be
message.author.send()

#

if you wanted to get the user, youd have to get it from cache, or fetch it

knotty steeple
#

quick question

#

in a switch

#

its default: yes?

#

im tired and i forgot how to use js

faint prism
#

That's what it is in oop typically

sick cloud
#

csp is really really dumb

sweet ruin
#

Its Ask for Help timeee

#

xDDD

#

So euhhh Im trying to make a modlogs command with Discord.js and MongoDB

#

but I have no clue how to make it

#

idk if i should use an array

#

and if so how to use it

#

or. like idk im very confused ;n;

regal saddle
#

I mean, read the js docs and try and work on it.
We cant spoonfeed here.

faint prism
#

I can't really even tell what this modlogs command is supposed to be

sweet ruin
#

basically it takes bans, mutes, kicks, warns, and reports done with my bot

#

and logs them into one place under a user

#

so you can do <modlogs @sweet ruin and get all infractions and modlogs against that user

#

if that makes sense

thick gull
#

save warnings under the users

sweet ruin
#

Like this?

thick gull
#

no

sweet ruin
#

oh

thick gull
#

i don’t think an array will work

sweet ruin
#

oh okay

thick gull
#

Unless you don’t want reasons

#

or something else

faint prism
#

Mongodb supports arrays of objects

thick gull
#

you’ll probably lose a function that bigger bots have

#

idk much about mongo though so yeah

sweet ruin
#

hm Okay

earnest phoenix
#

hey uh does anyone here use postgresql?

#

well

#

it's more of a question of how

#

i can extract data from the database in dpy when the data isn't an int or slice

faint prism
#

So if your table was
_id <ulong>, Bans <string[]>, Mutes<string[],...

earnest phoenix
#

trying to extract the invite code

{afterThing['invite_code']}

but i keep getting the error

TypeError: list indices must be integers or slices, not str
faint prism
#

Undefined variable

earnest phoenix
#

But i never use slice in my code KEKW

faint prism
#

Then something is configured wrong or was instantiated incorrectly (unless it a bug) for a discord.js object

earnest phoenix
#

Probably djs or djs light bug

topaz fjord
#

ask tim

#

cc @quartz kindle

earnest phoenix
#

Already dm tiM

fierce veldt
#

im getting issue with TypeError: TypeError: redeclaration of var Client, im not sure wtf is causing it

#

I don't have any variables called client

#

using eris if relevant because discord.js isn't compatible

solemn latch
#

Are you sure you dont have any variables named client?

fierce veldt
#

if I ctrl+f client in my code, nothing comes up

#

might be a weird code thing

solemn latch
#

Hmm, weird.

fierce veldt
#

the code is running on the rhino engine or whatever

#

and not js

#

const Eris = require('./node_modules/eris/index.js');

#

is the line I get the error on

earnest phoenix
fierce veldt
#

I might have to take a look at the eris code

#

to see if its a compatibility issue

solemn latch
#

Eris has something called client iirc.

earnest phoenix
#

require("Eris")

fierce veldt
#

can't

#

not on node

earnest phoenix
#

Oh

fierce veldt
#

I have to specify exact file

earnest phoenix
#

Fuck

#

I am dumb, sorry.

solemn latch
#

Minor mistake nbd

fierce veldt
#

I mean its understandable considering that would normally work

#

"use strict";

const Client = require("./lib/Client");

function Eris(token, options) {
return new Client(token, options);
}

#

hmm

#

maybe if I remove the strict mode it would help

solemn latch
#

🤷‍♂️ let's hope

fierce veldt
#

nope

cunning gorge
#

Anyone know how to add an image generated with canvas to show in an embed?
Right now I do
message.channel.send({ files: [image] }), but I don't know how to add it into an embed

earnest phoenix
#

You upload it into a erb

cunning gorge
#

What's an erb sorry

earnest phoenix
#

Web

sharp anvil
#

Preciso de um sistema de anunciar tipo #anunciar para anunciar para todos os membros do ds como faço, eu faço pelo dbd discord bot designer

Version Inglish

I need an #announce advertising system to advertise to all ds members as I do, I do it for the dbd discord bot designer

earnest phoenix
#

Sorry

sharp anvil
#

Ds > Discord

cunning gorge
#

Web
@earnest phoenix It's generated inside the code tho

#

So it changes depending on the user

earnest phoenix
#

Wait lemme check

sharp anvil
#

way of speaking

cunning gorge
#

okie

earnest phoenix
#

Saber

#

The .setImage require url

#

So you have to save the canvas as png file, and upload it to webserver, and get that image url

#

And put it in .setImage

cunning gorge
#

okay thx

earnest phoenix
#

Np

karmic compass
#

people: database
me: Host = new Set, MiniHost = new Set, Host.add(MiniHot)

#

bam

sick cloud
#

can someone help me make a function that just sets the first character of a string to uppercase

sudden geyser
#

just use <String>.charAt and .substring

earnest phoenix
#

@sick cloud i can

#

let str = "ihihuwiqiw"
str[0] = str[0].toUpperCase();

#

Eay

#

Easy

sudden geyser
#

That mutates the string though ram_heh

earnest phoenix
#

Oh lol

sudden geyser
#

actually I may be dumb

earnest phoenix
#

Nah m8

sick cloud
#

can i do it inline

#

like in ${}

sudden geyser
#

yes, but it can seem clunky

dusty tulip
#

Someone can left me a tip how to create a bot at mobile?

sudden geyser
#

I'd avoid it tbh. you have far tools to work with

dusty tulip
#

Tbh?

sudden geyser
#

to be honest

dusty tulip
#

Link to verify a bot?

#

?

#

Wdym?

earnest phoenix
#

Dont use glitch

#

They suspend project that host discord bot

#

But theres a risk duh

dusty tulip
#

What apps you guys recommend to create a bot at mobile?

earnest phoenix
#

And glitch ban pinging

worthy glacier
#

any reason to use other libraries over discord.js?

dusty tulip
#

And glitch ban pinging
Ops

slow ether
#

dbd
@earnest phoenix yes

worthy glacier
#

like eris

slow ether
#

use that one

sick cloud
#

get a pc and code on it @dusty tulip

earnest phoenix
#

@worthy glacier djs-light eris, kolas thingy

sick cloud
#

@worthy glacier depends on how big your bot is

slow ether
#

ehhh

sick cloud
#

eris is good for big bots

slow ether
#

ok

worthy glacier
#

why

dusty tulip
#

get a pc and code on it @dusty tulip
@sick cloud the problem is, i dont have pc

earnest phoenix
#

@dusty tulip to be honest, its easier to mke a bot on pc

sick cloud
#

buy one

slow ether
#

most of them r 15 secs long

dusty tulip
#

buy one
@sick cloud dont have money

sick cloud
#

you can get a laptop for cheap

#

seriously

#

that's garbage

dusty tulip
#

you can get a laptop for cheap
@sick cloud dont have money too

earnest phoenix
#

Most discord bot maker app are garbages

sick cloud
#

ask your parents then

dusty tulip
#

Most discord bot maker app are garbages
@earnest phoenix 😮

sick cloud
#

also @dusty tulip then how are you chatting on discord rn

#

with no pc

dusty tulip
#

Mobile

worthy glacier
#

@sick cloud why is eris better for larger bots

sick cloud
#

you're not on mobile

earnest phoenix
#

Phone lol

dusty tulip
#

Mobile legends XD

sick cloud
#

not on mobile

earnest phoenix
#

You also have steam lol

slow ether
#

@sick cloud do u seriously think that everyone has enough money to get a pc?

sick cloud
#

@worthy glacier eris uses a lot less ram

dusty tulip
#

You also have steam lol
@earnest phoenix bruh i dont use the steam btw XD

sick cloud
#

@slow ether you can get a laptop for <$50

#

easily

earnest phoenix
#

Djs light use less ram then djs

worthy glacier
#

ah

sick cloud
#

eris is a library

worthy glacier
#

whats djs light

slow ether
#

a lapyop is notba pc

earnest phoenix
#

Djs but without cache

worthy glacier
#

a lite version of djs

#

oh ok cool

sick cloud
#

....what

#

a laptop is a pc

#

pc = personal computer

slow ether
#

no

sick cloud
#

a laptop is a computer

#

a portable computer

dusty tulip
slow ether
#

hrm

dusty tulip
candid hare
earnest phoenix
#

}

candid hare
#

what ?

#

@earnest phoenix

earnest phoenix
#

Error with your

#

Json data

candid hare
#

What do you know the solution?

earnest phoenix
#

Show me full error and json data

candid hare
#

ok thanks

earnest phoenix
#

Anyone know about the npm module slappey?

earnest phoenix
#

I am bdfd user

#

So umm how i add my bot to top.gg?

#

@oak cliff do the honors

sick cloud
#

if i have a dd/mm/yyyy string can i turn that into a new Date sort of date somehow

oak cliff
#

-faq 1 @earnest phoenix

gilded plankBOT
#

@earnest phoenix

Frequently Asked Questions 📜
earnest phoenix
#

Ahh i know i already read faq

#

2 times

oak cliff
#

then why are you still asking

earnest phoenix
#

😅

#

That

oak cliff
#

So are you asking how to make a bot or how to add one onto the website?

earnest phoenix
#

Eh wait

#

Imma read faq again

#

Mhmmmm..

winter basalt
earnest phoenix
#

Hi, im trying to create a covid command but i have this error saying NovelCovid is not a constructor

#

I got some good covid code

#

Oh

fringe axle
#

I got some good covid code
@earnest phoenix no spoonfeeding please.

earnest phoenix
#

Could you share with me please

#

Hmm should i send the code

fringe axle
#

Yea, do it.

earnest phoenix
#
const Discord = require("Discord.js")
    //const fetch = require("node-fetch")
const { NovelCovid } = require("novelcovid")
    //const api = require("novelcovid")
const track = new NovelCovid();

module.exports = {
    name: 'covid',
    description: "check the virus info",
    async execute(message, args) {

        if (!args.length) {
            return message.channel.send("Please provide the name of the country")

        }
        if (args.join(" ") === "all") {
            let corona = await track.all()
            let embed = new Discord.MessageEmbed()
                .setTitle("Global Cases")
                .setColor('RANDOM')
                .setDescription("Some cases may differ in each country")
                .addField("Total cases", corona.cases, true)
                .addField("Total Deaths", corona.deaths, true)
                .addField("Total Recovered", corona.recovered, true)
                .addField("Today's cases", corona.todayCases, true)
                .addField("Today's Death", corona.todayDeaths, true)
                .addField("Active Cases", corona.active, true)
            return message.channel.send(embed)
        } else {
            let corona = await track.countries(args.join(" "))
            let embed = new Discord.MessageEmbed()
                .setTitle(`${corona.countries}`)
                .setColor('RANDOM')
                .setDescription("Some cases may differ in each country")
                .addField("Total cases", corona.cases, true)
                .addField("Total Deaths", corona.deaths, true)
                .addField("Total Recovered", corona.recovered, true)
                .addField("Today's cases", corona.todayCases, true)
                .addField("Today's Death", corona.todayDeaths, true)
                .addField("Active Cases", corona.active, true)
            return message.channel.send(embed)
        }

    }
}
#

Ok

#

How about this code

summer torrent
#

read the docs of novelcovid

fringe axle
#

Did you installed NovelCovid?

vocal idol
#

Hm

earnest phoenix
#

yeah

fringe axle
#

Hm

#

No spoon feeding!

earnest phoenix
#

ok

fringe axle
#

Delete this.

summer torrent
#

do not spoonfeed @earnest phoenix

earnest phoenix
#

K sorry

#

😆

#

This right? npm i -s novelcovid?

vocal idol
#

😂

earnest phoenix
summer torrent
vocal idol
#

Hmm

earnest phoenix
#

That was what i installed

fringe axle
#

const api = require('novelcovid');

#

Hm.

summer torrent
#

NovelCovid class doesn't exist (according to docs)

lime pumice
#

This right? npm i -s novelcovid?
@earnest phoenix yes

fringe axle
#

If you read the docs correctly you see how to define NovelCovid

earnest phoenix
#

Oh okay

lime pumice
#

just make sure to add it in the main file const covid = require('novelcovid');

fringe axle
#

Or that what I send.

lime pumice
#

yea

#

anything

earnest phoenix
#

Hmm i have the same error

lime pumice
#

just make sure u define it the right way

#

i can give u my covid code

#

if u want to use

#

¯_(ツ)_/¯

earnest phoenix
#

Yes please

fringe axle
#

No spoon feeding again.

lime pumice
#

wait

fringe axle
#

No

lime pumice
#

um ok

earnest phoenix
#

e

fringe axle
lime pumice
#

yea

#

spoondeeding

fringe axle
#

Rule 7 a.

earnest phoenix
#

Okay so i have the same error after putting that line

summer torrent
#

show error

earnest phoenix
#

NovelCovid is not a constructor

summer torrent
#

remove that line

fringe axle
#

But you deleted the old one?

earnest phoenix
#

If i deleted the line where it says const track = new NovelCovid();, it will say track is not defined

lime pumice
#

first define it in ur main file

fringe axle
#

Why „track“?

lime pumice
#

¯_(ツ)_/¯

fringe axle
#

You won‘t need track if you read the docs.

earnest phoenix
#

Cuz i have this line: let corona = await track.all()

lime pumice
#

const track = new NovelCovid();

#

use this

#
const { NovelCovid } = require("novelcovid");
const track = new NovelCovid();```
fringe axle
#

You won‘t need track if you read the docs

earnest phoenix
#

wait

lime pumice
#

yea read the npm page

#

¯_(ツ)_/¯

#

i used track 😦

earnest phoenix
#

This happened when i run the command

#

track is not defined

fringe axle
#

Yea, you don‘t need track.

earnest phoenix
#

So i can remove this line: let corona = await track.all()?

fringe axle
#

Just read the link I send...

#

There you can read how it‘s working.

lime pumice
#

u need o change the version

#

¯_(ツ)_/¯

earnest phoenix
#

wait

#

DiscordAPIError: Cannot send an empty message

summer torrent
#

what did you tried to send

earnest phoenix
#

I sent <prefix><country>then that came up

#

oh and covid as well

fringe axle
#

Did you read the docs?

earnest phoenix
#

yeah

summer torrent
#

with bot*

lime pumice
#

@summer torrent what is the cake role for

#

xd

summer torrent
#

birthday

lime pumice
#

oh

earnest phoenix
#

Hmm im not sure if im doing it right

lime pumice
#

@summer torrent where do u put the birthday date

summer torrent
#

what

earnest phoenix
#
const Discord = require("Discord.js")
    //const fetch = require("node-fetch")
    //const { NovelCovid } = require("novelcovid")
const api = require("novelcovid")
    //const track = new NovelCovid();

module.exports = {
    name: 'covid',
    description: "check the virus info",
    async execute(message, args) {

        if (!args.length) {
            return message.channel.send("Please provide the name of the country")

        }
        if (args.join(" ") === "all") {
            let corona = await api.all()
            let embed = new Discord.MessageEmbed()
                .setTitle("Global Cases")
                .setColor('RANDOM')
                .setDescription("Some cases may differ in each country")
                .addField("Total cases", corona.cases, true)
                .addField("Total Deaths", corona.deaths, true)
                .addField("Total Recovered", corona.recovered, true)
                .addField("Today's cases", corona.todayCases, true)
                .addField("Today's Death", corona.todayDeaths, true)
                .addField("Active Cases", corona.active, true)
            return message.channel.send(embed)
        } else {
            let corona = await api.countries()
            let embed = new Discord.MessageEmbed()
                .setTitle(`${corona.countries}`)
                .setColor('RANDOM')
                .setDescription("Some cases may differ in each country")
                .addField("Total cases", corona.cases, true)
                .addField("Total Deaths", corona.deaths, true)
                .addField("Total Recovered", corona.recovered, true)
                .addField("Today's cases", corona.todayCases, true)
                .addField("Today's Death", corona.todayDeaths, true)
                .addField("Active Cases", corona.active, true)
            return message.channel.send(embed)
        }

    }
}
#

not sure

lime pumice
#

ill send u a vid link

#

wait

empty hollow
#

approximately how long does bot verification take?

oak cliff
empty hollow
#

Oh

#

Okay

low phoenix
fringe axle
#

Any error?

low phoenix
#

@fringe axle no

fringe axle
#

Okay, das ist komisch. But yea we need to speak english.

low phoenix
#

xd

small prairie
#

Discord Down?

echo steppe
#

can some one help me with my code

#

anyone?

modest crane
#

c.config is undefined

glossy elk
#

how to change the client status to dnd

viral iris
#

any1 know how to fix this ?

echo steppe
#

@modest crane how to fix it

modest crane
#

how to change the client status to dnd
@glossy elk library?

earnest phoenix
#

hi i need help with something

modest crane
#

@modest crane how to fix it
check where c.config is defined

viral iris
#

any1 know heroku ?

earnest phoenix
#

can somone help me with a nitro point reward system

delicate shore
#

wha

#

again?

low phoenix
#

I'm use Discord.JS https://hasteb.in/unazehus.js my bot is not playing my music stream is come "Error [VOICE_PLAY_INTERFACE_BAD_TYPE]: Unknown stream type"

summer torrent
#

again?
@delicate shore again what

restive furnace
#

thats 12.3.1

sharp anvil
#

Como crio um site pro meu bot?, que site uso ou hospedagem?

Version english

How do I create a website for my bot ?, what website do I use or hosting?

restive furnace
#

vps

#

and knowledge

#

you can create it like by framework: react, vue etc. or with raw html5 + (s)css

earnest phoenix
#

If you know Python, then Django or Flask

restive furnace
sharp anvil
#

My Brazilian

earnest phoenix
#

Best vps?

abstract compass
#

Can i code and host my bot using my phone I currently use bdfd

restive furnace
#

yes but not recommended

#

use something like termux, but still i recommend vps atleast

abstract compass
#

K I will use bdfd

restive furnace
#

what?

earnest phoenix
#

Best vps?
@earnest phoenix

warm marsh
#

Check pins

oak cliff
#

-vps

gilded plankBOT
#

A VPS or virtual private server is a virtualized server instance run in the cloud. It acts like a normal server, allowing you to remotely login and manage it just like a physical server or computer. If you're looking for a way to keep your bot online 24/7, a VPS is a great option.

Having trouble choosing a VPS provider or don't know where to start? Click here for a list of common and affordable VPS providers.

warm marsh
#

Pick one that satisfies your needs.

earnest phoenix
#

Galaxy gate that is

tardy hornet
#
case 'purge':
  message.delete()
  if (!message.guild.me.hasPermission("MANAGE_MESSAGES")){
    return message.channel.send("I don't have permission to that, please give me `MANAGE_MESSAGES` permissions");
  }
    if(message.author.id != '723081690792067143' && !message.member.hasPermission('ADMINISTRATOR')){
      message.reply('you dont have the premissions to use this command!');
      return;
  } 
  if(!args[1]) return message.channel.send("How many messages you want to Delete? (you provided none!)");

  if(isNaN(args[1])) return message.channel.send(`${args[1]} is not a number!`).then(message => message.delete({timeout: 2500}));

  if (args[1] > 100) return message.channel.send("Insert the number less then 100").then(message => message.delete({timeout: 2500}));

  if (args[1] < 2) return message.channel.send("Insert the number more then 1").then(message => message.delete({timeout: 2500}));

message.channel.bulkDelete(args[1]);
break;

why its not working?

earnest phoenix
#

Prettifiy the code please mmLol

#

I cant read i

#

t

tardy hornet
#

now?

earnest phoenix
#

Error code

tardy hornet
#

no, there is no error

misty sigil
#

ok so

#

Change message to m when deleting it

#

I’d also assume you’d need to parse it

#

using parseInt()

elder plume
#

K I will use bdfd
@abstract compass yeah GWahreeSure

#

We are like best friends forever GWahreeSure

#

Both do the same thing GWmiyanoWow

worthy glacier
pure lion
#

@worthy glacier the keyword is finally

warm marsh
#

Use an if statement.

pure lion
#

Yeah you can always use isNaN

worthy glacier
#

ok thx

astral yoke
#
a non-empty string or a valid number. val=undefined```
const ms = require('ms')
const Time = ms(args[2]);
#

what the frick is this

restive pebble
#

That's undefined

astral yoke
#

args?

restive pebble
#

you can generate the error by doing some thing like require('ms')(undefined)

#

So args[2] is not defined

astral yoke
#

ty

fickle dune
#
heroku[Worker.1]: State changed from up to crashed```
#

whats the fix of this

restive pebble
#

there must be an error for what ur bot has crashed above GWjianWut

fickle dune
#

@restive pebble im try to host using 2 heroku apps

pine aspen
#

Hey, is it an event when a channel is deleted?

sullen harness
#

Yes.

pine aspen
#

Ok.

#

How could I fire up the event. Or listen for the event in eris?

#

I'm currently using client.on('CHANNEL_CREATE', channel => { })

sullen harness
#

I don't use Eris, but I assume the docs would say something about that?

pine aspen
#

I'm looking at them rn.

sullen harness
#

I see it already

pine aspen
#

?

sullen harness
#

Is that what you're looking for?

pine aspen
#

I just can't find out how to get the event.

sullen harness
#

I assume the same as the Create event?

pine aspen
#

When i try use a client.on('event_name)

#

Yeah.

sullen harness
#

Tried it?

pine aspen
#

I tried.

#

Yes.

#
    client.on('CHANNEL_CREATE', channel => {
        client.createMessage('721349163123736636', `${channel.name} was created`);
    });
#

I get no response.

#

nor error.

earnest phoenix
#

Eris has custom events based on raw events like DiscordJS.

#

Look documentation of Client

#

You can see events

#

or

pine aspen
#

Alright, I'll check.

#

https://abal.moe/Eris/docs/GuildAuditLogEntry

#

was checking this

earnest phoenix
#

client.on("rawWS", rawData

#

rawData is Discord's message

#

You can't use classes in this

pine aspen
#

client.guildMemberUpdate

earnest phoenix
pine aspen
#

Right, got it.

earnest phoenix
#

yes

pine aspen
#

Thanks!

#

@earnest phoenix how'd I get the data from it though?

#

If it says It's not a function.

earnest phoenix
#

all events is function

pine aspen
#

Oh

#

wait

#

nvm

golden condor
#

@pine aspen it's js client.on("event name", (params here) => { //function here })

pine aspen
#

Yep

#

Got it

#

It’s working now!

#

Ty

empty wind
#

@fickle dune > heroku[Worker.1]: State changed from up to crashed
@fickle dune

Heroku is not free, you clearly used the free version and you ran out of your processing power that you are given monthly

thick gull
#

heroku isn’t even meant for bot hosting

empty wind
#

It's cloud computing, it's for whatever you give it to do

#

I ditched heroku and bought myself a Raspberry pi which I now use to run my bot

neat harness
#

Who uses Heroku lmao

#

Even glitch is better

empty wind
#

It's very unreliable agreed

neat harness
#

Since I'm kinda poor hence GCP Free Tier is used xd

placid iron
#

I use heroku and for me it has been perfect

twilit rapids
#

Imagine using a free host for your public Discord bot anyways

placid iron
#

As long as you don't use over 500mb ram

neat harness
#

xd

twilit rapids
#

Heroku nor Glitch are a valid option for me TAkiritosip

empty wind
#

@placid iron yeah when my code was light it worked fine, then when I got more commands I bought myself a raspberry pi to run it

placid iron
#

I wouldn't use herokus paid tiers because they seem quite expensive

empty wind
#

@neat harness what do you use to host

twilit rapids
#

I would need to setup kuberneters across 15 Glitch projects to make it work

neat harness
#

@neat harness what do you use to host
@empty wind GCP

empty wind
#

Never heard

neat harness
#

Google Cloud Platform

placid iron
#

@empty wind yeah, for my quite simple bot it works quite well though

slender wagon
#

might be off-topic but Heroku is good for small bots unless you use a db which might get a lil bit complicated

empty wind
#

Google Cloud Platform
Hmm

neat harness
#

The GCP Paid Tier is expensive af

empty wind
#

Yeah for small bots Heroku works just fine

twilit rapids
#

I assume you're using the $300 free credit you get

empty wind
#

Me?

neat harness
#

Not exactly

#

I use the "Free Tier"

twilit rapids
#

What does the free tier provide again

neat harness
#

Which is basically monthly 614 MB ram Vm Instance

twilit rapids
#

Oh I see

neat harness
#

I used up the $300 last year

twilit rapids
#

Same here, but after that was done I switched to a paid VPS @ Contabo

empty wind
#

Just get a raspberry pi zero, costs 5 dollars

neat harness
#

And now, I'm using my parent's credit card secretly :v

twilit rapids
#

Not sure if that's a good thing

neat harness
#

Lmao

#

I'm 15

#

16 in a month

empty wind
#

Congrats

neat harness
#

🙂

twilit rapids
#

Just get a raspberry pi zero, costs 5 dollars
Can't afford the bandwidth my bot uses myself

low phoenix
placid iron
#

Raspberry pi tanks when trying to do CPU intensive things or uploading on my internet

neat harness
#

Sorry, it was off topic

placid iron
#

But for the ram you get it is good

twilit rapids
#

A pi can provide the ram/cpu I need

#

But not the bandwidth or IPv6

neat harness
#

Anyway, I host 3 bots on 624 MB RAM, not like anyone uses it anyway

slender wagon
#

but it needs strong connection

twilit rapids
#

Well I guess

empty wind
#

I have a pi 4, thing is a full pc, costs 50 bucks

twilit rapids
#

But my system uses 300GB of bandwidth a day

#

Music bots belike

empty wind
#

Bruh

#

What you running

twilit rapids
#

LavaLink instance

slender wagon
#

is there a way i can check the bandwith in heroku

empty wind
#

Ohh music

#

Right

twilit rapids
#

With a IPv6 /48 block

empty wind
#

Daamn

twilit rapids
#

58k guilds belike

honest perch
#

Ips go brrrrrrrrrr

empty wind
#

Lol

honest perch
#

Technically after 5 days you can re use them

empty wind
#

Still waiting for my bot to get approved smh

twilit rapids
#

Just wait lol

empty wind
#

Ik

slender wagon
#

same

#

been 25+ days

honest perch
#

Same, I honestly don't care days

empty wind
#

Watch me get denied because it was somehow offline

placid iron
#

Tbh I just hope I sort out branding before it gets accepted because I'm kinda confused atm

empty wind
#

Same

slender wagon
#

@empty wind oh u mean in dbl

empty wind
#

DBL?

honest perch
#

This

slender wagon
#

accepted in dbl

honest perch
#

Is dbl

winter basalt
#

wth is dbl es em ech

empty wind
#

wth is dbl es em ech
@winter basalt
?? Spelling ??

slender wagon
#

cuz discord doesn't care if your bot is offline it will accept anyhow

empty wind
#

Oh discord bot list

candid hare
#

...........

earnest phoenix
#

dotpost

#

Do user.username

#

You can't mention users anywhere outside of field values and descriptions of embeds

#

@earnest phoenix you need to get the username property of the user class

#

like

#

message.mentions.users.first().username

#

Oh okay

slender wagon
#

const user = message.mentions.users.first() || message.author;

earnest phoenix
#

I have already done that

slender wagon
#

then just go with user.username

earnest phoenix
#

okay I will try

slender wagon
#

.setTitle(${user.username})

earnest phoenix
#

Thanks

#

umm you're spoonfeeding

slender wagon
#

me?

earnest phoenix
#

Yes

slender wagon
#

oh is it bad

earnest phoenix
#

Of course

#

You're not explaining anything and just giving them code

#

Which is bad and also against dbl rules

#

Also for the emoji, can i just copy and paste cuz i know i can use emojipedia for python but im not sure about js

#

Yes

#

Okay cool!

#

Emojis work anywhere on discord

#

Cool!

#

Not sure about custom ones inside embeds

#

That's fine. I just get them from emojipedia

#

Cool

#

nope

#

But it seems that i can't use it

#

Yoir pc can't display it

#

But it will work inside Discord

#

Oh so i can just use it?

void shadow
earnest phoenix
#

With what

void shadow
#

at end is }

placid iron
#

wtf

earnest phoenix
#

TJAT MUCH FREAKING FIELDS

placid iron
#

fields can have content you know

void shadow
#

ohh

earnest phoenix
#

And wrong syntax

void shadow
#

.addfields

#

or what

#

im trying to make embed roles

earnest phoenix
#

Yoir syntax is wrong

slender wagon
#

@earnest phoenix wasn't trying to spoonfeed or something but that's how i started to understand coding, by seeing how it was done

void shadow
#

i have syntax

#

....

earnest phoenix
#

???

void shadow
#

but is not in pic

earnest phoenix
#

Tf

void shadow
#

i have that

earnest phoenix
#

???

#

Tf

#

You understood it wrong probably

#

I prefer using embed objects

void shadow
#

ok thx

#

is started today 🙂

sullen harness
opal plank
#

bad

earnest phoenix
#

Richembed

#

WTF

opal plank
#

embed constructor bad

earnest phoenix
#

Outdated

sullen harness
#

Nope

opal plank
#

waste of code using embed builders

earnest phoenix
#

I have the korrekt link

sullen harness
#

Just the link

#

Uses MessageEmbed on the page itself

opal plank
#

click on the link and watch the url

#

you'll see what he means

#

its redirected

honest perch
#

waste of code using embed builders
doubt

opal plank
#

imagine using constructors when you literally do the same thing

honest perch
#

Constructors are shorter

opal plank
#

wrong

honest perch
#

Not wrong

sullen harness
#

Both examples are there ¯_(ツ)_/¯

opal plank
#
{embed: field{}}

shorter than


let embed = new Discord.Embed();
embed.Addfield();
earnest phoenix
#

Discord.Embed

#

Wtf

sullen harness
#

Does it impact anything else besides space?

opal plank
#

you get the idea

#

builder is waste of time

#

calling constructors and methods when you can simply build the object yourself

honest perch
#

Thats one field

opal plank
#

let embed
embed.filed = 'this'

honest perch
#

But for multiple ots shorter

opal plank
#

which is the same that you builder is doing

honest perch
#

Yes but the code is shorter

#

And easier to read

opal plank
#

i disagree

#

calling constructors and methods/functions uncessarily

#

increases code

honest perch
#

No

#

Lies

#

Go away

opal plank
#

imagine calling methods when you can simply declare the obj

cinder patio
#

Why are you arguing about a personal preference

#

If someone finds constructors more readable, so be it

earnest phoenix
#

Hey
I am trying to make my bot online rn but I write all the code right, then I open Terminal I type node . but my bot is not getting online!
Could someone help me pls?

honest perch
#

Any error messages

earnest phoenix
#

Wait...

opal plank
#

idc about preference, just teaching that using embed builders is a waste

#

at least give them both options

#

even if nanoseconds, declaring a object manually is more code friendly rather than calling those functions using a builder

#

which ends up doing the exact same thing, its called redundant @cinder patio

latent fog
#
{embed: field{}}

shorter than


let embed = new Discord.Embed();
embed.Addfield();

@opal plank bruh how do you write these

#

I never understood

golden condor
#

The module wasn't found

latent fog
#

🤣

opal plank
#

embed objects?

golden condor
#

Also use a screenshot software omg

latent fog
#

@opal plank yeah

opal plank
#

<user/channel>.send({object})

leaden rover
#

How do I set the help_command= in my startup file as a cog? This is d.py

latent fog
#

Ok thanks

opal plank
#

heres example @latent fog

earnest phoenix
opal plank
earnest phoenix
#

@honest perch

honest perch
#

Module not found

golden condor
#

Install

#

The

#

Module

#

It's not that hard

earnest phoenix
#

Module?

latent fog
#

@opal plank I know that bruh

weak rain
#

install module

latent fog
#

🤣

#

Lol

opal plank
earnest phoenix
#

Wdym module?

weak rain
#

bruh

golden condor
#

ah I am having brain aneurysms again

weak rain
#

it will be writtenn up

opal plank
#

then whats the question @latent fog ?

weak rain
#

Wdym module?
@earnest phoenix package

opal plank
#

OOOH you mean code blocks?

latent fog
#

hi

#

Oh I got ut

opal plank
#
if(this) test
#

its 3

#

plus markdown if you wish

#

js

latent fog
#

@opal plank I wanted to know how to write this

#

🤣

#

Lol

opal plank
#

```js
/js code here
```

weak rain
#

u know js? @latent fog

latent fog
#

I know bro

#

@weak rain hmm no

opal plank
#

those are 2 different

latent fog
#

Ok

#

I develop bots by my phone 📱

weak rain
#

not even vars?

#

wtf

opal plank
#
//code block```
``forgot the name of this``
latent fog
#

🤣

weak rain
#

@opal plank he came for fun

opal plank
#

figured

latent fog
#

Bruh

weak rain
#

he thinks he can make bots via

latent fog
#

Not for fun

weak rain
#

Discord Bot Designer

opal plank
#

you game on a mac too?

#

jk, getting offtopic

weak rain
#

Who?

opal plank
#

lakshya

weak rain
#

ohk

delicate shore
#

I am getting bored

#

oh wait shit wrong channel nvm

weak rain
#

hey ervin can u do me a favour

#

@opal plank

opal plank
#

depends

#

but go ahead

delicate shore
#

He is live don't ping him

opal plank
#

technically im live but not really

delicate shore
#

O

opal plank
#

its the bot thats live and updating my presence instead

delicate shore
#

oh nice

opal plank
#

i actually managed to stream directly to twitch using the bot

weak rain
#

can u find the loop holes of my bot

opal plank
#

without using a software for livestreaming

delicate shore
#

But one should not ping one unless/until he/she has asked his/her question

opal plank
#

i mean i dont mind, i got over 300 servers total in my accounts, if you dont ping me, you likely wont be answered

#

sure @weak rain , got a test server or something?

delicate shore
#

oh lol

#

wait a min

#

@opal plank 100 servers is limit ;-;

weak rain
#

support server

stuck scaffold
opal plank
#

accounts

#

plural

delicate shore
#

Oh

opal plank
#

@weak rain dm me

delicate shore
#

lel

weak rain
#

ohk

opal plank
#

i though opus was deprecated

dreamy cedar
#

anyone know the regex of roles mentions
i use this ```js
(/<@!?(\d+?)>/g)

but it only works with users
wary flame
#

@stuck scaffold install make

golden condor
#

@dreamy cedar replace the !? With &

stuck scaffold
#

how

dreamy cedar
#

@dreamy cedar replace the !? With &
@golden condor thank you so much

golden condor
#

Np

wary flame
#

yum install make

golden condor
#

<@&role id> is a role mention

stuck scaffold
earnest phoenix
#

Wdym download module

stuck scaffold
#

@wary flame ^

earnest phoenix
#

Pls explain cause I just learnt how to code

golden condor
#

npm i <module-name>

wary flame
#

Full error?

opaque swift
#

Hello everyone!'

#

may i ask for help? i have been struggling with a bot for a day so far

golden condor
#

Yes