#development

1 messages · Page 546 of 1

sick cloud
#

it's API abuse

dreamy charm
#

Wdym

amber fractal
#

That wouldnt work either way, it uses properties not methods

dreamy charm
#

I just want to send to my own server

#

In all channels

#

Is that wrong?

amber fractal
#

Thats what makes it api abuse

dreamy charm
#

Ok then, guess not

#

Hold on

#

@sick cloud

#

@amber fractal

#

What if I only send it to #general channels

sick cloud
#

no

#

it's API abuse

dreamy charm
#

Ok then

sick cloud
#

mass announcing

earnest phoenix
#

Is there something wrong with this code since when i run the cmd the cooldown date is undefined

if(command == "economy") {
    const randomnumber = Math.floor(Math.random() * 100) + 1
    
    if(args[0] == "bal") {
      let balance = await economy.fetch(`uBal_${message.author.id}`)
      
      if (balance === null) balance = 0;
      message.channel.send(`You have $${balance}`)
    }
    
    if(args[0] == "work") {
     let cooldown = 8.64e+7
     
     let lastWork = await economy.fetch(`lastWork_${message.author.id}`)
     try {
      economy.fetch(`uBal_${message.author.id}`).then(bucks => {
        if(bucks = null) {
          economy.set(`uBal_${message.author.id}`, 0)}
        
        else if (lastWork !== null && cooldown - (Date.now() - lastWork) > 0) {
        let timeObj = ms(cooldown - (Date.now() - lastWork))
        
        message.channel.send(`You have to wait ${timeObj.hours} hours and ${timeObj.minutes} minutes before you can use this command again!`)
        
        } else {
          economy.set(`lastWork_${message.author.id}`, Date.now());
          economy.add(`uBal_${message.author.id}`, randomnumber).then(i => {
            message.channel.send(`You worked hard and got $${randomnumber}!`)
        })}
      })} catch(err) {
        console.log(err)}
     
    }
}
lament meteor
#

try new Date()

thorn nexus
#

[js] Hello everyone, I have a question, how to make a bot see a picture that you delete, my bot sees that the message is deleted, but that it does not see the deleted.

lament meteor
#

u gotta like save the picture then send it

thorn nexus
#

I want that when deleting a picture, the bot sent to the logs a picture that was deleted or its name was deleted.

lament meteor
#

you log the delete msg event and save the buffer and send it as an attachment in a channel

thorn nexus
#

can you give an example?

#

I partially understand how to do this, but I can't.

lament meteor
#

wait which lib?

#

i gotta presume d.js

#

cause who uses eris

thorn nexus
#

yes javascript

quartz kindle
#

js = lang

#

lib = d.js/eris/d.io/etc...

thorn nexus
#

oops

#

d.js

quartz kindle
#

try using message.attachments

#

you should be able to see the files that were attached to that message

lament meteor
#

@quartz kindle but deleted msgs u gotta use like node-fetch to fetch the buffer before the link gets deleted

quartz kindle
#

i was about to ask, how long do you think urls stay there before they are removed?

lament meteor
#

i wonder

quartz kindle
#

.attachments has both an .url and a .proxyURL

lament meteor
#

are ratelimits even documented in the discord docs?

quartz kindle
dreamy breach
#

How i can detect if an user s into a guild with an id?

ruby dust
#

in my experience attachment urls are invalidated instantly

lament meteor
#

Tim does discord documents their ratelimits?

quartz kindle
#

if(client.guilds.get(guildid).members.get(userid)) { do something }

#

i guess

lament meteor
#

well they don't rlly

quartz kindle
#

there's this, although its old and outdated

#

but current rate limits are still similar

#

the only way to get actual rate limits is to use the api and enable rate limit headers

dreamy breach
#

will try @quartz kindle thanks

#

works perfectly ty 😃

serene cobalt
#

Does anyone know how to get google's youtube data v3 api to fucking work
I keep getting

{
 "error": {
  "errors": [
   {
    "domain": "usageLimits",
    "reason": "accessNotConfigured",
    "message": "Access Not Configured. YouTube Data API has not been used in project [redacted] before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/youtube.googleapis.com/overview?project=[redacted] then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
    "extendedHelp": "https://console.developers.google.com/apis/api/youtube.googleapis.com/overview?project=[redacted]"
   }
  ],
  "code": 403,
  "message": "Access Not Configured. YouTube Data API has not been used in project [redacted] before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/youtube.googleapis.com/overview?project=[redacted] then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry."
 }
}
gaunt kettle
#
        if message.content in serverMembers:
            print("success")
        else:
            print("fail")```
where serverMembers is the usernames of all online members
i added l!give to all items in the list to see if that worked but it always prints fail, idk if this is meant to be an easy fix or not (discord.py)
serene cobalt
gaunt kettle
#

cheers

quartz kindle
#

is the youtube api enabled in your dashboard?

serene cobalt
#

yes

#

Disable implies it's enabled and can be disabled with the button

sick cloud
#

is it enabled on that specific app

serene cobalt
#

yes

sick cloud
#

read the docs through then

serene cobalt
#

I have

sick cloud
#

they should mention how to set it up

serene cobalt
#

and I have made the correct url

#

it says accessNotConfigured

sick cloud
#

then try google support or something

serene cobalt
#

Google support is trash

quartz kindle
#

try removing the restriction and leave the key unrestricted

sick cloud
#

^

#

it usually fails there

#

i had to leave all mine for yt unrestricted

serene cobalt
#

So, disable the restriction to only use the api I'm trying to use? that sounds broken as fuck

#

then again, we're talking about google

#

of course it'll be broken as fuck

sick cloud
#

just don't lock the api to a specific url

serene cobalt
#

Now to wait for like 5 minuets

quartz kindle
#

my api keys are all unrestricted lul

serene cobalt
#

still erroring at 3, not a good sign

#

still erroring at 5

#

Key has no restrictions

golden ice
#

im making a community plugins system where people can create their own commands for the bot, and then anyone can add that command to their server via the web control panel. What would the best method of doing this be?

loud salmon
#

github

#

i would look at what redbot does

sick cloud
#

yeah github would work best

golden ice
#

how would github help?

#

i want the stuff to be hosted on my server

#

@loud salmon the plugins are essentially packages that listen for discord.js events that will be hosted on my server. my issue is, what would the best way of firing the events and alerting a certain package that that event has been fired

#

keep in mind that the bot is for multiple discord servers and not all servers will use all packages

#

wait lemme give you a code example

loud salmon
#

im not entirely familiar with js

#

i wouldnt be the one to ask

golden ice
#

ok

serene cobalt
#
{
 "error": {
  "errors": [
   {
    "domain": "usageLimits",
    "reason": "accessNotConfigured",
    "message": "Access Not Configured. YouTube Data API has not been used in project 880573742558 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/youtube.googleapis.com/overview?project=880573742558 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
    "extendedHelp": "https://console.developers.google.com/apis/api/youtube.googleapis.com/overview?project=880573742558"
   }
  ],
  "code": 403,
  "message": "Access Not Configured. YouTube Data API has not been used in project 880573742558 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/youtube.googleapis.com/overview?project=880573742558 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry."
 }
}
#

Key has no restrictions, left for at least 6 mins before testing after changes, still not working

loud salmon
#

no need to repost it

#

people will view it when they have time

quartz kindle
#

try deleting everything and starting from the beginning

serene cobalt
#

Done that

quartz kindle
#

new project, new api key

serene cobalt
#

several times

loud salmon
#

people are probably still asleep from all the partying they did last night

quartz kindle
#

then idk

charred palm
#

How do you use mongodb atlas? Not asking to be spoon-fed, just asking for someone to point me in the right direction.

amber fractal
#

Alright, so I know some ways to make cooldowns on commands, but does anyone know the best way to go about doing it for discord.js?

night imp
#

create a set

amber fractal
#

On a timeout yea

night imp
#

Add person to set at the end of message handler

#

Get a timeout to remove them

#

Return if in set

amber fractal
#

But I want people to be able to check the time left on it

blazing star
#

there’s a work around for that

quartz kindle
#

use timestamps

#

save timestamp for last time command was used. on new command compare timestamp to saved one

amber fractal
#

Are timestamps in miliseconds

amber fractal
#

Well whatever was passed is undefined

#

at new User (/rbd/pnpm-volume/ffe971fb-0896-423e-a2be-c3899038c99b/node_modules/.registry.npmjs.org/fortnite/4.1.1/node_modules/fortnite/src/User.js:13:73)

#

it cant make something lowercase that doesnt exist

visual zenith
#

which means?

#

no spaces?

amber fractal
#

idk how the fix would work, but its trying to make something lowercase that isnt defined

visual zenith
#

idk tbh

quartz kindle
#

this is like the third time people post about this problem

#

from what i remember it seemed to be a problem with the package, which was not updated since, by the way

visual zenith
#

oh srry ;/

quartz kindle
#

the package is really simple though, you can easily do whatever you need without using it

crisp turtle
#

does anyone have any idea how I would make the progress bar scrollable on client side

azure reef
#

Anyone know bot that shows last user, how many users online, how many users on server, how many banned users etc.

#

Bot that create channels with this info, not on the website.

mossy vine
#

okay im not looking to be spoonfed, i want some resources but google isnt helping
i want to make a website that can use javascript code that isnt displayed to the user, but constantly runs on the server

#

i know this can be done with php, but i want to use javascript

#

and also use node.js modules and es6 syntax OMEGALUL

#

so yeah if anyone can direct me to a good starting point i would be very thankful

crisp turtle
#

node.js and express

gilded blaze
#

Webpack for using ES6 syntax and there are many template engines for Express. Like EJS

mossy vine
#

soooo i just use express in my file and do everything with it?

crisp turtle
#

idk I use python for my website

gilded blaze
#

I am pretty sure you can pass in parameters

crisp turtle
#

but express is good I've heard

gilded blaze
#

And use them in the file

mossy vine
crisp turtle
gilded blaze
mossy vine
#

ik im using dark reader

#

anyways, thanks for the tips

#

ill check it out

#

if anyone is reading this in the future and has better ideas tag me kthx

crisp turtle
#

I guess nobody has answer to my problem

spring ember
#

is there a js lib only for fetching simple data

#

like users

gilded blaze
#

Eris has REST mode.

earnest phoenix
#
var embed = new Discord.RichEmbed()
.setAuthor(message.author.tag, message.author.avatarURL)
.setDescription(`\`${feedback}\``)
.setThumbnail(message.author.avatarURL)
.setColor("00FFFF")
.setFooter(new Date())
client.shard.broadcastEval(`const channel = this.channels.get('529692006608273428'); if(channel) {channel.send(\`${embed}\`); true} else false;`)

This returns [object Object] in the specified channel... JavaScript, can someone help me figure this out please?

lament meteor
#

it would be easier to use webhooks™

earnest phoenix
#

Nu. I want to do it like this aha

inner jewel
#

because you're sending the toString() of the embed

earnest phoenix
#

I was told, this would work. But it is giving me another error:

client.shard.broadcastEval(`const channel = this.channels.get('529692006608273428'); if(channel) {channel.send(\`${JSON.stringify(embed)}\`); true } else { false; }`)

Returns:
{ SyntaxError: missing ) after argument list }

gilded blaze
#

Read the error. It tells you everything you need to know

earnest phoenix
#

I do not see the syntax error though...

smoky mica
#

Um no offense or tryna sound like an asshole but like how did you make your bot if you didn't know where and when to add an )

gilded blaze
#
const channel = this.channels.get('529692006608273428');
if (channel) {
    channel.send(\`${JSON.stringify(embed)}\`); true } else { false; }``` Does this look right to you?
earnest phoenix
#

@gilded blaze breh

#
client.shard.broadcastEval(`this.channels.get('529692006608273428').send(\`${JSON.stringify(embed)}\`)`)

There shouldn't need to be a ) anywhere else...

#

Still same error

quartz kindle
#

why are you repeating `

#

just remove them

#

send(${JSON.stringify(embed)})

earnest phoenix
#

@quartz kindle

var embed = new Discord.RichEmbed()
.setAuthor(message.author.tag, message.author.avatarURL)
.setDescription(`\`${feedback}\``)
.setThumbnail(message.author.avatarURL)
.setColor("00FFFF")
.setFooter(new Date())
client.shard.broadcastEval(`this.channels.get("529692006608273428").send(${JSON.stringify(embed)})`)

Cannot send an empty message...

quartz kindle
#

try send({embed:JSON.stringify(embed)})

earnest phoenix
#

finally! Thank you so much 😂

quartz kindle
#

👍

earnest phoenix
#

how do I find if someone is in a guild?

#

in d.js

amber fractal
#

Good luck

#

jk, its in there

#

its a property

earnest phoenix
#

lul

#

there are

#

so

#

many

#

options

#

i dont even know what I'm supposed to look for

keen drift
#

if the key is in the guildmemberstore Thonkang

#

let's think here

abstract fable
#

Does anyone know of a bot for discord that can prune members with roles?
Or generate a report on last login time etc..

keen drift
#

last login Thonkang

short sable
#

does anyone know how sharding works for discord.py .16.14 ?

#

if anyone has an example of how it works

#

it'd be much appreciated

#

im pretty lost and my bot is giving me an error that sharding is now required

crisp turtle
#

just use autoshardedbot

#

if it's rewrite you're talking about

short sable
#

it's not, .16.14

crisp turtle
#

I'm pretty sure it's not possible with it

#

you need to migrate to rewrite

#

I might be wrong but I'm 99% sure

earnest phoenix
#

Hi
How to fix this problem?
at item.request.gen.end (/root/X/node_modules/discord.js/src/client/rest/RequestHandlers/Sequential.js:79:15)
at then (/root/X/node_modules/snekfetch/src/index.js:215:21)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:26047) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4)
my bot is in 87 servers
(node:26047) UnhandledPromiseRejectionWarning: DiscordAPIError: Missing Permissions

short sable
#

@crisp turtle it looks like it's possible you just need to do it manually

earnest phoenix
#

@earnest phoenix have you tried reading the error

#

it's self explanatory

#

yes i read it

#

Missing Permissions

#

what perm missing?

#

¯_(ツ)_/¯

crisp turtle
#

ok

earnest phoenix
#

go check your code and check all actions you have

wide ruin
#

@pastel gazelle

earnest phoenix
#

@earnest phoenix pls help me in dm

#

no

#

😦

wide ruin
#

@pastel gazelle and me have a bot hosted on https::/glitch.com

#

Made in d.js

#

How can we homehost?

pastel gazelle
#

yes

wide ruin
#

How can we do that?

mossy vine
#

wdym homehost

wide ruin
#

Run from computer

mossy vine
#

do you want to host your bot on your machine?

wide ruin
#

Yes

mossy vine
#

your machine or a server?

wide ruin
#

Run from my computer

#

(laptop)

mossy vine
#

install node.js and other dependencies, download your bots code, and run it

wide ruin
#

Wdym?

#

So go to node.js and install

mossy vine
#

yes, and install other dependencies as well

pastel gazelle
#

i have node.js

wide ruin
#

Oh ok

pastel gazelle
#

what else is needed

earnest phoenix
#

@earnest phoenix My bot commands starts with - const Discord = require("discord.js");

    module.exports.run = async (bot, message, args) => {
      let bicon = bot.user.displayAvatarURL;
      let dembed = new Discord.RichEmbed()
wide ruin
#

T o a s t go to glitch and go to the code

mossy vine
#

i have no clue what other stuff your bots code uses

pastel gazelle
#

my invite link is broken

mossy vine
#

if you use sql you need to install sql as well (duh)

wide ruin
#

@pastel gazelle go to https://glitch.com

#

And find the project

pastel gazelle
#

ive done it in the past

#

it doesnt let me in

mossy vine
#

or you could just create an invite link OMEGALUL

wide ruin
#

Its at this link:

mossy vine
#

oh its most likely privated

wide ruin
#

(not an access link, he is already on the code)

mossy vine
#

it says not found

earnest phoenix
#

you don't host bots on free hosting, period

wide ruin
#

He is on the code already

mossy vine
#

then whats the problem WaitWhat

wide ruin
#

Memory

#

Can't handle all the requests

mossy vine
#

what the

pastel gazelle
#

oh its working

mossy vine
#

is it in any bot farm servers?

#

if so, make the bot leave them

earnest phoenix
#

any free hosting either:
a) is not free
b) has limited time of usage
c) restricts features which are 100% features your bot needs (to connect to the gateway for example)

wide ruin
#

Only used glitch while we were making the bot

#

There are 7 devs

#

Now it's made, were homehosting

mossy vine
#

or yknow

#

buy a vps?

earnest phoenix
#

^

wide ruin
#

money

earnest phoenix
#

you can find ones for literally $3

mossy vine
#

im guessing you arent paying for the electricity then

wide ruin
#

No

mossy vine
#

otherwise a vps would be waaaaaaay cheaper than homehosting

earnest phoenix
#

if you don't have the money to buy a $3 vps you probably shouldn't be hosting a bot at all, change my mind

wide ruin
#

I'm not hosting it, @pastel gazelle is

mossy vine
#

then why are you asking for instructions OMEGALUL

wide ruin
#

But i dont want to give out credit card info

#

Because I'm telling him where to go

earnest phoenix
#
But i dont want to give out credit card info```

you... don't have to? you can use a middleman service like paypal
pastel gazelle
#

wait what

wide ruin
#

Don't have PayPal

#

I'm 13

mossy vine
#

and you have a credit card

wide ruin
#

Can you not host @pastel gazelle?

mossy vine
#

ok

pastel gazelle
#

umm

wide ruin
#

you have to be 11 for that

pastel gazelle
#

we might need wlarus

#

.

#

m8 u have to be like 18

#

or wait

#

ur in a different country

wide ruin
#

England

mossy vine
#

this channel is for develpoment not for sorting out your personal problems tbh

#

dms exist for a reason

wide ruin
#

Can you host it please tost

amber fractal
#

You're mistaking a credit card for a debit card

earnest phoenix
#

get your parent/guardian to make you a debit card lol, i have a debit card on my name and i got it when i was like 14?

wide ruin
#

sorry

amber fractal
#

Unless you're in a join account with a parent/guardian of age

#

joint*

quartz kindle
#

ask your parents for a credit card for a "school project"

#

and get an amazon/google vps

#

its free for 12 months

#

tell them its a school project to learn how to work with vps and remote linux

#

that only needs a credit card to sign up, it wont be charged before 12 months pass

earnest phoenix
#

if you have an edu email you should probably check out github's student pack too

keen drift
#

I think a prepaid also works

#

I used to just buy prepaids and use it on AWS free tier

smoky mica
#

quick question, important to add this shard or wtv to my bot? didn't really understand whats that

nova atlas
#

Best vps for discord bot hosting? no heroku

smoky mica
#

check pinned msgs of this channel

#

btw heroku isnt bad

nova atlas
#

ik it isnt bad, i use it but my bot needs to be online 24/7 @earnest phoenix

amber fractal
#

Theres vps service providers pinned in this channel

#

I use ovh personally

void stump
#

Having trouble adding bots

shy rose
#

@quartz kindle google give you a potato vm for life

#

no idea how thats sustainable but they do...

earnest phoenix
#

you can get a 1gb ram vm which is heavily overpriced

#

they give you $300 to use on their service though

#

vms are still heavily overpriced

earnest phoenix
#

Can somebody help, with the discord api how do I hide the token after the redirect?

quartz kindle
#

@shy rose yeah im using it. but its not 100% free because they give you 1gb bandwidth/mo

#

discord alone uses like 8gb/mo

shy rose
#

yeah but the vm it self is free with no inbound data cap so liek your only paying outbound

which compaired to any other service is free...

#

and the vm it self is still free

quartz kindle
#

yeah it adds up to like 1-2 $/mo

shy rose
#

given on aws its $5 per month for the vps + every other cost

#

and if your not doing outbound data youve still got a free machine

quartz kindle
#

ik, i've been recommending it all the time here

shy rose
#

nothing else afik offers that

quartz kindle
#

but if you need something slightly better, then other companies are much better

shy rose
#

if you want something better then pay for it...

keen drift
#

why n0t glitch

shy rose
#

if can find another service that give you a free vm thats better...

#

@keen drift cause google gives a whole vm for free

keen drift
#

so does glitch Thonkang

shy rose
#

you jsut pay for external costs

#

glitch is containerised?

quartz kindle
#

im just saying, if you need to upgrade your vm for a price, other companies do it better

#

google's next tier is like 7usd/mo

shy rose
#

like can you run a mysql or mail server at same time as your bot on glitch?

quartz kindle
#

while others do it for 3

keen drift
#

each glitch project run in its own vm

shy rose
#

container

#

same way heroku does it

keen drift
#

can run java, python on this

shy rose
#

you know what a container is right?

keen drift
#

a container can mean a lot of things

#

depends what virtualization the container uses

shy rose
#

containerised code

keen drift
#

not sure, never heard of it

shy rose
#

can you run a mysql server + nodejs at the same time off one glitch container?

keen drift
#

I believe so

shy rose
#

is memory persistent?

keen drift
#

... memory is never persistent

#

what are you saying

shy rose
#

when the container stop/starts is a file you made before reboot still there

keen drift
#

Yes it has a persistent volume

quasi oasis
#

Bru this is scary

sonic ermine
#

Hey guys, if I wanted to make a bot in Python which library would you recommend I use?

amber fractal
sonic ermine
#

Is there like an idiots guide alternative for Discord.PY

#

Like an idiots guide for NodeJS?

amber fractal
#

Not sure, theres always the docs tho mmLol

sonic ermine
#

I keep forgetting docs are a thing lmao

#

Thanks

earnest phoenix
#

lmfao same Kie

zenith oriole
#

ayo quick question

#

does lavalink establish a connection with discord or does it relay the stream to the client

blazing star
#

it establishes a connection to a discord voice server

lethal sun
#

Why isn't message.react('✅'); working? I am using discord.js

coral trellis
#

@lethal sun Are you getting an error?

lethal sun
#

It says DiscordAPIError: Invalid Emoji

coral trellis
#

The emoji isn't correct and isn't recognized by Discord

lethal sun
#

#

but it is

coral trellis
#

#

Interesting

lethal sun
#

same error with other emojis

#

🔥

#

looked up on Google, couldn't find a solution

zinc pawn
#

make sure discord.js is up to date

#

@lethal sun

lethal sun
#

sure

#

will try that

#

didn't work @zinc pawn

zinc pawn
#

idk then, sorry

lethal sun
#

hm

#

alright

mental solstice
#

is react looking for an object, and not a char?

quartz kindle
#

try any of the other unicode checkmarks

#

U+237B ⍻ NOT CHECK MARK
U+2611 ☑ BALLOT BOX WITH CHECK
U+2705 ✅ WHITE HEAVY CHECK MARK
U+2713 ✓ CHECK MARK
U+2714 ✔ HEAVY CHECK MARK
U+1F5F8 🗸 LIGHT CHECK MARK
U+1F5F9 🗹 BALLOT BOX WITH BOLD CHECK

#

A check mark, checkmark or tick is a mark (✓, ✔, etc.) used (primarily in the English speaking world) to indicate the concept "yes" (e.g. "yes; this has been verified", "yes; that is the correct answer", "yes; this has been completed", or "yes; this [item or option] appli...

lament meteor
#

or try to use the text

earnest phoenix
#

@lethal sun use emojipedia

#

And copy paste

lethal sun
#

tried everything

earnest phoenix
lethal sun
#

hm

ruby dust
#

maybe the lib isn't up to date?

brave wedge
#

anyone here good with Rust?

knotty steeple
#

why?

lavish forge
#

Rust will give you tetanus that's bad

brave wedge
#

can't figure how to unpack a vector within a format

knotty steeple
#

google solves most of your problems

lavish forge
#

That's not relevant to this channel.

#

Google ftw

knotty steeple
#

how is it not relevant

brave wedge
#

i couldnt find anything on google which is why i asked here but i presume it isnt possible anyways due to how rust is

lavish forge
#

Channel about (bot) development

knotty steeple
#

yea what

inner jewel
#

vec.iter().map(|e| format!("u32({})", e)).collect::<Vec<_>>().join(", ")?

#

@brave wedge

#

afaik that should work

#
fn main() {
    let vec = (1..10).collect::<Vec<u32>>();
    
    println!("{}", vec.iter().map(|e| format!("u32({})", e)).collect::<Vec<_>>().join(", "));
}```
languid dragon
#

@lavish forge it's not just for bot development but it's the preferred subject, if people ask other questions its not up to you to tell them to stop, for all you know the guy is trying to get a vector for use with a bot, who knows

earnest phoenix
#

@lethal sun does it work when you eval it?

lethal sun
#

eval works just fine. @earnest phoenix

earnest phoenix
#

🤔

inner jewel
#

is the file encoded properly?

lethal sun
#

I don't know

quartz kindle
#

open it in notepad and save it as utf-8

knotty steeple
#

rule 7

earnest phoenix
#

ok sorry

grizzled scarab
#

My first time setting the amount of servers that are displayed on the site, and I forgot to remove the 2,133 number from the example, so when I ran my code it set the server count to 2,133. I changed it so it should now set it to the actual number of guilds connected but it isn't updating

quartz kindle
#

who are you and why are you pretending to be me
does it update if you hardcode a different number?

grizzled scarab
#

huh it does, probably should have tested that

#

Thanks haha

quartz kindle
#

then double check how you get the real server count

pearl elm
#

can anyone tell me why this doesn't work ?

knotty steeple
#

myfunction ()

#

also what doesnt work

#

you cant just say "it doesnt work"

pearl elm
#

when i run the command on discord i get errors back in the terminal

knotty steeple
#

well what are they?

#

cant fix a problem if you dont know whats causing them GWqlabsKek

pearl elm
knotty steeple
#

msg isnt defined

#

read the error

pearl elm
#

ah shit ofc lmao thanks

knotty steeple
#

wew

quartz kindle
#

has anyone tested discord's ping to many different vpses?

knotty steeple
#

all i can say is i get better on galaxygate then i got on digitalocean

quartz kindle
#

but they're both US right?

knotty steeple
#

ye

quartz kindle
#

i wanna know if an EU vps makes a big difference

#

im trying to decide between hetzner, ovh and galaxygate

knotty steeple
#

an eu vps huh

#

gonna get higher ping

quartz kindle
#

well yeah but how much higher? if its like from 30 to 150, thats bad, but if its from 60 to 80, thats not bad

#

also, discord's gateway is cloudflare right? i pinged their IP from here and i got 50ms, while my normal ping to the US is 200

#

is the gateway really US only?

knotty steeple
#

Thonk idk

#

i have a bot hosted on a friend's eu vps

#

its 2x ping compared to my other bot

#

but idk

inner jewel
#

the discord api is hosted 100% in the US

quartz kindle
#

is it noticeable when you run commands?

inner jewel
#

no

knotty steeple
#

not really

#

if anything slightly GWqlabsKek

inner jewel
#

most people won't even notice 100ms -> 200ms response times in normal usage

quartz kindle
#

i only have experience with 2 vpses, one was from a russian friend, and it was really laggy compared to google's when i switched

knotty steeple
#

well yea russia is far from the us

#

google servers are closer

lethal sun
#

changing the encoding to utf-8 didn't work @quartz kindle

ruby dust
#

is it possible to, at least locally, create an image of a pie chart in python?

inner jewel
#

python is turing complete so yes

ruby dust
#

I can't find a way to do it, is there a lib that I've missed?

quartz kindle
#

try a graphics/drawing library

#

like cairo

faint junco
#

Hi, How To Host Bot With Glitch

knotty steeple
#

you dont

faint junco
#

;-;

topaz fjord
#

You use a real host

mossy vine
#

if you cant figure out glitch you shouldnt even bother with 24/7 hosting

#

uhm

earnest phoenix
#

Uhm

#

Do you speak french ?

quartz kindle
#

je ne parles pas francais merci bocoup

#

i dont speak french thank you

brittle orchid
#

do you know a good package for fetch a overwatch player ? i was search since 5 hours and i didn't find

quartz kindle
#

for node?

#

there are many on npm, have you tried them?

earnest phoenix
#

I'm trying to do 'client.guilds.size' with my eval cmd.

#

But it says 'client is not defined'. How to fix?

night imp
#

@earnest phoenix what is discord client defined as

#

You may of put it as Client

earnest phoenix
#

Help...

patent reef
#

Check if they are HTTPS or not

earnest phoenix
#

thats an album link

#

oh

#

good god

#

just change the a to an i right?

#

no

#

oh

#

open the url

#

and copy image url from the album

#

got it

#

thanks

hushed zodiac
#

i have a question...

earnest phoenix
#

?

hushed zodiac
#

Why does a bot not work in the test channels? Do I have to do anything or something??

frozen kettle
hushed zodiac
#

ok @frozen kettle and what exactly do i have to do?

knotty steeple
#

solve the problem your bot has

earnest phoenix
#

Sam lmao

#

@hushed zodiac your bot may be muted because it responds to other bots, or something else.

hushed zodiac
#

ok

earnest phoenix
#

search for your bot

#

-bots @hushed zodiac

gilded plankBOT
#
ShowMeYourSkil#5698
Bots

@jade garnet

earnest phoenix
#

@jade garnet

hushed zodiac
#

👍

#

oh okey

earnest phoenix
#

The reason will be in modlogs

#

If you believe that it shouldn't have happened, ping a moderator

knotty steeple
#

refrain from using luca in here btw

hushed zodiac
#

So I have to rub a moderatior aschprescription?

#

AxelBOT23.12.2018

Mute | Case 5179
User
@jade garnet (Progen#5454)
Moderator
Unknown. Moderator, use ::reason 5179
Reason
Unknown. Moderator, use ::reason 5179 <reason>
ID: 495293590503817237

#

Perhaps a <@&304313580025544704> knows more?

knotty steeple
#

didnt work because edits dont ping

#

and dont ping all mods btw

#

ping 1 mod

hushed zodiac
#

oh okey

celest arch
#

@client.command(pass_context=True) async def coinflip(ctx): pog = ctx.message.author.mention cfa = ['Heads','Tails'] cfr = random.choice(cfa) await client.say(f'{pog} {cfa}')

#

How would I fix that so it picks randomly Heads or tails

#

I feel really dumb for having to ask that

blazing star
#

you sent the array not the random choice which was defined as cfr

celest arch
#

oh my god

#

I am blind

#

Thanks

blazing star
#

no prob

celest arch
#

I would've kept staring at that forever

mighty moat
blazing star
#

generate a new key

amber fractal
#

Well thats either on glitch or heroku...

zenith oriole
#

@mighty moat it takes up to 2 hours for your key to work

#

when you generate a new one

earnest phoenix
#

Hi

#

The backround never loads on my tablet

#

But it's fine on other devices

mental solstice
#

same size devices?

earnest phoenix
#

Nope

mental solstice
#

is it something in your css? with media size

earnest phoenix
#

It just centers the image

mental solstice
#

do you have media sizes though?

#

might want to make sure you're not missing the tablet screen size

earnest phoenix
#

Hmm

#

It doesn't specify the size at all

#

I don't specify the size it just centers it automatically

#

Hi?

mental solstice
#

sorry

#

do u know what css is?

earnest phoenix
#

Yes

#

I'm using it

mental solstice
#

it could be something like @media-screen (max-size 400px) then another with a min screen size

#

but nothing between

earnest phoenix
#

Hmm

#

So just set the maximum to a crazy high number

#

Wait hmm

#

h m m

mental solstice
#

no.. depending on how it looks with no screen size restrictions. u may not need anything, just body { background blah blah

#

I'd need to see the code and everything tbh

#

I can hop on PC and check out your site

earnest phoenix
#

Kk

mental solstice
#

try removing the stuff after the picture path and reload on tablet

#

https://cdn.glitch.com/2b7e7bbd-231a-4e05-93ab-d9700aa0ec46%2Ffortnite-hd-wallpapers-33139-8742143%20(1).jpg

earnest phoenix
#

I have those because those center the image

#

And make it not repeat

mental solstice
#

no like the ?3454374 after the actual picture link

earnest phoenix
#

I did

#

And it still had no effect on tablet

mental solstice
#

might be cached, so might try clearing that

earnest phoenix
#

Hmm okay

#

Still not appearing

mental solstice
#

idk if resolution would affect your tablet

earnest phoenix
#

It's quite a high resolution

mental solstice
#

7192x3912 is pretty massive

earnest phoenix
#

The tablet is a Nexus 9 on slimroms

mental solstice
#

try resizing it 50%, change the link to resized image and try again

earnest phoenix
#

Hmm

#

Do you have a tablet

mental solstice
#

i dont

earnest phoenix
#

Mk

mental solstice
#

might be some emulator stuff online ill check

earnest phoenix
#

If it loads on others it might not be a issue

mental solstice
#
window.onerror = function(msg, url, linenumber) {
    alert('Error message: '+msg+'\nURL: '+url+'\nLine Number: '+linenumber);
    return true;
}
#

put that in your <head> between <script> tags and reload

#

see if youre getting an error

earnest phoenix
#

So I need to add a header

mental solstice
#

oh sorry inside <head>

earnest phoenix
#

Kk

#

Also the favicons aren't working

#

I only have one script

mental solstice
#

yeah probably because the links

#

and actually.. something else

#

move <style> with all your custom css into your <head> section

earnest phoenix
#

I'm probably going to move it to a case file

mental solstice
#

<meta> all those tags need to be in <head>

earnest phoenix
#

Css

mental solstice
#

<link rel=...> all those need to go into <head> aswell

earnest phoenix
#

The style is in head

#

Those are

mental solstice
#

they are all inside your <body>

earnest phoenix
#

no...

mental solstice
earnest phoenix
#

Umm that's weird

#

If you have glitch I can invite you

#

But all the links are in the head

mental solstice
#

i dont have glitch

earnest phoenix
#

Mk

#

But all the links are in the head

#

So is style

mental solstice
#

so something isnt loading right then

earnest phoenix
#

Yeah

#

This is weird

mental solstice
#

can u teamview?

earnest phoenix
#

Sign up for glitch you can see the code though it

#

I'm on phone ATM so I can't teamview

mental solstice
#

oh.. apparently i have glitch

earnest phoenix
#

Lol

#

Username?

mental solstice
#

try moving audio into your body

earnest phoenix
#

Okay

mental solstice
#

or can i do it?

earnest phoenix
#

Did I do that right?

mental solstice
#

those 3 dots on line 94 need to go

bright spear
#

@earnest phoenix if you dont want a subdomain set name to @

#

but i would recommend you use cloudflare

earnest phoenix
#

@mental solstice mk

mental solstice
#

i deleted them, all scripts and stuff are in the head now

#

something still funky with <body style>

earnest phoenix
#

They're gone now

bright spear
#

oh @earnest phoenix looks like if youre using freenom's dns just leave the name blank

celest arch
#

Am I the only one that despises embeds?

bright spear
#

yes

celest arch
#

Okay

earnest phoenix
#

Embeds are amazing and so clean @celest arch

celest arch
#

Idk I just don’t like the look of them

earnest phoenix
#

Is there something wrong with this code

#
if(command == "transfer") {
    let user = message.mentions.users.first()
    if(!message.mentions.users.first()) return message.channel.send("Please mention a user.")
    
    let amount = parseInt(args.join(' ').replace(user, ''))
    
    if(isNaN(amount)) return message.channel.send("That is not a number.")
    
    let targetBalance = await db.fetch(`userBalance_${user.id}`)
    let selfBalance = await db.fetch(`userBalance_${message.author.id}`)
    
    if(targetBalance == null) targetBalance = 0;
    if(selfBalance = null) selfBalance = 0;
    
    if(amount > selfBalance) {
       return message.channel.send("Sorry, you don't have enough money to transfer!")
    } else {
    db.add(`userBalance_${user.id}`, amount)
    db.subtract(`userBalance_${message.author.id}`, amount)
    
    message.channel.send(`Sucsessfully gave ${user.username} $${amount}.`)
    }
  }
#

Oh nvm i figured it out

lusty dew
#

Am I allowed to ask about html here?

blazing star
#

you can since this is for development, but html isnt really a language

lusty dew
#

I know

#

I just need help with something

#

How can I move a button to the top right using Html?

#

All I need is the method, no one needs to give me code

blazing star
#

you use css

lusty dew
#

Ok

#

oh yea...

#

I get those two mixed up sometime

earnest phoenix
#

I Created Bot Again xd

jagged sinew
#

does dbl have a way to have a post request be done to edit edit things, like the secret for the vote receiving

#

i want to make it more secure by having it be updated every few hours or so

#

is this possible?

jagged sinew
#

how do i send an api post to update my bot stats?

#

what is the endpoint / url / format?

mental solstice
#

should be on the website

#

using js?

jagged sinew
#

no

#

im just trying to find the endpoint that i can http post to @mental solstice

inner jewel
#

/api/bots/stats

quartz kindle
#

its on the api docs lol

inner jewel
#

iirc

jagged sinew
#

ive been scowering the api docs for ages

#

@inner jewel /api/bots/stats/id ?

quartz kindle
jagged sinew
#

o.o

#

where was this?

quartz kindle
inner jewel
#

scroll down ^

jagged sinew
#

ffs

#

didnt scroll that far down fbfacepalm

earnest phoenix
#

someone know a command for unbanall ?
I want to unban all member ban in my server so..

#

i cant unban all manually

quartz kindle
#

delete your server and create a new one :^)

#

i dont think there is a way to bulk unban, other than looping through all members and unban them one by one. but that could also be considered API abuse since you have over 10k bans, so you could put a delay on it and unban everyone over a longer period of time

earnest phoenix
#

I think i go unban all manually

#

Spam unban button

#

I dont unban deleted user

#

Because 3/4 of ban are deleted

#

Ouch

quartz kindle
#

or you can open it in browser and make a script in the console xd

earnest phoenix
#

So like, how do i check if a user voted?

#

i saw the thingy in the API but i dont really know how to implement it

blazing star
#

you send a request with a query, and you need to set an Authorization header with your bots api key

earnest phoenix
#

parse error: Invalid numeric literal at line 1, column 6

#

what does this mean

blazing star
#

what’s your code?

earnest phoenix
blazing star
#

what’s the error again?

earnest phoenix
#

parse error

#

Invalid numeric literal at line 1, column 6

blazing star
#

what kind

#

line

#

oh

mossy vine
#

wtf

earnest phoenix
#

i didnt have this error on other bots

blazing star
#

I don’t see anything wrong tho

earnest phoenix
#

and its coded pretty much the same

void mantle
mossy vine
#

is the file saved as .js?

earnest phoenix
#

of course lol

blazing star
#

inb4 .ts

earnest phoenix
#

i pasted code in package.json by accident

#

Somebody can help me with the JDA DBL API ?

mossy vine
#

hey im having problems again with client.channels.get().send()

#

discord.js

#

if anyone can help plz tell

#

TypeError: Cannot read property 'send' of undefined

spare goblet
#

@mossy vine your code? 👀

mossy vine
#

just said OMEGALUL

#

anyways

#

client.channels.get() returns all properties properly

#

but .send() is just borken

spare goblet
#

did you put in a valid channel id

mossy vine
#

yes

#

.send() doesnt work on any-

#

oh

#

oh wait

spare goblet
#

..

mossy vine
#

hold on a sec

spare goblet
#

if you dont define the channel you can't send the message. so do something like
client.channels.get('channel_id').send(`your message here`)

mossy vine
#

thats what i did but.. hold on a sec

#

yeah ok

#

i didnt say anything

#

found a solution but im gonna be like the average stackoverflow user an not post the solution

#

jk i didnt actually add the bot to the server OMEGALUL

spare goblet
#

stackoverflow was actually where i learnt most of js

#

good luck :)

earnest phoenix
#

js deving is 10% writing your code and 90% angrily browsing stackoverflow

mossy vine
#

90% angrily asking in dev serers*

spare goblet
#

i don't actually ask, when i dont find someone who has already an answer of the same question i trial and error until i get it

earnest phoenix
#

Why hasVoted is null

inner jewel
#

because there was an error

vague chasm
#

@loud salmon can @cobalt pine get unmuted, It will now not send Unknown command message if the message's server's ID is this server's

loud salmon
#

👍

compact mauve
#

does anyone know how to get the bot key from discordbots

#

I don't know if this matters, but my bot uses discord.py

wide ruin
#

ive installed node.js

#

i have all the bots files downloaded

#

how do i run it?

quartz kindle
#

node botfile.js

#

from a command line

wide ruin
quartz kindle
#

in the folder where your bot is

wide ruin
#

ah ok

#

so 'app'

quartz kindle
#

you'll probably have to install the packages again

#

like discord.js

wide ruin
#

its got the json file

quartz kindle
#

if you have package.json then run npm install

compact mauve
#

Hey tim, can you help with my question right above pineapple's after you're done with pineapplefan's

quartz kindle
#

in the folder

smoky mica
#

alright can someone tell me how to convert my joinedAt and createdAt in discord.js to convert to normal time

quartz kindle
#

@compact mauve you mean getting the dbl api key programatically? or just getting it from the website?

compact mauve
#

website

smoky mica
#

the time is hell lmao

quartz kindle
#

should be in your bot's edit page

compact mauve
#

oh ok

#

thanks

quartz kindle
#

@smoky mica use javascript's Date() function

smoky mica
#

wait wdym how do i put it up properly?

#

@quartz kindle

wide ruin
#

where do i type the npm install

smoky mica
#

cmd or powershell

quartz kindle
smoky mica
#

make sure youre in your bots directory

wide ruin
#

now what

quartz kindle
#

npm install

wide ruin
#

npm is not recognised as an internal or external command

quartz kindle
#

then your node is not installed globally

#

try restarting your computer

wide ruin
#

ive intalled it and shut down before

#

installed*

#

a i meant to be on the bot or node-v10.15.0-win-x64

#

am*

quartz kindle
#

if your node is installed correctly, everything should be done in the bot directory

#

but your node is not being found, that means the environment variables are not set or wrong

#

this might help

smoky mica
#

Thanks Tim :)

earnest phoenix
#

@inner jewel thenAccept or whenComplete, it's null

wide ruin
#

what do i open with?

mossy vine
#

uhh

#

what file are you trying to open again?

#

@wide ruin

late hill
#

The real question is why you put your bot in your downloads

mossy vine
#

iirc he downloaded his files from glitch

wide ruin
#

@mossy vine im trying to run the bots code

#

That is a JavaScript file, but how do I open it?

mossy vine
#

...

quartz kindle
#

you run it with node

#

from the command line

wide ruin
#

What do I type

mossy vine
#

open up a cmd
navigate to the download directory
node file.js

lament meteor
#

my head hurts reading this

quartz kindle
#

^^

mossy vine
#

same Telk, being sick af doesnt help at all

lament meteor
#

ikr

wide ruin
#

Ok, I'm on node

lament meteor
#

tbh we need an auto mod here when people ask about ReferenceError: <random thing> is not defined

wide ruin
#

Whatever I type after node says SyntaxError

mossy vine
#

show cmd

lament meteor
#

how does this person hv bot role @mossy vine

quartz kindle
#

you dont type node

#

you type node yourfile.js

#

else you enter node's runtime

wide ruin
#

Wait

#

Node cmd is in a folder, downloads\a\node...\node app

mossy vine
#

just

#

show your file tree and cmd

#

its not that hard

wide ruin
#

Laptop turned off one second

quartz kindle
#

did you solve the environment variables problem you had? can you access node from anywhere? even outside node's folder?

wide ruin
#

I don't think so

quartz kindle
#

then you have to solve that problem first

wide ruin
#

What do I type for that

quartz kindle
#

you need to be able to access node from anywhere, so you can access it from your bot's folder

#

google

mossy vine
#

do people think every problem can be solved with 2 lines of code
var issue = "something isnt working"
fix(issue)

wide ruin
#

Loading discord

#

theres the tree

fleet horizon
#

Is there an easy way to change the name of my bot on the discord bot website without reuploading it

west raptor
#

it will change automatically

quartz kindle
#

last time i checked you couldnt change your bot's username on the website, only the project name

#

you can change it with code tho

knotty steeple
#

@lament meteor they use glitch

#

so they dont know how to actually run a js file

fleet horizon
#

@quartz kindle how would I do that? Like I tried to use the section where u can write HTML to Change the bots title but it didn't work

earnest phoenix
#

somebody can help me with json ?

quartz kindle
#

oh you're talking about dbl? i though it was about discordapp

#

dbl should update it automatically

#

as long as its your bot username, not just a nickname

fleet horizon
#

Uhhh dbl?

quartz kindle
#

discordbotlist

fleet horizon
#

So ur saying I should change it in the developer portal?

#

I want the page on the discord bot website to be updated

#

Should have cleared that up first

quartz kindle
#

so you already changed your bot's username?

fleet horizon
#

No

#

So that's what I'll try now

#

Alright so I updated it on the developer portal but it didn't change on the website

#

Or in any of the servers I have it in

late hill
#

I believe theres both a project name and a bot name in Developer portal, make sure you renamed the right one?

fleet horizon
#

Ah yes it worked thank you!

#

Wait how come on the site it only shows the new name if I'm logged in?

#

And if I'm not it still shows the old

#

Does it just take time to update?

earnest phoenix
#

if somebody can help me

amber fractal
#

what lang is that

#

lib*

earnest phoenix
#

Java, Apache httpconnection

#
 if(command === `${prefix}servers` || command === mentionprefix +"servers") {
        bot.guilds.map(r=> r.name + " " + r.members.size)
       }
#

Why does that not work for me.

#

js btw

knotty steeple
#

why doesnt what work

earnest phoenix
#

my command

knotty steeple
#

because you arent sending a message?

earnest phoenix
#

wtf

#

My dev told me that would work

#

but I don;t really know node

knotty steeple
#

node isnt a language

#

and

#

then go learn javascript

earnest phoenix
#

Would you mind fixing it so that it returns a message?

knotty steeple
#

yea no

#

do that urself

earnest phoenix
#

You are very helpful.

knotty steeple
#

basic enough

mental solstice
#

what does .map do?

knotty steeple
#

and you are very ignorant

#

its basically forEach

mental solstice
#

oh

knotty steeple
#

in a kind of way

last ferry
#

@earnest phoenix basic rule of the server. We don’t spoonfeed you stuff. Figure it out yourself

knotty steeple
#

its literally just a send function

earnest phoenix
#

if(command === ${prefix}servers || command === mentionprefix +"servers") {
message.channel.send(bot.guilds.map(r=> r.name + " " + r.members.size))
}

#

yeah im stupid.

#

thanks

knotty steeple
#

congrats

#

ur missing )

earnest phoenix
#

i knew that

quartz kindle
#

@mental solstice Map is an iteration that returns an array. example:

#

the result is always an array

earnest phoenix
#

Hi

summer escarp
#

can someone help me with sql/jquery

zealous veldt
#

Probably, ask your question

summer escarp
#

@mental solstice unless you make the array = arrayname.join("")
then log it

mental solstice
#

ok :) thanks guys

summer escarp
#

np

mental solstice
#

Tony did u get helped with your SQL jquery?

summer escarp
#

nope

#

know clue how to do sql + jquery + html @mental solstice

#

oh its jony

#

a mod chnaged my name and got it wrong

#

😒

mental solstice
#

are you using jquery ajax to call an outside php file that returns an SQL query

summer escarp
#

wtf

mental solstice
#

...

summer escarp
#

dms pls

#

i may need some help XD

topaz fjord
#

You would have to set up mysql for ajax requests iirc

mental solstice
#

is that what you're doing tony?

clever remnant
#

How long will a bot take to put all the server members id in a SQL database ?

summer escarp
#

couple seconds in good internet and no errors

mental solstice
#

depending on how many users.. at .001 second per query you could do 1000 users a second..

summer escarp
#

;eval 9*9

clever remnant
#

Thank you because to display the local leaderboard, I need to compare all id(s) with those in the database. But I never thought that a server could contain so many people ... So I'm afraid that my bot takes a lot of time to analyze everything.
(I tried to do my best to make my English understandable)

mental solstice
#

databases are made for holding large volumes of data

soft plaza
#

@clever remnant depends if you sort them

inner jewel
#

just select * from <table> where <filter> order by <key of the leaderboard> desc limit <amount>

earnest phoenix
#

do not forcefully add users to your database

#

when they do a command which interacts with your database, add them only then

#

you're wasting giant amount of space and resources on forcefully adding users to your database

clever remnant
#

That's what I did. What I'm concerned about is when I want to display a local leaderboard. The only way I've found is to compare all the server's id to the database to find out who's inside or not.

#

Because in my database I have the id and "points" of the user.

inner jewel
#

any proper database will deal with that easily

clever remnant
#

Thank you, it reassures me

raven bronze
#

So I'm making a bot for friends, and i ran into this error;

[ERROR] launcher: Error starting bot
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/aiohttp/connector.py", line 822, in _wrap_create_connection
    return await self._loop.create_connection(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/base_events.py", line 804, in create_connection
    sock, protocol_factory, ssl, server_hostname)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/base_events.py", line 830, in _create_connection_transport
    yield from waiter
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/sslproto.py", line 505, in data_received
    ssldata, appdata = self._sslpipe.feed_ssldata(data)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/sslproto.py", line 201, in feed_ssldata
    self._sslobj.do_handshake()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 689, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:841)

The above exception was the direct cause of the following exception:```
#

issue fixed! Just had to click the python command file

high anchor
#

quick question

#

is guildMembersChunk for loading in a chunk of members in the cache
or a chunk of members joining a guild

sick cloud
#

read your libraries documentation

high anchor
#

oka

earnest phoenix
#

Is there something wrong with this code
db.startsWith(guildMessages_${message.guild.id}, { sort: '.data'} ).then(resp => {

resp.length = 10;
let finalOutput = '**Leaderboard:**\n\n';
for (var i in resp) {
  finalOutput += `${client.users.get(resp[i].ID.split('_')[2]).username} -- ${resp[i].data} messages`;
}
  message.channel.send(finalOutput)
});
topaz fjord
#

well

#

idk

#

I don't see an error

earnest phoenix
#

It doesn’t give me an array of users it just gives out this Leaderboard:

#

@topaz fjord

topaz fjord
#

now let's see

#

where are you getting message from

#

the function doesn't return the parameter message

#

if you want to use message turn that function async

earnest phoenix
#

I did

#

i checked

topaz fjord
#

what did you do?
what did you check?

earnest phoenix
#

bot.on('ready',function(){
console.log("Ready")

bot.user.setStatus('Online')

bot.user.setActivity('game')

})

#

I checked if i turned on the async function

#

why it dosent works

#

....

#

bot.on('ready', () => { not function()

topaz fjord
#

tha's not what I mean

earnest phoenix
#

How do I do it dan that offered my play a game

#

Nono i was talking to the other guy

topaz fjord
#

read the thing

earnest phoenix
#

How do I do it dan that offered my play a game?

#

Kk

#

Guys

#

I need assistance

#

still doesn’t work for some reason

#

I'm probably a 2/10 with d.js

topaz fjord
#

and?

#

I don't see where you're going with this

earnest phoenix
#

if(command === `${prefix}servers` || command === mentionprefix +"servers") { message.channel.send(bot.guilds.map(r=> "**" + r.name + " (" + r.ownerID + ")" + "**" + " \n `" + r.members.size+ "`")) }

#

So that command works.

#

But I would like it so that it numbers the servers, and then I say a number and the bot will give me the link to the given server.

#

no

#

client.on('ready', () => {
console.log(Gestartet ohne Fehler als ${client.user.tag}!);
client.user.setActivity('Wird Programmiert')
});

#

This works

topaz fjord
#
  1. yes that's possible
  2. you'll run into errors if you don't have the proper perms @earnest phoenix