#development
1 messages · Page 1275 of 1
imagine not blocking trackers 😎
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
chrome is a one big tracker by itself lol
that's why i don't use it anymore
it's ok anything tracked by an American company is ok
Misly, I've disabled Brave Rewards
as soon as its China oh boy-
the reason why china is dangerous is because of their leader and no existing policies to protect data that got tracked
i need to get me a pi hole
I already use firefox for another reason, I can't technically start even using it
i have a spare old laptop that can be used for it ig
does privacy in China even exist
no
no
is there any laws at least one protecting your privacy lmao
a lot is from Youtube
unless you die at birth youre being tracked
Google has trackers on every service
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
trackers also cause long load times
most of their revenue does come from ads so it's obvious
@eternal osprey this.request isnt a function
then make it a function
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.
its this.getrequest
it's insane how much people value data, it's very hard to retain privacy online without giving in to some company
why is it this.getrequesst?
try my site, I can bet there is no trackers
I mean most companies track the fuck out of you or have trackers
@compact oriole doubt
trivia.wtf
your host may be tracking requests
pretty sure not
why does your personal site redirect to your youtube
Haven't found energy to make my own site
Couldn't find an Opus engine. < i how to install opus engine? 😄
well just install @discordjs/opus
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
show code
if you answer no to both of these questions, read #502193464054644737
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
} 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

nah he's just not using the okay function properly
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
and my package.json
@toxic jolt read that https://anidiots.guide/getting-started/getting-started-long-version, make a bot yourself and stop copy pasting code k thx
@tight plinth +1
But I don't have time I have a university entrance exam after 3 months @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

welcome to JS! 😉
i mean tbh some of them make sense 
like true === 1 is false because === considers type too
number and bool is diff types lul
yeah
true==1 returns true bc it checks for the value, true===1 returns false bc it also checks for the type yeah
typeof true; // => 'boolean'
typeof 1; // => 'number'```
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?
yes
thats why i use typescript (and some other reasons)
btw how did u know, hmmmmm???
https://hasteb.in/rovuxewu.js no errors, no output
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?```
jeez what language did you set the codeblock to lmao
muteRole.id to the role
jeez what language did you set the codeblock to lmao
@pale vessel lmao
wait
it's probably the <------------
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));
you don't do await()
you do await something()
and you need to provide a function for .find and a string for .get()
@misty sigil when people make dedicated music bots using ytdl
you do
await something()
@pale vessel bc I want it to work in all servers
https://media.discordapp.net/attachments/265156286406983680/747899138812936343/c86.gif
@misty sigil man ur memes is ancient
you need to use .find() to find via query
you need to use .find() to find via query
@pale vessel oh ok
https://hasteb.in/rovuxewu.js no errors, no output
@tired gate small tip, but try to keep the amount of scopes to a minimum
roles.cache.find(role => role.name === "Muted")
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. ^
if you use ids, you can use roles.cache.get(id)
This way you don't have that many scopes...
If statements in if statements etc... are a bad idea >_<
(mutePerson.roles.add(muteRole.id));
Replace to?
roles.cache.find(role => role.name === "Muted")
@pale vessel
oh ok
that's for adding
forEach + async
This is@Kaarssteun#1419's code, send that feedback to him I guess
yes I alrdy did that
@pale vessel but I want it to snap the muted role not the id of it
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
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?
setTimeout i guess
of what
after adding the role, you want to unmute the member after the given time right?
yes
var muteRole = roles.cache.find(role => role.name === "Muted", "muted")
This is right?
oh ok
did you define roles?
wdym
in server?
var muteRole = roles.cache.find(role => role.name === "Muted")
I have this now
@pale vessel
whose roles are you trying to find
muted
it can't be just roles unless you defined it
oh like muted
did you try the command first
no wait
make sure it adds the role first
I have
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
(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.
firsr
How would you do something like <prefix>bigemoji 🙂 and the bot sends a big IMG of it
message.mentions.users.firsr
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
how do I use more than 2 oauth scopes and how do I use the email oauth scope
bruh
@misty sigil detailed explination or less detailed?
idm
the larg one
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
that is https://discord.com/api/oauth2/token yes?
i know how to work with basic identify scope
from DOM in JS: URL.encode("identify guilds email") for example
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
yes he is, be patient
yes he is, be patient
@restive furnace dude pls is it doesnt or is it does?
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
use Math.random()
@restive furnace dude pls is it doesnt or is it does?
@autumn aspen i dont know
Guys pls lmao is it :
This server doesn't have a role with name `Muted/muted`.
or
does
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
Tyy
What do you meam Endph... it's doesn't when it does not have a role and does when it does...
yes
Powerful VPS hosting – SSD storage, snapshots, virtual machines equipped with brand new hardware, 100 mbit/s unlimited traffic, starting at just €3,99 EUR / month.
is the 4.99 eur / mo good
am just being cautious before buying

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!")
}};```
yeah you gotta await it
contabo is good from what ive heard
well at least on bang for buck and customer support
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)
alright it's returning false even when someone votes
i tried to use the example structure
One message removed from a suspended account.
How is it messed up?
.setDescription != .setDescripton
Notice the missing i between t and o at the end.
Oh, LMAO
and yeah the argument you're giving it is hard to read
but that's not the root of the error
That worked.
nice
Hello, I was coming to ask if someone can help me to do a force with the id's of raiders in a json
a force?
Does some now how to make command in which it pulls the changes from the github private repo?
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
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 ??
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
so shell is the solution. I thought kind of the same way
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
What language are you using
node js
Then try what I stated above:
they were using the exec function from the child_process module
Comes with Node.js
I need help with mongoose
hi ! how can we find all emojis starting with the same prefix?
mongo db is easier to unterstand
What library krolhm
discord js v12
and by prefix I assume you mean name
If I set upsert option to be true in findOneAndUpdate function, how it gonna add the required fields?
yes
the first letters of emojis
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
ah ok i didn't know it could work thanks !
Well, I'm using mongoose
yes thats one of the advantages of mongoose
Then how it gonna add the required fields which dont have default values set, if the record doesn't exist.
Matthew, you there??
Guys what is the meaning of CTX and ARG meaning in PYTHON?
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 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
argis just an argument, mostly used to accept commands like!command my_argumentwheremy_argumentcan be anything, but is a string codewise by default
@slender thistle Thenk you so much ❤️
you can have multiple arguments and even one that has strings in spaces
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.
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.
i wanted to ask how to add emojis to a message?
message.react('🎃')
not reaction
haa
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?
like this

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?
okie!
yeah
write this ```
and click a any emoji
ok

:pepewot:
ok?
oops
🙃
lol
oops
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
before the new line
try logic

Oh
I wonder if it's approved bot ?
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?
so put it after it?
I cant bc its ""
Lmao, I am dumb In js
@sick fable in the string or out side it?
what
@sick fable in the string or out side it?
@sick pelican Leave it. Just ignore what I said
ok...
I am confusing you guys.
message.channel.send("Your random number is:" + Math.floor(Math.random() * args[2] + args[0]));
}
there
then add a new string
🧠
💥
Is the massive difference in image quality because its in a embed?
yes
What are the flags in <Message>.flags?? And how to use it?
Alr so if i don't use a embed the quality will increase?
oh
@hazy sparrow yes
it's for detecting boosting messages or welcome messages
Alright thanks
huh.
hm
could've just
looked in the docs
u know
Yeah I did, but didn't understood what exactly that means
docs doesnt explain anything, dw about it
What do you want to do with them though
could be curiosity
I've seen somewhere using flags like some_command -flag1 -flag2, the flags gets stored in message.flags
Is theee a way to tell if a channel is a announcement channel in d.js?
yes
Ah no that's something completely different, actually, Basant.
channel.type i guess
channel.type for wut? ANNOUNCEMENT?
@rocky hearth It's more of an argument parsing in a special way, so you pretty much have to build that yourself.
like text hannel is "text" and voice cannel is "voice" announcement channel is "announcement"?
As in, it's not a base library thing (usually, depends on the library)
Hmm
I hate pure css 😔
especially when trying to modify someones else page with only it
hahaha yeah me too
also fuck Iframes 
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
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
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
Does python have something similliar to what js has with ts?
not sure, I use ts myself
so yes and no
it technically has types but no straight guards for them
seems like it does actually? https://stackoverflow.com/a/48255117
like c# or ts
but this SO answer seems to imply it's actually built in

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
I can't imagine myself working in a typeless language
that's even more confusing than some ts type thingies
It's relatively easy if you know what you're doing
I can't imagine myself working in a typeless language
me neither
My first actual programming language was Python and I don't have a problem with dynamic typing
The thing is that I like types because they confort me
python lover incoming
also IDEs act much better with types
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
Well I make games with c# 
with a good IDE and good annotations you pretty much have all you need to not fuck up with types
I don't use py either 
would recommend*, sorry
Personally I love the freedom of types in javascript itself
I once started making chess in python 3yrs ago. It is still incomplete
I get the appeal of typescript and I'll have to use it in my new job, but... fuck I don't wanna
and I don't like pythons "code"
That's opinions and preferences, which is understandable and respectable
like imo I feel js/ts/Java/c# with ; and } is more appealing
I once started making chess in python 3yrs ago. It is still incomplete
@rocky hearth what did you use for it?
pygame
Man I wanna try that out someday
I've never made a game with another engine than Unity, Godot or UE
I just love the editor/community
and c#/c++
I am a very mature coder
var ass = new Person {Name = "Yeet", Age = 5};
Console.WriteLine(ass);
var anal = new Person();
Console.WriteLine(anal);
pog you use var
I prefer it over explicit types for simplicity

how do i fix this [SSL: CERTIFICATE_VERIFY_FAILED] error in python?
Update d.py and...
uhh
Ask in their support server, they might have a tag for that
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
OMG
lol
Is it muteRole.name?
how do i check for admins perms in djs
setTimeout in mute
@misty sigil no its (muteRole.name) issue
no man I cant db so far
bruuuuuuuuuuuuuuuuuuuuuuuuuuuuuuh
@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
- not even fully trustable
else if (cmd === "res")
{
if (member.hasPermission('Administrator')) {
{
process.exit(1);
}
}
so like that
yea
why exit the process
it's a restart command.
yea, pm2 is dope
!??
it also has cloud statistics
else if (cmd === "res")
{
if (member.hasPermission('ADMINISTRATOR')) {
{
process.exit(1);
}
}
pm2 cloud thing
how can i ban a user that isnt in the server, in djs
welp i have my own server
@honest perch guild.ban("id")
thanks
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
Nice
And it's much more resilient than a batch file.
ill check it out
but now
else if (cmd === "res")
{
if (member.hasPermission('ADMINISTRATOR')) {
{
process.exit(1);
}
}
it is because it is a system service
whats my fuckywucky
lmao
but why you doing { like that in js?
c# you do that (imo it's still ugly) but in js it is inline
wym
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();
}
}
it's code preferences
im a c# dev lmao
well it is guidelines
@autumn aspen your mute will be bad if you use setTimeout
@compact oriole wdym
I just listed 3 things
So how do I do?
read a few messages down
@umbral zealot i have vsc true
use a db
@compact oriole don't bother he doesn't like to read.
ok

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

i have vs for c# coding
@rocky hearth well use createIndexes instead? 😛
it's a restart command.
@umbral zealot a member that has administrator can restart the bot?
must be a private bot then
yea
I know, and have read that too, but what does that error mean?
rider is a paid editor for only c#
¯_(ツ)_/¯
Its a private bot
the intellisense and decompilation is top notch
oh ok
Rider rocks
rider is so much more stable than vs
@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.
i gave up on vs after it kept breaking every other weak
rider is so much more stable than vs
exactly
and the startup times for vs suck ass
I get Rider (and all Jetbrains things) for free as I'm the student
startup times suck even more on lowend PCs tbh 😂
for python thingy
vsc =/= vs
lol i dont
ah
cause i thought they were taslking abt vsc
vsc has support for c# with omnisharp but it's horrible
What's with their EAP btw?
vsc has support for c# with omnisharp but it's horrible
yea it sucks ass
what is it exactly? like a separate public beta testing version or?
maybe search stuff once
See why we don't help them Affax
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
He didnt even tell me it was a databse
ooo sounds cute
yea
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
6 GB of RAM gang kek
rider do be sexy
WHAT'S THAT THEME
Material Deep Ocean
thanks mate
I've tried like all of them
Material dracula better
best thing of the eap is the new home screen
time to c||BUY|| rider
and actually you get all Jetbrains IDE's for free
best thing of the eap is the new home screen
yea
JetBrains IDEs are generally decent tbh
too bad i dont start uni till next year
:(
@compact oriole what u mean not trustable
like Jetbrain editors are best for C, C++, C# and Java
try to mute for 30 days and we will see
Python, JS, PHP too actually
hey i use php >:(

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
Yes hate on it all you want, but we had to use it for our web assignments
just because it says doesn't mean it works 
PhpStorm was just awesome in helping me write working code blindly
php is a good lang
also are you a homophobe?
probably a mistype lmao
PhpStorm was just awesome in helping me write working code blindly
yea, when I used php I got stuff done just because of PHPStorm
😂
just because it says doesn't mean it works :LUL:
@compact oriole but mine did?
js developers be like
for 2 days?
yes
that's nothing
some mutes are week, month, months
I have added it
and if your app restarts at ANY TIME it will clear
pregnancy mute 
lmao
and if your app restarts at ANY TIME it will clear
@compact oriole oh yeah but I have a self utime my bot
you what
@autumn aspen where do you host
no host runs truly 24/7
no host runs truly 24/7
@compact oriole my does
@autumn aspen where do you host
@misty sigil my second computer gaming
but it doesn't
bc i have my own server hardware
They restart like every 24 hours
I have one PC too
if a server crashes even once it is not 24/7
bc i have my own server hardware
@sudden tulip p o w e r c u t
network issues / power issues can cause downtime, nothing is ever truly 24/7
UPS POWER SUPPLY
(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 :/
exactly
lmfao
as i said
lmao
maybe read my messages
How do I expend it?
technically no server ever runs 24/7 because technically a day is not even 24 hours long

goddamn it
can we just redo the entire concept of time 😔

leap years are such a flaw
yea
yes please, you have no idea how annoying it is when working with astronomy
I fucking hate leap years
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
especially when working with payments
cool
still doesn't help with powercuts
Or restarting the bot.
you have universal time, ephemeris time, sidereal time, leap seconds, delta T, and whatever the fuck else
and idc about your rack setup
me too 
Power cuts be like "what's first world country?"
I live in Finland
what if a meteor hits your servers
i live in japan
with lightning fast internet
bro Japan has a bigger likelyhood of powercuts than Finland
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>
we have no earthquakes, almost no storms
try it and see if it's too much
lol
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
.
weird flex
This server's topics change faster than times you can physically blink
in that case i'll just get a deisel genny
we are building a safe for nuclear waste because the ground is so safe
in that case i'll just get a deisel genny
@sudden tulip what if u run out of diesel
first world country with diesel gen
@compact oriole i heard abt that

build a nuclear reactor?
no we have those
@sudden tulip what if u run out of diesel
@misty sigil buy more
but Finland is the only country building a safe for waste
I want the tesla power wall/ solar panels
How tf did you guys go from leap years to nuclear reactor so quickly
i spent my money on tesla stocks
like srsly
is MongoDB's compass is built on chromium?
yh
Does it mean it requires chrome to be installed to use it
discord also uses electron
hosting your own cluster or using atlas?
so if u can run discord u can run mongodb compass
yes hosting my own
cool
https://en.wikipedia.org/wiki/Electron_(software_framework) theres a bit more info here if u want
Electron (formerly known as Atom Shell) is an open-source software framework developed and maintained by GitHub. It allows for the development of desktop GUI applications using web technologies: it combines the Chromium rendering engine and the Node.js runtime. Electron is the...
Nah
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
use sort() (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort) to sort in descending order by the memberCount property then use slice() to get the first 10 elements out of the array (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice)
what did you try
client.guilds.cache.size.sort(function(a, b) {
return a - b;
});
you're attempting to call sort on size which is a number
and then attempting to subtract guilds, not their memberCount properties
numbers is an array of numbers
yes, those are numbers, you're working with guild objects
stop copypasting colorful shiny code blocks and read the text above them
xD
that just maps the guilds to their memberCount property and joins them with a + sign
yes i wanted tht
that's not what you asked
inb4 eval()
how do i get the biggest server from my bot? (javascript)
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
read above except take the slice part out
something like guilds.sort((x, y) => y.memberCount - x.memberCount), assuming guilds is a collection
Uhhhh
and also in #development
Yea...
Lol
well there goes my history
thats very nsfw lol
I hab proof for punishment if we need
meh u can tell a mod, if u want
@woeful pike
uhh
can I use await doSomething().catch() ?
ping a mod and not a team member next time 
not atmods tho
if it's asynchronous
@earnest phoenix I mean, does it catch correctly even with await?
yo cry
Is there any specific way to get a random array element
as opposed to a random index
(C#)
cant you just get the element at that random index?
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?
Sure, Jake, but I want to complicate my life in my coding assignment :^)
thonk, you want a complicated way?
im assuming you want to impress your teacher or sum
As simple as possible
I mean, a random index works too since it's in no fucking way needed in my case but /shrug
What library did you dev shivaco? Just curious
Maintaining dblpy
python?
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
a very slow way would be to just shuffle your collection and then First() it
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
I'm actually using the discord.py wrapper and cant find anything in the docs
Hmm, shuffling the array sounds fun
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
There's one by default if you use the commands extension, Jake
I'm assuming you're not using it
Why would you shuffle it and get the first xD
Just why, it seems more useles than complicated
Complicate other stuff I guess
but that array thingy doesn't make sense to me lol
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
What's the assignment?
create a class, add a few properties, create a new object with manually added property values, output the objects
the class can have a few types stored in an array of strings
i just discovered that Typescript has a hardcore mode
share
@restive urchin in the command decorator use description kwarg
@restive urchin in the command decorator use
descriptionkwarg
@slender thistle Thanks!
I suggest giving the docs a read after you're done
"noImplicitAny": true
"allowJs": false
"strict":true(which i already had)
Hi I’m having an issue with my bot not muting the person I @ like they just keep talking
"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
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
my man
i use any when im too lazy to type out the type name if it's too long (ie. in react lol)
I can and I want to
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)
yes
create a class with reflection @slender thistle
What you wanna do shivaco
say, stuff like weather or corona virus where you get a fuck ton of different countries. doing [key:string]: any will fuck you up
@indigo oasis show your code, we can help once we see that.
Idk how
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[]>]
Nope I thought this would be pretty simple
It is, if we can see the code
Sounds fun for a very simple assignment
we can't see your screen, darling, so we cannot guess what your problem is.
Well where do I find it?
did you even code your own bot?
No
@restive furnace what if it returns a mutable object?
Oh! Well, ask whoever made the bot then
reflection?
@slender thistle https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/reflection
we can't help you
Then why’d they send me here
Because we assume someone that is asking in this server is making a bot
Oh ok
@restive furnace what if it returns a mutable object?
uh ohh, then i just probably useanyorany[]tbh
Sorry someone from support sent me here
oh man
thats the whole point free, of this
yeah we know. Just go ask on the discord server for that bot
always pay for hosting
no matter what
(for custom apps running with nodejs etc)
you're looking for this shiv 👀 https://docs.microsoft.com/en-us/dotnet/api/system.activator.createinstance?view=netcore-3.1
you can get top notch website hosters with cdn of course (like Vercel)
no any in code, otherwise it throws errors. If the shape is wrong, it'll also error with assignment. Js cant be compiled.
or then use [key: string | string[] | object | object[] | Promise<string | string[] | object | object[]] or smth
object has implicity any
you'd need to make an interface for it
now you starting to realise the fun in this game

well, eval first find out the structure and make interface based from your evals
thats the thing
dynamic responses
{
data: {any data}
}
type that out
¯_(ツ)_/¯
without using any
lots of api dont have stuff documented properly
like the response same, or like same
you'd need to make everything optional
not everything, but most
there are static and dynamic responses








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

