#development

1 messages · Page 1167 of 1

opal plank
#

@visual lake go ahead

delicate shore
#

@delicate shore I have 100 lines in my index, But a total of 13k lines in my whole bot.
@pallid igloo i have 7k in total 2k in index

visual lake
delicate shore
#

i also use command handler

opal plank
#

i think im at 30K users

#

@visual lake thats basically a password

pallid igloo
#

Event handler?

opal plank
#

to make sure its coming from top.gg

delicate shore
#

no

pallid igloo
#

what is that ?
@visual lake Api password for your bot.

#

no
@delicate shore Acceptable. Not everybody listens to all the events.

opal plank
#

so whatever password you put there, you also put in the code

#

@pallid igloo thats where you wrong kiddo

visual lake
#

thanks

delicate shore
#

XDF;'

twilit rapids
#

Are we flexing the amount of lines we have TAkiritosip

pallid igloo
#

Not everyone listens to all the events. Only some people (Like me) do.

opal plank
faint prism
#

Hell yeah we are

pallid igloo
#

OH WTF

patent berry
#

wew

opal plank
#

while i may not use all events, i have them declared

#

i dont have to restart my bot whenever i make changes to listen to new events

#

¯_(ツ)_/¯

faint prism
#

Beautiful

opal plank
#

i just re-require the cache

#

ikr @faint prism

#

that was one weird emote

twilit rapids
#

I'm currently at 34k lines of code for my bot

opal plank
#

frick

#

lemme see my git repo rq

twilit rapids
#

99,99% JavaScript, 00,01% JSON

opal plank
#

99,8% typescript

#

get flexed on

faint prism
#

99.9% C# 00.1% HTML?

twilit rapids
opal plank
#

ignore the descriptive commit names

faint prism
twilit rapids
#

I only have javascript and one config.json file

faint prism
#

Guess that doesn't show much other than I'm using pipelines lol

twilit rapids
#

For todo I use Trello

#

Don't need a readme since it's private

faint prism
#

I use azure boards :^)

opal plank
#

i keep a readme backup for the open repo

#

the public repo readme is the same as the private one

twilit rapids
#

¯_(ツ)_/¯

faint prism
#

I'm just glad I didn't use tfvc as my scm over git lol

#

Man I hate tfvc

delicate shore
#

(╯°□°)╯︵ ┻━┻

green kestrel
#

┬─┬ ノ( ゜-゜ノ)

earnest phoenix
#

Friends, help me, I need you online.

high bough
#

Can someone help?

Error: Failed to lookup view "/home/kayuimineko/Cecyl/dashboard/templates/index.ejs" in views directory "/home/kayuimineko/Cecyl/views"
    at Function.render (/home/kayuimineko/Cecyl/node_modules/express/lib/application.js:580:17)
    at ServerResponse.render (/home/kayuimineko/Cecyl/node_modules/express/lib/response.js:1012:7)
    at renderTemplate (/home/kayuimineko/Cecyl/src/dashboard/dashboard.js:85:9)
    at /home/kayuimineko/Cecyl/src/dashboard/dashboard.js:141:5
    at Layer.handle [as handle_request] (/home/kayuimineko/Cecyl/node_modules/express/lib/router/layer.js:95:5)
    at next (/home/kayuimineko/Cecyl/node_modules/express/lib/router/route.js:137:13)
    at Route.dispatch (/home/kayuimineko/Cecyl/node_modules/express/lib/router/route.js:112:3)
    at Layer.handle [as handle_request] (/home/kayuimineko/Cecyl/node_modules/express/lib/router/layer.js:95:5)
    at /home/kayuimineko/Cecyl/node_modules/express/lib/router/index.js:281:22
    at Function.process_params (/home/kayuimineko/Cecyl/node_modules/express/lib/router/index.js:335:12)
    at next (/home/kayuimineko/Cecyl/node_modules/express/lib/router/index.js:275:10)
    at urlencodedParser (/home/kayuimineko/Cecyl/node_modules/body-parser/lib/types/urlencoded.js:91:7)
    at Layer.handle [as handle_request] (/home/kayuimineko/Cecyl/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/home/kayuimineko/Cecyl/node_modules/express/lib/router/index.js:317:13)
    at /home/kayuimineko/Cecyl/node_modules/express/lib/router/index.js:284:7
    at Function.process_params (/home/kayuimineko/Cecyl/node_modules/express/lib/router/index.js:335:12)
delicate shore
#

@earnest phoenix
There are 3 easy steps to getting help!

  1. Post your code
  2. Post your errors
  3. Send a short description of what you are trying to make

NEVER ask “will anybody help me?” or “Hello is anybody willing to help me out” as it wastes and makes helping you out slower, simply post your issue and a helper will get to you as soon as possible.

This is a serious issue and you need to work on this
Visit https://dontasktoask.com/ for more info about this issue.
I hope you understand !
Regards ,
A well wisher

earnest phoenix
#

he literally dropped his errror ?

pallid igloo
#

He did.

delicate shore
#

what

#

he did not

earnest phoenix
#

@delicate shore Place gevt me hosting projekt !!

delicate shore
#

i am talking about @earnest phoenix

earnest phoenix
#

oh mb

delicate shore
#

@delicate shore Place gevt me hosting projekt !!
@earnest phoenix whaawaaaa

faint prism
earnest phoenix
#

Yahh help me place

faint prism
#

@earnest phoenix how can I help you with no information?

delicate shore
#

bruh

#

^^^^

earnest phoenix
#

...

pallid igloo
#

Against popular belief "does not work" is not sufficient information to provide to receive help.
What's the expected (wanted) behaviour, what's the actual (unwanted) behaviour? Do you get any errors? What's your relevant code that might be causing the issue?

delicate shore
#

wait

#

do we need to have

#

a bat file?

#

in order to run my bot ?

faint prism
#

wha-

pallid igloo
#

No.

earnest phoenix
#

@faint prism Place send me website hosting projekt online bot ?

digital ibex
#

no

delicate shore
#

i have a script saying node index.js

pallid igloo
#

You can use the terminal or shell

delicate shore
#

in package.json

pallid igloo
#

U gotta use

#

npm run (scriptname)

faint prism
#

i have a script saying node index.js
@delicate shore To run js outside of a webbrowser you need nodejs

green kestrel
#

@delicate shore bat files are old hat, these days we use batman files to start bots.

#

or vampire files.

#

😂

faint prism
#

@faint prism Place send me website hosting projekt online bot ?
@earnest phoenix I'm not sure what you mean. In this channel we program our own bots

#

@delicate shore bat files are old hat, these days we use batman files to start bots.
@green kestrel or .cmd files :^)

delicate shore
#

wait what

#

i don;t have any such file

#

i don't*

digital ibex
#

you dont need nodejs to run js files outside of webservers

delicate shore
#

I am not getting it

digital ibex
#

u can use other runtimes like deno mmLol

faint prism
#

Well, there you go. NodeJS, a webbrowser, or "deno" is execute JS code

delicate shore
#

wait so

#

my bot is working

earnest phoenix
#

@faint prism wat your name apps ?

delicate shore
#

and i don't need

#

any bat file

#

simple

faint prism
#

Imagine using chrome to host your bot process lol

delicate shore
#

i don't

digital ibex
#

wha

delicate shore
#

some of m friend said me

#

my*

#

that his bat file gives error

digital ibex
#

nodejs and deno are the same things, runtimes

#

discord.js makes that possible, auger

#

its rly gay

slender thistle
#

runtime environments, if we're going into precise definitions

#

d.js-webpack is a thing so :^)

faint prism
#

||I don't use JS. But I'm trying to keep up with you JS devs||

digital ibex
#

yeah, discord.js is stupid

faint prism
#

@faint prism wat your name apps ?
@earnest phoenix "sppa eman" is my name apps. Idk what you mean by that tbh
||The joke: the quotes contain reversed text||

earnest phoenix
#

Send me wibsite online bot place @faint prism

faint prism
slender thistle
#

Any VPS provider will help you to get your bot running 24/7

opal plank
#

i wonder if they get the same level of questions we do shiv

earnest phoenix
#

¯_(ツ)_/¯

slender thistle
#

who?

opal plank
#

VPS's support

#

'my bot errors, pliz fix' and the likes

delicate shore
#

¯_(ツ)_/¯

slender thistle
#

don't know

delicate shore
#

oh sorry

#

no dot

#

by mistake

solemn latch
#

Never worked for a vps host, but from what ive seen, they get a lot of generic setup help requests.

The thing I've seen a lot is users blaming the VPS for user mistakes.

small zenith
#

Whats the minimum specs of azure vps?

#

RAM, CPU, etc....

delicate shore
#

idk

#

use GalaxyGate

#

best

small zenith
#

That needs cc

delicate shore
#

cc?

small zenith
#

Im student i dont have credit card

delicate shore
#

oh

small zenith
#

I got free azure in student pack

delicate shore
#

every vps neeeds credit

#

card for payment

#

oh

#

ok

solemn latch
#

Why do students not have credit cards 🤔

delicate shore
#

I got free azure in student pack
@small zenith which pack is that

small zenith
#

Github education pack @delicate shore

delicate shore
#

which student pack and where?

pale vessel
#

student pack

earnest phoenix
#

glitch v11 mute ?

delicate shore
#

?

earnest phoenix
#

huh

small zenith
#

Why do students not have credit cards 🤔
@solemn latch we dont do jobs we cant pay for it

delicate shore
#

glitch has versions?

pale vessel
#

discord.js maybe?

earnest phoenix
#

he's asking for code i assume

pale vessel
#

glitch v11 mute ?
@earnest phoenix 1. don't use glitch

  1. upgrade to v12
  2. we don't spoonfeed
earnest phoenix
#

rekt

solemn latch
#

Azure vps's start at 1gb of ram with their burst lineup i think @small zenith

earnest phoenix
#

jk

solemn latch
small zenith
#

Hmm Ok thanks

earnest phoenix
#

I need a mute code for v11.

pale vessel
#

did you just-

slender thistle
#

We will not straight up give you any code

earnest phoenix
#

wait

#

i got you guys

#

give me like a minute

pale vessel
#

not the r danny

earnest phoenix
#

Please change my name

pale vessel
#

no.

earnest phoenix
#

change your username

faint prism
#

No

earnest phoenix
#

ok

slender thistle
#

When you make it easily mentionable without unicode characters, sure

earnest phoenix
#

Please change my name@pale vessel

pale vessel
#

what

slender thistle
#

I told you how to get your nickname changed

delicate shore
#

azure takes $$/hour?

#

wtf

restive furnace
#

yes

faint prism
#

I mean. You can divide it by whatever you want

restive furnace
#

convert that to months

faint prism
#

^ this, lol

delicate shore
#

ok

#

I mean. You can divide it by whatever you want
@faint prism multiply*

restive furnace
#

price*24*7 would be weekly price

faint prism
#

You can multiply it to convert. But ultimately it's $/whatever you want

delicate shore
#

🧠

faint prism
#

Is what I was saying

earnest phoenix
slender thistle
#

really

faint prism
#

I mean

earnest phoenix
#

ask stupid questions get stupid answers

pale vessel
#

thank you cry i loved that

delicate shore
#

yes

slender thistle
#

This isn't the place for that

delicate shore
solemn latch
#

Hourly is pretty common @delicate shore
A lot of uses people will spin up temporary a new vps for a few days or a week for testing or dealing with extra load.

faint prism
#

@earnest phoenix might be easier to post in #memes-and-media but mention them next time
||But then I won't see the meme ;(||

solemn latch
#

I use DO as my test platform for the hourly billing

faint prism
#

I got a question for other devs on here,
Does anyone else write programs to solve repetitive tasks. Like for class work for example?

solemn latch
#

I've done it for real life stuff a few times.

delicate shore
#

I use DO as my test platform for the hourly billing
@solemn latch what really?

slender thistle
#

Numerical methods and calculus? All the time

solemn latch
#

Yeah

delicate shore
#

nice

faint prism
#

Numerical methods and calculus? All the time
@slender thistle YES. I made a script for synthetic division for a polynomial last semester lol (and shows work of course)

slender thistle
#

kek

#

We mostly deal with differentiation and integration in calculus. sympy generally helps way too much with it

faint prism
#

We mostly deal with differentiation and integration in calculus. sympy generally helps way too much with it
@slender thistle my last example was probably making a Windows form app that did statistical analysis on a bunch of data points in a text file

#

It was the first time I had ever used a async :3

slender thistle
#

"form app"
Oh right you're C# gang

faint prism
#

Yeye, dotnet for lyfe

#

But I did it in python too

#

And bash at first. Which was a terrible language to do it in.

slender thistle
faint prism
#

It has no advanced math functions. I had to pipe to BC every time, which added A FUCKLOAD of latency to calculations

slender thistle
#

Geez

faint prism
#

where python could calculate stats for 100m random datapoints in an instant. Bash ran overnight and didn't finish

slender thistle
#

I can see how that would be inconvenient

placid iron
#

C# is way faster than python. For maths I would use c# anyday

faint prism
#

It was when I was first getting into programming

#

I moved to C# because i wanted a UI

#

Learned 3 languages over the course of that project lol (not well, but some)

placid iron
#

Just use pygame 4head

golden pewter
slender thistle
#

-faq 1

gilded plankBOT
faint prism
#

Didn't know about it back then

slender thistle
#

C# is way faster than python
Well, it'd be kinda obvious, since Python is interpreted, whereas C# is compiled

#

PyQt gang

golden pewter
#

How to upload bot in top.gg?
@golden pewter plz

modest smelt
#

i have a question

pale vessel
modest smelt
#

for some reason when im coding my bot

placid iron
#

Yeah but the margin which c# is faster is really astonishing

modest smelt
#

im trying to code a mute command in

#
@client.command()
async def mute(ctx, member: discord.Member, *, reason=None):
    text_channel_list = []
    for server in Client.servers:
      for channel in server.channels:
        if channel.type == 'Text': 
          perms = channel.overwrites_for(member)
          perms.send_messages = False
          perms.add_reactions= False
          await channel.set_permissions(member, overwrite=perms, reason=reason)
    await ctx.send(f"{member} has been muted by {ctx.message.author} because "+ reason )
faint prism
modest smelt
#

i get an error saying for server in Client.servers: ^ SyntaxError: invalid character in identifier

#

do you guys know why

pale vessel
#

doorthief moment

slender thistle
#

🤔

#

what the fuck

modest smelt
#

@slender thistle do u have any clue?

placid iron
#

Yeah, that is confusing

#

Try client.guilds

slender thistle
#

aye, use .guilds everywhere

pale vessel
#

but the error seems unrelated

modest smelt
#

yeah

quartz kindle
#

are you trying to mute someone in all servers? lmao

modest smelt
#

here i'll just quote the code here

slender thistle
#

oh right

modest smelt
#
@client.command()
async def mute(ctx, member: discord.Member, *, reason=None):
    text_channel_list = []
    for server in Client.servers:
      for channel in server.channels:
        if channel.type == 'Text': 
          perms = channel.overwrites_for(member)
          perms.send_messages = False
          perms.add_reactions= False
          await channel.set_permissions(member, overwrite=perms, reason=reason)
    await ctx.send(f"{member} has been muted by {ctx.message.author} because "+ reason )

@modest smelt just so people can see

placid iron
#

@pale vessel I know, that is why I'm confused

slender thistle
#

thanks for noticing that Tim lmao

formal dome
#

How many days does a site approval take?

modest smelt
#

im trying to mute people in the servers the bot is in

slender thistle
#

why

modest smelt
#

around 4 weeks

#

@slender thistle was that to me?

slender thistle
#

yeah

faint prism
#

doorthief moment
@pale vessel What do you mean by "doorthief" moment?

quartz kindle
#

so basically, if someone gets muted, you want them to be muted in all servers the bot is in?

modest smelt
#

um... because im making my bot?

#

yes

formal dome
#

I sent a request for the site

quartz kindle
#

but like

slender thistle
#

in any case, it's client.guilds, not Client.servers

pale vessel
#

@pale vessel What do you mean by "doorthief" moment?
@faint prism nothing, your github username was also doorthief mmLol

delicate zephyr
#

yea, but look. Just because someone is muted in one server for a reason doesnt mean they should be muted everywehere

quartz kindle
#

if someone is muted in a server, why should they get muted in other servers that have nothing to do with it?

modest smelt
#

oh ok

#
@client.command()
async def mute(ctx, member: discord.Member, *, reason=None):
    text_channel_list = []
    for server in client.guilds:
      for channel in server.channels:
        if channel.type == 'Text': 
          perms = channel.overwrites_for(member)
          perms.send_messages = False
          perms.add_reactions= False
          await channel.set_permissions(member, overwrite=perms, reason=reason)
    await ctx.send(f"{member} has been muted by {ctx.message.author} because "+ reason )

@slender thistle is this correct?

slender thistle
#

@faint prism could've just used PyQt smh /s/s/s

placid iron
#

Try it and see

slender thistle
#

channel.type isn't a string iirc

modest smelt
#

if someone is muted in a server, why should they get muted in other servers that have nothing to do with it?
@quartz kindle ok i think it is better to mute them in only like my server

delicate zephyr
#

Not only that shiv

#

that'll be API Abuse

modest smelt
#

so i should do ```python
type(channel.type) == "text":

faint prism
#

@faint prism nothing, your github username was also doorthief mmLol
@pale vessel Ooooooh you mean the old python version
Nice find. That's waaaaayyyy old

placid iron
#

If isinstance(channel, discord.TextChannel):

slender thistle
#

one sec I'm going through the docs

modest smelt
#
@client.command()
async def mute(ctx, member: discord.Member, *, reason=None):
    text_channel_list = []
    for server in client.guilds:
      for channel in server.channels:
        if isinstance(channel, discord.TextChannel):
          perms = channel.overwrites_for(member)
          perms.send_messages = False
          perms.add_reactions= False
          await channel.set_permissions(member, overwrite=perms, reason=reason)
    await ctx.send(f"{member} has been muted by {ctx.message.author} because "+ reason )
#

just the code

slender thistle
#

yeah Rovi's way is correct

delicate zephyr
#

also you should check your bot has permission to do any of that before trying to change the users permissions

faint prism
pale vessel
#

where's the new one?

placid iron
#

I don't think I have correct cases

#

But it will work when it does

modest smelt
#

the bot will be admin @delicate zephyr

slender thistle
#

not in all servers

delicate zephyr
#

not in all servers

slender thistle
#

Users can still remove the bot's permissions

modest smelt
#

i ask them for that perm

delicate zephyr
#

and they can remove it

modest smelt
#

so how should i mandate that?

delicate zephyr
#

I mean, you could always just not make it mute them in every server

faint prism
#

where's the new one?
@pale vessel wdym? The C# one?

slender thistle
#

Yup. There's the option of not being an asshole, as harsh as it sounds. Just mute the user in the server where the command was used instead.

pale vessel
#

@faint prism mhm

quartz kindle
#

admin perms for a bot introduces a vulnerability in people's servers

#

so many will reject your bot because of that

modest smelt
#

Since I gtg, my partner @earnest phoenix will be here

earnest phoenix
#

Hi I am working with @modest smelt

faint prism
#

lol?

slender thistle
#

And requiring admin permission for your bot is the complete opposite of "mass appeal"

earnest phoenix
#

k

#

would i check

placid iron
#

@quartz kindle then there are people who give all bots admin perms cry

earnest phoenix
#
permissions_for(member)¶
slender thistle
#

permissions_for is a method of a TextChannel object

earnest phoenix
#

is that the way i would get it to check if the bot has perms?

#

yes

#

yup

placid iron
#

Are you using decorators?

slender thistle
#

and member must be replaced with anything that happens to be a Member object.

In order to get your bot's Member version in guild, you'd use guild.me

#

No, rovi, decos are unrelated to this

placid iron
#

@bot.bot_has_permission(perm=True)

earnest phoenix
#

k

placid iron
#

Ah ok

slender thistle
#

did you see their code at least

earnest phoenix
#

which perm should i check

#

mute_members=True?

slender thistle
#

mute_members is for voice channels

earnest phoenix
#

oh k

delicate shore
#
      throw er; // Unhandled 'error' event
      ^
TypeError: Cannot read property 'current' of undefined```
Error 

```js
    weather.find({ search: args.join(" "), degreeType: "C" }, function(
      error,
      result
    ) {
      if (error) return msg.channel.send(error);
      if (!args[1]) return msg.channel.send("Please specify a location");

      if (result === undefined || result.length === 0)
        return msg.channel.send("**Invalid** location");

      let current = result[1].current;
      let location = result[1].location;

      const weatherinfo = new Discord.MessageEmbed()
        .setDescription(`**${current.skytext}**`)
        .setAuthor(`Weather forecast for ${current.observationpoint}`)
        .setThumbnail(current.imageUrl)
        .setColor(0x111111)
        .addField("Timezone", `UTC${location.timezone}`, true)
        .addField("Degree Type", "Celsius", true)
        .addField("Temperature", `${current.temperature}°`, true)
        .addField("Wind", current.winddisplay, true)
        .addField("Feels like", `${current.feelslike}°`, true)
        .addField("Humidity", `${current.humidity}%`, true);

      msg.channel.send(weatherinfo);``` 
Code
#

Just so it's clean i changed few things

#

and posted again

earnest phoenix
#

@placid iron Can you DM me to help?

#

or anyone with muting members?

knotty steeple
#

i think that is a pretty obvious error

#

result[1] is undefined

#

u sure u didn't mean result[0]?

earnest phoenix
#

Can anyone help me code a mute command for my bot?

slender thistle
#

Which part are you confused on, apart from the ones we helped with

delicate shore
#

u sure u didn't mean result[0]?
@knotty steeple damn sure

#

@knotty steeple i even did that

#

did not work

pale vessel
#

debug

knotty steeple
#

cmon man don't ping me twice

delicate shore
#

can we debug in glitch

delicate zephyr
#

you could debug on a piece of paper

#

im pretty sure you can debug on glitch

#

I dont know tho since ive never used it, they should have some debug tools tho

slender thistle
#

You have access to the console on Glitch

earnest phoenix
#

Fr?

delicate shore
#

You have access to the console on Glitch
@slender thistle yes

#

debugger keeps loading

#

never comes

earnest phoenix
#

Is someone french here?

#

Sorry it's not the good place to talk about this

delicate shore
quartz kindle
#

you dont need the debugger to debug

#

console.log best debugger :^)

faint prism
#

You're not wrong

ionic dawn
#

try catch

delicate zephyr
#

imagine not just letting it error but console.loging right before it does

earnest phoenix
#

Code: ```python
@client.command()
async def mute(ctx, member: discord.Member, *, reason=None):
text_channel_list = []
for server in client.servers:
for channel in server.channels:
if channel.type == 'Text':
perms = channel.overwrites_for(member)
perms.send_messages = False
perms.add_reactions= False
await channel.set_permissions(member, overwrite=perms, reason=reason)
await ctx.send(f"{member} has been muted by {ctx.message.author} because "+ reason )


Error Message:
```for server in client.servers:
          ^
SyntaxError: invalid character in identifier```
slender thistle
#

guilds, not servers

#

bad idea to mute a user in all servers the bot us in

elder loom
#

hi

#

i

opal plank
#

need help?

elder loom
#

i want to make a dashboard for my bot

slender thistle
#

How can we help?

elder loom
#

but i don't really know how to

#

like i know html css etc

slender thistle
#

There's the option of connecting the backend to your bot's program

delicate zephyr
#

Have a look into some of the following:
EJS
React
and i would recommend looking into how to build an API

opal plank
#

You likely wanna get a domain and some html knownledge going

delicate zephyr
#

so the website and the bot can communicate

elder loom
#

i got a domain

opal plank
#

then do waht luke said

elder loom
#

well a free one just to test

#

ok

opal plank
#

you'll need a bit of basics of frontend development

restive furnace
#

free one is ok for testing purposes

elder loom
#

thanks @delicate zephyr

#

yea

delicate zephyr
#

No problem

elder loom
#

i will buy a domain when i get it working

#

but for now im just using that 000webhosting stuff

placid iron
#

So yeah you want some js on the website and a backend. The frontend will send a request to update data (to the backend) on a button click or something and then the backend will actually edit the database

elder loom
#

alright

#

sounds logic to me

#

i hope it will work because my bot is fully coded in python

restive furnace
#

yep it will with flask or smth

placid iron
#

My bot is in python and I have a working dashboard so it should be fine

opal plank
#

shouldnt matter too much which lang you using

elder loom
#

aha

opal plank
#

most of the stuff will be html and the payloads likely in json format

placid iron
#

Yeah make sure to abuse JSON cry

elder loom
#

lol

restive furnace
#

bInaRY

opal plank
#

protobufs sounds amazingly good

#

but ive never tried em

faint prism
#

May want to consider making an API for communicating data between your bot service and the website frontend

placid iron
#

Because with JSON you can send data and then have the client do work with making it into things and that reduces the load on your server

slender thistle
#

yep it will with flask or smth
@restive furnace I don't like to suggest Flask for Discord bots dashboards

#

since it's sync

placid iron
#

I use aiohttp for my dashboard

elder loom
#

alright i gtg now i have a bbq with my family but thanks for your help

placid iron
#

Is that fine?

slender thistle
#

There's Sanic and aiohttp

placid iron
#

@elder loom ok have fun

elder loom
#

thanks

slender thistle
#

aiohttp is fine tbh

restive furnace
#

@restive furnace I don't like to suggest Flask for Discord bots dashboards
i used it tho, thats why i recommended it, but yeah idk whats best one

slender thistle
#

Never seen it fuck itself or a bot up. I use aiohttp.web in dblpy and it works

placid iron
#

My code for my bot and my webserver are seperate, should I combine them?

slender thistle
#

There's no best one per se, you just want it to be asynchronous

placid iron
#

So I have 2 clients open at the moment basically

slender thistle
#

You could combine them, sure. Make sure you keep everything secure though

placid iron
#

Ok I'll look into it. In fact it would save me pain by combining them I think

#

In terms of files and what not

slender thistle
#

There's nothing wrong with running them separately if you don't need the website to communicate with your bot though

fluid basin
#

combining: shared variable access + easier to maintain code/files
not combining: need to maintain api and start seperately

slender thistle
#

Another option is to host a local API on the backend and send requests to it from the website backend KEKW

valid holly
#

Trying to make a bot that switches roles for users depending on which voice channel they join.
Theoretically the member will join voice channel x and will be given x role, although I have no idea how to start to make it. Any props ?

thick gull
#

then you’ll have to prevent anyone from sending requests if it’s not you

i think idk im not a good dev kek

slender thistle
#

What's your library?

valid holly
#

Mine ?

#

JS

fluid basin
#

@valid holly listen to voice state event to know when user joins voice channel, get the name of the current voice channel the user is in and assign the role for the user. If you need to remove the role after leaving the channel, check the event to see if its a leave and remove any roles thats related to voice channel names.

valid holly
#

Problem is not the lib itself, I'm comfortable with it, It's just finding a flexible way to manage this feature I'm implementing.
I was thinking to build a data structure consisting of channel ID's and role ID's then switching between.

X member joins Y channel, but already has x role, so switch from x to y

delicate zephyr
#

@valid holly what db do you use?

valid holly
#

I don't think there is a need for db in this case, we're dealing with predefined data

delicate zephyr
#

Ah ok

valid holly
#

Which I can easily define in code

delicate zephyr
#

then if you define it like

#

{
  "voiceId": "roleId"
}
#

you should be able to then fetch/get the role and give to to the user that way

valid holly
#

Yeah but it's more difficult.

#

The bot needs to check if you already have a role, then remove the old one and replace with the new one.

delicate zephyr
#

not really

valid holly
#

Well that's what intending to do

delicate zephyr
#

yea

#

im abotu to get into that

valid holly
#

Not just simply add and remove roles based on the join event

fluid basin
#

The bot needs to check if you already have a role, then remove the old one and replace with the new one.
I don't see any issues with that

delicate zephyr
#

you can then do Object.values(obj) to get all the roles you have available. and then check if they have any of them and if they have any other than the role assigned to the voice channel you can remove them

valid holly
#

It's a feature I'm working in my server, which lets you switch between Discord "Servers" on a voice channel, and the roles just have access to different channel where you see different stuff

#

Such as "Social" role and "Gaming" role.

delicate zephyr
#

Yea

#

When someone switches a voice channel

#

Object.values(obj) will give you an array of ids

#

iterate through them and make sure the only voiceChannel Role they have is the one associated with said channel

#

if its not associated, remove it

#

I'll make some psuedo code

#

if you're willing to wait

#

what lang are you using?

valid holly
#

Sure, really need help to construct this.

#

Java/JS

#

JS prefferably

delicate zephyr
#

Yea, Javascript

earnest phoenix
#

Can anyone help me code a mute command in discord.py?

delicate zephyr
#

ok gimme a minute and I'll have some psuedo code with comments

slender thistle
#

Didn't I explain like twice already

fluid basin
#

rule 7a

earnest phoenix
#

I didnt get it

fluid basin
#

tell us what problems are you having instead

earnest phoenix
#

Code: ```python
@client.command()
async def mute(ctx, member: discord.Member, *, reason=None):
text_channel_list = []
for server in client.servers:
for channel in server.channels:
if channel.type == 'Text':
perms = channel.overwrites_for(member)
perms.send_messages = False
perms.add_reactions= False
await channel.set_permissions(member, overwrite=perms, reason=reason)
await ctx.send(f"{member} has been muted by {ctx.message.author} because "+ reason )


Error Message:
```for server in client.servers:
          ^
SyntaxError: invalid character in identifier```

@earnest phoenix

delicate zephyr
#

@fluid basin you realise giving examples isnt spoonfeeding

fluid basin
#

well yes and no

#

I don't think client.servers is a thing @earnest phoenix

#

look at the docs again

valid holly
#

I'll send you some more info.

earnest phoenix
#

so should i do in guild

#

client.guild

scenic grotto
#

can anyone help me in my bot dashboard?
im trying to let it work on the website, it's ejs
but i don't know really how to let it work

placid iron
#

Client.guilds

earnest phoenix
#

k thx

scenic grotto
#

i want it to work same as html and the codes and everything is okay

restive furnace
#

you need html file

fluid basin
#

you need to render a view on your default route (/)

#

or alternatively, an index.html

scenic grotto
#

the html was converted to ejs

#

so there is no html now in the website

fluid basin
#

you need to render the ejs on your default route

scenic grotto
#

how?

fluid basin
#

same as the ejs examples you followed, res.render or smth for the app.get('/')

scenic grotto
#

i don't know really so good in programming so i didn't understand

fluid basin
#

do you know how to use ejs and express

scenic grotto
#

no

fluid basin
#

huh?

scenic grotto
#

i was trying to make the website for more than 2 weeks now

#

my friend made the html ejs and used it on glitch, but now i want to use it on a normal vps , i have cpanel

cinder patio
#

Maybe you should actually learn how to use them instead of jumping right in

delicate zephyr
#

@valid holly


// Example function fetching user
const user = fetchUser()

// Voice channel / role association
const voiceChannels = {
  "1": "100",
  "2": "200",
  "3": "300"
}

// Event handler (i didnt check the docs for the actual thing)
client.on('voiceChannelUpdate', (user) => {
  // Get the users voice channel
  const vChanID = user.voiceChannel.id
  // Check the voice channel id is defined
  if(vChanID) {
    // Get the role associated with the channel
    const role = voiceChannels[vChanID]
    // Get all role ids as an array
    const roleIds = Object.values(voiceChannels)
    // Add role associated with channe;
    user.roles.add(role)
    // If user has role that isn't accosiated with the channel, removed it
    user.roles.cache.forEach(r => if(r.id !== role) user.roles.remove(r))
  }
})

scenic grotto
#

i want to let it work then i will learn (:

slender thistle
#

It's voiceStateUpdate iirc

delicate zephyr
#

shiv

#

its psuedo code for a reason

cinder patio
#

So you want to make a bot dashboard with tools you haven't learnt to use yet, and you want to learn them AFTER you make the dashboard? ok

placid iron
#

V-chan Pogpega

slender thistle
#

I need to enter my useless 5 cents okay

scenic grotto
#

@cinder patio because my bot is right now in 60+ servers and i want to make the dashboard asap

earnest phoenix
#

how long does the verification take , i have waited over 4 weeks?

thick gull
#

shiv, you forgot the period at the end.

scenic grotto
#

then i will learn good in it

fluid basin
#

@earnest phoenix just wait

slender thistle
#

Around a month @earnest phoenix

earnest phoenix
#

okay

thick gull
#

he hasn’t submitted a bot on this account

quartz kindle
#

there are many big bots without dashboards, no need to rush

scenic grotto
#

also when im trying to do it i will learn

slender thistle
#

It's generally a better idea to take a step back and take it slow

#

to get used to the tools you want to use further

scenic grotto
#

my bot is dying rn so i need to do it asap, from the beginning we said there will be an dashboard in a few days

fluid basin
#

learning and trying is mutual, you cannot do one without the other

scenic grotto
#

from where could i learn how to make it ?

fluid basin
#

google is your best friend

scenic grotto
#

i am trying but i didn't yet know how

quartz kindle
#

a dashboard requires knowing many different areas, its not a single thing

valid holly
#

@delicate zephyr that's the idea I had intended initially, so I'll go with that, thanks for the support !

scenic grotto
#

all of these

earnest phoenix
#
boolean = false;

    setInterval(async() => {
        
        if (boolean !== true){
            client.shard.fetchClientValues('guilds.cache.size')
            .then(r => dbl.postStats(r.reduce((a, b) => a + b, 0)));

            boolean = true;
            setTimeout(() => boolean = false, 60 * 1000);

        };

    }, 1800 * 1000);

This is being ran for all the shards of the bot so it will be ran x times, how can i make sure it only runs once

scenic grotto
#

tabs im trying to do it

delicate zephyr
#

@valid holly No problem!

fluid basin
#

then you're not looking for the right thing

#

start from basics

quartz kindle
#

so you have a webhost with cpanel? is your website made with php?

scenic grotto
#

i use linux vps centos + cpanel

#
  • windows vps for the bot
fluid basin
#

ok thats a whole lot of new problems

faint prism
#

using boolean as a variable name waitWhat
Might as well call it "x"

scenic grotto
#

why?

quartz kindle
#

why windows vps lol

scenic grotto
#

because it's the easiest

earnest phoenix
#

using boolean as a variable name waitWhat
Might as well call it "x"
@faint prism that isn't the point.

scenic grotto
#

also i host another game server not just the bot on it

quartz kindle
#

alright

#

did you start making a website?

thick gull
scenic grotto
#

yes i have the domain

thick gull
#

Get free <nitro image>

scenic grotto
#

@thick gull lol

#

this is a scam one

quartz kindle
#

what is your website gonna be built with?

scenic grotto
#

im trying to get his discord

quartz kindle
#

php?

scenic grotto
#

name

#

@quartz kindle ejs

quartz kindle
#

then you need node.js in your webhost

#

does your cpanel support nodejs?

scenic grotto
#

i installed node js

#

does your cpanel support nodejs?
@quartz kindle yes

quartz kindle
#

ok, so then you need a webserver, like express

slender thistle
#

@earnest phoenix Is it possible that scopes may happen to be the issue?

quartz kindle
#

are you using express?

scenic grotto
#

what do you mean exactly with a web server?

#

linux vps

#

CentOS

quartz kindle
#

a webserver is a program that accepts connections to the host and responds with html files

#

for example

scenic grotto
#

I have the website files in the linux vps

quartz kindle
#

if you want to use ejs, you need a node webserver

#

for example express.js

thin tapir
#

in Dsharpplus how does one set the activity of the bot

scenic grotto
#

from where do i get express.js

quartz kindle
#

you install it from npm

scenic grotto
#

i do npm i?

#

npm i

thin tapir
#

yes

quartz kindle
#

do you have a package.json?

scenic grotto
#

yes

quartz kindle
#

so you already have everything made?

#

did someone do it for you?

scenic grotto
#

yes my friend

quartz kindle
#

so then yes, npm i

#

then run the program

scenic grotto
#

node modules hax express

quartz kindle
#

dont copy node_modules

#

npm i creates them

earnest phoenix
scenic grotto
#

@quartz kindle it's doing the modules now

pale vessel
#

check your package.json

scenic grotto
earnest phoenix
#

@pale vessel me?

scenic grotto
#

@quartz kindle I did them

pale vessel
#

yes

scenic grotto
pale vessel
#

open the file

#

looks like you're switching from glitch to heroku

#

get a vps

scenic grotto
#

@pale vessel me?

pale vessel
#

yes yes yes

scenic grotto
#

me from glitch to a linux vps

pale vessel
#

yes

#

not heroku

scenic grotto
#

no i don't use heroku

misty sigil
#

Cool

placid iron
#

I use heroku yeenaw

pale vessel
#

not you

fluid basin
#

flaze, hes trying to switch from glitch to centos vps + cpanel and a windows vps to host his bot, and trying to run ejs from cpanel

pale vessel
#

bruh

#

i misread my bad

#

meant @earnest phoenix

fluid basin
#

no

misty sigil
#

ima bring this up again

#

any """""""""""free""""""""""" hosting is either:

  1. not intended to be used as hosting for bots
  2. not actually suitable for hosting for bots
  3. not actually free
slender thistle
#

aeaeae

pale vessel
#

$3? promise? 😳

slender thistle
#

not the place to ask

nova swift
#

@pale vessel yep but nice story sword fight related family frndly

thick gull
#

I can rip off a sword anime

#

or say boy kill girl

#

boy liked girl

#

boy sad

#

boy become superhero

nova swift
#

Bruh

#

No

thick gull
#

give me my money

#

i did it

nova swift
#

I did not like it

#

If i like i will

#

Rlly

slender thistle
#

not the place to ask

nova swift
#

Dm me the story

slender thistle
#

I said this isn't the place to ask

nova swift
#

K

faint prism
#

Man, I'm still getting A MessageReceived handler is blocking the gateway task
But if I am understanding Tasks correctly, this should spin off it's own task and finish the handler?
Since I'm not awaiting it it shouldn't wait for the result...

fluid basin
#

what lang?

#

C#?

faint prism
#

Ye

fluid basin
#

hm not the most experienced in C# but let me take a look

faint prism
#

This lead me to think I wouldn't block my handler if I did that without awaiting. Which is what I want

placid iron
#

Idk how you do it but I have ```cs
Idk something {

If (message.contents == "!ping") {
await ping(message);

}}

Private Task ping (message){
await message.chabnel.sendAsync("ping is ping");
}```

#

I'm on mobile so that is not correct for code

#

But it is what I did for my small c# prohect

faint prism
#

Well, if I await the result, which is resource heavy, it'll definitely block the handler

placid iron
#

Hmm

#

What I did for my python bot was create a new thread for the heavy task then I gave it the loop so it could still use the loop for sending stuff to discord but it was out of the loop

#

If you understand

fluid basin
#

are you using any Thread.sleeps inside your task @faint prism

faint prism
#

no

fluid basin
#

hm

#

get mentions first? could you explain?

#

@faint prism I think theres something to do with await, Task.Run should be awaited if not it'll run sync?

faint prism
#

the opposite I believe. It should finish the function without waiting for the Task to finish

fluid basin
#

yeah thats what I thought too

#

I think you might be using the gateway/ws threadpool

#

which might have ran out of threads and blocked

#

@faint prism wait could you show the remainder/entirety of your code

faint prism
#

Well I'm trying out a solution rn, so it isn't production code atm

fluid basin
#

ah ok

faint prism
#

the _ = throwaway should make the method run without awaiting the result and finish the function

#

oh interesting link

ionic dawn
#

does mongodb works same way windows and ubuntu/deb ?

fluid basin
#

yup

earnest phoenix
#

Tell me if needed to see my code

ionic dawn
#

install module?

earnest phoenix
#

How?!

misty sigil
#

^

ionic dawn
#

:D?

misty sigil
#

by putting it in package.json

earnest phoenix
#

What put in package.json?

ionic dawn
#

npm i discord.js

thick gull
#

just create your own lib and use that

#

smh

misty sigil
#

why use heroku btw?

thick gull
#

JOKE ^^ don't take it seriously

#

yeah heroku isn't inheritly for bots

#

and AFAIK it goes offline

ionic dawn
#

rent a 3$ vps

#

will be easier

misty sigil
#

yea

#

much easier

#

also online 24/7, unlike heroku

thick gull
#

my dad has random 50$ gift cards he doesn't mind losing but not many services for hosting accept gift cards

ionic dawn
#

give it to me

#

we change the $

thick gull
#

no

ionic dawn
fluid basin
#

tfw google takes 30% of whatever you earn on google play

thick gull
#

yeah

ionic dawn
thick gull
#

So does apple

ionic dawn
#

MongoDB is so friendly to understand if you come from js lol

earnest phoenix
#

I may buy VPS but how can I add it to my bot? I must write something in command prompt or in visual studio code?

ionic dawn
#

Move files to the VPS

#

run node <whatever>.js

cinder patio
#

A VPS is a virtual computer

ionic dawn
#

but in a fresh vps you have to install node

#

and packages you can move them using FTP clients like WinSCP or Filezilla

thick gull
#

MongoDB is so friendly to understand if you come from js lol
crying irl

#

I figured it out in like half an hour

#

but I delayed it for a whole month

slender thistle
#

Python gang, got a hang of mongo fairly easily 02yay

thick gull
#

cause it didn't make sense

ionic dawn
#

I didn't know mongo was a non-sql db, never even read about it

#

JSON seems pretty much easier to work with than sql

thick gull
#

its literally almost as simple as quickdb

#

once you get the hang of it

ionic dawn
#

yeah but mongo is better than quickdb as I heard right?

#

scalability

thick gull
#

yeah

misty sigil
#

yea

opal plank
#

@slender thistle good shit

thick gull
#

quickdb is all in one file

misty sigil
#

more scalable

ionic dawn
#

jesus

opal plank
#

try postgres now for a good DB shiv

thick gull
#

sqlite file

opal plank
#

you'll love shit like PgAdmin 4

slender thistle
#

I hate writing SQL queries

opal plank
#

do try Postgres, trust me

ionic dawn
slender thistle
#

Someday when I start caring about SQL KEKW

misty sigil
#

sql seems cool

slender thistle
#

mongo is efficient for my use case

opal plank
#

lmao db's are essential to have nowadays

misty sigil
#

but I prefer mongo

#

because it works and I have it working

#

and I don’t need to change it if it works

ionic dawn
#

we just skiped that guy question up there

slender thistle
#

I also play with my data structures a fuckton so SQL is a bit of a pain in the ass for me

opal plank
#

my bot blew up out of proprotion and today i gotta learn scalability for large scale bots, so im kinda fucked

#

gotta start using redis for high performance checks

thick gull
#

@fleet hornet why do you need to put it in one line

slender thistle
#

Redis for caching?

opal plank
#

db wont cut for me anymore

#

yeah

thick gull
#

you should use two different const otherwise it won't make sense

slender thistle
#

What's the pro of using Redis for caching over direct memory access?

ionic dawn
#

yeah, just do:
const bla bla
const bla bla

opal plank
#

im starting to get 1900 spikes per MINUTE on messages

misty sigil
#

bruh

opal plank
#

its insanely faster than a db call

thick gull
#

shiv use your brain and explain to him

fluid basin
#

What's the pro of using Redis for caching over direct memory access?
@slender thistle uh shared access when sharding?

opal plank
#

its basically a map from what i've heard

magic jackal
#

ayo why does this not work?

client.users.fetch("467102802838159370").id

slender thistle
#

anything else?

opal plank
#

key/val storage

#

since i havent used it yet, i cant tell you more

fluid basin
#

mainly shared access

opal plank
#

though i'll be giving it a try today

fluid basin
#

and you don't lose any info if your bot crashes

cinder patio
#

Shared access between processes

slender thistle
#

eh so nothing I need to worry about mmulu

thick gull
#

you already have the id and you trying to fetch the id (?)

opal plank
#

unless you going for big scale

fluid basin
#

webscale™️

magic jackal
#

the issue is that i cannot access the object it returns

earnest phoenix
#

Hi, I have a question, Is there like a way to reserve a testing channel, like run a command to rent it, or u just enter the channel and just test without permission?

slender thistle
#

Big scale + me = Incompatibility

#

but thanks for the info

opal plank
#

my db is handling those incoming packets though its getting quite stressed

fluid basin
#

@earnest phoenix if you're talking about this server, then no

opal plank
#

it that number goes beyond 3k im kinda fucked

earnest phoenix
#

ok

thick gull
#

what is your bot for

earnest phoenix
#

So Do I just enter the testing server, and just... test?

fluid basin
thick gull
#

twitch stats?

earnest phoenix
#

Moderation

slender thistle
#

what do you mean, Cheslin?

opal plank
#

Nah, my bot integrates and bridges discord and twitch

magic jackal
thick gull
#

so the chat mixes?

opal plank
#

not only that

worthy glacier
#

so how do you scale it up

opal plank
#

quite a lot more

misty sigil
#

Await the fetch

fluid basin
#

Nah, my bot integrates and bridges discord and twitch
@opal plank so is it a twitch discord bot or a discord twitch bot

magic jackal
#

oh

thick gull
#

mmm sounds interesting tbh

opal plank
#

neither

earnest phoenix
#

I am making a bot named S... OH, i have to have it approved before I test it, o i tho other way around

opal plank
#

its a Twitch, Discord AND youtube bot

slender thistle
#

You can test it in your own server

opal plank
#

its a collection of 5 bots working together

fluid basin
#

damn

earnest phoenix
#

Ok @slender thistle

slender thistle
#

top.gg is just a public bot list website

earnest phoenix
#

ye ik

opal plank
#

interprocess bots ftw

thick gull
#

so @slender thistle if I completely redo my bot after its approved its okay right

opal plank
earnest phoenix
#

ok cya until its working 😄

slender thistle
#

aye we don't care as long as it follows our guidelines

thick gull
#

pog

opal plank
#

@fluid basin though in fairness the youtube bot needs a massive rework

fluid basin
#

oof

opal plank
#

not sure if its worth mentioning it as a pillar of that collection

#

there isnt a lib like d.js for it

#

so i have to manually send requests

#

its quite a bit complicated work

thick gull
#

then make your lib

fluid basin
#

big brain

opal plank
#

tis technically what i did

fluid basin
#

damn time to test how well will mongodb scale

opal plank
#

though im not proficient enough to make a super optimzed lib

fluid basin
#

remember those days discord was running off mongodb

misty sigil
#

It scales well

opal plank
#

but technically a lib

fluid basin
#

bet their servers went brrrr

opal plank
#

they use postgres now, no?

thick gull
#

when was that

fluid basin
#

cassandra

opal plank
#

i remember hearing that somewhere

#

cassandra

#

i think that was it

quiet topaz
fluid basin
opal plank
#

OOf

fluid basin
#

old stuff

quiet topaz
#
Client.on('voiceStateUpdate', (oldMember, newMember) => {


if(typeof newMember.channelID === "undefined"){
  return
};
let nchannel = newMember.channelID;

if(!nchannel=== voicechannelid){
  return
};
if(newMember.id=== "744974832147628032") return;
if(!newMember.channel)return;

Client.guilds.cache.find(g => g.id === guild).channels.create(newMember.member.displayName,
  {
    "parent":745676919294394369,
    "type":"voice",
    "permissionOverwrites":[{
      
      id:newMember.id,
      allow:["MANAGE_CHANNELS"]
    }]
  })
  .then(console.log);

newMember.setChannel(Client.channels.cache.find(c => c.id === "717376546947596338"))

})


opal plank
#

nice rate limit

faint prism
#

If I have a method Task MyTask
is calling it by MyTask() the same as Task.Run(() => MyTask()) ?

fluid basin
#

LOL creating a new channel for every voice state event

#

meme

opal plank
#

^^

fluid basin
#

soz I'm not really experienced in c#

opal plank
#

states update quite frenquently

#

if you mute, deafen

#

all those recieve events

dire obsidian
fluid basin
#

Everything on Discord was stored in a single MongoDB replica set
damn discord

misty sigil
#

damn

fluid basin
#

wtf

opal plank
#

what

quiet topaz
#

btw does voice state update triger by creating an voice channel

opal plank
#

why u comparing the same thing?

thick gull
#

they had to migrate in 2015?

#

wow

fluid basin
#

idts @quiet topaz

thick gull
#

that was before discords surge in popularity

fluid basin
#

nono 2015 was the birth of discord

quiet topaz
#

idts @quiet topaz
@fluid basin and how to prevent it?

fluid basin
#

they migrated in late 2015

thick gull
#

Oh

#

Yeah that makes more sense

fluid basin
#

wait

ionic dawn
fluid basin
#

thats only 6 months damn

ionic dawn
#

wumpus looks cool with the helmet

fluid basin
#

@quiet topaz uh I said "I don't think so (idts)"

thick gull
#

I'm fairly certain I had nitro in the period for it but I didn't get the badge so idk

quiet topaz
#

@quiet topaz uh I said "I don't think so (idts)"
@fluid basin bruh

#

but why does it happen

fluid basin
#

no I just said it doesn't

#

what

opal plank
#

yes

fluid basin
#

it only triggers when you join a channel or leave

#

or mute or deafen WHILE inside a channel

opal plank
#

not rlly

#

voiceEvents trigger on any update

fluid basin
#

wait I haven't finished speaking

opal plank
#

deafen, mute,servermute,stream,live,leaving,joining, moving channels

fluid basin
#

yeah ok

opal plank
#

those are all the actions that trigger that event

thick gull
#

why are you even creating a channel on VC update though

opal plank
#

you need to check em'

thick gull
#

I don't get it

#

kek

opal plank
#

bout to get ratelimited if you dont do that command carefully

quiet topaz
#

ok

fluid basin
#

still debating whether to learn cassandra

#

might experiment on large data

thick gull
#

oops

fluid basin
#

though tbh CQL is very similar to SQL

#

just no aggregate stuff like UNION or JOINs

opal plank
#

i dont have nearly as much of a need for cassandra

fluid basin
#

so you gotta make multiple queries for data across tables

opal plank
#

pg been handling fine quite a big stress

fluid basin
#

the thing is, my data is structured for now but for webscale™️ I can't afford to have a fixed schema

#

pushing updates will be really hard (without downtime)

quiet topaz
#

how to find out, what trigered that?

fluid basin
#

compare oldstate and newstate

quiet topaz
#

ok

fluid basin
#

since you only need joins, check the channel of the state

worthy glacier
#

is there any way to get a bot to screenshare something in a vc

quartz kindle
#

nope

worthy glacier
#

rip

fluid basin
#

nope

#

even if you wanted to, discord's modded rpc isn't documented

#

so have fun implementing it

#

<:emoji_name:emoji_id>

#

you can get it by going to the server with the emoji (that the bot is in as well), then add a \ before sending the emoji

worthy glacier
#

how would one go about implementing it lol

fluid basin
#

oh boy, reversing discord's custom RPC protocol isn't fun

worthy glacier
fluid basin
#

its like, making a png image using hex

#

well I shall not delve into the specifics

faint prism
#

@fluid basin Turns out the behavior I wanted was:
_ = Task.Run(() => LongRunningTask());

#

Which runs on it's own thread and the calling function continues regardless

earnest phoenix
#

hmm

#

what language ?

faint prism
#

C#

earnest phoenix
#

nvm then

ionic dawn
faint prism
ionic dawn
#

you cant use emojis calling the name

#

you have to use the emojis id

restive furnace
#

no custom emojis in titles

#

real ones are allowed iirc

ionic dawn
#

well also de emoji name but... yea ^

earnest phoenix
#

no

ionic dawn
#

find by name

worthy glacier
#

its like, making a png image using hex
@fluid basin okeh

earnest phoenix
#

wait

#

no

restive furnace
#

stop it, you simply cant use custom emojis in titles and field titles

ionic dawn
#

He's dying inside

fluid basin
#

ah nice

ionic dawn
#

Yeah emojis are used in Descriptions

#

Description with markdowns to make titles or whatever

fluid basin
#

@worthy glacier don't actually bother trying, seriously, its not worth the time

worthy glacier
#

yes ik llol

earnest phoenix
#

look docs

#
let emoji = message.guild.emojis.cache.find(emoji => emoji.name === "cd_disk")
#

@earnest phoenix ^^^

ionic dawn
#

I know it

earnest phoenix
#

oh no

pale vessel
#

== or ===

earnest phoenix
#

ye my false

#

._.

ionic dawn
safe kelp
earnest phoenix
#

Healer

#

i am good person

safe kelp
#

Ohk

earnest phoenix
#

so i will give u a example

#

:))

#

dont call it spoonfeeding

safe kelp
#

Np

faint prism
#

make sure you get permissions correct with who can run the eval command.

earnest phoenix
#
const toEval = "Something";
const result = eval(toEval);
faint prism
#

That's a pretty verbose command

safe kelp
#

That's js

earnest phoenix
#

:0

#

then nvm

#

bruh

safe kelp
#

Np

faint prism
#

I implemented an eval in C# 😉

safe kelp
#

I will find

modest smelt
#

hola

#

bruh my setup is finally finished

#

lmao

ionic dawn
#

Hola CBWaveboy

earnest phoenix
#

@safe kelp ask Shivaco

#

hes PY

safe kelp
#

Oka

faint prism
#

Behold, the power of CSharpScript and Roslyn API. I give you, eval in C#

quiet topaz
#

so, why does my bot trigger on voiceStateUpdate that move it to a channel and then trigers again (the trigering event is that moving, but you cant move multple times intp the same channel?

faint prism
#

It is kinda weird though, you have to pass in globals, and I haven't figured out the namespace inclusion yet

restive furnace
#

CSharpScript 🤔

faint prism
#

It's the class that implements an interpreted form of C# using Roslyn API

fast trench
#

Can anyonr help me? I cant fix this error :c

#
Error: Status code: 429
     at ClientRequest.<anonymous> (/home/DIR/node_modules/miniget/dist/index.js:150:31)
     at Object.onceWrapper (events.js:422:26)
     at ClientRequest.emit (events.js:315:20)
     at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:596:27)
     at HTTPParser.parserOnHeadersComplete (_http_common.js:119:17)
     at TLSSocket.socketOnData (_http_client.js:469:22)
     at TLSSocket.emit (events.js:315:20)
     at addChunk (_stream_readable.js:295:12)
     at readableAddChunk (_stream_readable.js:271:9)
     at TLSSocket.Readable.push (_stream_readable.js:212:10)
restive furnace
#

ah okay

quiet topaz
#

Can anyonr help me? I cant fix this error :c
@fast trench jo, code would be good

fast trench
#

Wait a Minute c:

restive furnace
#

you are kinda api abusing or smth

#

429 = ratelimit

fast trench
#

Hmm okay

faint prism
#

is setting status every 5s api abuse?
Otherwise, take a look wherever you are repeatedly calling an API.
Make sure to space out your requests as to not spam

#

@fast trench

fast trench
#

Ok

#

Thx

ionic shard
#

hello
does anyone know how can i fix this?
node_modules/puppeteer/.local-chromium/linux-782078/chrome-linux/chrome: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory