#development

1 messages · Page 1275 of 1

earnest phoenix
#

firefox + ublock origin + anti adblock killer

split hazel
#

imagine not blocking trackers 😎

honest perch
split hazel
#

I'm pretty sure chrome also has a "do not track" button which also shows on the top how many trackers it blocked but don't know how lenient that is

compact oriole
earnest phoenix
#

chrome is a one big tracker by itself lol

compact oriole
#

that's why i don't use it anymore

honest perch
#

brave is a scam

#

shows ads for "free" crypto

split hazel
#

it's ok anything tracked by an American company is ok

compact oriole
#

Misly, I've disabled Brave Rewards

split hazel
#

as soon as its China oh boy-

compact oriole
#

I just like the browser for the other things

#

I just block every ad.

earnest phoenix
#

the reason why china is dangerous is because of their leader and no existing policies to protect data that got tracked

honest perch
#

I just block every ad.
@compact oriole ublock origin does that too

#

plus pi hole

earnest phoenix
#

i need to get me a pi hole

compact oriole
#

I already use firefox for another reason, I can't technically start even using it

honest perch
earnest phoenix
#

i have a spare old laptop that can be used for it ig

split hazel
#

does privacy in China even exist

honest perch
#

no

earnest phoenix
#

no

compact oriole
split hazel
#

is there any laws at least one protecting your privacy lmao

compact oriole
#

a lot is from Youtube

honest perch
#

neither does it anywhere else

#

privacy simply doesnt exist speedy

compact oriole
#

google is chilling

honest perch
#

unless you die at birth youre being tracked

split hazel
#

Google has trackers on every service

eternal osprey
#

ciould anyone help me with this problem: ```js
setInterval(T.get, 60000);
T.get("search/tweets", { q: args, count: 10 }, function (
err,
data,
response

  ) {
    console.log(data);
    status = data.statuses[0];

    data.statuses.forEach((status) => {
      const embed = new Discord.MessageEmbed();
      embed.setTitle("Twitter Feed Poster");
      embed.setDescription(`${status.text}`);```

this.request is not a fucntion

honest perch
split hazel
#

most of their revenue does come from ads so it's obvious

honest perch
#

@eternal osprey this.request isnt a function

eternal osprey
#

yeah

#

that's the problem

honest perch
#

then make it a function

eternal osprey
#

the error is coming from a npm twit package:

#

Twitter.prototype.get = function (path, params, callback) {
return this.getrequest('GET', path, params, callback)
}

#

how the fuck do i make it a function

#

it already is.

honest perch
#

its this.getrequest

earnest phoenix
#

it's insane how much people value data, it's very hard to retain privacy online without giving in to some company

eternal osprey
#

why is it this.getrequesst?

compact oriole
#

try my site, I can bet there is no trackers

slender thistle
#

I mean most companies track the fuck out of you or have trackers

honest perch
#

@compact oriole doubt

compact oriole
#

trivia.wtf

honest perch
#

your host may be tracking requests

compact oriole
#

pretty sure not

honest perch
#

why does your personal site redirect to your youtube

compact oriole
#

Haven't found energy to make my own site

honest perch
#

lma

#

o

compact oriole
#

I have some subdomains on it

#

and mx

#

so I can use me@affax.dev

toxic jolt
#

Couldn't find an Opus engine. < i how to install opus engine? 😄

tight plinth
#

what r u using

#

js?

toxic jolt
#

discord.js

#

javascript

#

yes

tight plinth
#

well just install @discordjs/opus

toxic jolt
#

okay

#

thanks :3

#

@tight plinth im getting this error
TypeError [ERR_INVALID_ARG_TYPE]: The "file" argument must be of type string. Received an instance of Object

tight plinth
#

show code

toxic jolt
#

my bot is

#

music bot

tight plinth
#

do you even know what you're doing

#

do you even k ow how to code in js

toxic jolt
#

i use !!play command

#

and i gettings this error

tight plinth
spare goblet
#

your error is related to you trying to find properties or information on a message that does not exist in the discord api

#

and not related to opus

toxic jolt
#
    } else {
          serverQueue.songs.push(song);
          
          if (playlist) return undefined;
      
          const songListBed = new RichEmbed()
          .setColor("RANDOM")
          .setDescription(`[**${song.title}**](https://www.youtube.com/watch?v=${song.id}) adlı şarkı kuyruğa eklendi!`)
          return message.channel.send(songListBed);
        }
        return undefined;
      }
        function play(guild, song) {
        var serverQueue = queue.get(guild.id);
      if (!song) {
          queue.delete(guild.id);
          voiceChannel.leave();
          serverQueue.voiceChannel.leave();
          return;
        }
        const dispatcher = serverQueue.connection.playStream(ytdl(song.url))
          .on('end', reason => {
            serverQueue.songs.shift();
            play(guild, serverQueue.songs[0]);
          })
          .on('error', error => console.error(error));
        dispatcher.setVolumeLogarithmic(serverQueue.volume / 5);
        
        let y = ''
        if (song.durationh === 0) {
            y = `${song.durationm || 0}:${song.durations || 0}`
        } else {
            y = `${song.durationh || 0}:${song.durationm || 0}:${song.durations || 0}`
        }
#

here %30 code

spare goblet
tight plinth
#

nah he's just not using the okay function properly

toxic jolt
#

i using this code only


const Discord = require('discord.js');
const { RichEmbed } = require('discord.js');
const YouTube = require('simple-youtube-api');
const ytdl = require('ytdl-core');
const moment = require('moment');
``` this modules
tight plinth
#

and he don't know how to use it

#

bc he didn't code his bot

toxic jolt
#

and my package.json

tight plinth
toxic jolt
#

@tight plinth +1

steel thicket
#

simple-youtube-api Thonk

#

why are you using the api

toxic jolt
#

But I don't have time I have a university entrance exam after 3 months @tight plinth

tight plinth
#

@steel thicket he don't even know what he's doing

#

@toxic jolt not my problem, but we won't help you coding if you don't know how to code

misty sigil
toxic jolt
restive furnace
spare goblet
#

i mean tbh some of them make sense naniok

#

like true === 1 is false because === considers type too
number and bool is diff types lul

restive furnace
#

yeah

tight plinth
#

true==1 returns true bc it checks for the value, true===1 returns false bc it also checks for the type yeah

restive furnace
#
typeof true; // => 'boolean'
typeof 1; // => 'number'```
autumn aspen
#
var muteRole = message.guild.roles.cache.get('Muted', 'muted');
if (!muteRole) return message.channel.send("This server do not have a role with name \`Muted/muted\`.");

can u make it like this?

ancient slate
#

@restive furnace thats why you use typescript

#

nerd

restive furnace
#

yes

#

thats why i use typescript (and some other reasons)

#

btw how did u know, hmmmmm???

tired gate
autumn aspen
#
var muteRole = message.guild.roles.cache.get('Muted', 'muted');
if (!muteRole) return message.channel.send("This server do not have a role with name \`Muted/muted\`."); <------

var muteTime = args[1];

if (!muteTime) return message.channel.send("The mute time has expired.");

await(mutePerson.roles.add(muteRole.id)); ```<------

How can I replace with?```

pale vessel
#

jeez what language did you set the codeblock to lmao

autumn aspen
#

jeez what language did you set the codeblock to lmao
@pale vessel lmao

#

wait

pale vessel
#

it's probably the <------------

autumn aspen
#
var muteRole = message.guild.roles.cache.get('Muted', 'muted');
if (!muteRole) return message.channel.send("This server do not have a role with name \`Muted/muted\`.");

var muteTime = args[1];

if (!muteTime) return message.channel.send("The mute time has expired.");

await(mutePerson.roles.add(muteRole.id));
pale vessel
#

you don't do await()

autumn aspen
#

I want to change the id

#

to the role

pale vessel
#

you do await something()

#

and you need to provide a function for .find and a string for .get()

honest perch
#

@misty sigil when people make dedicated music bots using ytdl

autumn aspen
#

you do await something()
@pale vessel bc I want it to work in all servers

autumn aspen
misty sigil
#

it is

#

i dont care

#

i couldn't care less

pale vessel
#

you need to use .find() to find via query

autumn aspen
#

you need to use .find() to find via query
@pale vessel oh ok

sacred cypress
pale vessel
#

roles.cache.find(role => role.name === "Muted")

sacred cypress
#
client.on('message', async (message) => {
  if (message.author.bot) return;

  if (db.get(`${message.author}_infractions`) === 4) {
    message.reply('WARNING \n\n You have made 4 infractions. Once your fifth infraction occurs, you will be muted until staff permits otherwise.');
    return;
  }

  if (message.guild.roles.has(message.guild.roles.find((r) => r.name === 'Muted'))) {
    if (message.author.roles.has(message.guild.roles.find((r) => r.name === 'Muted').id)) return;

    await message.author.addRole(message.guild.roles.find((r) => r.name === 'Muted'));
    message.reply(`${message.author} Has been muted for multiple infrfactions.`);
  } else {
    try {
      await message.guild.createRole({
        name: 'Muted',
        color: '#000000',
        permissions: [],
      });

      message.guild.channels.forEach(async (channel, id) => {
        await channel.overwritePermissions(message.guild.roles.find((r) => r.name === 'Muted'), {
          SEND_MESSAGES: false,
          ADD_REACTIONS: false,
        });
      });

      await message.author.addRole(message.guild.roles.find((r) => r.name === 'Muted'));

      message.reply(`${message.author} Has been muted for multiple infrfactions.`);
    } catch (e) {
      console.log(e.stack);
    }
  }
});
#

e.g. ^

pale vessel
#

if you use ids, you can use roles.cache.get(id)

sacred cypress
#

This way you don't have that many scopes...

honest perch
#

its stuck

sacred cypress
#

If statements in if statements etc... are a bad idea >_<

pale vessel
#

forEach + async

autumn aspen
#
(mutePerson.roles.add(muteRole.id));

Replace to?

roles.cache.find(role => role.name === "Muted")
#

@pale vessel

pale vessel
#

no

#

No

autumn aspen
#

oh ok

pale vessel
#

that's for adding

sacred cypress
#

forEach + async
This is @Kaarssteun#1419 's code, send that feedback to him I guess

autumn aspen
#

yes I alrdy did that

tired gate
#

im confused now

#

xD

autumn aspen
#

@pale vessel but I want it to snap the muted role not the id of it

pale vessel
#

that's not how you use .get()

autumn aspen
#

how then?

#

oooooh

#

lmao

#

u gave me the answer

#

right

#

?

pale vessel
#

if you want to find a role via name, you need to use .find(), which you can provide a function to find the role

#

.get() only accepts IDs

autumn aspen
#

oh thc

#

x

sacred cypress
#

Take a look at that to get more info on what invalid is talking about!

autumn aspen
#
var muteRole = roles.cache.find(role => role.name === "Muted", "muted")
if (!muteRole) return message.channel.send("This server do not have a role with name \`Muted/muted\`.");

var muteTime = args[1];

if (!muteTime) return message.channel.send("The mute time has expired.");

await(mutePerson.roles.add(muteRole.id));


}

@pale vessel how do I do with the await now? delete it?

pale vessel
#

setTimeout i guess

autumn aspen
#

of what

pale vessel
#

after adding the role, you want to unmute the member after the given time right?

autumn aspen
#

yes

pale vessel
#

you don't need this

autumn aspen
#
var muteRole = roles.cache.find(role => role.name === "Muted", "muted")

This is right?

#

oh ok

pale vessel
#

did you define roles?

autumn aspen
#

wdym

#

in server?

#
var muteRole = roles.cache.find(role => role.name === "Muted")

I have this now

#

@pale vessel

pale vessel
#

whose roles are you trying to find

autumn aspen
#

muted

pale vessel
#

it can't be just roles unless you defined it

autumn aspen
#

oh like muted

pale vessel
#

no like

#

is it guild.roles?

#

please

autumn aspen
#

oh I see

#

in guild yes

pale vessel
#

did you try the command first

autumn aspen
#

no wait

pale vessel
#

make sure it adds the role first

autumn aspen
#

I have

pale vessel
#

so uh

#

works?

tired gate
#

im just

#

gonna bump my problem then xD

#
client.on('message', async (message) => {
  if (message.author.bot) return;

  if (db.get(`${message.author}_infractions`) === 4) {
    message.reply('WARNING \n\n You have made 4 infractions. Once your fifth infraction occurs, you will be muted until staff permits otherwise.');
    return;
  }

  if (message.guild.roles.has(message.guild.roles.find((r) => r.name === 'Muted'))) {
    if (message.author.roles.has(message.guild.roles.find((r) => r.name === 'Muted').id)) return;

    await message.author.addRole(message.guild.roles.find((r) => r.name === 'Muted'));
    message.reply(`${message.author} Has been muted for multiple infrfactions.`);
  } else {
    try {
      await message.guild.createRole({
        name: 'Muted',
        color: '#000000',
        permissions: [],
      });

      message.guild.channels.forEach(async (channel, id) => {
        await channel.overwritePermissions(message.guild.roles.find((r) => r.name === 'Muted'), {
          SEND_MESSAGES: false,
          ADD_REACTIONS: false,
        });
      });

      await message.author.addRole(message.guild.roles.find((r) => r.name === 'Muted'));

      message.reply(`${message.author} Has been muted for multiple infrfactions.`);
    } catch (e) {
      console.log(e.stack);
    }
  }
});```
#

no error or output

autumn aspen
#
(node:3196) UnhandledPromiseRejectionWarning: TypeError: message.mentions.users.firsr is not a function
    at Object.module.exports.run (C:\Users\admin\apemodicus\commands\tempMute.js:18:62)
    at Client.<anonymous> (C:\Users\admin\apemodicus\index.js:40:34)
    at Client.emit (events.js:315:20)
    at MessageCreateAction.handle (C:\Users\admin\apemodicus\node_modules\discord.js\src\client\actions\MessageCreate.js:31:14)
    at Object.module.exports [as MESSAGE_CREATE] (C:\Users\admin\apemodicus\node_modules\discord.js\src\client\websocket\handlers\MESSAGE_CREATE.js:4:32)
    at WebSocketManager.handlePacket (C:\Users\admin\apemodicus\node_modules\discord.js\src\client\websocket\WebSocketManager.js:384:31)
    at WebSocketShard.onPacket (C:\Users\admin\apemodicus\node_modules\discord.js\src\client\websocket\WebSocketShard.js:444:22)
    at WebSocketShard.onMessage (C:\Users\admin\apemodicus\node_modules\discord.js\src\client\websocket\WebSocketShard.js:301:10)
    at WebSocket.onMessage (C:\Users\admin\apemodicus\node_modules\ws\lib\event-target.js:125:16)
    at WebSocket.emit (events.js:315:20)
(node:3196) 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(). To terminate the node process on unhandled promise rejection, 
use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:3196) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

@pale vessel error I got for /mute @mention reason.

earnest phoenix
#

firsr

silver lintel
#

How would you do something like <prefix>bigemoji 🙂 and the bot sends a big IMG of it

tired gate
#

message.mentions.users.firsr

earnest phoenix
#

i like how you didn't fucking read the error before you ask for solution

#

@silver lintel get the emoji, then the url, then send it as attachment

misty sigil
#

how do I use more than 2 oauth scopes and how do I use the email oauth scope

autumn aspen
#

var muteRole = guild.roles.cache.first(role => role.name === "Muted")

#

like this?

misty sigil
#

bruh

earnest phoenix
#

@misty sigil detailed explination or less detailed?

misty sigil
#

idm

earnest phoenix
#

i will go with detailed one

#

SO

#

when you press that big fat authorize button

misty sigil
#

the larg one

earnest phoenix
#

discord will redirect you to your website with a qurey that have the carreir code

#

so you just take that code

#

and slap it into authorization

misty sigil
earnest phoenix
misty sigil
#

i know how to work with basic identify scope

earnest phoenix
#

it's the same as basic scope

#

also

#

you can only use 1 scope

restive furnace
#

from DOM in JS: URL.encode("identify guilds email") for example

autumn aspen
#

guys is it This server doesn\'t have a role with name \Muted/muted`. or does?

#

Doesnt or does?

#

hello anyone?

#

bow pro r u writing a bible?

#

@pale vessel

#

is it doesnt ot does

restive furnace
#

yes he is, be patient

autumn aspen
#

yes he is, be patient
@restive furnace dude pls is it doesnt or is it does?

hazy sparrow
#

Hiw do i select a random thing from an array i forgot kek
For eg;

const Alphabets = ["a", "b", "c", "d"];
// i want it to select a random letter from the array
sudden geyser
#

use Math.random()

restive furnace
#

@restive furnace dude pls is it doesnt or is it does?
@autumn aspen i dont know

autumn aspen
#

Guys pls lmao is it :
This server doesn't have a role with name `Muted/muted`.
or
does

restive furnace
#

Hiw do i select a random thing from an array i forgot kek
For eg;

const Alphabets = ["a", "b", "c", "d"];
// i want it to select a random letter from the array

@hazy sparrow Math.random() * arraySize = random item from the array

hazy sparrow
#

Tyy

cinder patio
#

What do you meam Endph... it's doesn't when it does not have a role and does when it does...

plucky harness
#

Just wanna know

#

is Contabo a good host?

tight plinth
#

yes

plucky harness
#

is the 4.99 eur / mo good

#

am just being cautious before buying

rugged minnow
#

hi there!
the .hasVoted(id) is currently returning Promise { <pending> }

here's my code:

if (command.votersOnly){ // ignore this
      if(!dbl.hasVoted(message.author.id)){ 
          return message.channel.send(":p_no: you need to *vote* in order to use this command!")
        }};```
misty sigil
#

await it

#

or resolve the promise somehow

tight plinth
#

yeah you gotta await it

placid iron
#

contabo is good from what ive heard

compact oriole
#

well at least on bang for buck and customer support

quick dune
#

Why am I getting the error: UnhandledPromiseRejectionWarning: TypeError: (intermediate value).setTitle(...).setColor(...).setDescripton is not a function
With the code: const embed= new MessageEmbed() .setTitle(`**📷Moderation Commands📷**`) .setColor('RANDOM') .setDescripton('Here\'s a list of all of my commands listed under the moderation category.\n`ban`**Bans the given user, they may not join back unless they\'re unbanned.**:camera:\n`kick`**Kicks the given user, they may join back if granted a new invite.**:camera:\n`purge`**Bulk deletes the given number of messages.**:camera:\n`mute`**Mutes the given user indefintely.**:camera:\n`unmute`**Unmutes the given user and removes their muted role.**:camera:\n`warn`**Warns the given user, lets them know they did something wrong**:camera:\n`role`**Creates/Deletes a role depending on the arguments given**:camera:, \n`setprefix`**Sets the bots prefix for the current guild.**:camera:\n`userinfo`**Check information on the given user, may be used to find suspicous accounts.**:camera:') .setFooter(`Requested by: ${message.author.tag}`, message.author.displayAvatarURL({ dynamic: true})); if (args[0].toLowerCase() == "moderation") { message.reply(embed)

rugged minnow
#

alright it's returning false even when someone votes

#

i tried to use the example structure

sage bobcat
#

One message removed from a suspended account.

quick dune
#

How is it messed up?

sudden geyser
#

.setDescription != .setDescripton

#

Notice the missing i between t and o at the end.

quick dune
#

Oh, LMAO

sudden geyser
#

and yeah the argument you're giving it is hard to read

#

but that's not the root of the error

quick dune
#

That worked.

sudden geyser
#

nice

iron night
#

Hello, I was coming to ask if someone can help me to do a force with the id's of raiders in a json

sudden geyser
#

a force?

tired panther
#

Does some now how to make command in which it pulls the changes from the github private repo?

iron night
#

I am looking for moderators (people who have permission to ban members) could with that command ban a list of people who have the bot prepared to prevent those people from entering to raide

final path
#

I am looking for moderators (people who have permission to ban members) could with that command ban a list of people who have the bot prepared to prevent those people from entering to raide
@iron night ??

sudden geyser
#

Meister a friend of mine wrote a script like that which used git to sudo git pull --no-commit origin master, but you should look into how to run a shell script and what flags you may want to give git pull

tired panther
#

so shell is the solution. I thought kind of the same way

sudden geyser
#

I am looking for moderators (people who have permission to ban members) could with that command ban a list of people who have the bot prepared to prevent those people from entering to raide
@iron night so, you want to make a ban list? Like if someone on the list joined they'd immediately be banned?

#

Yeah but in Node.js they were using the exec function from the child_process module

tired panther
#

do u know which libary the best is for shell.

#

they are libaries

sudden geyser
#

What language are you using

tired panther
#

node js

sudden geyser
#

Then try what I stated above:

they were using the exec function from the child_process module

Comes with Node.js

rocky hearth
#

I need help with mongoose

earnest phoenix
#

hi ! how can we find all emojis starting with the same prefix?

tired panther
#

mongo db is easier to unterstand

sudden geyser
#

What library krolhm

earnest phoenix
#

discord js v12

sudden geyser
#

and by prefix I assume you mean name

rocky hearth
#

If I set upsert option to be true in findOneAndUpdate function, how it gonna add the required fields?

earnest phoenix
#

yes
the first letters of emojis

tired panther
#

@rocky hearth

sudden geyser
#

Use <Guild>.emojis to get all the emojis, then call the filter method on the cache (.cache.filter(...)). It takes a function which the first argument will be the GuildEmoji, so you should check if that emoji starts with whatever string (emoji.name.startsWith(...))

#

Keep in mind that only applies to guild emojis

earnest phoenix
#

ah ok i didn't know it could work thanks !

rocky hearth
#

Well, I'm using mongoose

misty sigil
#

if you use upsert

#

it just creates it

#

if it doesnt exist

#

with the name

tired panther
#

yes thats one of the advantages of mongoose

rocky hearth
#

Then how it gonna add the required fields which dont have default values set, if the record doesn't exist.

#

Matthew, you there??

misty sigil
#

i dont know much about mongoose

#

im more a mongodb guy

sick fable
#

Guys what is the meaning of CTX and ARG meaning in PYTHON?

slender thistle
#

Alright

#

cracks fingers
so

#

ctx is shortly for Context, an object always passed to commands. It has multiple properties like channel, message the command was run in, user who ran the command, a few other you don't usually need

#

arg is just an argument, mostly used to accept commands like !command my_argument where my_argument can be anything, but is a string codewise by default

iron night
#

@iron night so, you want to make a ban list? Like if someone on the list joined they'd immediately be banned?
@sudden geyser something like that, only without being automatic, only when you put -forceban

sick fable
#

arg is just an argument, mostly used to accept commands like !command my_argument where my_argument can be anything, but is a string codewise by default
@slender thistle Thenk you so much ❤️

slender thistle
#

you can have multiple arguments and even one that has strings in spaces

sudden geyser
#

I think there was a public API by someone else which had an index of a bunch of users who were raiders which bots were using, but I wouldn't attempt it just because of how easy it is for bots to create new accounts and raid.

toxic jolt
#

The music command enters the channel when I type "!!play test" and then exits in voice channel

#

I how to fix?

#

i installed all music modules.

sick pelican
#

i wanted to ask how to add emojis to a message?

toxic jolt
#

message.react('🎃')

sick pelican
#

not reaction

toxic jolt
#

haa

autumn aspen
#
message.channel.send("Your random number is:" + Math.floor(Math.random() * args[2] + args[0]));
    }

I want to put an "\n" but where to start a new sentence bc I tryed and coulnt?

toxic jolt
#

![weirdsip](https://cdn.discordapp.com/emojis/585884223441862656.webp?size=128 "weirdsip")like this

sick pelican
#

ok

#

the emoji id?

toxic jolt
#

click a emoji

autumn aspen
#
message.channel.send("Your random number is:" + Math.floor(Math.random() * args[2] + args[0]));
    }

I want to put an "\n" but where to start a new sentence bc I tryed and coulnt?
anyone help?

sick pelican
#

okie!

toxic jolt
#

then

#

its a emoj id

#

or

sick pelican
#

yeah

autumn aspen
#

\ a emoji

#

backslash a emoji

toxic jolt
autumn aspen
#

u get the whole thing

#

look

toxic jolt
#

and click a any emoji

sick pelican
#

ok

toxic jolt
#

![weirdsip](https://cdn.discordapp.com/emojis/585884223441862656.webp?size=128 "weirdsip")

autumn aspen
#

:pepewot:

toxic jolt
#

ok?

autumn aspen
#

oops

sick pelican
#

oh i got it!

#

thx!

toxic jolt
#

okay use it

#

no problem

autumn aspen
#

there

#

@sick pelican

sick pelican
#

🙃

autumn aspen
#

lol

sick pelican
#

oops

autumn aspen
#
message.channel.send("Your random number is:" + Math.floor(Math.random() * args[2] + args[0]));
    }

I want to put an "\n" but where to start a new sentence bc I tryed and coulnt?
anyone help?

#

pls help me

pale vessel
#

before the new line

autumn aspen
#

where

#

oh ok

#

above the bracker?

#

t

pale vessel
#

try logic

sick fable
#

![PeepoFlushed](https://cdn.discordapp.com/emojis/733219680625623091.webp?size=128 "PeepoFlushed")

#

Oh

pale vessel
#

if you want a newline after hello, you'd obviously put it after hello

#

logic

torn kestrel
#

I wonder if it's approved bot ?

autumn aspen
#

if you want a line after hello, you'd obviously put it after hello
@pale vessel yes but I want it after mathfloor

#

));

#

how do I do that?

pale vessel
#

so put it after it?

autumn aspen
#

I cant bc its ""

sick fable
#

Lmao, I am dumb In js

sick pelican
#

@sick fable in the string or out side it?

pale vessel
#

what

autumn aspen
#

at the beginning

#

look

sick fable
#

@sick fable in the string or out side it?
@sick pelican Leave it. Just ignore what I said

sick pelican
#

ok...

sick fable
#

I am confusing you guys.

autumn aspen
#
message.channel.send("Your random number is:" + Math.floor(Math.random() * args[2] + args[0]));
    }
#

there

sonic lodge
#

then add a new string

pale vessel
#

🧠

sonic lodge
#

💥

autumn aspen
#

oh

#

bruh

hazy sparrow
midnight blaze
#

yes

rocky hearth
#

What are the flags in <Message>.flags?? And how to use it?

sudden geyser
#

like badges

#

but not all of them

misty sigil
#

no

#

they want message.flags not user flags

hazy sparrow
#

Alr so if i don't use a embed the quality will increase?

sudden geyser
#

oh

midnight blaze
#

@hazy sparrow yes

pale vessel
#

it's for detecting boosting messages or welcome messages

hazy sparrow
#

Alright thanks

umbral zealot
pale vessel
#

hm

umbral zealot
#

looks like message flags are related to announcement channels

#

¯_(ツ)_/¯

misty sigil
#

could've just

#

looked in the docs

#

u know

rocky hearth
#

Yeah I did, but didn't understood what exactly that means

midnight blaze
#

docs doesnt explain anything, dw about it

umbral zealot
#

What do you want to do with them though

pale vessel
#

could be curiosity

rocky hearth
#

I've seen somewhere using flags like some_command -flag1 -flag2, the flags gets stored in message.flags

hazy sparrow
#

Is theee a way to tell if a channel is a announcement channel in d.js?

pale vessel
#

yes

umbral zealot
#

Ah no that's something completely different, actually, Basant.

pale vessel
#

channel.type i guess

hazy sparrow
#

channel.type for wut? ANNOUNCEMENT?

umbral zealot
#

@rocky hearth It's more of an argument parsing in a special way, so you pretty much have to build that yourself.

hazy sparrow
#

like text hannel is "text" and voice cannel is "voice" announcement channel is "announcement"?

umbral zealot
#

As in, it's not a base library thing (usually, depends on the library)

hoary parcel
#

Hmm

compact oriole
#

I hate pure css 😔

#

especially when trying to modify someones else page with only it

rocky hearth
#

hahaha yeah me too

compact oriole
#

also fuck Iframes LUL

#

but sadly I can't just load my site directly into top.gg as it uses js...

#

so I have to settle with this scroll mess

earnest phoenix
#

i wonder if an iframe to an SSR site would bypass the js restriction

#

or an iframe to WASM

#

WASM completely bypasses the js restrictions

compact oriole
#

but the thing is that the cross origin iframe blocks me from making it the height of the page inside

#

so I need two scroll bars

#

one for top.gg and one for iframe

rocky hearth
#

Does python have something similliar to what js has with ts?

compact oriole
#

not sure, I use ts myself

#

so yes and no

#

it technically has types but no straight guards for them

umbral zealot
compact oriole
#

like c# or ts

umbral zealot
#

but this SO answer seems to imply it's actually built in

compact oriole
slender thistle
#

There's no strict typing in Python whatsoever unless you assert isinstance everywhere

#

The answer Evie linked is just for IDEs to handle

#

but not the interpreter

rocky hearth
#

I can't imagine myself working in a typeless language

compact oriole
#

that's even more confusing than some ts type thingies

slender thistle
#

It's relatively easy if you know what you're doing

compact oriole
#

I can't imagine myself working in a typeless language
me neither

slender thistle
#

My first actual programming language was Python and I don't have a problem with dynamic typing

compact oriole
#

The thing is that I like types because they confort me

rocky hearth
#

python lover incoming

compact oriole
#

also IDEs act much better with types

slender thistle
#

not specifically a lover but I do prefer to use it over anything else for my college projects

#

unless I have to go strict typing, then I go with C#

#

also IDEs act much better with types
@compact oriole this is the main reason I recommend using type annotations in Python

compact oriole
#

Well I make games with c# owoShrug

slender thistle
#

with a good IDE and good annotations you pretty much have all you need to not fuck up with types

compact oriole
#

I don't use py either LUL

slender thistle
#

would recommend*, sorry

umbral zealot
#

Personally I love the freedom of types in javascript itself

compact oriole
#

sometimes third party libs just don't really have annotations

#

and then it's hell

rocky hearth
#

I once started making chess in python 3yrs ago. It is still incomplete

umbral zealot
#

I get the appeal of typescript and I'll have to use it in my new job, but... fuck I don't wanna

compact oriole
#

and I don't like pythons "code"

slender thistle
#

That's opinions and preferences, which is understandable and respectable

compact oriole
#

like imo I feel js/ts/Java/c# with ; and } is more appealing

slender thistle
#

I once started making chess in python 3yrs ago. It is still incomplete
@rocky hearth what did you use for it?

rocky hearth
#

pygame

slender thistle
#

Man I wanna try that out someday

compact oriole
#

I've never made a game with another engine than Unity, Godot or UE

#

I just love the editor/community

#

and c#/c++

slender thistle
#

I am a very mature coder

            var ass = new Person {Name = "Yeet", Age = 5};
            Console.WriteLine(ass);
            var anal = new Person();
            Console.WriteLine(anal);
compact oriole
#

pog you use var

slender thistle
#

I prefer it over explicit types for simplicity

compact oriole
#

yea

#

and it's also quicker to type

slender thistle
#

:p

#

aye

compact oriole
#

but it's still not dynamic, just shorthand

#

and that's good

slender thistle
#

okay

#

time to dynamic everything 😂

compact oriole
#

do it and I'll find you

#

and make it var

slender thistle
compact oriole
#

pog

glad leaf
#

how do i fix this [SSL: CERTIFICATE_VERIFY_FAILED] error in python?

slender thistle
#

uhh

#

Ask in their support server, they might have a tag for that

compact oriole
#

WTF IS THIS

#

It adds an ugly thing to the bottom of the page

autumn aspen
#
const Discord = require("discord.js");
const ms = require("ms");

module.exports.config = {
    name: "mute", 
    aliases: []
}
    
module.exports.run = async (client, message, args) => {

    // /mute person time (d,h,m,s).

    if (!message.member.hasPermission("KICK_MEMBERS")) return message.channel.send(":x: **You don\'t have permission to run this command!** :x:");

    if (!args[0]) return message.reply("Please specify a user to mute.");

   if (!message.guild.me.hasPermission("KICK_MEMBERS")) message.channel.send("I don\'t have the right permissions.");

    var mutePerson = message.guild.member(message.mentions.users.first() || message.guild.members.get(args[0]));

    if (!mutePerson) return message.reply("Can\'t seem to find this user. Sorry about that!");

    if (mutePerson.hasPermission("MANAGE_MESSAGES")) return message.channel.send("This user can\'t be muted. It is either because they are a mod/admin, or their highest role is higher than mine.\n\`Or:\`\nthe bot you trying to mute with or yourself, owner, etc!");

    var muteRole = message.guil.roles.cache.find(role => role.name === "Muted")
    if (!muteRole) return message.channel.send("This server does not have a role with name Muted.");

    var muteTime = args[1];

    if (!muteTime) return message.channel.send("The mute time has expired.");

    await(mutePerson.roles.add(muteRole.name));
    message.channel.send(`**${mutePerson}** is Muted for \`${muteTime}\``);

    setTimeout(() => {

       mutePerson.roles.remove(muteRole.id);

       message.channel.send(`${mutePerson} is unmuted.`);

    }, ms(muteTime));    
}

Help

misty sigil
#

OMG

autumn aspen
#

lol

misty sigil
#

setTimeout in mute

autumn aspen
compact oriole
#

exactly

sudden tulip
#

how do i check for admins perms in djs

autumn aspen
misty sigil
#

<permissions>.has("ADMINISTRATOR")

#

use a db for punishment

autumn aspen
#

no man I cant db so far

compact oriole
autumn aspen
#

bruuuuuuuuuuuuuuuuuuuuuuuuuuuuuuh

compact oriole
#

@autumn aspen your mute will be bad if you use setTimeout

#

as 1. it has a limit
2. if app crashes so will the timeout

#
  1. not even fully trustable
sudden tulip
#
    else if (cmd === "res")
    {
        if (member.hasPermission('Administrator')) {
        {
         process.exit(1);
        }
    }
#

so like that

compact oriole
#

ADMINISTRATOR

#

it's all caps

sudden tulip
#

oh

#

case sensitive

#

got it

compact oriole
#

yea

pale vessel
#

why exit the process

umbral zealot
#

it's a restart command.

sudden tulip
#

yea

#

thats the run.bat

umbral zealot
#

ewww batch files ewwwwwwwww

#

use pm2 for god's sake.

compact oriole
#

yea, pm2 is dope

sudden tulip
#

!??

compact oriole
#

it also has cloud statistics

sudden tulip
#

i did a fucky wucky

compact oriole
sudden tulip
#
    else if (cmd === "res")
    {
        if (member.hasPermission('ADMINISTRATOR')) {
        {
         process.exit(1);
        }
    }
compact oriole
#

pm2 cloud thing

honest perch
#

how can i ban a user that isnt in the server, in djs

sudden tulip
#

welp i have my own server

umbral zealot
#

@honest perch guild.ban("id")

honest perch
#

thanks

compact oriole
#

me too?

#

that's my own server but pm2 cloud logging/statistics

sudden tulip
#

ohh

#

i see

#

cool

umbral zealot
#

pm2 is a replacement for using a batch file, and it stores a log of your console output, does auto-restart on crash, and also does cloud statistics

sudden tulip
#

Nice

umbral zealot
#

And it's much more resilient than a batch file.

sudden tulip
#

ill check it out

#

but now

#
    else if (cmd === "res")
    {
        if (member.hasPermission('ADMINISTRATOR')) {
        {
         process.exit(1);
        }
    }
compact oriole
#

it is because it is a system service

sudden tulip
#

whats my fuckywucky

umbral zealot
sudden tulip
#

oh

#

bruh

compact oriole
#

lmao

sudden tulip
#

im stupid

#

stupid np++

compact oriole
#

but why you doing { like that in js?

#

c# you do that (imo it's still ugly) but in js it is inline

sudden tulip
#

wym

umbral zealot
#

tip of the trade: first get a goddamn editor (Visual Studio Code). Then, stop putting { braces on their own line.

#
else if (cmd === 'res') {
  if(member.hasPermission('ADMINISTRATOR')) {
   process.exit();
  }
}
slender thistle
#

it's code preferences

sudden tulip
#

im a c# dev lmao

compact oriole
#

well it is guidelines

autumn aspen
#

@autumn aspen your mute will be bad if you use setTimeout
@compact oriole wdym

compact oriole
#

I just listed 3 things

autumn aspen
#

So how do I do?

compact oriole
#

read a few messages down

sudden tulip
#

@umbral zealot i have vsc true

compact oriole
#

use a db

umbral zealot
#

@compact oriole don't bother he doesn't like to read.

autumn aspen
#

ok

compact oriole
sudden tulip
#

Im gonna use vsc now

#

lmao

rocky hearth
#

whats that,
(node:12464) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.

umbral zealot
compact oriole
#

vsc is good

#

(I use it for everything else than c#)

sudden tulip
#

i have vs for c# coding

umbral zealot
#

@rocky hearth well use createIndexes instead? 😛

compact oriole
#

vsc is shit in c#

#

vs is ok

#

rider is god

sudden tulip
#

vsc is shity for c#

#

vs is nice

#

rider idk what that is

pale vessel
#

it's a restart command.
@umbral zealot a member that has administrator can restart the bot?

#

must be a private bot then

sudden tulip
#

yea

rocky hearth
#

I know, and have read that too, but what does that error mean?

compact oriole
#

rider is a paid editor for only c#

umbral zealot
#

¯_(ツ)_/¯

sudden tulip
#

Its a private bot

compact oriole
#

the intellisense and decompilation is top notch

pale vessel
#

oh ok

compact oriole
#

Rider rocks

earnest phoenix
#

rider is so much more stable than vs

umbral zealot
#

@rocky hearth "deprecated" means that it will be removed in the future, so if you don't fix the code, then you update to a new version, the code stops working.

earnest phoenix
#

i gave up on vs after it kept breaking every other weak

compact oriole
#

rider is so much more stable than vs
exactly

earnest phoenix
#

and the startup times for vs suck ass

zenith knoll
#

how

#

vsc is best

#

imho

sudden tulip
#

vs 19 has great time

#

wym

compact oriole
#

I get Rider (and all Jetbrains things) for free as I'm the student

zenith knoll
#

o

#

vs

#

i use vsc with vs

slender thistle
#

startup times suck even more on lowend PCs tbh 😂

zenith knoll
#

for python thingy

sudden tulip
#

imagine not having a awesome pc

#

Bruh

sudden geyser
#

vsc =/= vs

zenith knoll
#

lol i dont

compact oriole
zenith knoll
#

vsc =/= vs
@sudden geyser ik that

#

thats why i said oh

sudden geyser
#

ah

zenith knoll
#

cause i thought they were taslking abt vsc

earnest phoenix
#

vsc has support for c# with omnisharp but it's horrible

compact oriole
#

also Rider is free if you use the early access

#

but that can break of course

slender thistle
#

What's with their EAP btw?

compact oriole
#

vsc has support for c# with omnisharp but it's horrible
yea it sucks ass

autumn aspen
#

So ehm I npm db then after my ms was gone`?

#

from package.json

slender thistle
#

what is it exactly? like a separate public beta testing version or?

compact oriole
#

@autumn aspen I mean a database

#

not a package named db

autumn aspen
#

fuck u

#

lmao

compact oriole
#

maybe search stuff once

umbral zealot
#

See why we don't help them Affax

compact oriole
#

what is it exactly? like a separate public beta testing version or?
it's basically a version that has experimental features

#

and it's free to the public

autumn aspen
#

He didnt even tell me it was a databse

slender thistle
#

ooo sounds cute

compact oriole
#

maybe use da google

slender thistle
#

db is an acronym for database

#

(I think that's the right word?)

compact oriole
#

yea

sudden tulip
#

i have 2x Rtx 2080, 64gb ram, 3 m.2 drives along with 4x 3tb ssd and a amd threadripper

#

damn

#

we arent talking abt pcs anymore

slender thistle
#

6 GB of RAM gang kek

sudden tulip
#

wait

#

wrong server

#

oopsy

compact oriole
slender thistle
#

WHAT'S THAT THEME

compact oriole
#

Material Deep Ocean

slender thistle
#

thanks mate

compact oriole
#

I've tried like all of them

sudden geyser
#

Material dracula better

compact oriole
#

:(

#

@sudden tulip if you are a student you get Rider free

sudden geyser
#

best thing of the eap is the new home screen

sudden tulip
#

time to c||BUY|| rider

compact oriole
#

and actually you get all Jetbrains IDE's for free

#

best thing of the eap is the new home screen
yea

slender thistle
#

JetBrains IDEs are generally decent tbh

sudden tulip
#

too bad i dont start uni till next year

autumn aspen
#

:(
@compact oriole what u mean not trustable

compact oriole
#

like Jetbrain editors are best for C, C++, C# and Java

sudden tulip
#

ewww

#

jetbrains

#

no thx

autumn aspen
#

Affax u said that wasnt trust able it works good

#

@compact oriole

compact oriole
#

try to mute for 30 days and we will see

slender thistle
#

Python, JS, PHP too actually

compact oriole
#

ewww PHP

#

like any other lang is good

#

but php?

pale vessel
#

hey i use php >:(

compact oriole
autumn aspen
#

try to mute for 30 days and we will see
@compact oriole I muted a gay for 2 days and I told it to mute for 2days

#

sooo

slender thistle
#

Yes hate on it all you want, but we had to use it for our web assignments

compact oriole
#

just because it says doesn't mean it works LUL

slender thistle
#

PhpStorm was just awesome in helping me write working code blindly

sudden tulip
#

php is a good lang

compact oriole
#

also are you a homophobe?

slender thistle
#

probably a mistype lmao

sudden tulip
#

Eww homophobe

#

cringe

#

i hope its a mistype

compact oriole
#

PhpStorm was just awesome in helping me write working code blindly
yea, when I used php I got stuff done just because of PHPStorm

slender thistle
#

😂

autumn aspen
#

just because it says doesn't mean it works :LUL:
@compact oriole but mine did?

sudden tulip
compact oriole
#

for 2 days?

autumn aspen
#

yes

compact oriole
#

that's nothing

autumn aspen
#

OMG

#

wtf u mean

compact oriole
#

some mutes are week, month, months

autumn aspen
#

I have added it

compact oriole
#

and if your app restarts at ANY TIME it will clear

pale vessel
#

pregnancy mute chipweary

autumn aspen
#

lmao

#

and if your app restarts at ANY TIME it will clear
@compact oriole oh yeah but I have a self utime my bot

pale vessel
#

you what

compact oriole
#

never heard of that

misty sigil
#

@autumn aspen where do you host

compact oriole
#

no host runs truly 24/7

earnest phoenix
#

are they thinking of a pinger bot to keep their app alive

#

lol

#

that's sad

misty sigil
#

istg if they say repl or glitch

sudden tulip
#

no host runs truly 24/7
@compact oriole my does

autumn aspen
#

@autumn aspen where do you host
@misty sigil my second computer gaming

compact oriole
#

but it doesn't

sudden tulip
#

bc i have my own server hardware

misty sigil
#

They restart like every 24 hours

autumn aspen
#

I have one PC too

compact oriole
#

if a server crashes even once it is not 24/7

misty sigil
#

bc i have my own server hardware
@sudden tulip p o w e r c u t

earnest phoenix
#

network issues / power issues can cause downtime, nothing is ever truly 24/7

sudden tulip
#

UPS POWER SUPPLY

autumn aspen
#
(node:13340) TimeoutOverflowWarning: 2592000000 does not fit into a 32-bit signed integer.
Timeout duration was set to 1.

@compact oriole I tryed for 30days :/

compact oriole
#

exactly

misty sigil
#

lmfao

compact oriole
#

as i said

autumn aspen
#

lmao

compact oriole
#

maybe read my messages

autumn aspen
#

How do I expend it?

quartz kindle
#

technically no server ever runs 24/7 because technically a day is not even 24 hours long

umbral zealot
misty sigil
#

goddamn it

earnest phoenix
#

can we just redo the entire concept of time 😔

compact oriole
earnest phoenix
#

leap years are such a flaw

compact oriole
#

yea

quartz kindle
#

yes please, you have no idea how annoying it is when working with astronomy

compact oriole
#

I fucking hate leap years

sudden tulip
#
Heres a rundown of my rack (top down)
Gigabit ethernet switch
Power strip
2U Cooling fan
Dell poweredge r610 2x Intel(R) Xeon(R) CPU E5540 @ 2.53GHz 64gb ram
Dell poweredge r610 2x Intel(R) Xeon(R) CPU E5540 @ 2.53GHz 64gb ram
Dell poweredge r720 2x Intel(R) Xeon(R) CPU E5-2690 @ 2.9GHz 192gb ram
2U Cooling fan
UPS Powersupply
Dell xps desktop pc for controlling the servers
total cost + rack
~3k usd (i got good deals on alot of the stuff)
and the xps desktop has 32gb ddr4 ram
compact oriole
#

especially when working with payments

misty sigil
#

cool

compact oriole
#

still doesn't help with powercuts

umbral zealot
#

Or restarting the bot.

quartz kindle
#

you have universal time, ephemeris time, sidereal time, leap seconds, delta T, and whatever the fuck else

compact oriole
#

and idc about your rack setup

sudden tulip
#

I live in a first world country

#

no such thing as power cuts

compact oriole
#

me too LUL

slender thistle
#

Power cuts be like "what's first world country?"

compact oriole
#

I live in Finland

slender thistle
#

what if a meteor hits your servers

sudden tulip
#

i live in japan

misty sigil
#

I live in UK

#

there are very much power cuts

sudden tulip
#

with lightning fast internet

umbral zealot
#

Yay I'm in canada!

#

EyesSquint though I'm not finding who asked about any of this

compact oriole
#

bro Japan has a bigger likelyhood of powercuts than Finland

hazy sparrow
#

Is it too over for a 8ball command to be in a embed like
THE 8-BALL HAS RESPONDED
<insert response here>
Category: Yes/no/not obvious
<insert author name and pfp in footer>

sudden tulip
#

@umbral zealot i been to vancouver one

#

that was lit

compact oriole
#

we have no earthquakes, almost no storms

slender thistle
#

try it and see if it's too much

umbral zealot
autumn aspen
#

lol

sudden tulip
#

bro Japan has a bigger likelyhood of powercuts than Finland
@compact oriole true, but my ups power supply can offer a week of nonstop power

mint bluff
#

.

umbral zealot
#

weird flex

slender thistle
#

This server's topics change faster than times you can physically blink

sudden tulip
#

in that case i'll just get a deisel genny

compact oriole
#

we are building a safe for nuclear waste because the ground is so safe

misty sigil
#

in that case i'll just get a deisel genny
@sudden tulip what if u run out of diesel

compact oriole
#

first world country with diesel gen

sudden tulip
#

@compact oriole i heard abt that

compact oriole
misty sigil
#

build a nuclear reactor?

compact oriole
#

no we have those

slender thistle
sudden tulip
#

@sudden tulip what if u run out of diesel
@misty sigil buy more

compact oriole
#

but Finland is the only country building a safe for waste

umbral zealot
#

What, no tesla powerwall with solar tile roofs?

#

lame.

sudden tulip
#

I want the tesla power wall/ solar panels

hazy sparrow
#

How tf did you guys go from leap years to nuclear reactor so quickly

sudden tulip
#

i spent my money on tesla stocks

hazy sparrow
#

like srsly

rocky hearth
#

is MongoDB's compass is built on chromium?

trim lark
#

yh

rocky hearth
#

Does it mean it requires chrome to be installed to use it

trim lark
#

no

#

its built on electron framework

misty sigil
#

mongodb compass?

#

cool

trim lark
#

discord also uses electron

misty sigil
#

hosting your own cluster or using atlas?

trim lark
#

so if u can run discord u can run mongodb compass

rocky hearth
#

yes hosting my own

misty sigil
#

cool

trim lark
rocky hearth
#

ok, I'll check thanks

#

Can I see my local cluster on web

misty sigil
#

Nah

rocky hearth
#

without using compass

#

ok

tired panther
#

message.channel.send(client.guilds.cache.filter(g => {g.size < 1000}));

#

I want to see the biggest guild just the first 10 of them

#

how do i do that?

#

ping me

earnest phoenix
tired panther
#

how?

#

i tried it

earnest phoenix
#

what did you try

tired panther
#

client.guilds.cache.size.sort(function(a, b) {
return a - b;
});

earnest phoenix
#

you're attempting to call sort on size which is a number

#

and then attempting to subtract guilds, not their memberCount properties

tired panther
slender thistle
#

numbers is an array of numbers

earnest phoenix
#

yes, those are numbers, you're working with guild objects

#

stop copypasting colorful shiny code blocks and read the text above them

tired panther
#

xD

earnest phoenix
#

also, that's ascending order

#

you want descending order

tired panther
#

b%eval client.guilds.cache.map(g => g.memberCount).join(' + ')

#

here u go

earnest phoenix
#

that just maps the guilds to their memberCount property and joins them with a + sign

tired panther
#

yes i wanted tht

earnest phoenix
#

that's not what you asked

slender thistle
#

inb4 eval()

earnest phoenix
#

how do i get the biggest server from my bot? (javascript)

pale vessel
#

get the server with most member i guess

#

for that you have to sort your servers and get the one with the highest member count

earnest phoenix
#

read above except take the slice part out

pale vessel
#

something like guilds.sort((x, y) => y.memberCount - x.memberCount), assuming guilds is a collection

dense nest
#

Uhhhh

slender thistle
#

why post it in a public server and a non-NSFW channel

#

🙃

earnest phoenix
dense nest
#

Yea...

slender thistle
#

delete it, thanks

#

It's suggestive enough

dense nest
#

Lol

earnest phoenix
#

well there goes my history

quartz kindle
#

thats very nsfw lol

earnest phoenix
#

@earnest phoenix delete it

dense nest
#

I hab proof for punishment if we need

earnest phoenix
#

meh u can tell a mod, if u want

dense nest
#

@woeful pike

earnest phoenix
#

uhh

dense nest
earnest phoenix
#

not a team member

#

deleted ;Ö

#

😉

opaque seal
#

can I use await doSomething().catch() ?

slender thistle
#

ping a mod and not a team member next time bloblul

pale vessel
#

not atmods tho

earnest phoenix
#

if it's asynchronous

#

please get help

opaque seal
#

if it's asynchronous
@earnest phoenix I mean, does it catch correctly even with await?

slender thistle
#

yo cry

#

Is there any specific way to get a random array element

#

as opposed to a random index

#

(C#)

restive urchin
#

cant you just get the element at that random index?

undone carbon
#

I'm trying to make a variable like Date.now + 3 months and get the result. my dev logic is not working today. Can someone help me real quick?

slender thistle
#

Sure, Jake, but I want to complicate my life in my coding assignment :^)

earnest phoenix
#

thonk, you want a complicated way?

#

im assuming you want to impress your teacher or sum

undone carbon
#

As simple as possible

slender thistle
#

:p

#

Pretty much

undone carbon
#

Doing image manipulation, lol

#

So yk...

#

It's already eating resources

slender thistle
#

I mean, a random index works too since it's in no fucking way needed in my case but /shrug

opaque seal
#

What library did you dev shivaco? Just curious

slender thistle
#

Maintaining dblpy

compact oriole
#

python?

restive urchin
#

Hey, does anyone know how to add help info to bot commands??

So when a user runs .help the commands are annotated. I do not want to write my own help func

earnest phoenix
#

a very slow way would be to just shuffle your collection and then First() it

compact oriole
opaque seal
#

Hey, does anyone know how to add help info to bot commands??

So when a user runs .help the commands are annotated. I do not want to write my own help func
you can find the answer to your question on https://discordjs.guide if you are using discord.js

restive urchin
#

I'm actually using the discord.py wrapper and cant find anything in the docs

slender thistle
#

Hmm, shuffling the array sounds fun

opaque seal
#

I mean, a random index works too since it's in no fucking way needed in my case but /shrug
at the end you would still need to extract a random value so you would need the index of it

slender thistle
#

There's one by default if you use the commands extension, Jake

#

I'm assuming you're not using it

opaque seal
#

Why would you shuffle it and get the first xD

slender thistle
#

Pointless overcomplications

opaque seal
#

Just why, it seems more useles than complicated

#

Complicate other stuff I guess

#

but that array thingy doesn't make sense to me lol

restive urchin
#

There's one by default if you use the commands extension, Jake
@slender thistle I know there is but I want to add annotations to the commands.

By default "$help" lists the commands but doesn't have descriptions for what they do. How do I add those descriptions with discord.py

slender thistle
#

I never wanted it to, Gui

#

:p

opaque seal
#

What's the assignment?

slender thistle
#

create a class, add a few properties, create a new object with manually added property values, output the objects

opal plank
#

oh god

#

i just discovered that Typescript has a hardcore mode

slender thistle
#

the class can have a few types stored in an array of strings

compact oriole
#

i just discovered that Typescript has a hardcore mode
share

slender thistle
#

@restive urchin in the command decorator use description kwarg

restive urchin
#

@restive urchin in the command decorator use description kwarg
@slender thistle Thanks!

slender thistle
#

I suggest giving the docs a read after you're done

opal plank
#

"noImplicitAny": true
"allowJs": false
"strict":true(which i already had)

indigo oasis
#

Hi I’m having an issue with my bot not muting the person I @ like they just keep talking

opal plank
#

no any's

#

good luck making API calls interfaces

restive furnace
#

"noImplicitAny": true
"allowJs": false
"strict":true(which i already had)
i have every strict thing on, just sometimes annoying, but pretty good, no runtime errors

opaque seal
#

create a class, add a few properties, create a new object with manually added property values, output the objects
doesn't seem you can do much complicated stuff with that assignment

slender thistle
#

my man

earnest phoenix
#

i use any when im too lazy to type out the type name if it's too long (ie. in react lol)

slender thistle
#

I can and I want to

opal plank
#

i have strict by default, but removing any's from code and p´reventing native js from executing requires you to change legit everything to typewscript(im assuming that holds true for modules too)

restive furnace
#

yes

earnest phoenix
#

create a class with reflection @slender thistle

opaque seal
#

What you wanna do shivaco

opal plank
#

good luck typing out dynamic api calls

slender thistle
#

reflection?

#

Sounds new

opal plank
#

say, stuff like weather or corona virus where you get a fuck ton of different countries. doing [key:string]: any will fuck you up

umbral zealot
#

@indigo oasis show your code, we can help once we see that.

indigo oasis
#

Idk how

umbral zealot
#

you don't know how to copy/paste code?

restive furnace
#

say, stuff like weather or corona virus where you get a fuck ton of different countries. doing [key:string]: any will fuck you up
[key: string | string[] | Promise<string | string[]>]

indigo oasis
#

Nope I thought this would be pretty simple

opal plank
#

white names that dont know how to copy paste?

#

wot

umbral zealot
#

It is, if we can see the code

slender thistle
#

Sounds fun for a very simple assignment

umbral zealot
#

we can't see your screen, darling, so we cannot guess what your problem is.

indigo oasis
#

Well where do I find it?

umbral zealot
#

did you even code your own bot?

indigo oasis
#

No

opal plank
#

@restive furnace what if it returns a mutable object?

umbral zealot
#

Oh! Well, ask whoever made the bot then

earnest phoenix
umbral zealot
#

we can't help you

indigo oasis
#

Then why’d they send me here

umbral zealot
#

Because we assume someone that is asking in this server is making a bot

indigo oasis
#

Oh ok

restive furnace
#

@restive furnace what if it returns a mutable object?
uh ohh, then i just probably use any or any[] tbh notlikenoot

indigo oasis
#

Sorry someone from support sent me here

slender thistle
#

oh man

opal plank
#

thats the whole point free, of this

umbral zealot
#

yeah we know. Just go ask on the discord server for that bot

compact oriole
#

always pay for hosting

#

no matter what

#

(for custom apps running with nodejs etc)

earnest phoenix
compact oriole
#

you can get top notch website hosters with cdn of course (like Vercel)

opal plank
#

no any in code, otherwise it throws errors. If the shape is wrong, it'll also error with assignment. Js cant be compiled.

restive furnace
#

or then use [key: string | string[] | object | object[] | Promise<string | string[] | object | object[]] or smth

opal plank
#

object has implicity any

#

you'd need to make an interface for it

#

now you starting to realise the fun in this game

restive furnace
#

well, eval first find out the structure and make interface based from your evals

opal plank
#

thats the thing

#

dynamic responses

#

{
data: {any data}
}

#

type that out

#

¯_(ツ)_/¯

#

without using any

restive furnace
#

but... isn't the structure like same?

#

i mean

opal plank
#

lots of api dont have stuff documented properly

restive furnace
#

like the response same, or like same

opal plank
#

you'd need to make everything optional

restive furnace
#

not everything, but most

opal plank
#

there are static and dynamic responses