#development

1 messages · Page 1905 of 1

austere scaffold
#

Wait why self

narrow fractal
#

self is needed when ur bot has sharding

spark flint
#

thats cogs

austere scaffold
#

Ooo

spark flint
#

or sharding

austere scaffold
#

K

spark flint
#

not needed atm

narrow fractal
#

yea sorry forgot to remove the self part

#

even without the self it still works the same

spark flint
#

yep

narrow fractal
#

im too used to have self, ctx

earnest phoenix
#

Self is for instance methods, unrelated to sharding nor cogs doe

narrow fractal
#

U sure about that

spark flint
#

its usually used in cogs

#

well it is used in cogs

#

you can't use cogs without it

narrow fractal
#

class CogName(commands.Cog):
def init(self, bot):
self.bot = bot

#

So you do need self

spark flint
#

yeah

narrow fractal
#

atleast in dpy

earnest phoenix
narrow fractal
#

Not really?

spark flint
#

not really?

#

you literally can't use cogs without using self

earnest phoenix
#

It's not like you're supposed to have instance methods

spark flint
#

i don't use cogs but i know its needed for them

earnest phoenix
#

It's not needed for cogs specifically

spark flint
#

i know

narrow fractal
#

hmm yea okay

earnest phoenix
#

Cogs are just classes, and if you have an instance method on it, then you need the self. But it's not necessary. Not that it won't work without self

deft citrus
#

how to make commands that can only be used by me

#

is it possible

austere scaffold
#

Yes

spark flint
deft citrus
#

oh

#

lol ping 2

earnest phoenix
#

Order doesn't matter doe, it can be above it as well

spark flint
#

true

#

I tend to put under client.command() as thast what i'm used to

earnest phoenix
#

any js user here?

#

Decorators execute from bottom, so actually having it above the command makes the command instantiated first before adding the check. It makes the most sense to me, but again, it doesn't matter kek

narrow fractal
deft citrus
#

python or js is good

narrow fractal
#

both are good

deft citrus
#

oh

#

i thought python will die after some months or days

narrow fractal
spark flint
#

i like python as thats what i use in school

narrow fractal
#

but there are soms forks here and there

spark flint
#

i'm starting to teach myself js

earnest phoenix
#

lide sus

#

You guys shall give Hikari a try

#

need help in js

#

no one here to do

deft citrus
#

i know js

narrow fractal
#

Seems interesting

earnest phoenix
deft citrus
#

but i dont know to make bots

onyx torrent
#

tell

deft citrus
#

i only make games

earnest phoenix
deft citrus
#

in js

errant flax
#

how do u make games in js

narrow fractal
#

read docs

#

lol

spark flint
deft citrus
#

p5.js

onyx torrent
vivid fulcrum
deft citrus
#

p5

#

me

#

ooooooo

earnest phoenix
# onyx torrent yes?

@onyx torrent get this error when ```js
const Topgg = require('@top-gg/sdk');
const topgg = new Topgg.Api("TOP.GG_TOKEN")

let voted = await topgg.hasVoted(message.author.id);
if (!voted) {
return message.reply('not voted')
}```

narrow fractal
#

Hikari looks so different

deft citrus
#

how guys typing like this

#

black

deft citrus
#

inside it code

vivid fulcrum
#

code blocks

errant flax
#

code blocks

deft citrus
#

how

errant flax
#

```language

deft citrus
#

oooooooooooooooo

#

ty

spark flint
errant flax
spark flint
#

but with code

earnest phoenix
deft citrus
spark flint
#
console.log("shit")```
deft citrus
#

op

errant flax
#
"stanky"
earnest phoenix
#

like for work command need vote first

onyx torrent
earnest phoenix
#
helllo```
earnest phoenix
deft citrus
#

is making a bank hard in python

#

like dank memer

errant flax
#

not rlly

earnest phoenix
deft citrus
#

i wanna make a bank that stores keys 🔑

#

5 key = open box

#

inside it tips for poketwo

narrow fractal
#

why does so many people want those bank stuff bots like dank memer

austere scaffold
deft citrus
#

anyone knows to make bank

earnest phoenix
#

👀

deft citrus
#

idk atall

austere scaffold
#

use any database

narrow fractal
#

and not json

austere scaffold
#

I use Mongodb

deft citrus
#

but in some tutorials json

#

why

#

?

narrow fractal
#

well

deft citrus
#

i dont know nothing about database

spark flint
#

i store 1.1k blacklised userids using json

narrow fractal
#

I use Postgres

deft citrus
spark flint
#

and it checks the json everytime someone joins or leaves

narrow fractal
#

Ah thats hard

narrow fractal
#

Nah but it depends if you bot is in alot of guilds or not

earnest phoenix
#

@austere scaffold you use djs?

spark flint
#

thats how many it has

narrow fractal
#

aaah

deft citrus
#

can i black list from using my bot

earnest phoenix
#

why py people only here

deft citrus
#

using your bot @spark flint

narrow fractal
#

I use Postgres just to store data for rpg

spark flint
spark flint
deft citrus
#

oh

onyx torrent
narrow fractal
#

Then read djs docs

austere scaffold
spark flint
earnest phoenix
deft citrus
#

my main got hacked

spark flint
#

I'm not sharing the JSON of blacklisted users

narrow fractal
#

Mate wtf

earnest phoenix
#

also dpy noob

deft citrus
onyx torrent
deft citrus
#

from a bot

narrow fractal
#

I am saying that you should read the docs

untold creek
#

???

small tangle
#

Does anyone got sometimes AccessDenied Errors from Discords CDN? I upload a png as an attachment in an embed but it doesnt load and show this error upon opening in the browser
But when i execute the same command again, everything works

narrow fractal
#

Ur are the noob since you have to ask other devs to solve your problem

narrow fractal
#

Read DOCS\

earnest phoenix
harsh nacelle
#

Hi

earnest phoenix
narrow fractal
#

🤨

spark flint
#

i still ask for help even tho i call myself a good dev

onyx torrent
onyx torrent
earnest phoenix
onyx torrent
#

acha

spark flint
#

oh i see the context for the noob thing

onyx torrent
untold creek
#

steal 7732569351

harsh nacelle
small tangle
untold creek
#

Bruh

spark flint
#

i thought you were calling people who ask for help noobs

onyx torrent
#

f

small tangle
#

but what could be the cause for that

narrow fractal
untold creek
#

who have play roblox

earnest phoenix
onyx torrent
deft citrus
#

anyone knows to make bank

#

anyone?

spark flint
onyx torrent
earnest phoenix
harsh nacelle
deft citrus
spark flint
deft citrus
onyx torrent
earnest phoenix
spark flint
#

thats a developement question

earnest phoenix
spark flint
#

stop

onyx torrent
earnest phoenix
onyx torrent
#

mods please mute him

deft citrus
earnest phoenix
harsh nacelle
onyx torrent
deft citrus
earnest phoenix
onyx torrent
#

guys ignore him he has a lots of time to waste

spark flint
# earnest phoenix <#264445053596991498>

@rustic nova sorry for ping - can you ask this guy to stop replying to random messages to get people to move to general and is now being quite annoying towards all of us

onyx torrent
harsh nacelle
spark flint
#

all the mods are offline KEKW

spark flint
#

mac is online 24/7 and nom is away

small tangle
#

@vivid fulcrum ASPingSatania but the really weird thing is, when i reloaded discord the image can be displayed normally, so it doesnt seem like an error on my end, or?

deft citrus
#

is there any use of studing ms access

onyx torrent
# deft citrus py

so learn about databases (mongodb preferred) then make a schema. start with basic commands like bal,pay,rob. Search if d.py has any packages for that it will make it eaier

rustic nova
#

@earnest phoenix stop minimodding

narrow fractal
#

@earnest phoenix get your facts straight, you are the one calling me out for an noob for no actuall reason, you are the one that's asking for help and i simple said that you should read the discord.js docs because 99% of reading the docs will solve your problem.

onyx torrent
spark flint
onyx torrent
#

ok

spark flint
#

just that a few are on break atm

onyx torrent
#

oh

spark flint
#

and mods are allowed a life away from discord KEKW

deft citrus
earnest phoenix
narrow fractal
#

Lmao the guy even ignores me

#

I mean kid

narrow fractal
#

My bad

onyx torrent
earnest phoenix
onyx torrent
#

he doesnt even understands how command handler works

narrow fractal
#

Anyways

narrow fractal
onyx torrent
#

lmao

earnest phoenix
deft citrus
earnest phoenix
#

Just get problem in top.gg package

onyx torrent
onyx torrent
rustic nova
#

also remember the #development etiquette in the pinned messages 👍

deft citrus
eternal osprey
#

how do i notify when a user gets a certain role?

deft citrus
#

say to them

onyx torrent
#

in a specific channel?

earnest phoenix
onyx torrent
eternal osprey
#

Just in the general tab.

onyx torrent
onyx torrent
eternal osprey
spark flint
onyx torrent
spark flint
#

they're calling you underated

#

oh wait

#

im just emotion blind

onyx torrent
#

f

rustic nova
#

@earnest phoenix just gonna give you the final warning regarding the etiquette, if you're not willing to contribute in #development and not be helpful, dont talk here

earnest phoenix
spark flint
#

he said his code was correct in #topgg-api when I said it was a code issue not a top.gg issue

deft citrus
#

@spark flint is there any packages for bank l

onyx torrent
narrow fractal
#

@earnest phoenix you are the one that called me an noob?

rustic nova
#

@narrow fractal drop it

#

no need to fuel it

onyx torrent
#

i think we can ignore him.... we're wasting our own time

earnest phoenix
narrow fractal
#

🤨

earnest phoenix
#

Sorry sir

deft citrus
#

loaded

earnest phoenix
#

For my bad behaviour

eternal osprey
deft citrus
spark flint
#

no

#

i don;t have it myself

deft citrus
#

oh sed ;-;

eternal osprey
onyx torrent
eternal osprey
#

Not if the user already had it

tulip ledge
#

Just use the guildMemberUpdate event

#

it'll return the old member object and the new one

#

just check which role is added/removed in the new one

eternal osprey
tulip ledge
#

You just check the roles of one object and the roles of the other

#

and if there's a nw one in the new object a new role has been added

deft citrus
#

users = json.load(f) why get

#

red under

#

it

#

undefiend name json

tulip ledge
#

python?

#

js?

deft citrus
#

ye

#

py

tulip ledge
#

show more code

#

and wdym with red under it

deft citrus
#

'''
@mint spearient.command()
async def balance(ctx):
await open_account(ctx.author)

async def open_account(user):
with open('mainbank.json','r') as f:
users = json.load(f)
if str(user.id) in users:
return False
else:
users[str(user.id)]['wallet']= 0
users[str(user.id)]['bank']= 0

with open('mainbank.json','w') as f:
json.dump(users,f)
'''

tulip ledge
#

did u import json?

deft citrus
#
@client.command()
async def balance(ctx):
  await open_account(ctx.author)

async def open_account(user):
  with open('mainbank.json','r') as f:
    users = json.load(f)
  if str(user.id) in users:
    return False
  else:
    users[str(user.id)]['wallet']= 0
    users[str(user.id)]['bank']= 0

  with open('mainbank.json','w') as f:
    json.dump(users,f)

#

@tulip ledge oh

tulip ledge
#

did u import json?

deft citrus
#

understand

#

i forget

tulip ledge
#

haha happens to the best of us

slender thistle
#

Hint: you'll have to move away from your .sjon file database system to an appropriate one that is able to actually handle your needs

slender thistle
#

Was

tulip ledge
#

Oh, what happened?

slender thistle
#

Shit

deft citrus
#

Ignoring exception in command balance:
Traceback (most recent call last):
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "main.py", line 77, in balance
await open_account(ctx.author)
File "main.py", line 85, in open_account
users[str(user.id)]['wallet']= 0
KeyError: '892251811732406272'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 903, in invoke
await ctx.command.invoke(ctx)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 859, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 94, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: KeyError: '892251811732406272'

#

wht error is this

tulip ledge
#

Not the best at python but I think your object users is missing the '892251811732406272' key

#

try printing users

slender thistle
#

That means there's no data for a user with that ID

earnest phoenix
#

Just call setdefault to ensure the key always exists

deft citrus
#

Ignoring exception in command balance:
Traceback (most recent call last):
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "main.py", line 79, in balance
wallet_amt = users[str(user.id)]['wallet']
UnboundLocalError: local variable 'users' referenced before assignment

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 903, in invoke
await ctx.command.invoke(ctx)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 859, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 94, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: UnboundLocalError: local variable 'users' referenced before assignment

#

see

#
@client.command()
async def balance(ctx):
 await open_account(ctx.author)
 user = ctx.author
 wallet_amt = users[str(user.id)]['wallet']
 bank_amt = users[str(user.id)]['bank']

 users = await get_bank_data()

 em = discord.Embed(title =f"{ctx.author.name}'s balance",color=discord.Color.red())
 em.add_field(name = 'Wallet balance',value = wallet_amt)
 em.add_field(name = 'bank balance',value = bank_amt)
 await ctx.send(embed=em)
async def open_account(user):
  
  users = await get_bank_data()

  if str(user.id) in users:
    return False
  else:
    users[str(user.id)] = {}
    users[str(user.id)]['wallet']= 0
    users[str(user.id)]['bank']= 0

  with open('mainbank.json','w') as f:
    json.dump(users,f)
  return True  

async def get_bank_data():
  with open('mainbank.json','r') as f:
    users = json.load(f)
  return users
slender thistle
#

That error usually shows that you're creating a variable only in one branch of if-else and not in both

deft citrus
#

any error check in this code

earnest phoenix
#

Format your code mmLol

slender thistle
#

^ please for the love of God

earnest phoenix
#

I wonder why it returns boolean when you don't even care about the return value when calling it

#

It would make more sense for open_account to return the dict instead so that the command callback doesn't need to call get_bank_data again

slender thistle
#

Copied code!

earnest phoenix
#

Ah yes, gotta be it

deft citrus
#

is it fake

#

i guess

#

skem

boreal iron
#

It’s not me, no

deft citrus
#

ban him

#

my server got raided

#

yesterday

#

400+ members

#

one moderrator got hacked

#

and sent this same thing

#

banned ig

earnest phoenix
#

Weird flex but ok

deft citrus
#

bank worked

#

lol

#

it worked

#

op

#

i am happy

onyx torrent
deft citrus
#

lol

#

wht was tht

#

omg is your server getting raided

#

they are hackers

spark flint
#

its not being raided

#

its just stupid people falling for scams

boreal iron
#

In other words people who actually think they can get something for free on the 'net

deft citrus
#

how to

#

add

#

^give @spark flint 1

#
@client.command()
async def give(ctx,*,keey):
  await open_account(ctx.author)
  users = await get_bank_data()
  user = ctx.author
  earnings = keey

  users[str(user.id)]['wallet'] += earnings
#

made this

#

much

spark flint
#

what

#

that won't work

deft citrus
#

then how

spark flint
#

async def give(ctx, user:discord.User, amount):

#

then don't do user = ctx.author

#

or do async def give(ctx, amount, user:discord.User=None):

#

and add py if not user: user = ctx.author

#

now you can do
^give 10 @deft citrus

earnest phoenix
#

im more of a user = user or ctx.author fan

hard dust
#

Quick Question: I have created an inbound rule on my Firewall (on my server) but can't seem to get any response. Telnet tells me that the port is closed. Am I missing something here?

boreal iron
#

Did you set the right protocol?

#

Just show a screenshot of the role please, as well as the input policy to be sure.

hard dust
#

Rest is set to any

slender thistle
#

I personally prefer it

boreal iron
boreal iron
#

Is this a webhook listener (regarding the name)?

hard dust
#

Yes

boreal iron
#

Alright and sending a request to port 5000 doesn't go through?

boreal iron
#

Is it actually a system firewall or... ? Looks a little like Windows firewall manager.

hard dust
#

oh

#

wrong ip,

boreal iron
#

Well

hard dust
#

also tried with the correct one

#

still doens't work

boreal iron
#

localhost won't bring you far

hard dust
#

I know know haha, but also doesn't work with the right one

boreal iron
#

What about my question above?

boreal iron
#

Ah okay yeah as I assumed

#

Do you host the code locally (at home) or a server with static IP?

hard dust
#

on a server with an static ip

boreal iron
#

Does the provider maybe has a configurable firewall in his panel (active) as well?

hard dust
#

Don't think so

#

I bought an root server, I did set it up myself.

#

So they don't even know it's an windows server

#

and can't seem to find any settings regarding this

boreal iron
#

Hmm nothing wrong it, to not pay the fucking license costs

#

As keys are cheap to get

#

That's getting a little difficult then

hard dust
#

Yeah, Maby I could ask the hoster

boreal iron
#

Well make sure in the first place there's really no firewall active in your server admin panel somewhere

#

That's very often case for default (linux) servers with preconfigured rules

#

Windows in your case is running on the server not as container or VM?

hard dust
#

It's running on the root server

#

not virtually or anything

boreal iron
#

ok, the rule should work then

#

You may wanna try a different service to send a webhook

#

curl -d '{"key":"value", "key2":"value2"}' -H "Content-Type: application/json" -X POST http://your-ip:5000/route

#

You can test that yourself using curl

#

(preinstalled in your Windows command prompt)

hard dust
boreal iron
#

The route is correct?

hard dust
#

yeah if i use localhost on my server, with same command

#

I get a response

boreal iron
#

hmm localhost doesn't need to pass the firewall, means the service is running, but really blocked for some reason

#

I wonder why, if your provider would have an active firewall in place, you wouldn't be able to connect to RDP, too I guess

#

You may wanna try a different port

hard dust
#

Will do that

boreal iron
#

Like 31500

hard dust
#

I'm now getting an diffrent error

#

maby it's wokring now

#

but the application has an error

boreal iron
#

Ok, which error?

hard dust
#

never mind. I was looking wrong. Hopes died really fast lol

#

I changed the port now, but sadly still an timeout

boreal iron
#

Also changed the firewall rule?

hard dust
#

I'm getting an response on my server (localhost)

hard dust
hard dust
#

That's from the API (Listener)

boreal iron
#

Errr... does the API even listen to non local requests?

hard dust
#

That's what I thought now too

boreal iron
#

localhost usually means localhost, not 0.0.0.0 as synonym for your external network IP

earnest phoenix
#

isn't there a PORT env variable on VPSs that you're supposed to listen to?

hard dust
boreal iron
#

Change the IP address to 0.0.0.0

#

If you can in your script

lyric mountain
vivid fulcrum
#

just do http://*:port

boreal iron
#

Oh * as placeholder

vivid fulcrum
#

it'll automatically cover everything needed iirc

boreal iron
#

Why using the same as everyone else if you can use a different one

hard dust
deft citrus
#
client.command()
@commands.is_owner()
async def give(ctx, user:discord.User, amount):
  user = ctx.author
  await open_account(ctx.author)
  users = await get_bank_data()
  user = ctx.author
  earnings = amount
  if not user:
   user = ctx.author
  users[str(user.id)]['wallet'] += earnings
#

correct

earnest phoenix
#

It's wrong because it's python

boreal iron
deft citrus
#

op

hard dust
#

I'm trying again now, also obviously thanks to you @boreal iron I owe you something

boreal iron
wheat mesa
boreal iron
wheat mesa
#

NO

#

I WILL NOT BE CONDEMNED BY “JAVA USER”

deft citrus
#

client.command()
@commands.is_owner()
async def give(ctx, user:discord.User, amount):
user = ctx.author
await open_account(ctx.author)
users = await get_bank_data()
user = ctx.author
earnings = amount
if not user:
user = ctx.author
users[str(user.id)]['wallet'] += earnings

#

is it correct

earnest phoenix
lyric mountain
#

damn code

#

was writing that

hard dust
earnest phoenix
hard dust
#

I'm so happy right now

#

and I'm hating myself for being such an idiot

boreal iron
#

Great, also thank cry for clarifing the placeholder

#

not that he would deserve it but why not

hard dust
#

@boreal iron Thanks alot for sticking around with me, really helped me alot

boreal iron
#

yee np, invoice is on it's way

hard dust
#

You already helped me twice, on the third I would really expect an invoice KEKW

boreal iron
#

I will remember, Sir

hard dust
lyric mountain
#

until you forgor 💀

boreal iron
#

aye... that's the price of getting old

#

(or being old)

hard dust
#

how old are you?

boreal iron
#

well I usually don't share private infos in the 'net pepowot

hard dust
#

understandable

boreal iron
#

let's say around 30

hard dust
#

that's based

#

I mean not really that old

boreal iron
#

I feel like 60 at some days, you know

#

50 at good days

hard dust
#

me too and I'm in my early 20

boreal iron
#

alright, gonna get some food, see ya

hard dust
#

sure man, enjoyspoonfeed

old cliff
#

I feel like 70 when I'm ill

deft citrus
#

@boreal iron

#

you know python

#

right

lyric mountain
#

"is it correct?"

deft citrus
lyric mountain
#

did u even try ur code?

deft citrus
#

it does not work 1 error

#

shwoing

lyric mountain
#

then show the error

deft citrus
#
@client.command()
@commands.is_owner()
async def give(ctx, user:discord.User, amount):
  if not user:
   user = ctx.author

  await open_account(ctx.author)
  users = await get_bank_data()
  
  earnings = amount
  
  users[str(user.id)]['wallet'] += earnings



@client.command()
async def balance(ctx):
 user = ctx.author
 await open_account(ctx.author)
 users = await get_bank_data()
 
 wallet_amt = users[str(user.id)]['wallet']
 bank_amt = users[str(user.id)]['bank']

 

 em = discord.Embed(title =f"{ctx.author.name}'s balance",color=discord.Color.red())
 em.add_field(name = 'Keys',value = wallet_amt)
 em.add_field(name = 'Boxes',value = bank_amt)
 await ctx.send(embed=em)

async def open_account(user):
  
  users = await get_bank_data()

  if str(user.id) in users:
    return False
  else:
    users[str(user.id)] = {}
    users[str(user.id)]['wallet']= 0
    users[str(user.id)]['bank']= 0

  with open('mainbank.json','w') as f:
    json.dump(users,f)
  return True  

async def get_bank_data():
  with open('mainbank.json','r') as f:
    users = json.load(f)
  return users
lyric mountain
#

showing only the code doesn't help at all

deft citrus
#
Ignoring exception in command give:
Traceback (most recent call last):
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "main.py", line 86, in give
    users[str(user.id)]['wallet'] += earnings
TypeError: unsupported operand type(s) for +=: 'int' and 'str'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 903, in invoke
    await ctx.command.invoke(ctx)
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 859, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 94, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: unsupported operand type(s) for +=: 'int' and 'str'
#

see

#

error

#

@lyric mountain

lyric mountain
#

don't ping, I'm reading

deft citrus
#

ohk

#

sorry

lofty zephyr
#

O

lyric mountain
#

the issue is that you're trying to += two values of different types

deft citrus
lyric mountain
#

the youtuber knows nothing abt your use-case, don't copy other people's code

#

do print(users[str(user.id)]['wallet'])
and print(earnings)

#

then show the console result

rustic nova
boreal iron
#

weeew does imgur now block Discord's user agent wtf

#

pictures are available but not in Discord

lyric mountain
#

not as far as I know

#

maybe it's just another weird cdn issue

boreal iron
#

hmm may embed doesn't show it anymore, the chat does

#

weird

#

and there we go, magically working again

#

I wonder since imgur recently block TeamSpeak for some reason

lyric mountain
#

teamspeak is shit

boreal iron
#

well it's actually not, the fact you can host local servers with no ping issues and there's a full encryption of the chat and voice, makes it still the leader in it's segment

#

but you can't compare it to an entire different platform like Discord, mostly focusing on chatting

#

Even if Discord may supports an higher (possible) bandwith for voice streams, it still has a high ping, instable connection and like no guaranteed security

#

Which is horrible for the segment that relies on TeamSpeak like E-Sports

lyric mountain
#

discord could have p2p voice chat

#

like, without middleman

boreal iron
#

Still… the reliability of the client and group chats are bad

#

Or impossible

#

Also the new TeamSpeak is build using the chromium framework makes it available later on any platform and browser without needing to support different apps

#

Except Android, since it’s shit freerealestate

native walrus
#

it's blocked?

#

seems fine to me

boreal iron
#

Nah the embed just didn’t show it a few times i tried

#

Probably a temporary timeout or something

quartz kindle
#

kweeb/keeb

#

or whatever is the word for koreaboo

lyric mountain
#

keeb

royal herald
#

how to remove old lockfile ?

nova basin
#

I would like to know if there is a problem with the title and the color of the categories in the computer version and after I updated Microsoft Edge neither the title nor the categories are working in the computer version but in the mobile version it is still working. I don't understand the error.

deft citrus
deft citrus
#

anyone online

#

^give 1000

#

^balance

spark flint
#

Your bot isnt here

deft citrus
#

oh

#

i forget

#

Ignoring exception in command give:
Traceback (most recent call last):
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "main.py", line 84, in give
users[str(user.id)]['wallet'] += earnings
TypeError: unsupported operand type(s) for +=: 'int' and 'str'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 903, in invoke
await ctx.command.invoke(ctx)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 859, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 94, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: unsupported operand type(s) for +=: 'int' and 'str'

#

pls fix

#

@spark flint

#

see

spark flint
#

Do int(earnings)

deft citrus
#
@client.command()
@commands.is_owner()
async def give(ctx, user:discord.User, amount):
  
  await open_account(ctx.author)
  users = await get_bank_data()
  if not user:
    user = ctx.author
  

  print(users[str(user.id)]['wallet'])
  print(amount)
  users[str(user.id)]['wallet'] += amount
earnest phoenix
#

Just type hint amount with int

spark flint
#

Also do int(users[str(user.id)][“wallet”])

earnest phoenix
#

am just removing music command from my bot :)

spark flint
#

Make sure the output is an int

earnest phoenix
#

as its on youtube api

deft citrus
#

bro its not working

spark flint
#

Same error?

spark flint
deft citrus
#

yes

#

done

#
@client.command()
@commands.is_owner()
async def give(ctx, user:discord.User, amount):
  
  await open_account(ctx.author)
  users = await get_bank_data()
  if not user:
    user = ctx.author
  int(amount)
  int(users[str(user.id)][“wallet”]) += amount
#

see

spark flint
#

Do int(amount) too

deft citrus
#

see

#

down

spark flint
#

I meant int(amount) after the other int

#

Not a separate thing

deft citrus
#
@client.command()
@commands.is_owner()
async def give(ctx, user:discord.User, amount):
  
  await open_account(ctx.author)
  users = await get_bank_data()
  if not user:
    user = ctx.author
  int(amount)
  int(users[str(user.id)][“wallet”]) += amount
  int(amount)
  
#

bro

#

correct

#
Ignoring exception in command give:
Traceback (most recent call last):
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "main.py", line 84, in give
    (users[str(user.id)]['wallet']) += amount
TypeError: unsupported operand type(s) for +=: 'int' and 'str'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 903, in invoke
    await ctx.command.invoke(ctx)
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 859, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 94, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: unsupported operand type(s) for +=: 'int' and 'str
#

@spark flint

#

error

spark flint
#

Lemme fix when I get home

deft citrus
#
File "main.py", line 84
    int(users[str(user.id)]['wallet']) += amount
    ^
SyntaxError: cannot assign to function call
wheat mesa
#

Seems very apparent that he’s just looking for someone to write his code for him 😛

deft citrus
wheat mesa
#

Same concept applies

deft citrus
#

1 error is coming i have been looking for hours

#

still not yet fixed

slender thistle
#

Just...

#

amount: int

wheat mesa
#

Seems like a pretty basic fix to me

slender thistle
#

Seriously, take a step back and get a hang of basic Python first

#

All issues so far you've faced could've been prevented if you did that

wheat mesa
#

Learning how to read errors is an invaluable skill in programming

deft citrus
slender thistle
#

Where did you put it?

deft citrus
#

up

#

highest

slender thistle
#

Show

deft citrus
#
@client.command()
@commands.is_owner()
async def give(ctx, user:discord.User,*, amount):
  amount: int
  await open_account(ctx.author)
  users = await get_bank_data()
  if not user:
    user = ctx.author
  
  users[str(user.id)]['wallet'] += amount
wheat mesa
#

🤦‍♂️

slender thistle
deft citrus
wheat mesa
#

That’s why he’s saying to step back and learn python

spark flint
#

Back to my point - don’t code if you don’t know the language well enough

#

I learnt python for 6 months before starting bot development

wheat mesa
#

I started off programming with making a discord bot

#

Looking back on the code

#

It was horrendous

#

But I took a step back to learn js before continuing

#

And it helped a ton

slender thistle
#

My first bot was a genuine disaster

wheat mesa
#

Same

spark flint
#

Same

slender thistle
#

I did the same shit you did, got into Discord bots before learning Python itself

#

It bit me a lot

wheat mesa
#

I’m proud of myself for not creating an event listener for every command though at least!

#

I understand the appeal of making a discord bot to start with

#

It’s fun to see your creation actually used

boreal iron
#

I saw somebody sharing this today or yesterday as well

wheat mesa
#

Lmfao

boreal iron
#

Actually 5238 members

#

wtf

earnest phoenix
slender thistle
earnest phoenix
#

Though at least I knew a bit about how to do js

wheat mesa
#

My CS teacher just realized today that Java applets are dead

earnest phoenix
#

Like the fact that it sucks AF

wheat mesa
#

They’ve been dead since 2019

earnest phoenix
wheat mesa
#

You will be remembered flash

earnest phoenix
#

Imagine if Adobe brings back flash as an april fools joke

boreal iron
#

Flash and Java should both be forbidden, banned, shot, hanged, drowned etc.

wheat mesa
#

Imagine the message intent is just a big April fools joke

earnest phoenix
#

also I heard the language that flash uses is based on ecmascript 4 spec

boreal iron
wheat mesa
#

“Message intent releasing in April 2022”
April 2022: “April fools! We just wanted you losers to use slash commands for once!”

lament rock
boreal iron
#

slash commands being dropped in april

#

fuck dude, upgrading my small 1080p secondarys to 4k

#

the arm holding the monitor just looks like a banana

#

even if it says, they can hold up to 8 kg per monitor

lament rock
#

whats wrong with a banana

boreal iron
#

they can shit

boreal iron
lament rock
#

if (bending) return dont();

boreal iron
#

tomorrow the last one arrives

#

then both sides are bend as fuck

#

let's hope it doesn't break and fell down

#

fuck x3 28" is even larger than my desk, looks so funny

lament rock
#

hi qt

earnest phoenix
#

Looks back

lament rock
deft citrus
#
@client.command()
@commands.is_owner()
async def give(ctx, user:discord.User,*, amount):
  amount: int
  if not user:
    user = ctx.author
  users = await get_bank_data()
  users[str(user.id)]['wallet'] += amount
  await open_account(ctx.author)
#

is this correct

#

norizon

wheat mesa
deft citrus
earnest phoenix
#

Have you seen the first link I sent? There's an example there

wheat mesa
#

I’m no python user, but I can almost certainly guarantee that if you read what norizon sent that you’ll be able to tell what to do

deft citrus
#

oh i understand

#

the link was not loading

#

when i click

#

but now it loaded

#

ty

#

very much

#
int(users[str(user.id)]['wallet']) += amount
#

why showing error in this

#

?

slender thistle
#

Because you're not assigning a value to a variable

earnest phoenix
#

Get rid of that int

deft citrus
#

lol

#

skem

earnest phoenix
#

You're the one who set the initial value, and I saw it was 0. So there's no need to cast it to int

deft citrus
#
@client.command()
@commands.is_owner()
async def give(ctx, user:discord.User,amount: int):
  
  user = ctx.author
  await open_account(ctx.author)
  users = await get_bank_data()
  users[str(user.id)]['wallet'] += amount
  print(amount)
#

no error showing but

#

amount not adding

earnest phoenix
#

You ain't writing back to the file

deft citrus
deft citrus
earnest phoenix
#

You already have it in your other function

deft citrus
#
@client.command()
@commands.is_owner()
async def give(ctx, user:discord.User,amount: int):
  
  user = ctx.author
  await open_account(ctx.author)
  users = await get_bank_data()
  users[str(user.id)]['wallet'] += amount
  print(amount)
  
  
  
  


@client.command()
async def balance(ctx):
 user = ctx.author
 await open_account(ctx.author)
 users = await get_bank_data()
 
 wallet_amt = users[str(user.id)]['wallet']
 bank_amt = users[str(user.id)]['bank']

 

 em = discord.Embed(title =f"{ctx.author.name}'s balance",color=discord.Color.red())
 em.add_field(name = 'Keys',value = wallet_amt)
 em.add_field(name = 'Boxes',value = bank_amt)
 await ctx.send(embed=em)

async def open_account(user):
  
  users = await get_bank_data()

  if str(user.id) in users:
    return False
  else:
    users[str(user.id)] = {}
    users[str(user.id)]['wallet']= 0
    users[str(user.id)]['bank']= 0

  with open('mainbank.json','w') as f:
    json.dump(users,f)
  return True  

async def get_bank_data():
  with open('mainbank.json','r') as f:
    users = json.load(f)
  return users
earnest phoenix
#

This one specifically

deft citrus
#

here wht to do

earnest phoenix
#

As people have mentioned, it's a good idea to take a step back and learn the basics first

deft citrus
#

delete

earnest phoenix
#

I'm telling you that's how you write back to the file

#

Don't blindly copy-paste people's code, try to understand them as well

deft citrus
#

other all a youtubers

earnest phoenix
#

Doesn't change my point

deft citrus
#

@earnest phoenix oh i understand now

#

ty

#

worked yes

#

it worked

#

finally

#

anyone could sent documentation of

#

emojis

#

or animation

lament rock
#

You're being too ambiguous with what you're asking

earnest phoenix
#

^

earnest phoenix
#

somebody send documentation for how to send a single message instead of 6

sterile brook
earnest phoenix
tender raft
#

My bad sorry for the ping

orchid apex
#

hello

onyx torrent
#

Yes

onyx torrent
orchid apex
#

how do i script

#

and will

#

you be able to teach me in the next 2 hours or so

onyx torrent
#

Specify ur programming language

orchid apex
#

i pretty much know nothijng about scripting other than its complicated

onyx torrent
#

Wait

#

Scripting?

#

What do you want?

orchid apex
#

making a bot

#

discord bot

onyx torrent
#

In what programming language?

orchid apex
#

no clue

#

...

onyx torrent
orchid apex
#

maybe

#

is python somethin

slender thistle
#

There's plenty of languages

orchid apex
slender thistle
#

JavaScript and Python are the most popular ones by far as first-time languages

orchid apex
#

i see

#

so whats the difference

slender thistle
#

How they function, how they're compiled/interpreted, the syntax, the libraries written for them

orchid apex
#

hmmmmmmm

slender thistle
#

Different ecosystems basically

orchid apex
#

will you be able to teach me how to make a music bot soon like in a few

#

1:30mins or so

earnest phoenix
orchid apex
#

ee

lyric mountain
#

music bot that early? forget abt it

orchid apex
#

oh damn

#

i guess normal bot then

#

1 hr 30 mins

slender thistle
#

Music bot from scratch with no programming knowledge... yeah chief no

orchid apex
#

ill be back

slender thistle
#

It will take a LOT of time to learn, not just one hour

#

It took me weeks and even months to get my shit together well enough to stop breaking my stuff as often

orchid apex
#

no ill be back in 1hr and 30 mins

lyric mountain
#

learning how to code with no prior knowledge in 1 hour is virtually impossible

#

even 1 week is stretching a lot

orchid apex
#

i just wanna learn how to script

slender thistle
#

Independence is appreciated in the world of programming

cinder patio
slender thistle
#

I doubt you'll find anyone here willing to teach you personally

orchid apex
#

......

slender thistle
#

Yeah, see? It takes time and effort, so it's either generic tutorials or paid tutoring

orchid apex
#

sigh i guess i cant learn scripting

#

cuz i cant pay anyone ee

native walrus
lyric mountain
#

just not that fast

slender thistle
#

Why don't you just... use free courses on the Internet?

cinder patio
#

teach yourself man

native walrus
#

it's just a skill like anything else

cinder patio
#

if you can't do that then it's just not for you

slender thistle
#

Py and JS are popular as hell, they have lots of coverage on the internet

orchid apex
#

play yeah.-. i cant teach myself how to type abdeca and =

lyric mountain
#

like, start with the concepts, learn what each thing means

orchid apex
#

eee

lyric mountain
#

the download required tools to try it yourself and play with it around

cinder patio
#

How old are you btw

orchid apex
#

cant tell

#

but u prob already know

cinder patio
#

I don't

earnest phoenix
slender thistle
#

lol

earnest phoenix
#

why appears signal:killed in my console?

#

i can't make my bot work

#

it doesn't give any clue on what it is making that signal:killed

deft citrus
#

ty i made my shop command very welL ty Guys!!!!!!!!!!!!!

lyric mountain
#

or ["color", "colour"].contains(arg)

jovial nexus
#

I have an array, for example [{id:1}, {id:1}, {id:1}, {id:2}, {id:2}, {id:3}]And i want to get a list like 1st: ID of 1 with 3 entries. 2nd: ID of 2 with 2 entries. 3rd: ID of 3 with 1 entry
Does someone know how to do this?

earnest phoenix
#
/home/runner/boro-bott/node_modules/bindings/bindings.js:135
  throw err;
  ^

Error: Could not locate the bindings file. Tried:
``` bruh
#

whyy

earnest phoenix
lyric mountain
#

err

#

try updating the lib, or see if it requires above and specific node version

earnest phoenix
#

my node is v12 and i can't update it so updating lib will work or it'll give more errors?

lyric mountain
#

can't tell, check the lib npm page

earnest phoenix
lyric mountain
#

dang, includes

#

hate js

earnest phoenix
#

plus arg.toLowerCase() probs

snow urchin
#
c:\users\callu\appdata\local\node-gyp\cache\17.0.0\include\node\v8-persistent-handle.h(10): fatal error C1083: Cannot open include file: 'v8-weak-callback-info.h': No such file or directory [E:\Developing\Ryft\Discord-Bot\node_modules\erlpack\build\erlpack.vcxproj]
earnest phoenix
#

any solution?

#

i deleted node modules

#

now i have to wait

earnest phoenix
#
../src/node-opus.cc: In member function 'Napi::Value OpusEncoder::Decode(const Napi::CallbackInfo&)':
../src/node-opus.cc:134:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
``` what??
#

adding discordjs/opus

lyric mountain
#

tf is .cc?

native walrus
#

c source code

earnest phoenix
native walrus
#

used interchangably with C++ sometimes

lyric mountain
#

wouldn't it be .c?

jovial nexus
#

.cc = .cpp

native walrus
#

this is a warning though it shouldn't prevent you from compiling

earnest phoenix
#

oh then it's compiled?

wheat mesa
#

Seems like an issue with the package

earnest phoenix
#

i added in 30 minutes so if it's added i won't need to add it again

wheat mesa
#

Try reinstalling it

earnest phoenix
wheat mesa
#

Although it’s a warning so it shouldn’t be preventing you from running your project

earnest phoenix
#

gyp ERR! node -v v12.22.6
gyp ERR! node-gyp -v v8.2.0
gyp ERR! not ok

native walrus
#

lol

earnest phoenix
#

bruhhh

#

gyp ERR! find Python Python is not set from command line or npm configuration
gyp ERR! find Python Python is not set from environment variable PYTHON
gyp ERR! find Python checking if "python3" can be used
gyp ERR! find Python - "python3" is not in PATH or produced an error
gyp ERR! find Python checking if "python" can be used
gyp ERR! find Python - executable path is "/usr/bin/python"
gyp ERR! find Python - version is "2.7.13"
gyp ERR! find Python - version is 2.7.13 - should be >=3.6.0
gyp ERR! find Python - THIS VERSION OF PYTHON IS NOT SUPPORTED
gyp ERR! find Python
gyp ERR! find Python **********************************************************
gyp ERR! find Python You need to install the latest version of Python.
gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
gyp ERR! find Python you can try one of the following options:
gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
gyp ERR! find Python (accepted by both node-gyp and npm)
gyp ERR! find Python - Set the environment variable PYTHON
gyp ERR! find Python - Set the npm configuration variable python:
gyp ERR! find Python npm config set python "/path/to/pythonexecutable"
gyp ERR! find Python For more information consult the documentation at:
gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
gyp ERR! find Python **********************************************************
gyp ERR! find Python
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Python installation to use

GitHub

Node.js native addon build tool. Contribute to nodejs/node-gyp development by creating an account on GitHub.

#

finding python??

native walrus
#

install python3

earnest phoenix
#

in js it's possible?

native walrus
#

the build tool for node is written in python

earnest phoenix
#

and how do i install it

native walrus
#

if you want to compile native addons on the go you need to be able to run the build tool

#

idk google it

earnest phoenix
sterile brook
wooden kindle
#

class MessageDelete {
    constructor(client) {
        this.client = client;
    };

    async run(message) {
        if (message.author.bot) return;
        if (!message.content) return;
        const regex = /<@!?(1|\d{17,19})>/;
        if (message.content.match(regex)) {
            const embed = new RichEmbed()
                .setColor('RED')
                .setAuthor(message.author.username, message.author.displayAvatarURL)
                .setDescription(`Well well well, **${message.author.username}** decided to ghost-ping a user..`)
                .addField('Their Message', `\`\`\`${Util.escapeMarkdown(message.content)}\`\`\``);
            return message.channel.send(message.author, embed);
        };
    };
};

module.exports = MessageDelete; ```
#

Will this work

earnest phoenix
#

oh quick.db needs python to be downloaded

#

i didn't know? I have a bot running without python and quick.db

#

when python installs, i'll check if works

rugged terrace
#

how does one get all members in a message.guild (discord.js)

#

not just cache

wooden kindle
#

What like all ids or what

rugged terrace
#

yes

#

message.guild.members.cache.forEach is what i was using

tulip ledge
#

How do you securely make your front end communicate with your backend for accounts etc?

#

I already have a database hooked up to an api which uses jwt for verification but do I have to use the IP of the server hosting the database in the code of the front end?

#

Because won't that make it vulnerable to attacks?

boreal iron
boreal iron
rugged terrace
#

yea i think i found it, would message.guild.members.fetch() be a solution to this?

boreal iron
#

yeah

#

Why would you even need to fetch all?

rugged terrace
#

server leaderboard for points in a simulated betting system
although i think i'm gonna find a different way to go about this as i'm sure it may get messy for bigger servers

boreal iron
#

This can always be seen in the source code and can be manipulated at any time by the client

#

Server side code can’t

boreal iron
#

I mean the users name and tag can be stored in your database

#

Doesn’t need to be fetched and live

split hazel
#

anyone happen to know how to get the first 16 bits from a 32 bit number?

spark flint
#

In which language

solemn latch
#

just bitshift?

split hazel
#

actually i need to get the bits between 8 and 15 (yeah weird)

#

in assembly but it really doesnt matter here

#

some shifting and anding probably

sterile lantern
#
let myRole = message.guild.roles.cache.get("821785879961927720");
user.roles.add(myRole)```

why isnt this working
#

user is defined as

#
User {
  id: '293060399106883584',
  system: null,
  locale: null,
  flags: UserFlags { bitfield: 640 },
  username: 'samm',
  bot: false,
  discriminator: '0021',
  avatar: 'a_701ceb57a053c8fb7b9473b58327f449',
  lastMessageID: '900482019224596532',
  lastMessageChannelID: '898358737880879104'
}
cinder patio
#

users don't have roles

#

members do

solemn latch
split hazel
#

actually i got it lol

#

i first shifted it to the right by 8 bits to get the low 8 bits at the start and then anded by 0xFF to extract the 8 bits

shr eax, 8
and eax, 0xFF
sterile lantern
solemn latch
split hazel
#

an os 😳

solemn latch
#

oh hype

split hazel
#

need this to be able to save the attributes of the flags register

#

well i can save it in an 8 bit number

#

actually i should

#

instead of converting it to 32 bits and back for convenience which wastes performance

sterile lantern
solemn latch
#

what is your code?

sterile lantern
#
let myRole = message.guild.roles.cache.get("821785879961927720");
member.roles.add(myRole)```
solemn latch
#

how did you get member?

sterile lantern
#

const member = message.guild.members.fetch(user)
this prints

  lastMessageID: '900483475507916862',
    lastMessageChannelID: '898358737880879104',
    premiumSinceTimestamp: 0,
    deleted: false,
    nickname: 'Lxphere',
    _roles: [
      '745165233911365665',
      '898698578212585513',
      '866846789391089744',
      '868923073427017778',
      '898700495215022100',
      '868664428831309855',
      '821572340507738143'
    ],```
i cut off most of it
#

but thats what some of ikt prints

#

top part says this

Promise {
  GuildMember {
    guild: Guild {
      members: [GuildMemberManager],
      channels: [GuildChannelManager],
      roles: [RoleManager],
      presences: [PresenceManager],
      voiceStates: [VoiceStateManager],
      deleted: false,
      available: true,```
sterile lantern
earnest phoenix
#

file:///home/runner/bott/index.js:1
const mongoose = require("mongoose");
^

ReferenceError: require is not defined

#

whatt??

sterile lantern
#

whatlanguage are you using??

earnest phoenix
#

nodejs

#

or js

sterile lantern
#

do you have it installed on whatever you're running it on??

earnest phoenix
#

??

#

what i have to install

sterile lantern
#

did you install node.js...

earnest phoenix
#

yeah

sterile lantern
#

go to the console and run node -v

earnest phoenix
#

it's v12

sterile lantern
#

and ss what it prints

earnest phoenix
sterile lantern
#

send your package.json here

cinder patio
sterile lantern
#

oh ty

earnest phoenix
#

i have "type": "module" because it gives ES error

jolly vale
#

hello

#

i need help with something on discord py, its hard to explain on text so can someone hop on vc and try to help?

earnest phoenix
#

why using node-fetch is using ES modules?

#

i'm getting error

#

fixed

split hazel
#

i found when people ask for help and then when you leave them for a while they're forced to try and research on their own more thoroughly which leads them to solve their own issue

boreal iron
#

Even more strange is the fact to ask in Discord than asking google freerealestate

jolly vale
jolly vale
split hazel
#

can you just explain your issue

#

most people wont go out of their way to hop into vc

boreal iron
#

Watching the context we obviously didn’t speak about you

#

But doesn’t matter

split hazel
#

i lost so much sleep because of my operating system

boreal iron
#

huh? How

split hazel
#

well

#

its hard

#

and by os i mean developing it lol

boreal iron
#

Developing your own OS … poor boy

#

That really takes time i guess

sterile brook
#

developing os when os whales exist

split hazel
#

its a really unique experience though

#

one that no program no matter how low level can give you

#

its painful yet rewarding

#

you also learn a lot of c++ and assembly

native walrus
#

one day I will work on a compiler when I'm bored enough

split hazel
#

nicee

#

in my os i implemented a pilot version of a task scheduler/switcher

#

works nicely

#

took a month though since i took a big break since i couldnt figure something out

#

only works with assembly programs atm

#

c++ will probably require restoration of more registers and a custom stack

woeful pike
#

https://youtu.be/bnnacleqg6k this dude is so good

Rust is a unique programming language that blends imperative and functional concepts to make low-level systems safer. However, compared to other modern languages, designing APIs in Rust requires a fundamentally different mindset -- for example, designing without classes or inheritance. In this talk, I will live-code the design of a simple Rust A...

▶ Play video
split hazel
#

no

wicked pivot
#
for(const test of [1, 2, 3){}```
how can I make it face not all of a sudden but every 1 second for example
lyric mountain
#

create a promise with setTimeout tp resolve it and await

woeful pike
#

create an asyncIterator that waits 1 second after yielding the next value

#
for await (const test of intersperse(wait(1), [1, 2, 3])) {

}

epic gamers

spark flint
#

I have no idea what that does

#

But Xet big brain

woeful pike
#

intersperse takes an item and puts in in between every other element in an array so you get

[1, wait(1), 2, wait(1), 3]

but these functions don't exist in js so you'd have to make it work by hand

spark flint
#

Ah

woeful pike
#

but like this is a stupid idea so it doesn't matter

lyric mountain
#

Was that a thing in js since when?

woeful pike
#

a couple years

lyric mountain
#

I never heard abt that, albeit being a quite handy function

earnest phoenix
royal pawn
#

How to edit with normal message and embed message in discord.py

#

My code:

#

(f"**:yay: GIVEAWAY ENDED :yay:**", embed=new_emb_msg)
Error: edit() takes 1 positional argument but 2 were given

quartz kindle
#

you can do that yourself using string.slice lol

earnest phoenix
royal pawn
#

(content=f"**:yay: GIVEAWAY ENDED :yay:**", embed=new_emb_msg)

lucid prawn
#

This used to work and now it say botfile not a function


const bots = ["anti system"];

for(const bot of bots) {
 const botFile = require(`./${bot}/index.js`);
   botFile()
}

onyx torrent
#

folder named anti system exists?

#

check the spaces

low totem
#

there's other ways to do xss though if that's the point

onyx torrent
low totem
#

<img onerror="alert(\"xss\")" src="invalid-url"/>

earnest phoenix
#

hello how solve bot token leak problem for some time some bot token got leak

onyx torrent