#development
1 messages · Page 1253 of 1
channel = client.get_channel(guildInfo.get[str(member.guild.id)])
TypeError: 'builtin_function_or_method' object is not subscriptable```
@graceful drift
you need to use round brackets @modest smelt
for everything?
[] tries to index it like it's a list
ok
yes
How can i Set Status To my Bot
bot.on("ready", () => console.log(`${bot.user.tag} music is setup `))
here is my ready event
Me New 😄
if(first == second == third){//this
if(first && second && third == ""){
return msg.edit(embedfinalwinseven)
}else{
return msg.edit(embedfinalwin)
}
}else if(first == second || second == third || first == third){
return msg.edit(embedegal)
}else if(first !== second && second !== third && first !== third){
return msg.edit(embedloose)
}```
this does not work
it's kind of a casino but even when i win it doesn't work
what do u prefer lava link or other apis
how to i make v12 bot help!
@next flax use "setPresence"
And see my tutorial
@next flax did you check docs?
@G
ok
when would you use void expression in a js code?
If you don't want to return a type
Hi
Void doesn't have a return type, so it usually is used for methods/function that doesn't return anything. Return keyword can still be used in a void method/function, but it can't return anything
Hi
Hello
(and sorry for ping voltrex lol)
Anybody code on mobile
@fathom topaz I do, got any questions?
when would you use void expression in a js code?
@midnight blaze To do functions but return no result, as it's meant to return undefined
ok so i am leaving python and start learning javascript... fuck you python

js isn't easier than python to newcomer
@restive furnace it's not my choice i m forced to do it cuz of some unknown error
and i think js is short and easy than python
k
Js is as easy as py, idk where people are thinking it's harder. They are about the exact same
py errors might be more complicated, but overall they're pretty much same
Js or py none are easier than each other, it's just the fact that you should go with the one that comforts you
^^^
and many people use js more so it would be easier to understand what the hell they talk cuz i see them writing so much commands and i only talk with pythonists so imma learn js thats it
JavaScript or Python is hardly human readable but easier, languages such as C++ are more human readable but way harder than these
I prefer js over py any day. It's more about syntax. I hate whitespace syntax, and it annoys me when I can't use semis at all.
But the errors tho, it's just that you have to handle your errors correctly, but in a efficient way related to the programming language you're using
Mhm
i just saw that python tutorial was of 6hrs but js is of 1hr only...
you may like js but remember it has its inconsistencies and quirks https://cdn.discordapp.com/attachments/741043113501524130/756909879431659650/image0.png
I'd say Python is more beginner friendly than JavaScript or C++
There are too many flavors of JavaScript
Js is more flexible in code style. Py is more strict on code style
both have its perk tbh
Mhm
i just personally prefer Ts
Ts is god
it has the safe guards while also being Js
so at end js is better or not
o/

I will take a language where type matters over ones that type doesn't matter
TypeScript is about correctness but in the end you're still inheriting some of JavaScript's problems
ok
^^
Ok
can we list the benefits of javascript
can run rather easily on web
It's easy and popular.
TS is just javascript with type guards
It can be run in a V8 environment
js is more of a web lang, py iirc is more multi-usage
Atwood’s law:
“Any application that can be written in JavaScript, will eventually be written in JavaScript”
C++ is beginner friendly too, https://learncpp.com.
Hmm yes, the floor here is made out of floor
doubt
Gp*I hate autocorrect
C++ is beginner friendly too, https://learncpp.com.
@restive furnace is this guy from 3020
uhh, it really is, that book explains everything.
Cpp is always beginner friendly
I started with it
C++ is like Java but easier
c++ can never be a beginner friendly lang...lol
not really volt
here
friendly
Java is the hell redefined
c++ can never be a beginner friendly lang...lol
@silk chasm how so?
friendly
That's like saying Rust is beginner friendly because their book is simple to read
not really, same as any other lang
fuck, it, go haskell
Cpp is very rough for newer programmers. It's extremely rough, but I mean I survived
It's like saying brainfuck (A programming language) is beginner friendly because it might look easy
what about jsfuck?

ok guys say something good about js so that i won't feel bad in leaving pythong and starting js
guys
is this technically a lang war?
Nah man, it's like saying glass is beginner lang
@silk chasm it's extremely popular. You can probably do anything in JS at this point.
ok guys say something good about js so that i won't feel bad in leaving pythong and starting js
Ok time to move this
it's getting offtopic
@earnest phoenix not really, talking about programming langs is kinda development
@silk chasm it's extremely popular. You can probably do anything in JS at this point.
@sudden geyser good say more
Like, people have the choice to use native APIs to write GUIs, but they prefer to use Electron because they don't have to change up their code base.
Another Xdd error, It does not appear as it should appear
@silk chasm
ok guys say something good about js so that i won't feel bad in leaving pythong and starting js
@silk chasm Easier, more human readable, runs web environment easier
While you're talking about rust, c++, javascript, python, i am here coding in java.
why C# forgotten 😢
It's hard to think of advantages to JS since I haven't touched it in a while, and other languages I've used simply do more than JS could do, but for a beginner, learn it and see if you like it. You don't need a particular reason to use something. A lot of people like writing Haskell yet I have not found a reason to use it yet.
Rip
@restive furnace it's microsoft's java
how can i check if arg = to a set of numbers
like if arg = 1 do this
if arg = drnfdfuhoufdb do that?
py
just another question
with python, you can do everything other languages do?
just in other ways?
or r there limitations?
not everything, every lamguage has it's limits.
Every language has its ups and downs.
.addFields("📑 Channels", ${server.channels.size}, true)?
I like Python because it's very simple and, as a scripting language, would prefer it any day of the week over JS.
many native apps use python for build scripts too.
But Python is known for being slow. Yet I'm weighing productivity over speed.
what about thursdays o.o
** it is better to use Python for backend development and stick to JavaScript for frontend.**
this sentence was in the article can u explain what is frontend and backend
??
I know this question is pretty dumb but
how do you enable rest mode in eris?
frontend = html, css, js // what the user sees.
backend = what the user doesn't see: other langs, sql, etc.
Rip
how can i check if arg = to a set of numbers
like if arg = 1 do this
if arg = drnfdfuhoufdb do that?
py
Eris's REST mode is disabled by default and Im kinda new to it so how exactly do you enable it?
It's in the client options when you initialize the client.
ok hold on let me see
It's somewhere in the docs on the client class
@tired nimbus js new Client(token, { restMode: true });
oh ok
coolio
I didnt see it in the docs but thanks
front end = website
@restive furnace means like the dashboard of bot can be made by js and the bot by python?
ye
.addFields("📑 Channels",
${server.channels.size}, true)?
@earnest phoenixjs MessageEmbed.addFields()takes an array as a parameter
rough example is that bot is made in c++ and dashboard with js + vue.
and no problems
@earnest phoenix you will recieve a message from @gilded plank if your bot gets approved
ye
@restive furnace that completely means that js is better so website and bot both can be made by me...yasssssssssssssssssssssssss
np
@restive furnace that completely means that js is better so website and bot both can be made by me...yasssssssssssssssssssssssss
@silk chasm it doesn't make JS better
WRONG CHANNEl
SORRY GUYS
@silk chasm it doesn't make JS better
@restive furnace but still u told me somethin' that made me ultra motivated...thanks!
I made this function to check if some text contains something like {word1//word2//a phrase} and substitude that whole thing with one of the options inside it, any suggestion on how to improve this?
const regExp = /{.+?}/
const matched = newName.match(regExp);
const groups = matched.slice(1);
groups.forEach(group => {
let options = group.split('//');
let selected = options[Math.floor(Math.random() * options.length)];
newName.replace(group, selected);
})
Bruv
@earnest phoenix you mean submitting or approval?
H m m
@restive furnace but still u told me somethin' that made me ultra motivated...thanks!
@silk chasm well go with JS then ¯\_(ツ)_/¯
@silk chasm well go with JS then ¯\_(ツ)_/¯
@restive furnace ok that emoji thing removed my motivation
@restive furnace ok that emoji thing removed my motivation
@silk chasm lmao
actually you can use 90% of py in the dash too
actually you can use 90% of py in the dash too
@restive furnace why tf r u trying to demotivate meh
@restive furnace why tf r u trying to demotivate meh
@silk chasm what i'm just ✨ saying ✨
it's not essay
try not to list many commands if possible
what does your bot do?
why is it better than other bots?
what are the key features of it?
I can get 200 words about just writing text how the bot works and Privacy stuff
How do I make an easy changeable prefix command? As in with discord.py
ty
oh frick my rp went off

Aight, now its time to get my hands dirty again with Twitch API BS
undocumented is a thing
but when this shit is DOCUMENTED and doesnt work half of the fucking time, thats when it pissed me off
Why isn't this RegExp mathing something like {test//another}
const regExp = /{(.+?)}/g
How do i make my bot send a automatic message, when its added?
IRC limits bending me over like a lil bitch not gonna lie
either the lib is doing requests in the background or the api dislikes me
the former being more likely
but i dont see anything that exposes nor handles the limits, so im having to do guess work
tried sniffing the traffic? i know it's reaching but it's worth to check it out w something like wireshark
TokenError
at Strategy.OAuth2Strategy.parseErrorResponse (/rbd/pnpm-volume/99237f07-02b4-47d9-b8fb-f2bca84951f8/node_modules/.registry.npmjs.org/passport-oauth2/1.5.0/node_modules/passport-oauth2/lib/strategy.js:358:12)
at Strategy.OAuth2Strategy._createOAuthError (/rbd/pnpm-volume/99237f07-02b4-47d9-b8fb-f2bca84951f8/node_modules/.registry.npmjs.org/passport-oauth2/1.5.0/node_modules/passport-oauth2/lib/strategy.js:405:16)
at /rbd/pnpm-volume/99237f07-02b4-47d9-b8fb-f2bca84951f8/node_modules/.registry.npmjs.org/passport-oauth2/1.5.0/node_modules/passport-oauth2/lib/strategy.js:175:45
at /rbd/pnpm-volume/99237f07-02b4-47d9-b8fb-f2bca84951f8/node_modules/.registry.npmjs.org/oauth/0.9.15/node_modules/oauth/lib/oauth2.js:191:18
at passBackControl (/rbd/pnpm-volume/99237f07-02b4-47d9-b8fb-f2bca84951f8/node_modules/.registry.npmjs.org/oauth/0.9.15/node_modules/oauth/lib/oauth2.js:132:9)
at IncomingMessage.<anonymous> (/rbd/pnpm-volume/99237f07-02b4-47d9-b8fb-f2bca84951f8/node_modules/.registry.npmjs.org/oauth/0.9.15/node_modules/oauth/lib/oauth2.js:157:7)
at IncomingMessage.emit (events.js:185:15)
at endReadableNT (_stream_readable.js:1106:12)
at process._tickCallback (internal/process/next_tick.js:178:19) what say ı am not understand
How do i make my bot send a automatic message, when its added?
@earnest phoenix
you cut more than half of the error message off
i can prob give it a try, the problem though is the stupid amount of traffic going outbound and inbound
@earnest phoenix i still don't get why you want to return nothing. That doesn't make any sense.
@earnest phoenix in which library
imagine wiresharking this
yeah
@earnest phoenix in which library
@earnest phoenix discord.js

Can someone give me an explanation when it's useful to use void in js?
js has void?
Yes
interesting
you'll likely see static void in a lot of places
Ok. But why!!
https://discord.js.org/#/docs/main/stable/examples/greeting
@earnest phoenix you could've found this yourself by taking a minute and literally just searching for the docs
Void doesn't have a return type. It is use for methods/functions that doesn't need to return anything
I know what it does
wdym why? its what it does
But when or where to use it 🤔
if you dont need the returned value, void it
It is use for methods/functions that doesn't need to return anything
When you don't need to return anything
remote execution
say you want a function that sends an api call
why would you want to return a value from that?
just do the call
period
@earnest phoenix nice
By default Js methods are the type of void. They change it's type when it returns something
I see, but you can create functions w/o a return. Isn't that the same?
I made this function to check if some text contains something like
{word1//word2//a phrase}and substitude that whole thing with one of the options inside it, any suggestion on how to improve this?const regExp = /{.+?}/ const matched = newName.match(regExp); const groups = matched.slice(1); groups.forEach(group => { let options = group.split('//'); let selected = options[Math.floor(Math.random() * options.length)]; newName.replace(group, selected); })
@opaque seal
Yes
sure
Methods and functions follow the same return type rule
When I create a function without a return. Isn't that like using a void?
Yes
indeed
@earnest phoenix yeah the /g was fucking it up
its even more relevant on typescript where you need to infer the types of your functions
already did
Mhm
Ok. Then I don't know why people even use void on js.
its even more relevant on typescript where you need to infer the types of your functions
generics
i gave u an example davon
Sometimes it's just used to make things smaller, for example, instead of typing undefined, you can do void 0
Ok. Then I don't know why people even use void on js.
@midnight blaze because they don't need a return value?
Then create a function without a return
like setStatus?
That's what a void method/function is
function sendTextToAPI(text):void { api.send(text) }
Ah yes ts syntax
Mhm
Or something like this
function send(content) {
void ChannelHandler.appendMessage(content);
}```
75
and you need it to be approved first
@earnest phoenix to get bot tick you need to submit it once you have 75 servers to discord
i'm assuming void also has its advantages because of the GC
GC instantly picks it up since it's marked as void
By default variables are type of any. Methods/functions are void by default unless told other wise in comment blocks using the return tag.
i have way too many any's floating in my code
Lol
I use comment blocks using the type and param tags now
when you pull a lib from npm
and it doesn't have type definitions
:(
Oofers
npm @types
my luck is that it won't exist
void is completely something that js devs implemented when they were drunk, like tell me the difference between
void message.channel.send("bruh");``` and
```js
message.channel.send("bruh"); undefined;```
it likely exist
That is why I am confused
@earnest phoenix second returns undefined, it ACTUALLY has a value returned, void doesnt return ANYTHING
Oh
this.client.users.fetch()```
Fetch user doesn't exist on the client type
Wait void doesn't return anything at all
like i said void also has GC advantages
Yes
@earnest phoenix second returns undefined, it ACTUALLY has a value returned, void doesnt return ANYTHING
@opal plank Absolutely no, both has no value
So the performance is better?
I LOVE ERIS
Wait weren't you using commando @flint yew
yea
commando, yikes
its commando
Oofers commando
Commando, more like please make me a command handlero
Isn't it safer to have it be void, than undefined?
void isnt READ
Right
undefined is READ but has no value
So void has a value?
a void is a void
I void people
I know that part. But when a undefined method is called on it acts like a void correct?
what is it in this context
But either way your code looks more fancy with void
void someCode```
↓
```js
I'm just gonna execute this but return literally no fucking result cuz void```
↓
🕳️
hmmm
i'm wondering how the v8 engine translates functions into voids

Wait isn't that obvious
surely it needs to decide when it should actually be a void
from reading up a few articles
the garbage collector picks up every value in a void
V8 engine has builtins of checking them, if void appears before anything, just execute it and return undefined
It's just simple
But it also triggers GCs
wait, can you manually call GC in node?
hmm
Can someone tell me how to call it
Call what?
I want too see the garbage 
You don't see garbage collected inside GCs
i think the flag is --expose-gc
It just shows status of it
then you can call gc with global.gc()
and there you have it
but its not recommended to mess around it
to expose what it collects you have to make your own GC i think? 🤔
Global.destroy() 
setinterval(()=>{global.gc()}, 10)
the gc is automatic for a reason
best performance code
Yes
cpp devs are shaking in their grave
It won't work lol
And slow down your code by 69x

cpp devs are shaking in their grave
not really,std::shared_ptr. (and bunch of other "smart" pointers)
Slow motion code
Your code will run slower than yandere simulator if you do that
-69420 frames per seconds
Caps the I, then it will
i wish the gc in node was as good as the gc in net core
the net core gc is blazing fast and super optimized
compare that to cpp stack GC
Node sucks. We need node2
Gc in net core is so good
Node sucks. We need node2
@midnight blaze no, we need done.
Imagine binding net core's GC to v8 engine of google

Oh god
Everyone goes js dev
Lol
Haha brain goes big
google devs and ms devs working together
yikes
ms? Microsoft?
yes
my user command is broken, before it working fine showing someone date of joining a discord, pfp, etc, can anyone help lol
net core is made by ms
it was working before.
Show code
google devs and ms devs working together
@earnest phoenix on one side minecraft is dying on the other side nobody cares about it
Your object/property that name is apart of us undefined
minecraft is far from dying 
@earnest phoenix you mean entire code 🤔
Minecraft goes more popular actually
@fickle arch No the part where it errors
granted mojang devs are idiots
If you don't know where, show stack trace
@earnest phoenix on one side minecraft is dying on the other side nobody cares about it
@earnest phoenix far away from dying, minecraft has millions of players (thx to pewdiepie and bunch of other big ytubers)
the part of error were name not defined, but I had like 8 name on the search list
If you don't know where, show stack trace
how
Under the error
The full error under the error message
That's stack trace
^^^
And here he goes to the moon and never comes back just like my dad
sort of like this ?
The full part of that
Oofers
aah
Oofers
@vernal rivet Jokes
Yes
Starwoman said the biggest lie tho, "i code on java"
My_girlfriend = void 0
Lol
java13+ is rather ok
i still wouldn't take it as a production language
Bruh why does he keep deleting the image
just censor ur name lol, rather than deleting the message instantly.
My bad lmao
Show the 32nd line on your user.js
if you don't want to leak your name
why 👏 make 👏 your 👏 irl 👏 name 👏 your 👏 username 👏 in 👏 the 👏 first 👏 place 👏
^ and that, usually my username is fs or fr lol
Because big brain
It's my mid name 🤷♂️
Yes
status = `Custom Status:\n${cstatus}\nApp:\n${muser.presence.activities[1].name}
Why 👏 to 👏 even 👏 exist 👏 in 👏 the 👏 first 👏 place 👏
Its funny, because mine is korea
idk why it's like that, I don't remember making it like that. But my computer thinks it's in korea
@fickle arch activities[1] is not always available
👏 I'm 👏 dumb 👏 as 👏 frick 👏 thanks 👏 to 👏 reminds 👏 me 👏
Not even the 0
Just do a simple check
windows sets itself up in croatian for me because i'm in croatia and it pings the location, it's super annoying when you always work with the english version
Oofers
and then proceeds to download the wrong keyboard language

message.author.presence.activities[1] ? message.author.presence.activities[1].name : "No other activities";```
Ah yes elvis operators, my Lord and savior
I 👏 c 👏 ommu👏ni👏ca👏te👏wi👏th👏emo👏ji👏s bec👏👏👏ause I am a dumb Facebook person
@midnight blaze m 👏 y 👏 e 👏 y 👏 e 👏 s 👏 hurt
Now we can stop, my eyes melt
Same
Same
@coral trellis off topic bois here
Keep this on topic please
sorry for ping btw
yes
@earnest phoenix wdym
back to scramble my code
botdonefordummys
LMFAO
?
@earnest phoenix yes with custom commands or smth
Oh
Pretty much this
hicus picus I lost my brain functions.
I highly recommend not to use BDFD
bdfd nowdays has partitial js support tho
Still not good to use it
but still yeah ^
That's great. Like anyone who knows js would use that trash
Code stop snitching bruh
ping plez
here goes your free ping: @drifting wedge
@earnest phoenix wow so much help, thanks
Against code913 you can be toxic, yes
Against code913 you can be toxic, yes
@nimble kiln i don't really care if someone messes with me I'm friends with discord staff anyways
uuuuuu now i'm scared 😱
so scawwed
there an employee and 4 discord api mods in the server i shittalk in, does that gimme special perks?
nobody asked golden apple lookin ass
@drifting wedge Wtf I'm dying
yeah
i got people spamming the n word in my DMs
what does guildChannel.type return for text and vc channels in eris?
how can i check if args is a digit?
guys
i need help with discord.js bot
hosting on glitch
why it write error
but in heroku nothing
What's the problem?
look
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Did you check if flat is a function of fields?
idk
but
3 commands working, more doesnt
it working
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
but how example
that doesnt working
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
You should check that. The error is saying it is being treated as a function, but it is a property
im looking on my code
around 5 hours
....
trying all
and nothing
OHHH
I FOUND IT
writes an error only with embed messages
Ok

someone link this person that big ass wall explaining why json is bad pls
but OTHER COMMANDS NOT
@silent cloud because 👏 fields.flat 👏 is not 👏 a function
someone link this person that big ass wall explaining why json is bad pls
https://canary.discordapp.com/channels/264445053596991498/272764566411149314/752260260672176221
@silent cloud because 👏 fields.flat 👏 is not 👏 a function
@earnest phoenix where is it...
fields.flat
in code
BRUHHHHHHHH
what os?
flat is only supported in v12 onwards iirc
did u install nodejs from https://nodejs.org ?
idk how glitch works so uninstall nodejs and install it again
need npm command
how did u install nodejs?
same
google how to update node.js on glitch
how can i check if like an int in a var is = to this?
if '1','2','3','4' in arg:
like so if one of these numbers are in the var arg
do this
what language?
py
if <string> in <string/list>:
but like multiple ints
How do i make my bot send a message when it is added (Discord.js)
How do i make my bot send a message when it is added (Discord.js)
@earnest phoenix yeah^ listen to the event
what?
like so if one of these numbers are in the var
arg
@drifting wedge for loop over args and check if <i> is inargs
bot.on('guildCreate')
The same way you listen for the message event
what?
@earnest phoenix
im new to making bots, so im new to events, and such
Well the bots work by listening to specific events from discord
Everytime im here, i feel like im gonna get clowned on...
Then you need to understand the language at least
How much do you understand?
What, except for events specifically? Lol
You're good dude
Json and Js are not the same thing my dude
Json is a serialized object
I know
See what they said #development message
Are you saying your bot has no <bot>.on('someEvent') ?
when i turn the bot on, i have a console.log that automatically activates when it turns on
like "Im online"
;-;
How much do you understand what events are?
Have you seen a template bot script?
@faint prism nope
Then look at it
How much do you understand what events are?
@vernal rivet Barely anything
Then look at it
@faint prism Can i have the link to the thing? ;-;
Do you know how to Google "Discord.js docs" ?
no
Then I recommend you learn what they are before continuing working on your bot. Events are something you are going want to learn for d.js
I know that
no
@earnest phoenix https://bfy.tw/P77J
For all those people who find it more convenient to bother you with their question rather than search it for themselves.
@earnest phoenix https://bfy.tw/P77J
@faint prism Lmaoo, smartass
For all those people who find it more convenient to bother you with their question rather than search it for themselves.
wait
I mean 🤷
you can actually check if a user have nitro or not and display the actual flag
i've been told that wasnt possible

There wasn't any accurate way of doing it back then
As you can see. It uses events
don't work with eris
I recently moved to eris because Im at 700 and I want to prepare for future
emit an event to listen to a reaction on the message being sent
yeah premium types shows the nitro level
then listen to it
Neat
what you can't see is the booster level
Bot.on('guildCreate')
message.channel.send("REEE")
but most of the bots only shows:

when I userinfo my self
and
is actually displayable but they don't do it lol
Cosmetic you have to make a function as a parameter in the event
Bot.on('guildCreate')
message.channel.send("REEE")
@earnest phoenix sure. If your bot client object is named that
^^^^
Like I said I recommend you learn what events are and how to make one/emit it before continuing
@earnest phoenix sure. If your bot client object is named that
@faint prism re
Why don't you just send your code (minus the token)
Alright
const discord = require("discord.js")
const client = new discord.Client();
const prefix = "RE "
client.once('ready', () => {
console.log("FuckerBot is fucking online, u fucking piece of TRASH")
});
client.once('message', message =>{
if(!message.content.startsWith(prefix) ||
message.author.bot) return;
});
'use strict';
client.on('guildMemberAdd', member => {
const channel = member.guild.channels.cache.find(ch => ch.name === 'general');
if (!channel) return;
channel.send(Welcome to the server, ${member});
});
client.login('StupidStupidSTUPID')
pastebin that shit
strict mode lol
any bin but pastebin
both kinda work
Are they identical??
once stop after emitting once iirc
once = happens once (doesnt restart)
on = opposite to what flaz person said
not a good idea for non functions
No
on() you attach a full listener, versus when you use EventEmitter. once(), it is a one time listener that will detach after firing once. Listeners that only fire once don't count towards the max listener count. Jul 25, 2018
@earnest phoenix do you have a v11 bot?
if thats the case just read the v11 -> v12 changes and apply them
i havent
then just read some tutorial to get started
ok
im looking now
if discord.js devs didnt make u need to add the .cache, if u added it it gets it from the cache, otherwise it gets it from the rest hahaha lmfao
it would break bot “developers”
uwotm8
like
I swear if cache existed on games, it would run slower than yandere simulator
instead of getting data from the cache as normal, it would always get data from the rest every time
but if u added the .cache how it is now in v12, it gets data from the cache and not rest
if that makes a bit more sense idk
I'm sorry what
wat
As heavy as djs
Lol
Are videogames really comparable to a Discord API wrapper in terms of RAM
^^^
lmao
i mean, games are unoptimized af these days
they just abuse your cpu because your pc can handle it
cough me playing Arma 3 on 6 GB of RAM
Game dev sounds more fun than Discord bots tbf
yes
i was going to make a game a while back
make a game IN discord, both worlds
but i realised how much shit game devs get
the whole community of discord bots is so narrow
prob get better treatment than discord bots tbh
anything is better than discord bot development
'what do you do for a living? i code discord bots'
ew cringe
lmao
Game development is sure more fun than bot development, but after you try it and get stuck and try to fuck go back, that's the part where it gets unfun
at least i can call my shit "Inter Platform bridge/relaying system"
Looking at one part of the code for 10 hours still can't find any issues
That's how game development works
the problem of game development is ideas
literally everything has already be done before
i wanna make an open world game
working on things that already exist is no fun
or make some shitty low graphic quality game like among us and fall guys
gameplay > visuals
fall guys is shit
Ey fax
worked out greatly for them
look at terraria
minecraft
and a ton of other games
they are heavily focused on graphics
and look where they at
or do non euclidean worlds in ue which totally won't make you go insane because non euclidean geometry is fucking not insane
its either 8 or 80 from what i see
you either a AAA game dev or you an indie that pulled off and amazing gameplay game
8-bit NFS
just make a open-world 3D game where you can freeplay and has some sort of story and boom you have game what hasn't been done beforeish.
I actually don't know pretty much games what allows player do following
actually I don't know any
Dark Souls?
hmm
i meant more real-lifeish, like GTA series (the graphics and stuff, not the gameplay, unless you wan't to make GTA stylish game).
compiled in Python
@slender thistle wot
@drifting wedge for loop over args and check if <i> is in
args
@faint prism how tho?
With a for loop
ive never used one b4
yea lol
Have no never heard of a for loop before
@faint prism ive head abt loops
but not for loops
Sounds perfect for your use case
Sounds perfect for your use case
@faint prism lol
for (int i = 0; i < myArr.length; i++)
myArr[i].doThing()```
The syntax varies very slightly across languages
capital I
can i just use if?
i =/= I
Sorry on mobile
What's the initial question
@slender thistle so its for a thing where the user can switch out their backgrounds in levels and profiles
Yeah. Mobile auto caps sucks
i want to like make it so the user can can do !background 1
but not like !background 69420
i got a new keyboard, finally not gonna be coding with that shitty laptop hellspawn keyboard
80% of the spacebar doesnt detect on press
i =/= I
weird operator, never heard of, i always usei != I.
hmmmmmmmmm
yeah, math. not code
I don't see how a for loop is helpful there
never heard of still
because he is comparing ints against a string. so it will increment until his specified max
I don't see how a
forloop is helpful there
@slender thistle
What max
Isn't it literally just a settings[user_input]
In any case
@drifting wedge what do the backgrounds happen to be
images?
why not regex or index of while joining?
@drifting wedge what do the backgrounds happen to be
@slender thistle oh
u want me to send it?
if you going to search args, join them into a single string then either indexOf() != -1 or regex
i made like 50
string.match(regex)
Y'all seem to be overcomplicating this imo
i dont even know what the quesiton was tbh
Show me how you loaded that image through the command
@slender thistle i dont need help with that
just need help with the arg part
and like only using the correct args
among us is just the video game version of the board game secret hitler
among us is just the video game version of the board game secret hitler
@proven lantern fax
Do you think you can use a dictionary, set numbers as keys and file/image names as values?
never heard of
im thinking about decreasing the cache refresh to 5 minutes but idk if that'd be a really smart move
🤔
Only one way to find out
lol
i shit you not i think ive hit 429's almost 100 times the last 3 days
write a script to replace revoked tokens
im amazed they havent revoked or flagged my app
though tbf the helix api seems fine with me
loll
the IRC is the one bending me over like a lil slut
Do you think you can use a dictionary, set numbers as keys and file/image names as values?
@slender thistle <int, string> you mean?
Aye
yes
not even necessarily an integer
<string, string> 
no u
I mean you can do string keys in some dbms. but idk about a dictionary
you could probably do it where the key is the character codes -> ascii decimal value
Python though
implicitly convert for dictionary keys
Objects, classes, all that stuff if explicitly stored as-is
I don't think there's need for a class for that tbf
I mean you do can do this
#development message
I'm not exactly sure how ASCII got involved kek
because that's a character encoding
what are you using the dictionary for?
Who?
shivaco. are you caching to improve performance?
so if a dictionary didn't support strings as keys. you could implement it yourself by converting the string -> char codes (integers), then storing that int as the keys
is what I'm saying
"Am I the one that's having an issue here" is the question I'm tempted to ask
scroll up, I was suggesting a dictionary as a solution :^)
right I'm just saying how to implement this
#development message
Nah Auger, Python dictionaries support string objects just fine, so no need for all that headache
lol alright
help me please, when I put the command !ban doesn't let this error appear
rate limited?
someone called me?
no clue
lmao
it should be obvious im a genius when it comes to ratelimits the moment i say i got ratelimited over 100 times in the past 4 or 5 days

best person to ask for ratelimit advice is the guy constantly getting ratelimited
still fine tuning this shit but im confident its the library reconnecting to some channels and ending up abusing my count
i think im going to kill my other bot @astral cedar as he only gives you a joke and i cant do much with him as i feel it kill the aspect of having it as a joke bot
rip
yeah hes going to be completely rebranded so i dont have to wait 5 weeks again
i am adding a command that will set the bot command prefix for a guild. i am planning to create the below command and start with a default prefix of !. if the prefix is changed the below command will still have the prefix of !. is this the right approach for a command to change the bot prefix for a guild?
!set-team-up-bot-prefix
can my bot have a unique status message for each guild?
i think im about to get my 5th ratelimit today
no
status is per user
Well today we learned
clustering and ratelimits dont go well together
they will BOTH spam the api
sockets dont like scaling
why doesnt twich do sharding? like ffs
gonna have to come up with something
i wont sleep till i get my cache stressed up to 7 days uptime with 10k streams
are you queueing request that get rate limited?
im fairly certain reconnects count as join attempts
so ontop of MY requests the library is doing reconnects in the background
hence it fucks up my limit
i cant think of any way to avert this than just being 'careful' or patching someones lib which is equaolly a bad idea
rate limit is 10k per 5 minutes right?
use ease off reconnect logic
wdym?
actually the library probably handles the reconnect logic right?
i assume so yeah
the first time you fail you wait 5 seconds, second time you wait 10 seconds and so on
damn
buy a dedi 
jeez
1️⃣
damn it doesn't work
?
oof
shard the app and get a second api key
its 20 attempts per 10 seconds
@sudden geyser ?
im waiting 1.5 secs PER iteration
and ontop of that im also doing 11 on the last attempt
1.5 x 19 + 11 seconds
1️⃣ would be the emoji
and im STILL encountering ratelimits
get a second api key and rotate between the two







