#development

1 messages · Page 1225 of 1

clever vector
#

@earnest phoenix Hey bro can you teach me how to do that

pale vessel
#

just change it to your bot's id after it's approved

earnest phoenix
#

ok BOOMER

kind basin
pale vessel
slender thistle
#

Is VBA part of .NET

earnest phoenix
#

Like this ?

pale vessel
#

yes

earnest phoenix
#

yea

clever vector
#

is it like this

#

https://top.gg/api/widget/727448017799479296.png

pale vessel
#

yes

earnest phoenix
#

i don't think so @slender thistle

pale vessel
#

how the hell did cry come up at the perfect time

earnest phoenix
#

not showing...

#

VBA isn't capable of what VB running on .net is

slender thistle
#

Aw

#

Time to suffer, I guess

pale vessel
#

that's because @earnest phoenix

earnest phoenix
pale vessel
earnest phoenix
#

What ?

#

Ping

pale vessel
earnest phoenix
#

Why are you usung fucking members+ ripoffs

#

he made it

#

Yeah yeah

#

@earnest phoenix You need serious help

#

Ripoffing Members+ completely doesn't make you a good bot developer

#

Hello, can someone tell me how to make my bot send a message when someone votes for my bot?

#

Hello, can someone tell me how to make my bot send a message when someone votes for my bot?
@earnest phoenix #topgg-api

pale vessel
#

he never said he's a good developer

earnest phoenix
#

yup

pale vessel
#

chill out man

earnest phoenix
#

but still

pale vessel
#

poor guy

earnest phoenix
#

users+ has great potential

slender thistle
#

Let people do their own thing

earnest phoenix
#

this bot called my status ad ACTUALLY GIVES A FUCK about servers

sly dawn
#

i need help

earnest phoenix
#

i need help
@sly dawn with what

#

dont say you need help, just say your problem

sly dawn
#

my bot responds to other bots

earnest phoenix
#

f

#

filter it out

sly dawn
#
  return``` where shall i put this code in my index.js?
slender thistle
#

That's Python code

pale vessel
#

should be in the event

#

oh

#

lmao

slender thistle
#

You'd need to convert it into JS code and enter in the message event

earnest phoenix
#

That's Python code
@slender thistle i typed it out as pseudocode

pale vessel
#

stop the code if the author is a bot

earnest phoenix
#

Imagine usin user+

#

Thats epic

undone carbon
#

Quick question, I applied for discord partnership and want to give a DM when the server review staff joins to check the server however I don't want to DM everyone who joins in this period, so is it possible to only DM a user if they have like the Discord Staff badge?

#

How would I go about doing this ?

clever vector
#

Hey guys how to make @mention bot and it send prefix

earnest phoenix
#

Quick question, I applied for discord partnership and want to give a DM when the server review staff joins to check the server however I don't want to DM everyone who joins in this period, so is it possible to only DM a user if they have like the Discord Staff badge?
@undone carbon whyyyy

#

They're just people

#

Hey guys how to make @mention bot and it send prefix
@clever vector just check if the message contains a mention for your bot, and if yes then you can send the prefix

sly dawn
#

@slender thistle if message.author.bot return; Where shall i put this code? I have discord.js not python

earnest phoenix
#

oh my god

slender thistle
#

In your message event

earnest phoenix
#
  1. put it in your message event
#
  1. consult your library's documentation for the correct bot boolean
sly dawn
#

@slender thistle I have more than 11 message listeners lol

slender thistle
#

Quick question, I applied for discord partnership and want to give a DM when the server review staff joins to check the server however I don't want to DM everyone who joins in this period, so is it possible to only DM a user if they have like the Discord Staff badge?
@undone carbon There's a possibility that they won't join the server at all so it's a bit pointless

earnest phoenix
#

why do you have so many message listeners @sly dawn

slender thistle
#

Question: WHY

#

You optimally only need one

earnest phoenix
#

Yeah

#

just do a switch-case in one message listener, jesus

sly dawn
#

@earnest phoenix a long story, i will put the code on each message event

earnest phoenix
#

oh my god

slender thistle
#

Bad idea

sly dawn
#

Dont worry

earnest phoenix
#

WHY mY Bot uSe So MuCh RaM whY PinG so High

slender thistle
#

You'll have to enter the same snippet in all 11 listeners...

undone carbon
#

I understand that, however, our server is community gated which means only verified members have access to the full server, I asked the community team beforehand if community gated servers are eligible for partner and they said yes. However, the partner description is limited to like 150 characters and we weren't able to explain things.

earnest phoenix
#

imagine having copy-pasted code in all 11 listeners, and you just found a bug that's in the repeating code. you'd have to edit the code 11 times to fix the bug

delicate zephyr
#

@undone carbon discord staff has a brain... they'll figure it out

undone carbon
#

I hope that makes more sense

earnest phoenix
#

@undone carbon discord staff has a brain... they'll figure it out
@delicate zephyr yeah, they're people

#

@undone carbon discord staff has a brain... they'll figure it out
@delicate zephyr fuck no they don't have a brain they've got CPUs

delicate zephyr
#

realistically you should have a channel explaining things when they join anyway

undone carbon
#

Haha

delicate zephyr
#

so you shouldnt have an issue

earnest phoenix
#

imagine having copy-pasted code in all 11 listeners, and you just found a bug that's in the repeating code. you'd have to edit the code 11 times to fix the bug
@earnest phoenix it's not only that, you take a huge hit on performance

#

@earnest phoenix it's not only that, you take a huge hit on performance
@earnest phoenix yeah

#

because the bot has to run the functions 11 times

#

and probably only one actually gets executed for a longer period of time

#

one message listener with a switch-case would have better performance than 11 listeners checking for individual commands

#

yeah

sly dawn
#

I just updated my bot's code

earnest phoenix
#

cool

modest plaza
#

(prefix)say title with 1 or more words (end of title, for example character "|") text

Someone who could help me with this?

earnest phoenix
#

@modest plaza what are you tryna do

#

explain it better

modest plaza
pale vessel
#

you split the string by "|"

earnest phoenix
#

^

#

but first substring out the prefix

#

and the word say

#

@modest plaza do you use discord.js or discord.py or smth

modest plaza
#

discord.js

earnest phoenix
#

k

#

show the command handler

#

the bot.on("message">: shit

#

screenshot the first few lines

modest plaza
#

give me a second, im playing leauge rn.

earnest phoenix
#

lmao

quartz kindle
#

discord staff is widely known for not having a brain tho

clever vector
#

Can anyone make the mention bot it give prefix?

earnest phoenix
#

@clever vector do you seriously not get it that we're telling you to learn stuff before trying to make a bot

clever vector
#

It got an error

earnest phoenix
#

discord bot development NEEDS you to have a good understanding of programming

slender thistle
#

See pre-last pin

#

Can anyone make the mention bot it give prefix?
@clever vector Can you elaborate?

earnest phoenix
#

when someone pings bot it tells them what is the prefix

warm marsh
#

if mentioned reply prefix

#

pretty much the entire code behind it

earnest phoenix
#

yep

#

and we literally spoonfeeded him code earlier yet he still doesn't get it

warm marsh
#

😞

earnest phoenix
#

its literally ```py
if ctx.guild.me in ctx.message.mentions:
await ctx.send("prefix is fuck!")

slender thistle
#

What's your bot's library

#

Sorry what

earnest phoenix
#

and we literally spoonfeeded him code earlier yet he still doesn't get it
some people think by learning a smol thingy they're a god of programming
I've got hundreds in my programming server

slender thistle
#

Dillon, I assume you have a custom prefix feature?

dull badger
#

is anybody have nsfw api

warm marsh
#

I don't have a bot

earnest phoenix
#

is anybody have nsfw api
@dull badger but why

dull badger
#

bcs i cant find api madPat

earnest phoenix
#

why an nsfw one
reddit api exists

#

Dillon, I assume you have a custom prefix feature?
@slender thistle we're talking about @clever vector

dull badger
#

bcs im doing nsfw command.

earnest phoenix
#

why an nsfw one
reddit api exists
@earnest phoenix just take posts from r/hentai lol

slender thistle
#

I lost track of this chat, okay

#

Question still stands, though

earnest phoenix
#

@dull badger use reddit api lol

#

virak is now playing clash of clans, hes done trying to code

#

completely ignored us

clever vector
#

LoL its ma dad

#

I was taking shower

#

GG

modest plaza
#

the bot.on("message">: shit
@earnest phoenix You mean this?

client.on("message", async message => {
    const prefix = ".";

    if (message.author.bot) return;
    if (!message.guild) return;
    if (!message.content.startsWith(prefix)) return;
    if (!message.member) message.member = await message.guild.fetchMember(message);

    const args = message.content.slice(prefix.length).trim().split(/ +/g);
    const cmd = args.shift().toLowerCase();

    if (cmd.length === 0) return;

    let command = client.commands.get(cmd);
    if (!command) command = client.commands.get(client.aliases.get(cmd));

    console.log(command)

    if (command)
        command.run(client, message, args);

});```
earnest phoenix
#

yeah

warm marsh
#

You were trying to make a say command that takes <title> | <content> ?

modest plaza
#

You were trying to make a say command that takes <title> | <content> ?
@warm marsh Yeah

warm marsh
#

What do you need help with inside the command?

earnest phoenix
#

how to make it

#

that's it

#

he asked how to make it

#

Yeeeee that's a hard pass for me

warm marsh
#

If I were to create a command like that, I'd manipulate the args array by joining it by spaces then splitting it by the separator (ex. "|"). Then say[0] = title and say[1] = content

#

Joining the args array as it should already be missing the prefix and command name.

modest plaza
#

So far, I've done it this way.

let title = args[1]; let text = args[2];  
  
        
if (args[0].toLowerCase() === "embed") {
  
  
  let sayembed = new RichEmbed()
    .setTitle(`${title}`)
    .setColor("#576bff")
    .setDescription(`${text}`)
    .setTimestamp();

    const esayMessage = args.join(" ");
    message.delete().catch(O_o=>{});

    message.channel.send(sayembed)
     
    } else {
  
    message.channel.send(args.join(" ")); 
      
    const esayMessage = args.join(" ");
    message.delete().catch(O_o=>{});```
earnest phoenix
#

RichEmbed

modest plaza
#

v11

earnest phoenix
#

Shouldn't it be Discord.RichEmbed

#

You're missing Discord.

warm marsh
#

Not entirely true.

slender thistle
#

const {RichEmbed} = require("discord.js")?

earnest phoenix
#

Uhhh yea

warm marsh
#

It might be defined like const {RichEmbed} = require('discord.js');

modest plaza
#

Yeah

earnest phoenix
#

Not following industry standard will getcha in a lil' bit O' trouble

modest plaza
#

Not following industry standard will getcha in a lil' bit O' trouble
@earnest phoenix What trouble?

earnest phoenix
#

we wouldn't be able to fully understand your code

modest plaza
#

Oh, sorry then.

slender thistle
#

I mean, it's technically preference

earnest phoenix
#

yeah but still

pale vessel
#

please upgrade

earnest phoenix
#

How can I get a Bot developer role?

faint prism
#

@earnest phoenix By getting a bot approved

earnest phoenix
#

...

#

rlly

#

ok then

#

thx dude

faint prism
#

yep, np

earnest phoenix
#

Where is

#

bot cmd

faint prism
#

What?

earnest phoenix
#

bot hell?

#

I mean bot command

faint prism
#

The bot command channel?

earnest phoenix
#

yea

faint prism
earnest phoenix
#

ok

#

eh btw what is ur bot prefix?

faint prism
#

Mine specifically is t+

earnest phoenix
#

ok

#

imma try dat

#

bot

#

😄

thin turret
#

Mans just stole your bot

faint prism
#

?

earnest phoenix
#

Hey does python work here

#

huh

#

How do I code here does print work

faint prism
#

lol

#

Not sure what you're asking

earnest phoenix
#

:print/hello world ,that

faint prism
#
print("You mean this?")
earnest phoenix
#

Yes

faint prism
#

Well that works everywhere

earnest phoenix
#

I only know basic python i don't seem to remember how to tho

faint prism
#

Then you could refresh with reading through the docs or some course

earnest phoenix
#

I read a book

faint prism
#

That works, ig

#

What are you getting at?

earnest phoenix
#

In school

#

I want to be a game designer as my hobby

last valve
#

I want to get information about how to add my bot to discord bot list server.

modest plaza
#

@earnest phoenix @warm marsh ```js
if(args[0].toLowerCase() === "embed") {
if(message.content.includes(";")) {
var title = message.content.split(";")[0]
title = title.replace(".say embed","");
var text = message.content.split(";")[1]

var sayembed = new RichEmbed()
  .setTitle(title)
  .setColor("#576bff")
  .setDescription(text)
  .setTimestamp();

const esayMessage = args.slice(1).join(" ");
message.delete().catch(O_o=>{});


message.channel.send(sayembed)
} else {
    return;
}

} else {
message.channel.send(args.join(" "))
}
}
}``` This one works fine.

last valve
#

How do I add my bot here? I want to know how many servers it has.

#

<@&304313580025544704>

coral trellis
#

-atmods

gilded plankBOT
#

Please do not mention (ping) more than one or two moderators for help, unless there is an emergency.

Here are some examples of emergencies:

  • Raids / Multiple members mass spamming.
  • Severe disruption of Discord's ToS (NSFW content, etc)
  • Anything that requires more than 2 moderators to handle.
coral trellis
#

-faq 1

gilded plankBOT
flat pelican
#

sigh

coral trellis
#

You can also figure out how many servers your bot is in without adding it here

last valve
#

How do I add the boat in this discord

green kestrel
#

wheres the raid?

flat pelican
#

Technically you can't figure out by adding it to top.gg anyway 😩

green kestrel
#

oh wait, just another atmods :/

flat pelican
#

@green kestrel here -> ❤️

green kestrel
#

one day, someone will actually be doing one of the things that youre supposed to atmods for, and we'll all ignore it thinking its one of these 😄

#

like that age old proverb the boy who cried atmods

#

😄

last valve
#

Bot awaiting approval - Please be patient, us humans take time to verify bots!

#

...

faint prism
#

Yeah

last valve
faint prism
#

common prefix

last valve
#

How will I find out how many servers my bot is on?

faint prism
#

By reading the client's guild count.

last valve
#

how?

faint prism
#

The description of the client object's properties is in your library's docs

#

Or are you using the Discord API directly?

last valve
summer torrent
#

@last valve which library are you using

last valve
#

I want to know how many servers my bot is on, except that my bot has been approved

#

discord.js

#

glitch

summer torrent
#

<Client>.guilds.cache.size

last valve
#

what

faint prism
#

That's the object's property

#

He just posted it for you

summer torrent
#

@last valve did you actually coded this bot

last valve
#

I'm sorry I don't understand much of what you're saying.

#

The only dream I made while building this bot was to have my bot verified and have a verified bot developer badge.

faint prism
#

They don't do badges anymore iirc

last valve
#

I want to know how many servers my bot is on.

faint prism
summer torrent
#

@last valve you can't get badge anymore

last valve
#

I did not understand what you said

summer torrent
#

they stopped to giving badges

last valve
#

why can't i have

#

really?

#

😦

faint prism
#

Discord's decision

last valve
#

:/

summer torrent
#

They stopped it because of people like you

#

"making a bot for badge"

last valve
#

why?

#

but it was my dream ..

summer torrent
#

doesn't matter

last valve
#

So what if we make boots now?

obtuse saffron
#

The only dream I made while building this bot was to have my bot verified and have a verified bot developer badge.
@last valve Your bot can get a verified badge that's more nice

summer torrent
#

your bot can get a tick but you can't get

last valve
#

Even if my bot is approved, can't I get the badge?

summer torrent
#

yes

#

you can't get

last valve
#

pff thank you

summer torrent
#
So, as of today--August 19, 2020--we are changing the “Verified Bot Developer” profile badge to the “Early Verified Developer” badge, and will not be granting it to anyone who submits for approval after today. If you have already submitted your application, you will still receive the badge.```
last valve
#

so how will i learn how many servers are

faint prism
#

oml

summer torrent
#

😩

#

if you don't know anything about javascript, please learn

last valve
#

I say man, how can I find out how many servers my bot is on. Why are you twitching?

pale vessel
#

"why are you twitching"

summer torrent
#

we already answered you 2 times

delicate shore
#

Smh

green kestrel
#

@last valve to make a bot you need to be able to program. Usually, unless you use discord bot maker or dbd or similar

#

What is your programming experience? A bot is not a wise idea for a first project.

delicate shore
#

Can I eval my token from eval command

#

oh holy crap

#

i leaked it

faint prism
#

Lol

#

@delicate shore Well eval should be closed to dev anyways

delicate shore
#

yes it is

faint prism
#

Unless you leaked it yourself

delicate shore
#

yea

#

i did in my support server

#

i had to reset

pale vessel
#

get a bot that sends it to github so that it auto reset

faint prism
#

lol

delicate shore
#

hehe

faint prism
#

You know, tokens should be able to be regen'ed via API

delicate shore
#

i did s!eval TOKEN

#

and i never thought it would

#

just straight up

analog rampart
#
queue.tracks.map((track, i) => {
           if (i < 25) return `#${i+1} - ${track.name} | ${track.author}`
        }).join('\n')

it will be
#1 asd | asd
but i want to use as

#1 asd | asd

pls help me

delicate shore
#

oh wow

analog rampart
drifting wedge
#

background = Image.open('levelupcard.png')

#

how can i open images? using PIL in discordpy?

earnest phoenix
#
  1. are you using Pillow
#
  1. did you import the Image class
faint prism
#

Depends on what Image is. A lib? Is it an obj in the lang?

earnest phoenix
#

Depends on what Image is. A lib?
@faint prism he's trying to use PIL so I'm not sure if he uses Pillow or PIL

drifting wedge
#

im using PIL

#

not pillow

earnest phoenix
#

PIL is outdated, use Pillow

#

the imports are the same

drifting wedge
#

will do

#

but for now

#

i want to open a background

earnest phoenix
#

you should be able to do that without issues

#

but PIL might not have support for it

#

first of all, remove PIL and install Pillow

drifting wedge
#

in class

#

1 sec

earnest phoenix
#

second of all, check if you have the from PIL import Image import

drifting wedge
#

ok 1 sec

tired panther
#

have a question about fs write

#

how can i write in a array

#

I have a config.json file and there is an array as example named banneddgld

#

and there i want to add the banned gld

faint prism
#

You can serialize it to JSON which is a string, and write the string to a file

#

@tired panther However, if it is something you will be modifying, a database would be a better idea

tired panther
#

but thats just a small data

faint prism
#

What is it's use?

tired panther
#

to ban a guild

faint prism
#

So you want to hold information for "banned guilds" in a json file?

tired panther
#

yes

faint prism
#

and update it to add new entries?

tired panther
#

yes

faint prism
#

That's definitely something for a database. JSON can mess up and can boom every banned guild entry is gone

#

You'll want a lightweight database system

tired panther
#

it is just 1 guild i want to ban

faint prism
#

but you said you want to add more

#

This is a design choice. I recommend a database management system, not JSON to store mutable data

tired panther
#

okay , and now i want to test the json option

#

how can i write in the array

faint prism
#

Serialize from object -> write to file
Deserialize to object <- read from file

drifting wedge
#

can i resume PIL code for pillow?

earnest phoenix
#

what

#

Pillow uses the same PIL imports since it's a fork

#

just uninstall PIL and install Pillow

#

no need to change anything else

#

unless your code is borked

tired panther
#

Serialize from object -> write to file
Deserialize to object <- read from file
@faint prism I have no Idea , how I should do that.

faint prism
#

You need to google how to read a file to a variable, and how to deserialize it

#

And vice vera

#

I can only describe what you need to do since I'm now allowed to spoonfeed code

tired panther
#

🤣 okay thx

faint prism
#

np. Again, don't recommend what you're trying to use JSON for.

tired panther
#

I use mongo db , but when there is a slow connection , then it have to wait till the data comes

#

otherwise I could use asynchron db

fluid basin
#

don't fetch big amounts of data at once, use a cursor to obtain data asynchronously

#

and cache frequently used data

#

(since mongodb doesn't have a cache itself)

drifting wedge
#

what
@earnest phoenix do i do from pil?

#

or from pillow?

lyric mountain
#

dot dot dot

#

just uninstall PIL and install pillow as he said

#

no need to change anything else
^

drifting wedge
#

i had pillow

#

i have a levels thing

#

but when i import it the whole bot slows down

#

its using mongo db

lyric mountain
#

wait, the code IS working, right?

#

like, you're not getting any crashes?

drifting wedge
#

yea

#

but its slow

#

like very slow

#

it slows the whole bot donw

#

down

lyric mountain
#

then the issue lies somewhere else probably

#

have u profiled it?

drifting wedge
#

?

lyric mountain
#

it's python, right?

drifting wedge
#

yea

lyric mountain
#

you could profile the code to find where's the bottleneck

#

some IDEs allow that

drifting wedge
#

1 sec

#

ok

#

so its the level cog

#

100%

#

ill try to move the cpde

#

well its working

#

i think theyres something wrong with the cog file

lyric mountain
#

btw, cog file?

drifting wedge
#

yea?

lyric mountain
#

just a question: why?

drifting wedge
#

why should i not use cogs?

lyric mountain
#

like, I'm not THAT experienced in python, but isn't cog code generation stuff?

slender thistle
#

It's a discord.py thing where cogs are separate classes containing event listeners and commands

#

Usually done through completely separate files

lyric mountain
#

ah, I thought it was another thing

#

anyway, is your bot slow to answer or to retrieve data from the DB?

velvet bluff
#

How can i grab the user's profile badges? I never managed to make my system work...

lyric mountain
#

what lang and lib?

velvet bluff
#

Discord.js v12

river thistle
#

how can I launch puppeteer specifying the path of chromium ?

#

nvm it's executablePath

fluid basin
#

How can i grab the user's profile badges? I never managed to make my system work...
@velvet bluff you can use User#flags to obtain any profile information available to the bot

velvet bluff
#

thanks, ill read more on the documentation

ancient nova
#

how do I make welcomer message (d.js)

fluid basin
#

@velvet bluff also, UserFlags#serialize() is useful if you need to get a list of everything without much hassle

velvet bluff
#

alright, thank you again! gotta read more to understand fully that argument

fluid basin
#

you can try it out actually, pretty much just makes it into a true/false list

velvet bluff
#

alright, ill set up a testing bot and will test out these things, thanks again

eternal osprey
#

how can i limit my send embed to only 10 countries?

woeful pike
#

here's a fun challenge if you're bored, go make a program that posts webhooks from DSL/DBL votes into a discord webhook by formatting it automatically

fluid basin
#

damn, so its not Veld's fault?

ancient nova
#

how do I make welcomer message (d.js)

fluid basin
#

@woeful pike any constraints?

woeful pike
#

do it in a new language that you're not comfortable with

fluid basin
#

uh, what can be considered as an "uncomfortable" language

woeful pike
#

up to you

sonic lodge
#

@ancient nova guildMemberAdd event

eternal osprey
#

how do i limit me embed to only 10 countries that are being sent?

lyric mountain
#

bonus points: do it in JSFuck

eternal osprey
#
onst title = '**Countries/cities ranked by weather type**';

async function get_weather(options) {
    return new Promise((resolve, reject) => {
       weather.find(options, function(error, result) {
         if (error) reject(error);
         else resolve(result);

    });
  });
}

async function get_data(locations) {
  return Promise.all(
    locations.map(
      location => get_weather({search: location, degreeType: 'C'})
    )
  );
}

async function get_location_by_skytext(text) {
  text = text.toUpperCase(); 
  let result = await get_data(locations);
  result = result.flat();
  return result.filter(entry => {
    return entry.current.skytext.toUpperCase() === text
  });```
ancient nova
#

@sonic lodge welcomer message for when someone invites my bot to their server

woeful pike
#

haskell might be an uncomfortable language for you but it wouldn't for me

heavy anchor
#

flex

sonic lodge
#

then guildCreate

woeful pike
fluid basin
#

well I don't know haskell so ¯_(ツ)_/¯

ancient nova
#

@sonic lodge alright

sonic lodge
#

great, it's an uncomfortable language

woeful pike
#

just saying it would be a good excuse to learn a new language

eternal osprey
#

no-one?

woeful pike
#

await get_data(locations.slice(0, 10));

eternal osprey
#

lovely!

#

should i put it after async function get_location_by_skytext(text

drifting wedge
#

for guild icon in cogs

#

how do i get them?

eternal osprey
#

uhhm i have put in let result = await get_data(locations.slice(0, 10));

#

but it only returns me 1 array

#

anyone?

wicked pivot
#

how to install the new version of nodejs on Debian 10 (64 bits)

queen parrot
#

Go to the node.js website it may help

eternal osprey
#
async function get_data(locations) {
  return Promise.all(
    locations.map(
      location => get_weather({search: location, degreeType: 'C'})
    )
  );
}

async function get_location_by_skytext(text) {
  text = text.toUpperCase(); 
  let result = await get_data(locations.slice(0, 10));
  result = result.flat();
  return result.filter(entry => {
    return entry.current.skytext.toUpperCase() === text
  });```

why is this slice method only giving me 1 array?
queen parrot
#

idk

eternal osprey
#

okay, thanks!

queen parrot
#

I think you have only defined one array?

eternal osprey
#

no.

queen parrot
#

how many?

eternal osprey
#

if i remove the lice 0,10

#

it works

queen parrot
#

there you go

eternal osprey
#

like 68 arrays

queen parrot
#

lol

eternal osprey
#

i want to slice them.

#

to only 10 max

queen parrot
#

ok

eternal osprey
#

yeah

#

but it is only showing me 1 array

#

do you maybe know the problem?

queen parrot
#

For me i re write the code

eternal osprey
#

do you even code bro?

queen parrot
#

yes

eternal osprey
#

cuz the only thing that i have been hearing was shit?

#

sorry for the bad language.

queen parrot
#

ok chill

woeful pike
#

what does return 1 array mean, Promise.all returns one array

wicked pivot
#

it does not work Detente_ref

earnest phoenix
wicked pivot
earnest phoenix
#

@limpid edge could you pls help me? Sr for the ping

#

Tony look up nvm

fluid basin
earnest phoenix
#

use nvm to get latest node v then reinstall npm modules

wicked pivot
#

already tried, not working I'll end up with delete canvas

earnest phoenix
#

ok

fluid basin
#

wait

#

where are you running the bot on?

#

@wicked pivot can you give the output of node -v?

earnest phoenix
#

how do i make it so the bot reads the old message

#

thru the embed

restive furnace
#

why just not use .then or async methods?

fluid basin
#

if you're using embeds, its message.embeds and not message.content

#

why just not use .then or async methods?
and you can use .then on the message.edit(embed1) as well

wicked pivot
#

@fluid basin I uninstalled canvas, otherwise I was just going to break something

fluid basin
#

break what?

#

afaik deleting the node_modules folder and just doing npm install should fix the problem

#

unless you have a specific (and dumb) package that is only compiled for node v10

earnest phoenix
#

@fluid basin what would i put in the " "

sullen frost
#

needs a music bot a license or something to play music?

fluid basin
#

well in a sense you actually need (if you're going to play copyrighted music), but in reality no

#

short answer is no

earnest phoenix
#

would i just put pinging...?

fluid basin
#

if you're using embeds, its message.embeds and not message.content
this

sullen frost
#

and that means? i mean i would to play it from yt

fluid basin
#

message content has the message text, but embeds and embed text belongs in embeds

earnest phoenix
#

o

#

k

fluid basin
#

well yes (you don't need a license), no one really cares tbh, most popular bots stream from yt anyways

sullen frost
#

hm okay

earnest phoenix
sullen frost
#

thanks

misty sigil
#

The XY problem is a communication problem encountered in help desk and similar situations in which the real issue, X, of the person asking for help is obscured, because instead of asking directly about issue X, they ask how to solve a secondary issue, Y, which they believe wil...

earnest phoenix
#

@fluid basin thanks alot

fluid basin
#

and read the docs too, you still need a few more steps to get the "Pinging..." text @earnest phoenix

earnest phoenix
#

k

frozen crest
#

Hello

fluid basin
frozen crest
#

I want help with programming

fluid basin
#

don't see anyone reported from streaming from youtube

#

at most google/youtube blocks your IPs

misty sigil
#

@frozen crest do you have any experience in programming?

frozen crest
#

No

#

;((

#

Am on mobile

misty sigil
#

making a bot is one of the harder things

frozen crest
#

And I want to learn program

misty sigil
#

its highly unadvised to do it on mobile if you dont know a language

#

its highly unadvised to do it without knowing a language

frozen crest
#

What does that mean

misty sigil
#

without knowing the language you're writing in

frozen crest
#

I know little

#

I only seen on yt

fluid basin
#

depends on what you need the bot for and what purpose does the bot need to accomplish

misty sigil
#

yt is outdated usually

#

what language is it so i can point you to docs?

frozen crest
#

Eng

misty sigil
#

B R U H

#

eng isnt a programming language?

frozen crest
#

Idk what you really mean

#

Oh

fluid basin
#

matt chill lol

frozen crest
#

Sorry I am a noob at this T-T

fluid basin
#

we're talking about someone who watches YT to learn how to make bots, and possibly know nothing about coding

misty sigil
#

yes i know

#

but aaaaaaaaaaaaa

earnest phoenix
#

oh yes i am english programmer

frozen crest
#

O

fluid basin
#

depends on what you need the bot for and what purpose does the bot need to accomplish
well if you can answer this maybe we can help you

storm knot
#

Hey guys. Quick question. Is it possible to make a 'testing' bot? My bot is on quite a few servers and I need to test new features without changing the existing bot

misty sigil
#

yes it is

#

just make a new application

frozen crest
#

My bot I want to be a game bot

storm knot
#

@misty sigil cheers. I thought about that, but wasn't sure it would be allowed

misty sigil
#

you'd need a database

#

@storm knot its entirely allowed, i have @earnest phoenix and animal bot beta

fluid basin
#

ok let me be honest right now, learning a new language isn't an easy task, and so is making a discord bot

#

"Muted"

misty sigil
#

animal bot beta not being on top.gg

frozen crest
#

Humm

storm knot
#

@storm knot its entirely allowed, i have @earnest phoenix and animal bot beta
@misty sigil Cheers mate

frozen crest
#

Think 🤔

misty sigil
#

aye no problem

fluid basin
#

ok let me be honest right now, learning a new language isn't an easy task, and so is making a discord bot
so unless you do have the perseverance and time AND effort to do so, I strongly recommend not to

frozen crest
#

Well....

misty sigil
#

i say flat out dont

#

learn js

earnest phoenix
#

i have @near moat and @glad quartz

fluid basin
#

not trying to discourage you to try out new things, but making an actual bot (a game bot moreover) really isn't an easy task

misty sigil
#

learn js db interactions

storm knot
#

so unless you do have the perseverance and time AND effort to do so, I strongly recommend not to
@fluid basin I second this. Making a bot and learning a language are very different things

misty sigil
#

then make a bot

earnest phoenix
#

i mean

#

i learnt discord.js thru making discord bots

#

im not

#

good

misty sigil
#

and dont you dare come back with some JSON db rubbish

earnest phoenix
#

but like

fluid basin
#

and having a computer is really essential I would say

earnest phoenix
#

^

frozen crest
#

Well can you give me a link to the program thing so I least can try Q-Q

fluid basin
#

not that coding on a mobile device is impossible, but it really is impractical

misty sigil
#

and having a computer is really essential I would say
@fluid basin <voltrex master has entered the chat>

crystal mountain
#

    const browser = await puppeteer.launch({
        defaultViewport: {width: 1920, height: 1080}});
    const page = await browser.newPage()
    await page.goto('https://sa-mp.im/login', {waitUntil: 'domcontentloaded'})
    await page.waitForSelector('input[name="username"]');
    await page.type('input[name="username"]', 'username');
    await page.type('input[name="password"]', 'password');
    await page.click('input[type="submit"]');
    await page.goto('https://sa-mp.im/profile/faction')
    const el = await page.$('body')
    const buffer = await el.screenshot({ path: `${Date.now()}.png` })

    await browser.close()
    return buffer
};
```why isnt it logging in.. i already changed username/password to real ones to be used for logging .. even login page have red message error if username/pass incorrect but it just prints login page w/o even typing into fields and clicking login
frozen crest
#

~_~

#

Hummmm

fluid basin
#

@crystal mountain can you try without going to the faction page? does that work?

earnest phoenix
#

aaaaa

fluid basin
#

(like a successful login, basically)

frozen crest
#

I guess I have to find someone that I can share my bot with that can help

earnest phoenix
#

i mean

#

if i had help it'd be nice 🙂

fluid basin
#

having a team to make a bot is great, but do find people who are willing to help you wholeheartedly

split hazel
#

anyone know max reactions discord can show in a single emoji?

fluid basin
#

I think it was 5000 iirc

frozen crest
#

sigh

split hazel
#

i forgot

eternal osprey
#

hey boys

frozen crest
#

This will be hard than 😭

split hazel
#

think that was it thanks

eternal osprey
#
    return new Promise((resolve, reject) => {
       weather.find(options, function(error, result) {
         if (error) reject(error);
         else resolve(result);

    });
  });
}

async function get_data(locations) {
  return Promise.all(
    locations.map(
      location => get_weather({search: location, degreeType: 'C'})
    )
  );
}

async function get_location_by_skytext(text) {
  text = text.toUpperCase(); 
  let result = await get_data(locations.slice(0, 10));
  console.log(result)
  result = result.flat();
  return result.filter(entry => {
    return entry.current.skytext.toUpperCase() === text
  });
}```
#

this is only showing me 1 country

earnest phoenix
#

a

eternal osprey
#

while there are actually 68

#

and i am trying to display max 10

earnest phoenix
#

i still know nothing about async xd

eternal osprey
#

what is wrong?

frozen crest
#

Thanks for help -;(

#

;-;

fluid basin
#

@split hazel not a 100% sure so don't blame me lurk

frozen crest
#

Bai

storm knot
#

i still know nothing about async xd
@earnest phoenix it means running everything asynchronous aka at the same time

earnest phoenix
#

o

#

ok

#

bruh why is this server better than any online corse

#

xd

fluid basin
#

while there are actually 68
@eternal osprey does your weather function return more than 1 for each query?

eternal osprey
#

yes

#

if you use $po sunny

#

it returns countries that have sunny weather

#

usually more than 10 countries

#

(i have picked warm countries).

fluid basin
#

also why are you only limiting the search to 10 locations

#

those 10 locations might have 9 raining and 1 sunny

eternal osprey
#

cuz otherwise i get an embed with maybe 40 countries

#

no because i have filtered the skytext

#

so $po sunny

fluid basin
#

yes I know

#

those 10 locations might have 9 raining and 1 sunny
this could have actually happened

#

so you only get 1 country ¯_(ツ)_/¯

eternal osprey
#

yeah i won't maximize to 10.

#

ooowh okay i get it.

fluid basin
#

filter AFTER you get the results, not BEFORE

plucky harness
#
Session Expires               7 hours, 57 minutes```

How do i make this ngrok session dont expire until i restart or stop it?
fluid basin
#

not possible on free plan

plucky harness
#

whats a paid plan

eternal osprey
#
et [skytext] = msg.slice(prefix.length).split(" ");
      console.log('Searching locations with:', skytext);
      let locations_found =  await get_location_by_skytext(skytext);
      console.log({locations_found});
      if (locations_found.length === 0)```
fluid basin
eternal osprey
#

should i filter it here

fluid basin
#

yes

#

lets say you have all the countries in the world

#

you should first find out which countries are sunny

eternal osprey
#

so skytext.slice(0, 10)

fluid basin
#

then take the first 10

eternal osprey
#

yeah

fluid basin
#

not the opposite, right?

plucky harness
#

5$ one gives that ?

eternal osprey
#

yeah ofc.

fluid basin
#

5$ one gives that ?
yes

plucky harness
#

or is there any better alternative

fluid basin
#

what do you need it for?

plucky harness
#

webhooks receving

fluid basin
#

I'm pretty sure there are other options out there

#

webhooks receving
for?

plucky harness
#

donations and other stuffs

eternal osprey
#
let [skytext] = msg.slice(prefix.length).split(" ");
      console.log('Searching locations with:', skytext);
      let locations_found =  await get_location_by_skytext(skytext.slice(0, 10));
      console.log({locations_found});
      if (locations_found.length === 0)
      ```
#

it returned 13 arrays

#

instead of 10

fluid basin
#

ok lemme rephrase that, what application/software/program needs it?

eternal osprey
#

this is a discord bot

#

i am using visual studio code

fluid basin
#

no not you

eternal osprey
#

node v12.18.3

#

owh okay.

plucky harness
#

i am gonna be using donate bot which sends a post webhook

fluid basin
#

@eternal osprey nonono, don't slice the text, slice the array

plucky harness
#

just need the info to add to database

fluid basin
#

lets say you have all the countries in the world
you should first find out which countries are sunny
then take the first 10 of the results (locations_found)

#

i am gonna be using donate bot which sends a post webhook
could it not be hosted on a server instead?

#

otherwise if you are going to host it on your home network you will need to port forward

eternal osprey
#

i can't seem top find where the location found is.

#

it is only in the let location_found

fluid basin
#

yeah

#

slice it after getting the locations

eternal osprey
#

let [skytext] = msg.slice(prefix.length).split(" ");
console.log('Searching locations with:', skytext);
let locations_found = await get_location_by_skytext(skytext.slice(0, 10));
console.log({locations_found});
if (locations_found.length === 0)

#

that is here

#

this is after getting the locations

#
async function get_weather(options) {
    return new Promise((resolve, reject) => {
       weather.find(options, function(error, result) {
         if (error) reject(error);
         else resolve(result);

    });
  });
}

async function get_data(locations) {
  return Promise.all(
    locations.map(
      location => get_weather({search: location, degreeType: 'C'})
    )
  );
}

async function get_location_by_skytext(text) {
  text = text.toUpperCase(); 
  let result = await get_data(locations);
  console.log(result)
  result = result.flat();
  return result.filter(entry => {
    return entry.current.skytext.toUpperCase() === text
  });
}```
fluid basin
#

uhuh

eternal osprey
#

this is how i get the info

fluid basin
#

yes yes I know

#

you see, you've gotten a 13 country array

eternal osprey
#

yeah

fluid basin
#

and you only need 10 results

#

so slice that 13 country array and only get 10?

#

understandable?

eternal osprey
#

i know

fluid basin
#

great

eternal osprey
#
let result = await get_data(locations.slice(0, 10));```
#

this can't

#

it gave me shit ton of errors

fluid basin
#

nono

eternal osprey
#

and only returned 1 array.

fluid basin
#

which one is the 13 country array?

#

we need to slice that

#

not other stuff

eternal osprey
#

i do have 68 countries

#

and 10 different weather types

#

so $po sunny

#

$po windy

#

etc.

#

so i can't just slice the 13 off.

fluid basin
#

yes, I know

plucky harness
#

could it not be hosted on a server instead?
that donate bot is not mine its a donate bot. I am just gonna be using its function where it send webhooks

#

my bot is hosted on a vps

fluid basin
#
let [skytext] = msg.slice(prefix.length).split(" ");
      console.log('Searching locations with:', skytext);
      let locations_found =  await get_location_by_skytext(skytext.slice(0, 10));
      console.log({locations_found});
      if (locations_found.length === 0)
      ```

look at this code

eternal osprey
#

yeah

plucky harness
#

how can i catch its post request

crystal mountain
#

@crystal mountain can you try without going to the faction page? does that work?
@fluid basin yes willi

#

btw it even prints the login page

#

but w/o trying to login

#

i mean if u try to login with wrong id/pass u get red message error in the same page

fluid basin
#

my bot is hosted on a vps
oh, in that case you can catch the webhook on your vps

plucky harness
#

without port forwading?

crystal mountain
#

i can show ut that it actually works

eternal osprey
#

i can't find anything useful in that code.

#
 let locations_found =  await get_location_by_skytext(skytext.slice(0, 10));
      console.log({locations_found});```
fluid basin
#

if your vps has a dedicated IP address (which it usually does), you will be able to setup a webhook catcher on your vps

eternal osprey
#

this should be good right?

fluid basin
#

yup

#

and how many countries is that printing?

eternal osprey
#

let me try

plucky harness
#

umm yeah

#

lemme test that

fluid basin
#

can you try without going to the faction page? does that work?
@crystal mountain do you get the profile page or something after logging in?

crystal mountain
#

it doesnt even login

#

i can show u preview of what happens

plucky harness
#

so url is gonna be like

#

https:Ipaddress\port?

eternal osprey
#

12

#

it is still returning 13

#

12**

#

ffs

#

i also shouldn'tslice the ksytext

fluid basin
#

yeah

#

you need to slice that

eternal osprey
#

but location found i guess

fluid basin
#

to make it 10

eternal osprey
#

i want it to be 10

#

i have it already sliced

#
let [skytext] = msg.slice(prefix.length).split(" ");
      console.log('Searching locations with:', skytext);
      let locations_found =  await get_location_by_skytext(skytext.slice(0, 10));
      console.log({locations_found});
      if (locations_found.length === 0)```
#

it still returns 12 arrays

#

i have no clue why

fluid basin
#

urgh

eternal osprey
#

yeh

fluid basin
#

the api tells you, out of your 68 countries, 12 of them are sunny

eternal osprey
#

and it returns 12

#

in an embed

#

wait, can't i just maximize the embed?

fluid basin
#

yes, its intended to have 12?

eternal osprey
#
et embed = new Discord.MessageEmbed()
                              .setDescription(description)
                              .setTitle(title);
      locations_found.forEach(location => {
        embed.addField(
          `**${location.current.observationpoint}:**`,
          `${location.current.skytext}`);
      });
      embed.setThumbnail('https://media.giphy.com/media/CKsIi206Ntz4k/giphy.gif')
            .setColor('#FF0000')
            .setFooter("Command hosted for Pokehub`s community!");
            message.author.send("<@" + message.author.id + ">")
      message.author.send({embed});
    }
  }```
#

can't i try to maximize this.

pale vessel
#

you mean minimize?

eternal osprey
#

no i am trying to maximize the given countries to only 10

misty sigil
#

why would u wanna maximise code

eternal osprey
#

but it is not wroking for me.

pale vessel
#

that's minimize

eternal osprey
#

minimize*

pale vessel
#

wouldn't locations_found.slice(0, 10).forEach() work?

eternal osprey
#

let me try.

fluid basin
#

yes, you slice the locations_found

#

this has been exactly what I am trying to tell you for the past 10 minutes

eternal osprey
#

yeah lmao

#

it works,

crystal mountain
#

@fluid basin DUDE THANKS A LOT IT WORKED!

dire obsidian
#

Well im using ffmpeg static and ytdl core to make a music command, but isnt playing audio, the bot just still there with the green circle, anything i can do?

warm marsh
#

Did you install opus bindings?

#

If you're using nodejs and d.js npm install --save @discordjs/opus or npm install --save opusscript

dire obsidian
#

Let me try

fringe marten
#

(node:22) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 disconnect listeners added to [VoiceConnection]. Use emitter.setMaxListeners() to increase limit how could i fix this and what is this error about

warm marsh
#

The error states that there are too many listeners bound.

sudden geyser
#

It means you added 11 disconnect events to a VoiceConnection instance. It's a warning as Node thinks you may have a memory leak.

fringe marten
#

oh

#

so i shouldn't be worried about this

sudden geyser
#

A common example of it happening would be nesting events, but we don't know what your source code is.

#

You should.

fringe marten
#

oh

glossy elk
#

how do i dm a user via their id using eris

lyric mountain
#

get user by id -> open private channel -> send message

#

the exact method names idk

glossy elk
#

this?

lyric mountain
#

probably

pale vessel
#

yes

glossy elk
#

okay but how do i get a user

pale vessel
#

client#users

glossy elk
#

and is there a get function?

pale vessel
#

yes

#

eris has collections too

#

it's a bit different than discord.js's one though

#

.filter() returns an array

#

so you need to use .length after it, not .size

glossy elk
#

how do i send the dm tho

#

eris is confusing hell

#

they need better docs

pale vessel
#

it's not once you get the hang of it

#

like this: user.getDMChannel().then(x => x.createMessage())

glossy elk
#

kk thanks

faint prism
#

how to make nuke command?
@earnest phoenix wdym?

whole patrol
#

Hi

#

How do I get the bot dev role CH_BotDev

faint prism
#

Discontinued by Discord

slender thistle
#

Role or badge?

earnest phoenix
#

I think he means the bot developer role on here, not the badge, but let's see

#

yeah they want the role

#

they have the badge already

#

and are flexing it smh

#

@whole patrol you need to add your bot on top.gg and wait for it to get accepted. that's how you get the role

misty sigil
#

omg the hoist

whole patrol
#

Okay

zenith knoll
#

i get this

#

message.member.guild.hasPermission is not a function

#

when i do

#

if (!message.member.hasPermission(['KICK_MEMBERS', 'MANAGE_GUILD'])) return message.reply(To start a server lockdown, you need to have \MANAGE GUILD` (Manage Server) & `KICK MEMBERS` permissions.`)

slender thistle
#

message.member.hasPermission

zenith knoll
#

its what im doing

#

message.member.hasPermission(['KICK_MEMBERS', 'MANAGE_GUILD'])

slender thistle
#

It accepts a string, not an array

zenith knoll
#

o

#

uh

#

so

slender thistle
#

You'll have to use the same function separately with && for each permission

zenith knoll
#

if (!message.member.hasPermission('KICK_MEMBERS')) && (!message.member.hasPermission('KICK_MEMBERS'))'MANAGE_GUILD'

#

yes

#

thanks

slender thistle
#

uhh a bit... not really but

#

you got the gist of it

zenith knoll
#

yea

#

i messed up my copying and paste

#

lets test

faint prism
#
try { kick() }
catch { log("missing perms") }```
zenith knoll
#

brb

slender thistle
#

Auger, it's better to save an API request

opal plank
#

prob bad auger

#

yeah i was about to mentiion that

#

dont use api as your error catcher

zenith knoll
#

What??

slender thistle
#

and as cry has been for a while here, exceptions are a good hassle for RAM so better to check before doing something

#

Are you sure that's the line where the error is occurring?

opal plank
#

member.guild?

#

permissions is for member, not for guild

zenith knoll
#

yes

#

Idk why

slender thistle
#

Ctrl + F -> member.guild

zenith knoll
#

the file says message.member.haspermission

opal plank
#

ur snippet doesnt match that

zenith knoll
#

exactly

#

idk it wont save?

#

i think?

opal plank
#

it means it somewhere else

#

or u didnt save

zenith knoll
#

hmm

opal plank
#

read the rest of the error

#

it shows the line

zenith knoll
#

ki

#

ik

#

oh i think ik the preblom

#

yea

#

thanks

#

i forgot to save

#

i think

earnest phoenix
#

Snipes are reset when the bot shuts down. what should I do.

slender thistle
#

Save snipes in database

misty sigil
#

although thats slightly grey area

opal plank
#

end user data

misty sigil
slender thistle
#

It might bite them in the ass someday. None of my business from here.

opal plank
#

they DO say some stuff like statistic bots are permitted to store some level of end user data as long as its encrypted and secured iirc, but that needs to have an opt-out way of avoid having your data collected and shit of the sorts which is a super hassle

misty sigil
#

but for snipes

#

dont bother

#

just have them reset

opal plank
#

cache is fine

#

shouldnt be a big deal unless ||your bot is shit and restarts every 10 minutes|| your bot has uptime problems

earnest phoenix
misty sigil
#

looks

#

amazing

earnest phoenix
#

thx

misty sigil
#

better than i could make anyways

#

lol

earnest phoenix
#

huh

#

here steal my design if u want

#

nah

#

im good

#

bruh

#

how much money did u spend for .vip

#

5 whole dollars 😸

#

What

#

i thought it must be somelink 100$

#

it was

#

but i changed the name

#

and it was 5 dollars

#

uhmm there are nothing

faint prism
#

Domains are dirt cheap

earnest phoenix
#

just the invite the bot

#

thats all u need

#

there is info and server button underneath

valid frigate
#

ck

drifting wedge
#

how do i get a progress bar with pillow

valid frigate
#

this is really weird

sharp thicket
#

Hi,anyone know any npm package that converts ms to minutes?

quartz kindle
#

you dont need a package for that lol

restive furnace
#

milliseconds / 1000 / 60 = minutes

sharp thicket
#

But im too dumb :(

sudden geyser
#

Packages make things easier, but you don't need a package for everything.

slender thistle
#

It's handy to know how to convert time measurement units

sharp thicket
#

I know but i get confused

slender thistle
#

comment your calculations then

quartz kindle
#

i mean

slender thistle
#
// minutes * secondsInAMinute * 1000 because a second equals 1000 milliseconds
10 * 60 * 1000``` and you got yourself 10 minutes in milliseconds
quartz kindle
#

thats like 3rd grade math

sharp thicket
#

ik

quartz kindle
#

shouldnt you pretty much know that?

sharp thicket
#

yes

earnest phoenix
#

3rd grade

slender thistle
#

I half-assed my way through school since 3rd grade and even I know this :^))))

earnest phoenix
#

or maybe 3rd class

sharp thicket
#

i dropped out of school in 1st grade

#

lol

earnest phoenix
#

wut

sharp thicket
#

it was a joke

quartz kindle
#

lmao

restive furnace
#

bad joke

sharp thicket
#

ik 8379_Sad_Boi_Hours

quartz kindle
#

well i never went to school in the first place

#

i was home schooled lol

honest perch
#

im bad at maths

quartz kindle
#

you cant be that bad that you cant do a simple multiplication

restive furnace
#

math is just math, so if you can count, you can do everything (on computers).

sharp thicket
#

look at my custom status sad

restive furnace
#

yeah binary

sharp thicket
drifting wedge
#

how can i make a progress bar?

earnest phoenix
#

how can i save snippets to the database?

pure lion
#

It depends

#

@earnest phoenix what database

earnest phoenix
#
bot.snipes = new Collection();

bot.on('messageDelete', message => {

    //if(message.author.bot) return;
    const snipes = message.client.snipes.get(message.channel.id) || [];
    snipes.unshift({
        author: message.author,
        content: message.content,
        message: message.id,
        channel: message.channel.id,
        date: new Date().toLocaleString("tr-TR")
    })
    snipes.splice(10);
    message.client.snipes.set(message.channel.id, snipes)
    //db.set(`snipe_${message.guild.id}`, message.channel.id, snipes)

});
#

quick.db

eternal osprey
#

hey

pure lion
#

db.set()

eternal osprey
#

is it possible to create a birthday announcement bot?

#

like !setbirthday

#

etc.

opal plank
#

clie.snipes and then bot.snipes as collection

pure lion
#

Yes

opal plank
pure lion
eternal osprey
#

btw not erwin

#

i promisfied my file

#

🙂

opal plank
#

eeey nice

eternal osprey
#

yeh it's hot.

opal plank
#

is it properly fixed or half way fixed?

eternal osprey
#

i am done

#

with everything

#

i just need to display the coordinates of the places.

opal plank
#

nooice

eternal osprey
#

using weather-js package.

earnest phoenix
eternal osprey
#

(node:14516) UnhandledPromiseRejectionWarning: Error: An invalid token was provided.

#

uhhm

#

pretty sure i have a good bot token in my .env.template

quartz kindle
#

then you used it wrong

earnest phoenix
#

apparently not

eternal osprey
#

pretty sure i did not

quartz kindle
#

well errors dont lie

torn ravine
#

is there event that emits when someone in a voice channel mutes/unmutes?

#

in d.js

earnest phoenix
#
bot.on('messageDelete', message => {

    //if(message.author.bot) return;
    const snipes = db.get(message.channel.id) || [];
    snipes.unshift({
        author: message.author.id,
        content: message.content,
        message: message.id,
        channel: message.channel.id,
        date: new Date().toLocaleString("tr-TR")
    })
    snipes.splice(10);
    db.set(message.channel.id, snipes)
    //db.set(`snipe_${message.guild.id}`, message.channel.id, snipes)

});
        const snipes = db.get(message.channel.id) || [];
        const msg = snipes[args[0]-1||0]
        if(!msg) return message.channel.send(`**${message.author.tag}**: Hiç mesaj silinmemiş.`);
        const embed = new MessageEmbed()
        .setAuthor(`#${args[0]||1} - ` + msg.author.tag + ' tarafından silindi.', msg.author.displayAvatarURL({dynamic: true, size: 1024, format: 'png'}))

TypeError: msg.author.displayAvatarURL is not a function

#

msg.author.tag appears as undefined.

#

uhhh

#

u write message