#development

1 messages · Page 1412 of 1

pure lion
#

can we all just i32

#

for a minute

hollow sedge
#

wth is i32

pure lion
#

thanks

earnest phoenix
#

Rust moment

pure lion
#

32 bit int

#

yes rust is very pog

#

saxy

#

mmm rust

earnest phoenix
#

Rust is the future

#

Rust's syntax isn't tho

hollow sedge
#

i guess you could say

#

im kinda rusty

stone cradle
#

im using python for my bot ;-;

pure lion
#

rust is rusty

#

also i love the syntax ty voltrex

#

it just has a tf2 learning curve

stone cradle
#

negative indexing is unfunny

earnest phoenix
#

Negative indexing

#

Did you mean

pure lion
#

mfw [-1]

earnest phoenix
#

Certified bruh moment

stone cradle
#

i meanarray[-1]

pure lion
#

pogchamp

earnest phoenix
#

I know lol

pure lion
#

off to make rust botum

stone cradle
#

i was making minesweeper when i first learned about it

hollow sedge
#

i mean negative indexing is the same thing as just using the length of the array

stone cradle
#

yes but i can't not use it

earnest phoenix
#

Array prototype indexes sometimes hurt my brain

pure lion
#

the first time i used [-1] i nyaaaa~d

stone cradle
#
def generategrid(length: int, width: int, mines: int):
    bombs = generatebombs(length,width,mines)
    x = [ (i + 1) for i in range(width)  ]
    y = [ (i + 1) for i in range(length) ]
    grid = [ [ 0 for i in range(length) ] for i in range(width) ]
    for i in x:
        for j in y:
            if [i,j] in bombs:
                grid[i - 1][j - 1] = "B"
    for bomb in bombs:
        try: grid[bomb[0] - 2][bomb[1] - 2] += 1 if bomb[0] - 2 > -1 and bomb[1] - 2 > -1 else 0
        except: pass
        try: grid[bomb[0] - 0][bomb[1] - 2] += 1 if bomb[0] - 1 > -1 and bomb[1] - 2 > -1 else 0
        except: pass
        try: grid[bomb[0] - 2][bomb[1] - 0] += 1 if bomb[0] - 2 > -1 and bomb[1] - 0 > -1 else 0
        except: pass
        try: grid[bomb[0] - 0][bomb[1] - 0] += 1 if bomb[0] - 0 > -1 and bomb[1] - 0 > -1 else 0
        except: pass
        try: grid[bomb[0] - 1][bomb[1] - 0] += 1 if bomb[0] - 1 > -1 and bomb[1] - 0 > -1 else 0
        except: pass
        try: grid[bomb[0] - 0][bomb[1] - 1] += 1 if bomb[0] - 0 > -1 and bomb[1] - 1 > -1 else 0
        except: pass
        try: grid[bomb[0] - 2][bomb[1] - 1] += 1 if bomb[0] - 2 > -1 and bomb[1] - 1 > -1 else 0
        except: pass
        try: grid[bomb[0] - 1][bomb[1] - 2] += 1 if bomb[0] - 1 > -1 and bomb[1] - 2 > -1 else 0
        except: pass
    gridstr = ""
    for i in grid:
        for j in i:
            gridstr += f"{j}"
        gridstr += "\n"
    return gridstr
pure lion
#

so anyway

earnest phoenix
#

Holy mother of god

pure lion
#

dont they have loops

#

in py

hollow sedge
#

omg

#

YES

#

also

#

why try except

#

do you not know what you're doing?

earnest phoenix
#

Bro you know what i just did

pure lion
#

i sharted on my keyboard

#

because py

#

without loops

#

would be ew

stone cradle
#

not only is that code ugly because it errored any time a bomb was next to another bomb requiring a separate try/except loop for each direction a bomb could exist

hollow sedge
#

people have websites for discord embeds cringe

pure lion
#

what does pass mean anyway

stone cradle
#

it means do nothing

hollow sedge
#

it's just for empty stuff

hollow sedge
#

so you dont get an error

#

like if you were defining a function but put nothing in it

pure lion
#

i always put the error thats going to happen with try except

#

smh

hollow sedge
#

it's connect 4

earnest phoenix
#

Imagine not using try catch

hollow sedge
#

there shouldn't be an error in the first place

stone cradle
#

thats for minesweeper

pure lion
#

i only use try except with the int function

#

because ValueError

#

no poggo

stone cradle
#

its the thing that made me first learn about negative indexing

#

by force

hollow sedge
#

why cant minecraft use negative indexing to create finite worlds that are seemingly infinite

stone cradle
#

because that'd be dumb

hollow sedge
#

I'm joking

earnest phoenix
#

because minecraft doesn't do anything properly

hollow sedge
#

Lol

pure lion
#

minecraft cant even spell minecraft sometimes

#

smh my smh

stone cradle
#

minceraft

earnest phoenix
#

it's such a shame that a game so fun and good gets drowned in bad performance because rookies worked on it, when they shouldn't have

hollow sedge
#

Lol

earnest phoenix
#

genuinely not kidding

hollow sedge
#

Why can't mojang use Unity

earnest phoenix
#

with the aquatic update they got interns

stone cradle
#

unity didn't exist in 2009 i dont think

hollow sedge
#

migrate ez

earnest phoenix
#

yes it did

hollow sedge
#

People have recreated minecraft in Unity so I'm sure a company with the resources of Mojang could do it

earnest phoenix
#

unity was one of the first stable game engines out there

stone cradle
#

notch felt like making it in java

earnest phoenix
#

where mojang went wrong is taking already bad code and building on top of it instead of refactoring it

hollow sedge
#

notch is a dummy

earnest phoenix
#

notch had no clue what he was doing lol

#

he was just playing with opengl until something worked

pale vessel
#

Oh yeah, saw those on his Twitter

hollow sedge
#

They don't even have to add that much every update, they just have to inherit from the classes that they already made

stone cradle
#

time to make a discord bot in unity

earnest phoenix
#

people have done it

#

they've done it not understanding what that actually means lol

#

they shared their bot token to anyone who has the game

hollow sedge
#

LOL

bronze bramble
#

Is anyone available to show me how I may organize my files containing cogs? in the hosting service; and then to actually host only the main file that will run the cogs;this is python, thanks in advance, you may dm or call me

hollow sedge
bronze bramble
#

@hollow sedge you're amazing, I have a slight experience and so I will read through them, If i may refer to you for questions, only tell me yay or nay

hollow sedge
#

Yay

pure lion
#

so I'm making a bot in rust using serenity, how would i send a message to a channel without using msg.reply?

pale vessel
#

read docd

#

s

pure lion
#

s

hollow sedge
#

i dont think many people use serenity so you'd be better off going to their discord or looking at the docs

pure lion
#

the docs are

#

uh

hollow sedge
#

make your own rust API then

#

omg

#

the docs are terrible

#

you could say that the docs don't even exist

#

wait

#

im looking in the wrong place

#

the docs are fine lol

pale vessel
#

lol

earnest phoenix
#

At the Plasma bot, how many days must he have the discord account in order not to be fake?

pure lion
#

the Who™️

earnest phoenix
#

idk

drifting wedge
#

how would i setup a 404 page with nginx?

pale vessel
pure lion
#

are you just using nginx or do you have a backend

#

yes flaze i know i read

drifting wedge
#

backend too

#

i have flask

pure lion
#

there's probably a way to listen for 404

#

in express there is

drifting wedge
#

there we go

#

thanks

pure lion
#

np

hollow sedge
#

flask is good but also has some weird practices

bronze bramble
#

@hollow sedge yup too advanced, I specifically need to know how I would organize in the hostiung directory

#

such as glitch

hollow sedge
#

create a cogs folder and make .py file for each section

#

and inherit from commands.Cogs like in the docs

pure lion
#

what is a cog anyway

hollow sedge
#

it's just a group of commands

pure lion
#

ah

safe creek
#

@hollow sedge

hollow sedge
#

i did

safe creek
#

ok

#

my bad

hollow sedge
#

lol no you're fine

bronze bramble
#

I would have to see an example of a directory

safe creek
#

no?

bronze bramble
#

or it will take me much longer to disseminate this information

hollow sedge
#

ok

#

yeah i understand

bronze bramble
#

I am below beginner

hollow sedge
#

then you shouldn't be making a discord bot

safe creek
#

im a begginner but im still doing well

#

got an somewhat advanced kick and ban system

#

an 8ball command, ping etc

#

its not that hard mostly

bronze bramble
#

I am not making it, it is already made, I simply helped develop it. Now I need to host it

safe creek
#

so host it

hollow sedge
#

then what is the problem?

#

to host it you just need to run a main py file

safe creek
#

yes

hollow sedge
#

in a VPS (or heroku but that isn't recommended)

bronze bramble
#

alright and where are the additional files stored

hollow sedge
#

? in your github repo?

#

or your local directory

safe creek
#

you need the file that has client/bot.run(token) to be ran

hollow sedge
#

yeah

umbral zealot
#

The file directory on a VPS is no different than the local one. The structure is the same. You just need to upload the files and figure out how to tell the host to run it. And how exactly that happens depends on the hosting service.

safe creek
#

and if it isnt gonna run your bots never coming onlin unless you do something about that

#

^^^^^^^^^^^^

hollow sedge
#

exactly

#

usually it will be very similar to running it locally

bronze bramble
#

I will be using glitch

hollow sedge
#

glitch isn't meant for hosting bots

bronze bramble
#

One minute please, I need to confirm where my client/bot.run(token)

#

either config or main

safe creek
#

its a site hoster for fuck sake

hollow sedge
safe creek
#

omfg

#

is this kid- im trying to not be an asshole rn

bronze bramble
#

Don't be crass, I'm not telling you anything, only asking.

safe creek
#

but im dissapointed

bronze bramble
#

If this isn't the place for a slow and steady. allow me to find another

hollow sedge
#

nah it just seems like you lack some basic knowledge

bronze bramble
#

Oh I do

umbral zealot
#

Just google "Free python hosting" and you'll probably find some. there are a whole lot of places.

#

it's not really for us to tell you which service to chose.

safe creek
#

more than lacks

bronze bramble
#

Agreed, I've already discovered a way to work glitch, my only issue is I don't recognize it

#

Again, don't be crass

umbral zealot
#

Glitch is not meant to host bots, because it cannot run a bot 24/7 for free.

bronze bramble
#

uptime bot

#

google it

hollow sedge
#

with glitch, don't you just have to click one button run it?

#

anyway

safe creek
#

GLITCH IS FOR SITE HOSTING READ THE LAST MESSAGE I SENT FOR FUCK SAKE

hollow sedge
#

you aren't supposed to use uptime bot

umbral zealot
#

uptime bot is against the terms of service for Glitch.

hollow sedge
#

literally read the screenshot i sent

#

from the glitch website

umbral zealot
#

So, again, glitch is not a correct place.

safe creek
#

UUUUUUUUUUUUUUGGGGGGGGGGGGHHHHHHHHHHHHHH

#

he doesnt lllllllllllllliiiiiiiiiiiiiissssssssssssssstttttttttteeeeeeeeeeennnnnnnnnn

bronze bramble
#

That is what I needed to see. Not arbitrary talk in bold.

umbral zealot
#

I can screenshot the terms of service for you if you need to see.

bronze bramble
#

I will read it myself, thankyou

safe creek
hollow sedge
safe creek
#

there

bronze bramble
#

Appreciated

safe creek
#

i think thats it

umbral zealot
bronze bramble
#

Dually noted

#

I won't be using glitch

hollow sedge
#

If you want to use glitch, use glitch, but it is not recommended at all

safe creek
#

hold on, how old are you to not be able to listen to something after being told once?

#

@bronze bramble

pale vessel
#

If you have no other alternative or money, I guess you can use repl.it

bronze bramble
#

I do have money

hollow sedge
pale vessel
#

Lmao

#

Then why bother trying glitch

hollow sedge
#

repl.it is not meant for discord bots either

bronze bramble
#

I don't want to waste resources on something too advanced

#

for myself

pale vessel
#

If they're desperate

#

It's possible

#

albeit not recommended

hollow sedge
#

although I don't think it's against the TOS on repl

umbral zealot
#

OVH hosting would be good for a cheap web hosting, and it can run whatever you want since it's a full blown server OS with root access

bronze bramble
#

I will look into that

#

now

hollow sedge
#

aren't those servers in france though?

umbral zealot
#

They have servers all over

hollow sedge
#

oh

hollow sedge
umbral zealot
#

no no they have one-click installs but they do also have actual blank OS like ubuntu

#

oh wait that's hostgator not ovh

#

I have no idea

hollow sedge
#

yeah

#

"HostGator is a leading provider of secure and easy website hosting services."

pale vessel
#

did you just google cheap hosting

hollow sedge
#

it does seem like they give you a VPS though

#

don't you love it when hosting companies have black friday sales

safe creek
#

holy shit this kid is stealing and downloafing bot files xddddd

pale vessel
#

Let them be

bronze bramble
#

I am sick of you, child

hollow sedge
#

they said they were just hosting

#

so ig someone else made the bot

safe creek
#

thats stupid tho, why steal someones code when they done even understand the language in general? you wont be able to add your own stuff and gonna get called out on it anyway

#

some time n the future

bronze bramble
#

you have made a series of unporported claims directed at the basis of my knowledge, which I have admitted to be miniscule. Yet my desires to learn are purposeful. If you could kindly take your words of discouragement elsewhere, that would be greatly appreciated.

hollow sedge
#

if you do not know programming, you shouldn't be making a discord bot

safe creek
#

learn discord py before taking other peoples code????

#

and before making a bot

#

too

bronze bramble
#

these are not the answers I came looking for, you are not a very positive person to be around, I will take up my learning elsewhere.

hollow sedge
#

what are you trying to learn? perhaps I could provide some resources

bronze bramble
#

Thankyou for your time @umbral zealot , and @hollow sedge , and @pale vessel

safe creek
#

because you did say it was already made but here you are stealing code, not knowing shit even the basics etc

radiant mountain
#

pls bal

hollow sedge
#

bruh

bronze bramble
#

I helped create the bot you imbecile, the bot was expressly made for use in my own unique community. Go away

safe creek
#

not the right server @radiant mountain

bronze bramble
#

@hollow sedge We can talk later, sure

#

and thanks again

safe creek
#

so you dont???

hollow sedge
#

leave it alone before a mod comes and tells us to shut up

bronze bramble
#

You are asking the wrong questions, I will again expunge you from my screen.

safe creek
#

ok fox and moo, your smart words dont phase me either

hollow sedge
#

im sorry, but it's actually faze

safe creek
#

faze clan go brrrrrrrr

hollow sedge
#

im not joking

#

the word is legit faze

safe creek
#

lol ik

#

i cant be bothered

hollow sedge
#

oh ok lol

safe creek
#

to edit

#

lol

#

its almost 10pm and im in pain so i could be less bothered atm xd

pure lion
#

phase clan

bronze bramble
#

By the way, even though I may not view your reply,

pure lion
#

so like rust

bronze bramble
safe creek
#

well i wish your brain cells a safe journy, bye @hollow sedge

hollow sedge
#

A CRX file is an extension that adds extra features or themes to the Google Chrome web browser.

bronze bramble
#

this file is the extension to add grammarly to your microsoft edge browser. I decided to pause the download because I do not need the service.

hollow sedge
#

he was talking about the .py file

#

not the crx

safe creek
#

why are you downloading a chrome plugun?

bronze bramble
#

Reading isn't one of your strong suits.

pure lion
#

when i .await a message it returns a message but surrounded by a big fat Ok() so I'm not sure how to access this. For more info, it shows that when i print it. Also when i try to apply any discord methods to it it does nothing

safe creek
#

and why are you trying to continue the argument that i left like 10 mins ago

pure lion
hollow sedge
#

guys legit stop, or a mod will come and tell us to

pure lion
#

just a hunch

bronze bramble
#

I only meant to clarify, I will leave it be.

safe creek
#

im going lmao he keeps going on so

bronze bramble
#

You placed your doubt on me, I am within my place to clear it up. Final

pure lion
#

here in dbl we follow a strict policy of stfu or get stfu'd

hollow sedge
#

true

bronze bramble
#

noted

safe creek
#

please stop continuing, thanks.

earnest phoenix
#

how can i make my bot create a invite AND send it to the same channel

#

guess ima die then

pure lion
#

what library

earnest phoenix
#

discord.js

#

oopsie i forgot to say that

pure lion
#

ah

#

basically

#

there's these things called docs

earnest phoenix
#

ye i was reading them

pure lion
#

they're quite useful

earnest phoenix
#

they didnt help :/

umbral zealot
#

Don't be like that. If you're gonna go "read the docs" at least point to the right docs

pure lion
#

did you do guild.createQuickInvite

#

or whatever its called

earnest phoenix
#

is it instanr

#

instant

pure lion
#

yeah

umbral zealot
#

No.

pure lion
#

so you're generating the invite

earnest phoenix
#

no i did

umbral zealot
#

wrong, and wrong.

pure lion
#

wait im confused

#

@umbral zealot help then

earnest phoenix
#

message.channel.createInvite({ unique: true, temporary: false }).then(invite => {
console.log(invite.code);

umbral zealot
pure lion
#

its msg.guild

earnest phoenix
#

oke

pure lion
#

wait

bronze bramble
umbral zealot
#

Yo Krista you're not helping.

earnest phoenix
#

i know discord updated that

pure lion
#

holup one second

earnest phoenix
#

ok

misty sigil
#

fill me in

pure lion
#

@umbral zealot that's a little harsh

misty sigil
#

what’s going on

umbral zealot
#

It's any guild channel object and the actual name of the message object depends on how it was defined

#

so it's not "msg" or "message" it's "whatever it was defined as"

hollow sedge
earnest phoenix
bronze bramble
#

digital ocean

hollow sedge
#

oh nice

misty sigil
#

no?

earnest phoenix
#

atleast to me they do

umbral zealot
hollow sedge
#

good choice

pure lion
#

i think im going to throw my laptop out of my window

earnest phoenix
umbral zealot
#

client.on("message" => message => /* it's message */)
client.on("message" => msg => /* it's msg */)

#

you said you were using discord.js

earnest phoenix
#

i am

drifting wedge
#

how can i check if a specific item is in a list?

umbral zealot
#

discord.js has events. events determine the name of the variable. as defined in the function

earnest phoenix
#

thats why they both work

umbral zealot
#

No, they don't both work. The one that works is the one you write

drifting wedge
#

like if a list contains "peepee" for example

pure lion
#

@drifting wedge iterate

umbral zealot
#

it could be client.on("message", 324lktjjelkgjl24kqjglakej4g => 324lktjjelkgjl24kqjglakej4g.reply("Blah")) if you wanted.

earnest phoenix
#

whaaaat

umbral zealot
#

This is basic javascript, here.

hollow sedge
#

so I'm not sure how it works but it's something along these lines:

  1. SSH into VPS
  2. transfer files using git clone or scp
  3. Run your main bot file
    @bronze bramble
earnest phoenix
#

ok im dumb then

umbral zealot
#

variable definition as function arguments

earnest phoenix
#

ima bit noob

#

i left coding for a wwhil

#

now im dumb

umbral zealot
bronze bramble
#

@hollow sedge alrighty friend, I will go look into all of this, back for more later.

pure lion
#

@earnest phoenix the client.on("message", msg => {}) event uses a function to define an argument, msg in this context is the message object but in reality it could be anything, It's merely a placeholder

umbral zealot
#

yeah I covered that already 😄

earnest phoenix
#

ok

pure lion
#

thats nice evie

broken sentinel
#

Hey yoo bros. Do you know site where i can host my discord.js bot 24/7 ?

pure lion
#

not for free if that's what you're looking for

broken sentinel
#

Because i have found but lost the site name

pure lion
stoic hull
#

Hm, idk if this is the right channel for this. But can someone give me general directions into setting up a grafana dashboard for my bot?

pure lion
#

grafana?

stoic hull
#

Yeah.

pure lion
#

can't be too hard

stoic hull
#

I just don't get it.

pure lion
#

can you link me?

stoic hull
#

To?

drifting wedge
#

how can i do an if- if this item is in the list

#

do stuff

pure lion
#
myList = ["apples", "bananas", "pears"]
for fruit in myList:
  if fruit == "what you're looking for":
    # ...
  else: 
    pass```
drifting wedge
#

i need the for?

safe creek
drifting wedge
#

yes

safe creek
#

@hollow sedge

#

oh ok

hollow sedge
#

oops mb

#

wair

#

wait*

#

i didnt do anything wrong

#

why did i say that

safe creek
#

so i can put an listener ontop of my ban command and itll go into my class defined above?

#

lmao @hollow sedge it happens qt dw

hollow sedge
#

i think if you do @Greetings.listener()

#

it will work

#

although I haven't tried myself

safe creek
#

that was he example in the docs

#

i was using as an example

#

just for mt question

hollow sedge
#

the fact that it's indented under the class should tell you something

safe creek
#

but what your saying is what ever the class is ill use in the listener to be in sad category correct?

hollow sedge
#

i think so..haven't tried myself so don't take my word for it

safe creek
#

mmmk

#

i seee pepe_susp

hollow sedge
#

but if you are instantiating the listener under a commands.Cog inherited class you have to use commands.Cog.listener()

safe creek
#

mmk

#

because i wantcategorys and also my other commands to be ran cwhen inside other file

#

files*

drifting wedge
#

u can do Cog.listner

hollow sedge
#

that just depends on how you imported it

safe creek
#

mmk

drifting wedge
#

i imported commands

#

it works

hollow sedge
#

how would that possibly work

drifting wedge
#

my imports

hollow sedge
#

did you also do a from commands import Cog

drifting wedge
#
from discord.ext import commands
from discord.ext.commands import command, cooldown, BucketType, Cog```
safe creek
#

so if i do the add thingy with the nam of the category then run said category in my main file the commands in the other category should work in theory yes?

hollow sedge
#

well there's no point in that

#

but yeah it was because of the way you imported

hollow sedge
#

they will never lead you wrong

safe creek
#

yeah i will be and am rn lol

limber flume
#

python

hollow sedge
#

if you are defining an event use @commands.Cog.listener, if you are defining a command use @commands.command() INSIDE the class (as a method)

pure lion
#

when i .await a message it returns a message but surrounded by a big fat Ok() so I'm not sure how to access this. For more info, it shows that when i print it. Also when i try to apply any discord methods to it it does nothing

sudden geyser
#

@pure lion, I assume you're using Rust.

You can use pattern matching to get the value inside of the Ok variant of Result. rust if let Ok(msg) = someHttpAction() { // ... }

#

If you want to handle the Err variant, use Err instead of Ok to handle it. If you want to handle both cases, use a match pattern instead.

pure lion
#

i need to .unwrap

sudden geyser
#

Are you sure? .unwrap will cause a panic in the thread.

#

There are probably better ways to handle it.

pure lion
#

i can test for an error

#

i think i can anywa

#

y

sudden geyser
#

Why not use the if let pattern?

pure lion
#

yeah i was just typing tha-

#

anyway

urban ridge
#

How do I add an image to my desc?

pure lion
#

its chapters 6 and 9

earnest phoenix
urban ridge
#

ye

earnest phoenix
#

for markdown

urban ridge
#

I did this

earnest phoenix
#

use the !

#

in front of the []

urban ridge
#

k

#

thx

peak venture
#

so... i've updated my Discord bot to v12 and then updated my node aswell to v12+
But when i get certain embeds i get an fields.flat is not a function with the messageEmbeds.

Anyone knows how to solve this issue?

sudden geyser
#

Are you calling .flat or the library?

#

Also can you do node --version in your shell to see what version of Node you have.

peak venture
#

i can do that node --version for you. just gimme a sec

#

how should i be calling .flat or the library?

sudden geyser
#

Do you write .flat() or no

peak venture
#

ah no? cause the discord.js doesnt require that to do i guess?

#

like new Discord.MessageEmbed()

#

Node v12.18.2 btw

sudden geyser
#

Interesting, <Array>.flat() is a v12 feature to my knowledge.

peak venture
#

Yea. as for what i read up onto aswell.

#

i had it on v10 b4 which obviously gave errors so i updated Node to v12

sudden geyser
#

Could you show some of your code?

peak venture
#

wherebouts? 😛

sudden geyser
#

You could use https://hastebin.com, or share it via hastebin. I recommend Hastebin to share all your code for context.

peak venture
#

@sudden geyser is it possible (considering the error is getting at line 209) the unicode is not functioning there anymore?

broken sentinel
#

@peak venture hey have you been approved for top.gg

#

?

peak venture
#

i have yes

broken sentinel
#

is it was hard

#

to approve you ?

peak venture
#

ahm.

#

i uploaded my bot and it needed some tweaks due to bypassing some time filter

#

thats all i had to do

sudden geyser
#

I don't think the unicode symbol \u200b would play a role. Could you share the full error?

peak venture
pure lion
#

@peak venture have you tried ...array?

drifting wedge
#

if i just do this: py collection.update_one({"_id": guild_id}, {"$set":{"Levels_Toggled":arg}}, upsert=True)

#

will it give me key error?

#

if this post doesnt exist in db

pure lion
#

why would it give you a key error?

drifting wedge
#

bc if post doesnt exist in db

#

the key would

pure lion
#

no, you're upserting

#

so it would create a doc regardless

drifting wedge
#

so it would create on if it doesnt exist

#

?

pure lion
#

yeah

drifting wedge
#

with the guild id as the _id tag?

peak venture
pure lion
#

try it

sudden geyser
# peak venture

I don't see what's wrong with your code, but for a last effort, could you try logging process.versions.node to the console

drifting wedge
#

alr ty @pure lion

peak venture
#

i will

pure lion
#

(try it to both of you so there's no confusion)

desert hazel
#

ima have to ask here because DJS members have sex with the rules

anyone know why line 24 is being skipped when banklevel is 10000 and bank.bank is over 10000

broken sentinel
#

Can somebody see my bot and tell me if its ready for application ?

peak venture
sudden geyser
#

wdym?

limber flume
peak venture
#

says v 12.18.2 when i started it and in the command it says undefined

safe creek
#

do i put bot.add_cog(Greetings(bot)) into my bots main file? (im using this as an example)

drifting wedge
#
if(collection.count_documents({}) == 0):
                user_info = {"_id": guild_id, "Mod_Toggled": 'true', "Levels_Toggled": 'true', "Log_Toggled": 'true', "Music_Toggled": 'true', "Memes_Toggled": 'true', "Currency_Toggled": 'true', "Profile_Toggled": 'true', "Misc_Toggled": 'true', "Fun_Toggled": 'true', "Img_Toggled": 'true'}
                collection.insert_one(user_info)``` would this make a post if one doesnt already exist?
limber flume
#

Your learning how to use cogs?

peak venture
safe creek
drifting wedge
#

or would the checker have to be py if(collection.count_documents(guild_id2) == 0):

sudden geyser
#

process.versions

limber flume
safe creek
#

do i put bot.add_cog(Greetings(bot)) into my bots main file? (im using this as an example)

peak venture
#

btw; process.versions.node is similar to process.version

sudden geyser
#

ah, I thought it returned the project version from package.json

#

I don't see what would be the cause of the error sadly.

safe creek
#

can someone please answer my question?

peak venture
#

thnx for the effort though

sudden geyser
#

You put it in the setup function in the cog file

safe creek
#

so what would the cog file be? my main.py?

#

or the one i put the class in?

sudden geyser
#
def setup(bot):
  bot.add_cog(Greetings(bot))

Appears in the global scope of the cog file. If your cog lives in cogs/Greetings.py, the function lives in there.

In your main file, you'll add it with bot.load_extension(...).

safe creek
#

ahhh ok so the greetings part is my file name?

sudden geyser
#

Greetings is a class.

safe creek
#

you said greetings.py so i assumed you mean the class and the file name but idk

#

for the example

#

but i think i get what you mean?

earnest phoenix
#

How can I integrate a webhook to see when there are new guilds?

deep robin
safe creek
#

dont advertise??? @deep robin

sudden geyser
safe creek
#

so the class would live inside the file so example greetings would live inside greetings.py same for the setup?

sudden geyser
#

yes

safe creek
#

its late so i might be a little weird haha

#

okkkkkkkk i see my bad

#

its late as i just said haha my bad

#

and just to clarafy things the class name can be anything yes?

#

@sudden geyser

sudden geyser
#

Yes, but the name of the class will be used by Discord.py for some things, like showing what category a command is from.

safe creek
#

okkkk i see, thats good to know

#

sorry for the ping but will the setup be an event or command same for the bot.load_extention? @sudden geyser

#

so will the setup be an command or event?

#

ill read the docs if your a bit busy

sudden geyser
#

The setup function is used to initialize the cog (Greetings in this case). In this case, it's being used to add the Greetings cog to bot (bot.add_cog(...)).

It'll only be called when the extension is being loaded (which you do in bot.load_extension(...)).

For example, when I call bot.load_extension("cogs.Greetings"), discord.py gets the cogs/Greetings.py file and calls the setup function. In that function, you add the Greetings cog.

It's like an event, but it's not the kind of event you're probably thinking of.

safe creek
#

yeah im thinking of @client.event blah blah blah

#

i now already know that thanks to your help

#

@sudden geyser (i do hate pinging you tbh <3)

sudden geyser
#

I don't mind being pinged 🕺

safe creek
#

its annoying tho to me haha anyway

#

yeah im thinking of @client.event blah blah blah

#

so like what would be an @client.event and what would be an @client.command?

hasty mulch
#

When using menus in Python, what class should come first? The cog class or the menu class?

sudden geyser
# safe creek so like what would be an @client.event and what would be an @client.command?

@client.event is for any event discord.py will call -- typically stuff Discord sends you, like when a user sends a message. You can see a list of all events here: https://discordpy.readthedocs.io/en/latest/api.html#event-reference

@client.command is for any command you register for your bot. For example, a ping command.

In your cog, it's a method. ```py

commands.command() is the "register".

@commands.command()
async def ping(self, ctx): # ping is the name of the command. all commands take a ctx parameter
ctx.send("Pong!")

There's far more to learn about commands here: https://discordpy.readthedocs.io/en/latest/ext/commands/commands.html
safe creek
#

i was asking about the cogs lol

#

like is the setup an command or an event etc etc etc

#

but ima just read the cogs doc

#

thanks for the current help

earnest phoenix
#

@sudden geyser why do you need to take self into the definition of the variable

sudden geyser
#

self is a parameter Python requires in order to use it as a method.

#

If you exclude the self parameter, you can use it like a static method.

safe creek
#

static?

earnest phoenix
#

What’s the difference between ctx and await?

safe creek
#

await is for when it waits for the first part of the command to execute if im correct

#

or it might be the other way around

#

its midnight sooo

desert hazel
#

https ;-;

#

are you a js wiz?

safe creek
#

what about https?

desert hazel
#

are you a javascript god ;-;

#

i need help with legit one line ;-;

sudden geyser
# safe creek static?

A function that exists on the class itself rather than an instance of the class. For example, ```py
class Alphabet:
def sing(self):
print("Abc...")

def spy():
print("Google")

abc = Alphabet()
abc.sing() # Abc...

Alphabet.spy() # Google

safe creek
#

no

#

i use python

#

never use js

#

used*

desert hazel
#

;-;

earnest phoenix
#

Rust > Python > Java

desert hazel
#

learn it for me and help me KEK

#

i know it a bit

#

but this logic bit is fucking my brain

safe creek
desert hazel
#

lol i already learned it

safe creek
#

im not going to waste my time learning something i dont need

desert hazel
#

;-; it was a jokeeeee

safe creek
#

or will ever use

earnest phoenix
#

Again

Rust > Python > Java

safe creek
#

well im just saying for the future

desert hazel
#

do you have some bad memories with JS, thats why you got argumentative over it? KEK

sudden geyser
#

JavaScript is like Fortnite. A ton of people shit on it yet it's still incredibly popular.

earnest phoenix
#

Java is yesterday’s language

#

Python is today’s language

desert hazel
#

Javascript it tomorrows language

earnest phoenix
#

Rust is tomorrow’s language

desert hazel
#

What is rust lmao

earnest phoenix
#

Well:

#

Easy to learn

desert hazel
#

ive never heard of it

earnest phoenix
#

Fast as fuck

sudden geyser
#

C/C++ but modern

desert hazel
#

so is JS

sudden geyser
#

no its not

desert hazel
#

@green kestrel

#

what is your take on this

earnest phoenix
#

No garbage collector

#

It’s a base language

desert hazel
#

so is JS

earnest phoenix
#

No JS is a high level language

desert hazel
#

plus once you have learned it

#

you can make webdash with it

#

not entirely with it

earnest phoenix
#

Webdash?

desert hazel
#

but JS in your site is good

#

Web Dashboard

earnest phoenix
#

I have JS disabled anyway in my browser

desert hazel
#

lol why

sudden geyser
#

JavaScript is for browsers but its been taken farther.

#

You could write an operating system in JS, but it's not the right tool for the job.

desert hazel
#

hmm

#

im gonna call cap on that

earnest phoenix
#

It’s a privacy risk

sudden geyser
#

cap?

earnest phoenix
#

Don’t even know what a gc is

desert hazel
#

bruh what did i ask KEK

earnest phoenix
#

Can’t call cap on shit you nothing about pepowot

desert hazel
#

oh lol

#

bruh

#

stop roasting me

earnest phoenix
#

@sudden geyser knows what they are talking about, listen

sudden geyser
#

a

desert hazel
#

b

sudden geyser
#

though OG Ghost what languages outside of JS do you have experience with

desert hazel
#

erm

#

english

#

👀

earnest phoenix
#

@sudden geyser when did you learn python?

sudden geyser
#

idk, maybe a year ago

earnest phoenix
sudden geyser
#

learned it (Python) on Hyperskill

earnest phoenix
#

Other than docs

sudden geyser
#

I don't think so. Other guides won't go over as much as the docs will

desert hazel
#

@green kestrel

#

here ❤️

safe creek
#

docs are fucking hotttt FinnaPeanut

sudden geyser
#

sometimes

green kestrel
#

@earnest phoenix @desert hazel
the correct language is the one that solves the problem, each programming language has different strengths and weaknesses. choose the right one or you might as well crack your wallnuts with a JCB.

sudden geyser
desert hazel
#

brians gonna get in here and go, i made my own language what do yall mean KEK

safe creek
#

yeah

#

sometimes tho

desert hazel
#

im not gonna lie

#

but

#

slow

sudden geyser
#

Do you know why it's slow?

desert hazel
#

elaborate

green kestrel
#

its probably only as slow as the code that uses the lib

#

sometimes people accuse a language or its libs of being slow, usually the language of being slow, and they dont know how to use it

desert hazel
#

jira slow brainboxspin

green kestrel
#

like theyll go "OMG THIS IS SHIT C++ IS SO SLOW" and theyre iterating a 1 million item C style array of structs, with C style strings in using strcmp() when they should be using an std::unordered_map

#

hmm jira IS slow, i cant argue with that!

desert hazel
#

Jira is worse than JS

green kestrel
#

but jira is an application stack

desert hazel
#

yea

green kestrel
#

not a language

#

ive seen fast performant java, jira isnt one of those projects

desert hazel
#

brain, .cpp is slow KEK 👀 zsorryduck

green kestrel
#

C++ is slow..... to compile

earnest phoenix
#

Rust = best

green kestrel
#

best at what?

desert hazel
#

RUST IS A GAME WDYMMMMM

sudden geyser
#

and a lang

earnest phoenix
#

Everything

desert hazel
#

lol

safe creek
#

install a RAT i dare you

green kestrel
#

if youre going to write an application for a phone, or perhaps parts of a discord bot? sure, use rust if its available on your platform. but im yet to see a proper (non mobile) game written in rust, an OS, or an embedded system.

desert hazel
#

Should i KEK

#

for fun

safe creek
#

yesss

#

lolol

desert hazel
#

i got a rat eating my ram ngl

safe creek
#

lmfao

green kestrel
#

16gb ram

desert hazel
#

bruh

#

tf

sudden geyser
#

Rust is also very slow to compile. But as Brain and a lot of others say, it's about choosing the right tool for the job.

desert hazel
#

why does discord take 1.3gb

safe creek
#

discord takes up too much ;-;

green kestrel
desert hazel
#

brain what the fuck

#

you got 32 gb

#

only 16 is usable

sudden geyser
#

but im yet to see a proper (non mobile) game written in rust, an OS, or an embedded system.
I don't remember the name, but I saw an OS in development written in Rust. But it's not close to being finished.

desert hazel
#

why

green kestrel
#

and two SSDs, one 1tb and one 2tb

#

😄

safe creek
#

im on a laptop ;-;

sudden geyser
#

Rust is slow to adopt, but has its potential.

green kestrel
#

three letters is why: U, E, 4.

#

i suppose technically one of them's a number, meh

desert hazel
#

i got 4 letters

#

tfum

#

the fuck u mean

green kestrel
#

UE4 can eat 8-12gb of ram just being itself

#

and then you have to load up full visual studio alongside it

#

NOT vs.code

#

and usually a copy of gimp, audacity, blender

#

plus all the stuff that i run normally... firefox, discord, xchat, outlook, thunderbird, teams, steam, epic games launcher

desert hazel
#

WE WILL IGNORE THAT OK

safe creek
#

perfect help

desert hazel
green kestrel
#

in comparison bot dev needs nothing, i can do that on my phone at a push...

safe creek
#

2020 help be like

green kestrel
#

lol uh

#

one sec

desert hazel
#

my help is nice

#

let me get it

sudden geyser
#

why do people never close their tabs

desert hazel
#

i like my help KEK

safe creek
#

wow ok show of

#

off*

desert hazel
#

this other bot that i own is a cool help command, isnt it @green kestrel 👀

safe creek
#

googles Allegro bot github

desert hazel
#

BRUH

safe creek
#

lolol

desert hazel
#

ok good

#

it dont come up

#

bruh ngl i shat myself

safe creek
#

visual studio isnt responding...

green kestrel
safe creek
#

i didnt save

green kestrel
#

i dont even know how many tabs i have open @desert hazel

#

i'd have to scroll to the left for about 5 mins on each window to count them!

desert hazel
#

Brain... get off my database angryGlitch

safe creek
#

lmao

green kestrel
#

thats MY database 😄

desert hazel
#

lol

green kestrel
#

no way you have so many settings in your table 😄

desert hazel
#

trust

#

i have one table

#

atleast the database works

#

lol

safe creek
#

ayy my vsc crashed but the autosave saved my ass!!!!

desert hazel
#

the music may not play, fucking ytdl

#

yayayyayaya

#

fireee

safe creek
#

its litttttt

#

its 12:26pm PepeKMS

desert hazel
#

FOCK IT IS

green kestrel
#

change to something more stable 😄

safe creek
#

but its pepe_pog

desert hazel
#

Braine, why are you watching minecraft ❤️

green kestrel
#

something google arent actively trying to break

#

i like minecraft!

desert hazel
#

like what

#

minecraft is cool

#

lol

safe creek
#

im watching mc and also coding lol

desert hazel
#

lol

green kestrel
#

well im not actually watching that atm

#

thats my 'watch while i work in my day job' youtube window

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

safe creek
#

i forgot to load my cog lmfao

green kestrel
#

i cant get in the zone without background videos, but usually its music

desert hazel
#

wife walks in "Why you watching minecraft"
brain "WHAT HOW DID THAT GET THERE, I DONT PLAY MINECRAFT, I CODE, ONLY CODE, DONT PLAY A BLOCK GAME"
wife walks out Video Plays

green kestrel
#

lmao

desert hazel
#

lol

green kestrel
#

i got the kids into minecraft!

#

😄

desert hazel
#

good lol

#

good man

#

get them into CPP

green kestrel
#

aint nobody got time for that lol

desert hazel
#

so they can manage trivia bot KEK

#

hire them KEK

green kestrel
#

kids want instant results, they like things like purple mash

desert hazel
#

ooo

#

play dough

#

thats cool

green kestrel
#

no! lol

desert hazel
#

i like sticking it to my sisters head

green kestrel
#

purple mash is a learning platform they use in school

desert hazel
#

oh

green kestrel
#

it has a programming section in it where they can make games

desert hazel
#

i think i need that

#

i defo need that

green kestrel
#

proper games, with a drag and drop system

#

theyre limited, but games non the less

desert hazel
#

yea

#

this should activate

#

but it dont

green kestrel
#

you should install ue4 and try blueprint

desert hazel
green kestrel
#

ever seen blueprints?

desert hazel
#

na

ancient nova
#

anyone knows any good image manipulator apis that don't require a key?

green kestrel
#

it looks deceptively simple

desert hazel
#

canvas

green kestrel
#

but it gets you and pulls you in with its tentacles like some forbidden japanese cartoon lol

desert hazel
green kestrel
#

jesus man free up some space

desert hazel
#

i tried

safe creek
#

i have 11 errors thanks to my cog setup ffs

green kestrel
#

that makes me sweat just seeing it

desert hazel
#

can you remote me and find files, idk where to look

green kestrel
#

get rid of the anime collection for starters

#

nobody needs that shit

#

😄

desert hazel
#

bruh anime gae

#

ew

#

ew

safe creek
#

@green kestrel your in the bar dude!!

desert hazel
#

#brain for demotion for mentioning anime

safe creek
#

@desert hazel is that all hentia?????

desert hazel
#

yes

safe creek
#

damn

desert hazel
#

all anime

#

bad

safe creek
#

i have a 1TB hard drive full of it lol jk

#

nah

#

i dont like pixels

#

they cuck your horn

desert hazel
#

i know someone with 30gb because their in Israel so they block it, so when he gets on his vpn he has a cheeky download KEK

safe creek
#

lmfao

#

wait untill he hears about only fans

desert hazel
#

Lol

#

i bought this for 9.99 and i cant install it

green kestrel
safe creek
#

lol imagine

desert hazel
#

OH

green kestrel
#

like i said deceptively simple looking

desert hazel
#

Thats like that thing

#

erm

#

i forgot it

green kestrel
#

but it trips people over thinking its gonna be easy 😄

desert hazel
#

Erm

safe creek
#

are you on a 32bit windows? @desert hazel

desert hazel
#

blender

green kestrel
#

naw ghost is on windows 3.1

desert hazel
#

if i was on 32bit.... how can i have 16gb

safe creek
desert hazel
#

ram

#

my windows edition is 3.1

safe creek
desert hazel
#

lol

sudden geyser
#

I'm going to need your C++ code base as an apology.

green kestrel
#

hes got a screenshot of windows 10 in mspaint that he brings up when people are looking

#

it really looks like this

safe creek
#

anime tiddies anyone??????????????????????

green kestrel
desert hazel
#

STOP

safe creek
#

lol

desert hazel
#

IM TRYING TO MAKE IT LOOK LIKE WINDOWS 10

#

I told you not to show that to anyone

safe creek
#

lolololololololol

desert hazel
#

ffs brain

safe creek
#

join general vc

#

i swear down wont leave

#

@zinc fable

desert hazel
#

i was strugling to download mysql server ngl

green kestrel
#

that was legit my first ever version of windows, 3.1

#

on a 386 with 4 whole megs of ram

#

and a 200mb hard disk

safe creek
#

my first one is windows 10 lol

green kestrel
#

25mhz processor, no floating point support

#

640x480 256 colour graphics

desert hazel
#

now you got three hundred and thirty six thosund, seven hundred and nine gigabytes of ram

green kestrel
#

ISA sound card and 4x cd rom

#

32768mb ram 😄

desert hazel
#

gb

green kestrel
#

but you know whats funny?

#

boot that modern high spec pc, and it boots in a compatibility mode that can only see 640k of it

desert hazel
#

LOL

green kestrel
#

with all its 32 bit support disabled, never mind 64 bit flat mode

desert hazel
#

is that what happend with your old one you got out?

green kestrel
#

you know all PCs start in 16 bit "real mode" right, and have to switch to 32 bit mode and from there to 64 bit flat mode

desert hazel
#

erm

#

sure ?

green kestrel
#

oh the old one? that one isnt even PC compatible. it has an 8 bit processor, 128k ram

desert hazel
#

brain are you forgetting that i am answering calls and telling people to wait 2 days for a engineer to call them....

nothing cool like you ;-;

green kestrel
#

"dont call us we'll call you"

desert hazel
#

lol

safe creek
#

@green kestrel join general vc

#

rq

green kestrel
#

i dont do voice chat 😛

safe creek
#

no balls

desert hazel
#

"Thanks for calling,how can i help " "yea im calling fr.." "Im going for my break, please call back later. bye"

#

bruh

safe creek
#

hehe

desert hazel
#

this guy dipped so quick

green kestrel
#

they make me do teams meetings at work

#

we had a casual 'meeting' this morning, a coffee meeting to just catch up and have a laugh

#

because it was casual i messed with them a bit

#

i piped teams webcam through obs and did uh... some stuff

desert hazel
#

got you

#

oh that like us

safe creek
#

no u

desert hazel
#

we had a call with all the UK team

#

like 75 people in one call

#

not one had a question at the end...

green kestrel
#

that's the feed i put into teams

#

they were like 'wtf how did you do this'

desert hazel
#

LOL

safe creek
#

is that you? @green kestrel

green kestrel
#

yes

safe creek
#

lmfao

green kestrel
#

but i have a filter over my face

#

i dont look like a zombie... YET

safe creek
#

oh ok

green kestrel
#

one sec

safe creek
#

i want to fuck virtual u no homo tho

desert hazel
#

#brain face reveal

green kestrel
#

i changed to an animated cat later on

#

so people could see my face

#

🤣

desert hazel
#

bro, there was a cat on your head

#

did you know brain?

safe creek
#

the only pussy he'll ever get lolol

green kestrel
#

oh shit no i didnt

desert hazel
#

bruh

green kestrel
#

how did that get there

desert hazel
#

he has a 2 wives

green kestrel
#

that'd explain the claw marks

desert hazel
#

lol

safe creek
#

lolol

#

get it back in the slow coocker

green kestrel
#

lol

desert hazel
#

Brain gets angry when his wifes boyfriend tells him off

green kestrel
#

one of the others kid sat on his knee during the meeting and shes like 'daddy that man has a cat on his head'

#

lol

desert hazel
#

Looool

#

whats RTX Voice?

green kestrel
#

oh oh! do you have a geforce 1060 or newer?

desert hazel
#

3070

#

FUCK

#

2070 super

green kestrel
#

nice, get RTX voice

desert hazel
#

i wished

safe creek
#

"well son, thats the only pussy hes gonna, get same for you"

desert hazel
#

Lol

green kestrel
#

so its a program by nvidia that processes your audio from your mic thru the graphics card

safe creek
#

lol

green kestrel
#

it uses AI to strip out background noise

desert hazel
#

why do i need that lol

green kestrel
#

its INCREDIBLE

#

im in a house full of noisy kids and i can do a stream and nobody can hear them

desert hazel
#

oh

green kestrel
#

heres an example of someone using it

desert hazel
#

igy

#

brain, did you just take those ss on OBS?

green kestrel
#

yeah

desert hazel
#

BRAIN WHERE DID YOUR BEARD GO

#

NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO

#

jesus

green kestrel
#

watch that video from that time

#

how incredible is that

desert hazel
#

its good