#development

1 messages · Page 1234 of 1

thick gull
#

is that how it is?

#

the index.js is in the folder

earnest phoenix
thick gull
#

bot.js is index.js

#

for me

earnest phoenix
#

Is there a way to make sure that if one YT API doesn't work, use another one without having to change it all the time? xD

thick gull
#

you dont need any of the extra files i have

#

is that how it looks>

pure lion
spare mirage
#

Small question, my pc broke... and I still want to host my great bot.. but all I have is a chromebook now am I able to host on chromebooks

thick gull
#

i mean

spare mirage
#

no replit or heroku

pure lion
#

Can you get node on a Chromebook?

thick gull
#

you can boot linux

spare mirage
#

Fun fact

thick gull
#

on chrome os

pure lion
#

Yes boot Linux pweaseeee

earnest phoenix
#

?

spare mirage
#

its a school chromebook

#

I cant

thick gull
#

don't host shit on school property

#

it's most likely illegal

pure lion
#

Lmfao

spare mirage
#

no its mine

thick gull
spare mirage
#

but its managed by the school

#

:3

thick gull
#

@native osprey

pure lion
#

@earnest phoenix use a try-catch statement

thick gull
#

i suggest using that

#

you've had similar issues before that could be easily fixed by following a beginners guide

spare mirage
thick gull
#

the guide tells you

#

all of it

spare mirage
#

but first learn js

thick gull
#

yes

spare mirage
#

:3

thick gull
#

it tells you to learn js

spare mirage
thick gull
#

with a bunch of links

spare mirage
#

^

#

w3schools helped me alot

earnest phoenix
#

@earnest phoenix use a try-catch statement
@pure lion How should it be? xD

thick gull
#

try {} catch {} ?

#

forgot how those work

earnest phoenix
#

XDDDD

#

x2

misty sigil
#

try{}catch(err){err //the error object}

thick gull
#

pog I was almost right

sudden geyser
earnest phoenix
#

nice

thick gull
#

i prefer mdn

#

:) over w3schools

spare mirage
#

lol

#

Wait. If I use repl.it or heroku will it be able to handle 1 server

misty sigil
#

yea

fast loom
#

@spare mirage Heroku can keep your bot running on a server but has some drawbacks

spare mirage
#

like?

#

what would be a member cap

fast loom
#

first is that the free hours are limited

thick gull
#

nvm

native osprey
#

Thx

thick gull
#

thought you were talking about free hosting

#

for one server yeah

fast loom
#

and also the bot goes to sleep every 30min when unused

thick gull
#

should be fine

spare mirage
#

and heroku?

#

I mean replit

fast loom
#

just register there and give it a try yourself. THen you'll see it firsthand

thick gull
#

i wouldn't reccomend it either way though

fast loom
#

I haven't used replit so i can't say anything

thick gull
#

but its usable for one server

#

you need an uptimer for them

#

otherwise they will turn off

spare mirage
#

..

#

uhh

fast loom
#

currently I'm using my old laptop to host my bot 24/7 if needed

#

since it's broken af and is laggy af

#

so if you have that option too (to use something old as a host)

#

then that's your best option

#

otherwise you'll have to accept the limits the free-hosting services provide

spare mirage
#

..

#

I dont have anything

#

just this chromebook

fast loom
#

@spare mirage chromebook can install PyCharm, VS Code, etc... that is used to develop your bot, right?

#

if so - then you can use it to host your stuff.

spare mirage
#

With linux enabled

#

but

#

school is a piece of shit

fast loom
#

true. Welp, You'll find a way to make it work

spare mirage
#

will try

faint prism
#

just this chromebook
@spare mirage use an azure vps. Students get $100 of credit free

#

With that you should be able to host anything. Compile code. And for coding, online editors would be fine

ionic dawn
#

Bots can use animated stickers right?

cinder patio
#

yes, if by stickers you mean emojis

ionic dawn
#

yeah emojis

granite echo
#
const Discord = require("discord.js");
module.exports = {
    name: 'vote',
    category:'Misc',
    async execute(message, args, client) {
        const messageEmbed = new Discord.MessageEmbed()
            .setDescription['vote for debbie'](["https://space-bot-list.xyz/bots/746228910743879782/vote", "https://mythicalbots.xyz/bot/746228910743879782?q=UPV"])
            .setColor('RANDOM')
            .setTimestamp()
        message.channel.send(messageEmbed);
    }
}

what am i not doing right?, or has this completely changed

#
TypeError: (intermediate value).setDescription.vote for debbie is not a function
    at eval (eval at <anonymous> (/home/container/commands/eval.js:23:57), <anonymous>:3:47)
    at /home/container/commands/eval.js:23:57
    at new Promise (<anonymous>)
    at Object.execute (/home/container/commands/eval.js:23:24)
    at processMessage (/home/container/lemonbot.js:77:52)
    at Client.<anonymous> (/home/container/lemonbot.js:56:11)
    at Client.emit (events.js:315:20)
    at MessageCreateAction.handle (/home/container/node_modules/discord.js/src/client/actions/MessageCreate.js:31:14)
    at Object.module.exports [as MESSAGE_CREATE] (/home/container/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
    at WebSocketManager.handlePacket (/home/container/node_modules/discord.js/src/client/websocket/WebSocketManager.js:386:31)
cinder patio
#

setDescription is a function. You are tying to get a vote for debbie property from it and call it.

#

Instead, you should call the setDescription function and pass vote for debbie as the first parameter

#

and the link as the second (and only the link - don't put it in an array)

granite echo
#

has that changed tho?, cuz thats how i remember it

thick gull
#

your desc is wrong

cinder patio
#

Nope. Your code doesn't make much sense.

granite echo
#

ok

thick gull
#

.setDescription('put your stuff in here')

granite echo
#

not what i want

thick gull
#

that's what you're doing

#

but without the ('')

cinder patio
#

They want it to be a link

granite echo
#

yes but not what i want it to look like

thick gull
#

yes

#

you can put markdown links

#

in descriptions

granite echo
#

yes but im trying to do 2 links

#

so

thick gull
#

then put two?

#

Vote 1
Vote 2?

granite echo
#

i have, but woldn;t that mess with

.setDescription('example')
@thick gull

rancid bramble
#

Warns command isn't working can anyone help me out a bit?

thick gull
#

i don't think you can put two links in one spot

#

just like

#

Vote 1 > vote 1 link
Vote 2 > vote 2 link

granite echo
#

i thought it was like how u do ids in a json

rancid bramble
#

const db = require("quick.db");

module.exports = {
  name: "warns",
  aliases: ["warnings"],
  description: "check user warns",
  async run (client, message, args) {
        const user = message.mentions.users.first() || message.guild.members.cache.get(args[0]) || message.author;
       
    let warnings = db.get(`warnings_${message.guild.id}_${user.id}`);
    
   
    message.channel.send(`**${user.username}** has **${warnings}** warning(s)`);

                        
  }
}```
Shows warns as null even tho user has been warned before
granite echo
#

or add multiple things

thick gull
#

you can link your own website and put a list?

granite echo
#

im confused now cuz that above was posted

thick gull
#

@rancid bramble show the warn

rancid bramble
#

const db = require('quick.db');

module.exports = {
  name: "warn",
  description: "warn a member",
  
  async run (client, message, args) {
    if(!message.member.hasPermission("MANAGE_MESSAGES")){
      return message.channel.send("You don't have the permission required to perform this command | Permission Required : Manage Messages")
    }
    const user = message.mentions.users.first() || message.guild.members.cache.get(args[0]);
    if(!user) {return message.channel.send("Please mention a user to warn")
              }
    if(user.bot) { return message.channel.send("You can't warn bots")}
    if(message.author.id === user.id) { return message.channel.send("You can't warn yourself")}
    if(user.id === message.guild.owner.id) { return message.channel.send("You can't warn the server owner jeez")}
    let reason = args.slice(1).join(" ");
    if(!reason) reason = "Unspecified"
    let warnings = db.get(`warnings_${message.guild.id}_${user.id}`);
    if(warnings = null) {
       await db.set(`warnings_${message.guild.id}_${user.id}`, 1)}
      message.channel.send(`${user.username} has been warned.`)
      user.send(`You were warned in ${message.guild.name} for the following reason: **${reason}**`)    
          
  }
}```
granite echo
thick gull
#

well, i can't see anything wrong off the bat, but db.add('warnings', 1) should probably be there

granite echo
#

^

#

wait

#

nvm

near veldt
#

turns out im just a dumbass

#

my token didnt get leaked

#

my database got leaked

#

from an old github i had

#

and they created separate bots which connected to that database and recked havoc

#

or something like that

#

idrk the hell they did

urban olive
#

anyone here with nitro wish to contribute something to society kong bot?

thick gull
#

what?

crystal mountain
#

is it possible to save login session ? to avoid message delay (during logging and redirecting to new page etc)

woven sundial
#

Heya !
I'm trying do give some permissions to a rôle in a channel and I tried with

message.channel.overwritePermissions('748231391614861433', {VIEW_CHANNEL: true, SEND_MESSAGES: true, READ_MESSAGE_HISTORY: true, ATTACH_FILES: true});
```but it returns me ```TypeError [INVALID_TYPE]: Supplied overwrites is not an Array or Collection of Permission Overwrites.```help please ![icero_pandasad](https://cdn.discordapp.com/emojis/717304060813770763.webp?size=128 "icero_pandasad")
earnest phoenix
#

wrap 2nd param object in []?

sudden geyser
#

overwritePermissions takes an array or collection of those objects.

#

You could use .updateOverwrite instead if you don't want to wrap it in an array.

woven sundial
#

like ? js message.channel.overwritePermissions('748231391614861433', [{VIEW_CHANNEL: true, SEND_MESSAGES: true, READ_MESSAGE_HISTORY: true, ATTACH_FILES: true}]);

earnest phoenix
#

try that

woven sundial
#

it didn't work

#

it returns the same error

earnest phoenix
#

i dunno then..maybe try lites idea

sudden geyser
#

It didn't work because the array of objects you passed couldn't be resolved to permissions. The example in the docs is a basic way of doing it: https://discord.js.org/#/docs/main/stable/class/GuildChannel?scrollTo=overwritePermissions

woven sundial
#

.updateOverwrite worked perfectly, thanks Lite !

drifting wedge
#

how can i make a command me only?

misty sigil
#

check for ID

drifting wedge
misty sigil
#

mine uses about 300gb a month

earnest phoenix
#

if num >= 300 && num <= 600

molten charm
#

Discord server / website etc. that share open source code (discord.js). Do you have any suggestions?

sudden geyser
#

how would u check if 2 numbers are inbetween 2 numbers? e.g 560 and 400 inbetween 300 and 600
@low orbit what xsfg5 said, but if you're using Python, you can also do something like 300 <= x <= 600

arctic cape
#

Is there a way to list the powers of a member ? Except checing for each and every one in loop ?

#

DISCORD. Js v12

sudden geyser
#

What do you mean by powers. The permissions?

arctic cape
#

Yea

fringe axle
#

How can I change the color in a console.log? (discord.js v12)

sudden geyser
#

You can iterate over every guild in the <Guild>.members.cache collection. Then on the member object you receive, use the .permissions property to get an instance of their permissions.

digital ibex
#

first and third param iirc

sudden geyser
#

There are many ways to check or see what permissions someone has, so the docs will probably do fine: https://discord.js.org/#/docs/main/stable/class/Permissions

arctic cape
#

I did that so does that return an array ?

#

Thnkx

opal plank
#

@fringe axle console log is vanilla js,unrealted to d.js

digital ibex
sudden geyser
#

I recommend the chalk library instead of hard-coding the color values.

valid frigate
opal plank
#

even vsc has some plugins to allow color changing on console

valid frigate
#

what tf is this

fringe axle
#

What's the color code there?

digital ibex
#

i forgot where i got the colours, i done it a while ago

cinder patio
fringe axle
#

i forgot where i got the colours, i done it a while ago
@digital ibex oh... okay

#

Thanks Google

unique patio
#

So if you guys help me make my bot, I can take creds after? K ty 😄

#

Teasing.

fringe axle
indigo flax
#

how do u check how many shards your bot has?

fringe axle
#

Do you sharded already?

indigo flax
#

yes

obtuse jolt
#

you added the bot in the past

#

Then kicked it

#

A few hours later

somber sky
#

how do i make admin commands

opal plank
#

wdym admin commands?

#

permission check or actual stuff that does adminitration?

somber sky
#

like ban kick warn

opal plank
#

you'd have to write the code for it

#

and use the methods you need

earnest phoenix
#
#

@somber sky read docs :))

somber sky
#

ok

somber sky
#

thx

earnest phoenix
#

nah

earnest phoenix
#

can we disabe the embed

#

pls

opal plank
#

you're the only one who didnt remove

#

¯_(ツ)_/¯

earnest phoenix
#

¯_(ツ)_/¯

opal plank
#

i removed mine lol

earnest phoenix
#

well that effect 2 me 2

opal plank
#

fyi if u didnt know

opal plank
#

ta-da

earnest phoenix
#

@opal plank u know how to set up Embed for website

opal plank
earnest phoenix
#

in discord

opal plank
#

like when you get the url it gives the embed?

earnest phoenix
#

yes

opal plank
#

fuck i did it a while ago but i dont remember

#

lemme dig in my repo 1sec

earnest phoenix
#

ok

#

smh

#

didnt get it

opal plank
#

imagine this justii

#

i think ace means that ^^

earnest phoenix
#

yes

opal plank
#

when you get the link of a website,it embeds the contents of it

earnest phoenix
#

the embed

#
opal plank
#

fuck this has been so long ago

earnest phoenix
#

smh

#

see my wbesite

#

it dont have

opal plank
#

im not finding it on my repo, this shit is too long

earnest phoenix
opal plank
#

im asking a friend,sec

earnest phoenix
#

hmm maybe this

#

will owkr

opal plank
#

im pretty sure you can do it via the website

earnest phoenix
#

uh no

opal plank
#

its a payload im pretty sure

earnest phoenix
#

that is for discord server

#

why the bot

#

._.

opal plank
#

aaah found it

#

its open Graph

earnest phoenix
#

where

opal plank
#

OGL

earnest phoenix
#

Graph???

opal plank
#

yes,its metadata

#

og

earnest phoenix
#

link ?

opal plank
#

dont have,its just open graph protocol

earnest phoenix
#

???

opal plank
#

take a look inside

#

its og

earnest phoenix
#

oh i seee

#

YEY

#

Finnaly

#

NOICE

#

Finnnaly

#

@opal plank it works

#

IT WORKS

opal plank
eternal osprey
#

hey guys

#

i've got a qeuestion

#

how do i actually send a link to google maps that is the same as the weather country.

#

so i have a commadn that does:

#

$po rain

#

or $po sunny

#

and it returns a list of countries with rainy weather. How can i add a google maps link of that country as an embed.

earnest phoenix
#

._.

#

google maps api

eternal osprey
#

hmm

earnest phoenix
rocky oak
#

my bad sorry

earnest phoenix
#

@earnest phoenix

if(parseInt(number1) === parseInt(number2))
{
  //TRUE
}else {
  //false
}
sonic lodge
#

does "similar" mean they should be within a certain range of each other?

earnest phoenix
#

yes

sonic lodge
#

subtract one number from another, take the absolute value of that, and see if the result is less than your specified range

earnest phoenix
#

hm alright

#

however the range should be specified depending on their elo.

sonic lodge
#

ok, then calculate what the range should be before you do the check

earnest phoenix
#

btw u can do

return match = (something)
sonic lodge
#

that's checking if the numbers are equal, not within a range of each other

earnest phoenix
#

wdym range

#

100 - 200 ?

sonic lodge
#

they want the difference between the two numbers to be less than a certian value

earnest phoenix
#

oh

sonic lodge
#

take the absolute value of the differences first

charred geyser
sonic lodge
#

Math.abs(eloA - eloB);

earnest phoenix
charred geyser
#

lol

earnest phoenix
#

i learned this url from @ Cry

sonic lodge
#

who made that video

earnest phoenix
#

idk

charred geyser
#

very cool

sonic lodge
#

looks like bill wurtz esque

charred geyser
#

yeah

indigo flax
charred geyser
#

no

earnest phoenix
charred geyser
#

nobody

earnest phoenix
#

@indigo flax ask shivaco

#

he is good py dev

indigo flax
#

@slender thistle hey.

earnest phoenix
#

bruh

#

dont ping him

indigo flax
#

so for some reason

charred geyser
#

pog

indigo flax
#

This doesn't work.

earnest phoenix
#

GOOGLe

indigo flax
#

it gives a syntax error

earnest phoenix
#

read console

#

read that line

charred geyser
#

name="Nitro Generator"

indigo flax
#

i tried google

charred geyser
#

bruh

earnest phoenix
#

think about it

indigo flax
#

it doesnt work

earnest phoenix
#

Think

#

and read

#

and read

#

and understand

indigo flax
#

like

earnest phoenix
#

and oneday u will fix it

indigo flax
#

await client.change_presence(status=discord.Status.online,activity=discord.Streaming(name="A Bot", url=https://youtube.com))

earnest phoenix
#

._.

#

url = ""

#

maybe

charred geyser
#

kekw

earnest phoenix
#

url is string

indigo flax
#

yea ik

charred geyser
#

yea

earnest phoenix
#

await client.change_presence(status=discord.Status.online,activity=discord.Streaming(name="A Bot", url="https://youtube.com/"))

indigo flax
#

that works?

pulsar forge
#

How do i make a bigger button

earnest phoenix
#

SO MAKE IT TO STRING

pulsar forge
eternal osprey
#

noob

earnest phoenix
#

@indigo flax yes maybe

eternal osprey
#

make it bigger lmao

#

show code

charred geyser
#

^^

indigo flax
#

@pulsar forge style css html etc

eternal osprey
#

we can't do anything with an image only.

charred geyser
#

^^

earnest phoenix
#

@pulsar forge

button{
width: 4000px;
height: 10000px;
}
slender thistle
#

A streaming status must be a valid Twitch URL iirc

earnest phoenix
#

:))

#

or just

indigo flax
#

no

pulsar forge
#

@earnest phoenix and were do I put the link

indigo flax
#

someone did a yt link

charred geyser
#
button{
width: 4000000000000000px;
height: 1000111111119242304320px;
}
#

do that pog button

earnest phoenix
#
<button width="100px" height="400px">click me<button>
#

@pulsar forge ^^

pulsar forge
#

Link?

indigo flax
#

.

charred geyser
#

he didn't even say what lang

earnest phoenix
#

what link

#

wtf

#

wdym link

indigo flax
#

@pulsar forge u should know html to know how to make a button go to a link

charred geyser
#

just normal link tags lmao

earnest phoenix
#

oh

#
<a href="link"><button></button></a>
charred geyser
earnest phoenix
#

@pulsar forge ^^ maybe

indigo flax
#

ive only been learning html for like 5 months

pulsar forge
#

Im learning that y

blazing ravine
#

sup

#

i need help with flags

earnest phoenix
#

huh

blazing ravine
earnest phoenix
#

flag?

#

wdym ?

#

wtf

earnest phoenix
#

show code

blazing ravine
earnest phoenix
#

@indigo flax huh ?

blazing ravine
#

any1 helpp me pls

misty sigil
#

whats wrong?

#

any1 helpp me pls is no fucking information

earnest phoenix
#

@blazing ravine btw u can do

member.flags.toArray().forEach(flag => {
  flag = flag.split("_").join(" ");
  return flag.toLowerCase();
}) 
blazing ravine
#

oh thanks

earnest phoenix
#

burh

#

that wasnt the solve

misty sigil
#

spoonfeed ™️

earnest phoenix
#

@misty sigil good right :))

blazing ravine
#

i dont need to use const userflags ?

earnest phoenix
#

the code

#

@blazing ravine yes

blazing ravine
#

lets try

charred geyser
#

yes, lets

blazing ravine
#

;d

charred geyser
#

pog

earnest phoenix
#

:))

blazing ravine
earnest phoenix
#

wtf are u doing

blazing ravine
#

xddd

#

u asg u dont need use userflags

#

xd

earnest phoenix
#
return flag.toLowerCase()
#

just do only that

#

oh no

#

wait

#
let flag_result = [];
member.flags.toArray().forEach(flag => {
  flag = flag.split("_").join(" ");
  return flag_result.push(flag.toLowerCase());
}) 
if(flag_result.length == 0) flag_result == "None";
#

@blazing ravine ^^^

blazing ravine
#

oki

#

now right

earnest phoenix
#

nah

blazing ravine
#

;0

earnest phoenix
#
.addField("Flags", flag_result.join(", "), true)
#

Is this for every bot

#

@earnest phoenix wdym ?

blazing ravine
#

the flaghe mean maybe

earnest phoenix
#

yes u can simple copy paste

#

it is for every bot

#

but not PY

blazing ravine
#

discord.js only

earnest phoenix
#

only for JS

blazing ravine
#

"lets try" ;ddd ashibaswim

earnest phoenix
#

Every bot in discord

#

bye imma sleep, if u have problem ping @ Dice he loves ping

blazing ravine
restive shell
#

what are you trying to do ?

blazing ravine
#

flags

earnest phoenix
#

@blazing ravine wait what

#

is it message.member

#

?

blazing ravine
#

msg.member

earnest phoenix
#

yes

blazing ravine
#

message => msg

earnest phoenix
#

nvm bye

blazing ravine
#

xd

restive shell
#

i don't get it lmao

blazing ravine
#

f!userinfo

#

who can help me

restive shell
#

give me 1 sec

blazing ravine
#

ok

restive shell
#

@blazing ravine

blazing ravine
#

yes

restive shell
#

something like that ?

blazing ravine
#

yes

cinder fossil
#

i need help with my bot

restive shell
#

it's the same

blazing ravine
#

ye

restive shell
#

you don't have to edit anything

#

so ?

blazing ravine
#

but not work in me

misty sigil
restive shell
#

it's not working for you ?

#

how ? show me the err

blazing ravine
#

not showing flags

#

no error

misty sigil
#

lets see your code

cinder fossil
#

huh

restive shell
#

can you show me the code ?

blazing ravine
misty sigil
#

are you trying to get from a member or user

blazing ravine
#

1min

cinder fossil
#

i still need help

misty sigil
#

@cinder fossil what do you need help with

#

😩

restive shell
cinder fossil
#

my bot

blazing ravine
misty sigil
#

ARGH

blazing ravine
misty sigil
#

WHAT DO YOU NEED WITH YOUR BOT

blazing ravine
cinder fossil
#

1 sec

misty sigil
#

@blazing ravine try member.user.flags

restive shell
#

what is this

blazing ravine
#

ohhh

#

how i forgot

restive shell
#
.addField('**Flag:**', flag_result.join(", "), true)
blazing ravine
#

1min

restive shell
#

that's all you need

#
user.flags.toArray().forEach(flag => {
#

it should work

cinder fossil
#

@misty sigil i need to get it online and also to make commands

blazing ravine
#

1min

restive shell
#

@cinder fossil bud

misty sigil
#

@cinder fossil do you know a programming language

cinder fossil
#

no.

slender thistle
#

-faq 3 13

gilded plankBOT
restive shell
#

this should help @cinder fossil a_pp_fluttercry

blazing ravine
#

member.user.flash worked

restive shell
#

yes ofc

#

@blazing ravine replace it with icons

cinder fossil
#

im dum i cant do anything

blazing ravine
#

i m trying now ;d

restive shell
#

@cinder fossil just read the guides

cinder fossil
#

ok

blazing ravine
#

where i can find the icons

low shard
#

userflags working only in v12

blazing ravine
#

;d

low shard
#

ye?

blazing ravine
#

maybe

restive shell
#

where i can find the icons
just google ..

blazing ravine
#

xd

restive shell
#

use google a_pp_girlsmile

cinder fossil
#

i-

blazing ravine
#

i cant

cinder fossil
#

i see a lot of hacking and coding so idk how

blazing ravine
#

showing country ;d

restive shell
cinder fossil
#

i quit making a bot

#

this is to confusing

blazing ravine
#

its soo funny

cinder fossil
#

how-

misty sigil
#

lmao

cinder fossil
#

omg

misty sigil
#

you need to know a programming language

#

you cant just jump right in

#

its like jumping into the deep end at 1 year old ffs

cinder fossil
#

cause idk where to start

misty sigil
#

use mdn and w3schools

#

learn base js

#

then move to nodejs

cinder fossil
#

i have to-

#

making a bot is this hard

#

im already in school school on top of that is harder

misty sigil
#

yes its this hard

#

its like

#

jumping into the deep end at 1 year old

#

writing a russian essay without knowing russian

cinder fossil
#

i hate my life😩

restive shell
#

it's not hard ><

misty sigil
#

eating cake without teeth

restive shell
#

you can do it

#

just learn the basics first

misty sigil
#

you need to learn the basics of js

cinder fossil
#

huh

misty sigil
#

not js

restive shell
#

yes then you can just read the documentation

misty sigil
#

just the language you wanna write in

cinder fossil
#

i guess this is my goodbye

misty sigil
#

bye

restive shell
cinder fossil
#

im gonna probaly do this for like 4 years anyways

restive shell
#

good luck

earnest phoenix
#

anyone know how to make a basic system like this to queue 2 people with each other that has a similar amount of points?

drifting wedge
#

how do i check what badges a user has?

restive shell
#

how do i check what badges a user has?
you can do that with flags

#

@blazing ravine idk let me check

thick gull
#

he’s using py

blazing ravine
#

ops

#

deleted soryr

faint prism
#

anyone know how to make a basic system like this to queue 2 people with each other that has a similar amount of points?
@earnest phoenix search for players within a point range, if none are found, expand range

opaque seal
#

Can I use github to update my bot files and download them in the VPS everytime?

slender thistle
#

@earnest phoenix Heya, remember my issue with HttpClient NullReferenceException crap?

#

Seems that it's the client itself that's causing the error for some reason

#

~~```cs
var client = new HttpClient();
client
.DefaultRequestHeaders
.Add("Authorization",
$"{credentials.TokenType} {credentials.AccessToken}");

ASP.NET is complaining about the line with only `client`~~

Disregard this, the issue was with my custom object
opaque seal
#

first of all, why are you using var

#

wait

#

Is that js?

slender thistle
#

Long story short, I can

#

C#

opaque seal
#

ah

#

ok

slender thistle
#

:^)

faint prism
#

Can I use github to update my bot files and download them in the VPS everytime?
@opaque seal you're describing a CICD pipeline

opaque seal
#

?

#

idk what that is

faint prism
#

Continuous integration, and continuous development

opaque seal
#

I just wanna pull it everytime for github

#

idk if it's the right approach

faint prism
#

Just Google GitHub Actions

restive shell
#

@blazing ravine u know you don't have to do

const flags = {
};
blazing ravine
#

hm

restive shell
#

you don't need that

blazing ravine
#

but nitro flag is possible

#

but xd

restive shell
#

noo lmao

blazing ravine
#

in footer ?

restive shell
#

just make it emoji

opaque seal
#

you need to set it as an image in the embed

blazing ravine
#

hmm

opaque seal
#

just make it emoji
or that

restive shell
#

just make a new server for emojis

#
  • you can do something like this
opaque seal
#

you need to set it as an image in the embed
you can't use it anywhere you want in the embed, just in the image field or thumbnail

#

so an emoji would be much better

restive shell
opaque seal
#

And to use it in the embed you need the emoji "code"

#

like

restive shell
#

for me, I store all the emojis in a json file

opaque seal
#

uhm

#

weird

blazing ravine
#

hmm

opaque seal
#

that doesn't seem good practice tbh

#

just modify your const status {} object

#

putting emoji codes in it

restive shell
#

something like this

blazing ravine
restive shell
#

@blazing ravine but yes anyways, you can check if the user is boosting any server

blazing ravine
#

can u give me the flags

opaque seal
#

Do you access it everytime you need them or just when the bot starts up @restive shell

blazing ravine
#

for the nitro

restive shell
#

@blazing ravine make sure the bot has access to the emoji

blazing ravine
#

idk how xd

#

trying but

opaque seal
#

these are all the flags

#

and there isn't nitro there

restive shell
#

@blazing ravine the bot has to be in the server

blazing ravine
#

oh

opaque seal
restive shell
#

Yes that's perfect

#

There is no flag for boosters

opaque seal
#

yeah unfortunately

earnest phoenix
#

@earnest phoenix search for players within a point range, if none are found, expand range
@faint prism yh but i dont know how to work out the range from both users current elo

faint prism
#

So imagine someone has 30 points, initially you would search for other players in the matchmaking queue within, say, 5 points (25-35). if there are zero available, increase the threshold by five more (20-40). And so on and so on until some max number

#

@earnest phoenix

earnest phoenix
#

they start at 250 elo and the matchmaking queue will stay within 100 elo so should i do like player1elo yeha idk

#

idk what the calculation would be for the if statement to check if they should be matched together

faint prism
#

You mean if there are multiple results for matchmaking players within a range?

earnest phoenix
#

nah

faint prism
#

idk what the calculation would be for the if statement to check if they should be matched together
@earnest phoenix you would just match them with the one that has the least difference between the player that's searching

earnest phoenix
#

what would the equation look like tho

#
if(player1elo <= player1elo - 100 && player1elo >= player1elo + 100 && player2elo <= player2elo - 100 && player2elo >= player2elo + 100) return match = true;``` @faint prism would this work ?
thin turret
#

That logic

faint prism
#

would this work ?
@earnest phoenix Eh not really what I had in mind

ocean drift
#

would it be possible to have a discord bot that could tell if there is a staff member in a csgo server

#

so like staff will have roles, and if someone has that role in any of the seervers it'l tell you

#

so moderators can quickly see which servers dont have any moderation atm

opaque seal
#

Idk, does csgo have public APIs? Don't think so tho

ocean drift
#

youre gonna need to use english

faint prism
#

You'd need a lib that implements whatever the server browser does. Or the API for the server listings

#

But idk if you can actually find users

#

Without joining tbh

ocean drift
#

it doesnt seem that hard. ive seen loads of bots that advertise server playerlists

#

it would just need to label some as staff

opaque seal
#

it doesnt seem that hard. ive seen loads of bots that advertise server playerlists
then it's possible

faint prism
#

Oh maybe a public API

ocean drift
#

would it be a good first discord bot project?

opaque seal
#

yeah I mean you would learn a lot probably

#

but it wont be easy for your first bot

#

I suggest discord.js to start too

faint prism
#

Sounds unique and a bit difficult

opaque seal
#

Sounds unique and a bit difficult
yeah not too easy

#

but doable

#

if you have programming background obv

earnest phoenix
#

java best language

#

stfu

#

it is good

faint prism
#

I really don't like Java

earnest phoenix
#

was

#

it was good

#

what do u code in

faint prism
#

C#

earnest phoenix
#

how is it not good now

#

c# is the same as java

#

but java is better

faint prism
#

Because c# exists

earnest phoenix
#

ewww

#

c# was made to improve java

ocean drift
#

"The bot would have to hook into our player list and run a query for any player with staff perms and run that query every so often and then post an update like how are #📶welcome-servers is basically"

#

thats what a smart person said

earnest phoenix
#

c# was made to improve java
@earnest phoenix but they failed

faint prism
#

Anyone still using Java is probably drowning in technical debt

earnest phoenix
#

they didn't...?

faint prism
#

No they didn't

earnest phoenix
#

yes they did

ocean drift
#

so the bot would be possible

faint prism
#

My entire company is currently transitioning from Java to c#

earnest phoenix
#

i can name more caveats in java than i can in c#

#

broo can u compile a c# program for every platform with the same file

#

yes

faint prism
#

Yes

earnest phoenix
#

how

#

yes you can

#

explain

#

net core

faint prism
#

Dotnet core

earnest phoenix
#

no I mean if I compile the file on windows that works on windows, could I share it with mac

#

or linux

#

yes

faint prism
#

Also it's performance is about to rival C++

earnest phoenix
#

how

#

explain

#

net core

#

what extension does it compile to

#

net core can publish apps as framework dependent and self contained

faint prism
#

.exe or .dll

earnest phoenix
#

does that work on linux without wine?

thick gull
#

inb4

how

earnest phoenix
#

yes

faint prism
#

Both runable with dotnet

#

Yeah

earnest phoenix
#

no exe no work on linux

#

😦

#

chmod +x

#

boom

#

it's now an exe

faint prism
#

Since it matches the runtime for the OS

earnest phoenix
#

visual studio bad

faint prism
#

I literally run my C# bot on Linux ubuntu server

earnest phoenix
#

that is true

#

but there are other IDEs lol

faint prism
#

It's eh, I won't argue with that lol

earnest phoenix
#

can I code c# in intellij

#

i use rider

#

intellij best ide

opaque seal
#

intellij best ide
^

faint prism
#

Never used it

earnest phoenix
#

rider is made by jetbrains, next

#

rider is cool

#

It better be as cool as intellij

faint prism
#

I'll use anything with autocomplete for an objects properties and functions tbh

earnest phoenix
#

I wont use it cus java better

#

3 edits?!?!?!

#

2

#

2*

faint prism
#

On mobile

earnest phoenix
#

how do u edit so fast

faint prism
#

I use c# mmLol

earnest phoenix
#

lol

#

auger do u have any other ideas for my bot

#

Idk what to ad

#

dd

#

🙂

faint prism
#

Yeah

#

And it'd be easy to implement too

earnest phoenix
#

give me pls

faint prism
#

Nah

earnest phoenix
#

😦

#

why not

opaque seal
#

rider is made by jetbrains, next
anything made by jetbrains is noice

earnest phoenix
#

with .net 6 adding two way java interop i doubt there will be much use left over for java lol

faint prism
#

why not
@earnest phoenix Because you won't get with the times and adopt C#

earnest phoenix
#

ookkk I downloaded rider

#

can u tell me now

faint prism
#

Rider != C#? what

earnest phoenix
#

idk

#

lol

#

ive coded c# and java before, just more java

#

now tell me

#

microsoft plans to rework their GUI libs too, cross platform c# gui apps, just swooping the market from java

#

I forgot c# was owned by microsoft

faint prism
#

microsoft plans to rework their GUI libs too, cross platform c# gui apps, just swooping the market from java
@earnest phoenix God thank god. I hated wpf

earnest phoenix
#

keep in mind, the entirety of net core is open source too

#

java is open source

#

I think

faint prism
#

since November 13, 2006, yeah

earnest phoenix
#

java is thebest language

sonic lodge
#

debatable

faint prism
#

Oh well, you're allowed to have a wrong opinion

earnest phoenix
#

no its facts

#

smh

faint prism
#

Sounds like opinions

earnest phoenix
#

no

faint prism
#

Unless you provide proof

sonic lodge
#

any superlative is an opinion

earnest phoenix
#

ummm

faint prism
#

java is cooler
@earnest phoenix define "cooler"

sonic lodge
#

it's a programming language not a cooler what

earnest phoenix
#

its easy for retards like me

faint prism
#

Well you got me there

earnest phoenix
#

yes

#

discord jda is best library

faint prism
sonic lodge
#

honestly js is probably easier for "retards"

earnest phoenix
#

yes but javascript is bad

#

ive never actually used javascript

#

but I think its bad

#

easy to start with and it's a togo if you need to write an app that "just works"

#

if you want performance throw interpreted languages down the bin

#

have you seen the latest in #starboard ?
@faint prism yes that was my whole motivation in saying java is best

faint prism
#

Do you even know java?

earnest phoenix
#

yes

#

its the best

sonic lodge
#

Debatable™️

earnest phoenix
#

no

faint prism
#

Write the main method right now

earnest phoenix
#

public static void main(String[] args) {

}

faint prism
#

You pass

earnest phoenix
#

lol

sudden geyser
#

3 billion devices

faint prism
#

For decades

earnest phoenix
#

yes thats why java is the best 3 billion devices

sudden geyser
#

always has been

earnest phoenix
#

no they just dont update it

sonic lodge
#

lol someone make the meme

earnest phoenix
#

its prob 6 billion

faint prism
#

no they just dont update it
@earnest phoenix it's open source

earnest phoenix
#

lol someone make the meme
@sonic lodge no dont

#

pls

#

@earnest phoenix it's open source
@faint prism no I meant that they dont update the numbers

faint prism
earnest phoenix
#

no adware

#

thats fake

faint prism
#

Explain that to my grandma

earnest phoenix
#

your grandma downloaded some sketchy version of java

faint prism
#

Yeah, the official version

earnest phoenix
#

ive never got adware from downloading java

sonic lodge
#

nah that actually happens

earnest phoenix
#

how have I never seen it

#

what

faint prism
#

I don't know, when's the last time you updated Java

earnest phoenix
#

2 weeks ago

faint prism
#

And the time before that?

earnest phoenix
#

around 1 week before that

#

maybe its cus I download the jdk version

#

not the jre

faint prism
#

Sounds like they're trying to patch a lot of 0-days

earnest phoenix
#

no its just from me resetting pc

faint prism
#

Because you're one of the 3 billion?

earnest phoenix
#

yes

#

java best language

faint prism
#

I see we've come full circle

earnest phoenix
#

yes we have

#

im so bored rn. ima learn c# again

faint prism
#

Lmao alright

earnest phoenix
#

lol

drifting wedge
#

in python

earnest phoenix
#

ill learn it in python

#

yes

drifting wedge
#

how can i do: if {var} has this word do this?

faint prism
#

f

earnest phoenix
#

huh u mean

if var:

faint prism
#

I think he's talking about string interpolation

earnest phoenix
#

and then u like tab

drifting wedge
#

if var has {keyword)

earnest phoenix
#

oh idk python

#

thats the only thing I know

faint prism
#

iirc f"my {var}"

earnest phoenix
#
if var.contains("keyword"):
drifting wedge
#

my var is like 1, 2, 3, 4

#

for example

faint prism
#

for loop

earnest phoenix
#

for loops are cool

drifting wedge
#

so how can i do if var has 3 do this?

cerulean salmon
#

how can i get 2nd last message in a channel ?

earnest phoenix
#

thats against tos

faint prism
#

how can i get 2nd last message in a channel ?
@cerulean salmon [length-1]

earnest phoenix
#

oh u mean that

#

lol

#

im retarded

#

how to code in c#

faint prism
#

literally just write java

earnest phoenix
#

ohhhhhh

#

yes

faint prism
#

that'll get you started

earnest phoenix
#

so c# < java

#

but theyre similar

faint prism
#

sure, whatever

earnest phoenix
#

ok

opal plank
earnest phoenix
#

does jetbrains rider have free version

opal plank
#

Wtf is this with java and sharp

sudden geyser
#

No, but there's the student pack

earnest phoenix
#

java is better then c#

#

im not paying for a ide

#

tf

faint prism
#

than*

earnest phoenix
#

@faint prism 😦

cerulean salmon
#

[length-1]
@faint prism that will give me last message

sudden geyser
#

the student pack gets you that paid stuff for free

faint prism
#

@faint prism that will give me last message
@cerulean salmon then [length-2]

earnest phoenix
#

how do I get stupid pack

#

student

opal plank
#

No?

#

Lenght is the last

cerulean salmon
#

i mean which method i can use @faint prism

opal plank
#

Lenght - 1 is second last

sudden geyser
faint prism
#

length is out of an index's range

#

@cerulean salmon was right

opal plank
#

Index 0 though

faint prism
#

right

opal plank
#

Depends on lang

faint prism
#

so, the last element is length-1

cerulean salmon
#

let p = message.channel.messages.cache.array();
console.log(p[p.length-2]);

#

didn't work

faint prism
#

Depends on lang
@opal plank are you talking about lua? lol

earnest phoenix
#

bro I can get 1 free domain name?!?!?!

opal plank
#

Maybe lol

faint prism
#

bro I can get 1 free domain name?!?!?!
@earnest phoenix .tk is free

opal plank
earnest phoenix
#

.tk is garbage

#

cus some dns server dont know what it is

#

idk

faint prism
#

then .ml

earnest phoenix
#

like I cant connect to .tk if im not on vpn

opal plank
#

Bruh, one dollar

faint prism
#

Sounds like your ISP sucks

opal plank
#

Xyz domains

#

Literally one dollar

earnest phoenix
#

where

#

tell me

#

link me pls

faint prism
opal plank
#

Holdup

earnest phoenix
#

@faint prism thats 1.37

#

too much

faint prism
earnest phoenix
#

I bought domain from porkbun before

#

theyre pretty cool

#

they have cheap xyz

#

I dont even want a domain

#

lol

faint prism
opal plank
#

Fuck that cant search 5 days ago on mobile

earnest phoenix
#

wait do people actually pay for ides?

#

I wanna know

opal plank
#

But there are some cheapdomains for a dollar

earnest phoenix
#

who tf is buying ides

faint prism
#

vim premium

earnest phoenix
#

@faint prism what ide do u use

faint prism
#

VS and VSC

earnest phoenix
#

eww vs

#

I think its my only option though

faint prism
#

I'm a dotnet fanboy 🤷‍♂️

earnest phoenix
#

oh rly????

#

I didnt know that

#

!?!?!?!?

faint prism
#

now you know

earnest phoenix
#

thx for the info

#

where is vs 2020

#

there is only 2019

faint prism
#

2020 isn't over yet

earnest phoenix
#

do they release at the end of the year?

faint prism
#

Only if there is a major overhaul

earnest phoenix
#

oh

#

auger, btw do u know how long it takes for you bot to be verified

faint prism
#

+4wks

#

took me 5

earnest phoenix
#

ok

dire obsidian
#

Well, anyone know how remove the default key shortcuts on electron?

earnest phoenix
#

hi asterki

dire obsidian
#

UwU hi

earnest phoenix
#

ewww electroj

#

electronh

#

electron

#

ok ill stop now

#

bye

#

what do you want to do

#

just disable all shortcuts or

dire obsidian
#

Keyboard shortcut

#

Remove, like, the f11 one

#

To get in fullscreen

earnest phoenix
#

I actually forgot that I coded a discord bot in c# before

#

I just realized