#development
1 messages · Page 1277 of 1
That seems like a lot of work to make the status online on a phone
its in the identification/gateway payload
@honest perch go to a diff channel, this isnt for trolling
Not Erwin wernet u a mod
I use nodejs apps on my phone to ho st my bots.
It's very easy, not sure with iphones however don't own one.
Write like how you would in visual studio code or whatever you use, make your package.json through npm init; upload your files set the server up and boom.
Phones do great for up to 1,000 people.
sometimes more
@opal plank not trolling
@honest perch i have explained why you shouldnt do it
first, you are modifiying a library, whcih 90% of the cases here, people dont know what they are doing
second, you are modifying it to use an undocumented feature
third, using undocumented bits of the api might lead to punishment and will likely get you denied in verification
they are undocumented for a reason
It would of been patched if they cared
its not 'patched'
you seem to not understand the reason why stuff is undocumented in the api
its to be used by the client
its not for general use
Why are we here Just to Suffer
@honest perch https://discord.com/developers/docs/topics/gateway#identifying-example-gateway-identify
you go and tell me where mobile is at. Go screech at the devs, not me, if you got an issue submit a ticker at discord's repo
Integrate your service with Discord â whether it's a bot or a game or whatever your wildest imagination can come up with.
its against TOS to be using undocumented stuff
while they dont care in most cases, you'd be using it for a public bot
I mean activity "5" isn't documented but I dont see it being bad
if you wanna take the risk, go ahead and do it, im not encouraging users to use undocumented stuff, same way i dont condone people of using client mods
As long as I can still send my bots in to broadcast FFMPEG and still XSS
That's all the bot I need.
like i mentioned, its your opinion, you are more than welcome to ask a staff or someone higher up about it
"$browser": "my_library",
Fun little promoting thing we got đ
So if I make a lib called iOS then can I use mobile status
Cause then its the libs name
lib =/= mobile
first, there arent libs for mobile
not documented at least
you'd be using linux
Ohhh mobile status, you can do it but you need to access gate-way differently. I've done it and rate-limiting is exceeded fast under these parameters.
Discord doesn't allow it to affectively go down,
like i said dude, you are more than welcome to raise a ticket here if you wish, im not a staff and im abiding by the TOS,
https://github.com/discord
feel free to go bother them, im not here to argue with you
I was doing it for a JS project a while back it's not smooth at all
I had to XHR all my requests to and from to gain access, rewrite library like they were saying to find it's poop city.
They give the BOT api for a reason to monitor/allow these usages
Idea is cool-ish depending on your means my case was re-theming a site but also with the XSS hosting bot, all in browser it was a tad abusive.
this worked in an eval command, but when i go to put it in a typescript file, it givess me thi
Hi guy
const peoples = message.member!.voice.channel.members;
return message.channel.send(`
The following people have been rickrolled: ${message.channel.send(peoples.map(guildmember => guildmember).join('\n))}
`);```
I made an api
@fringe jungle evaluation works in js, you cant precompile it
Thatâs what I told him
sigh
:d
if it says something, believe it
unless itâs repl.it
Sometimes the errors lag and there will be correct syntax highlighted for a completely unrelated reason so you have to refresh the page and wait for it to go away
it wont tell you wrong stuff 99.999% of the time
@opal plank JavaScript would like to have a word with you
XD
For eval like in JS/Node; I'd do something like this
if (typeof functionarray[nameofvariable] == "function") {
functionarray[nameofvariable](arg1, arg2);
}
let functionarray = {
test: () => {
console.log("you passed test through");
}
};
for fun "eval like" you can set nameofvariable like so
let nameofvariable = `test`;
let nameofvariable = `test_${newvariable}`;
You could load up thousands of functions like this and have a complexity rating of 5-20~
Big lolz
@sudden geyser you misread the part where they mentioned typescript
high level javascript
im currently trying to make my own typescript api
its working, though its very basic
gonna use that as middle ground for the dashboard
How can I get the participantId of a json file named "aproxthethat"?
{
"participantIdentities": [
{
"participantId": 1,
"player": {
"platformId": "TR1",
"accountId": "5vqU8LNi2dZHaXIvfUmFwOZCXmWqP-NmEfrsRdxZW66JzaL6vP6Qb5TA",
"summonerName": "FiddleSticks0",
"summonerId": "R65nvvCPD_DJYxdciOZBcbP8KW9dME71Y9rh3k7xMQP7neo",
"currentPlatformId": "TR1",
"currentAccountId": "5vqU8LNi2dZHaXIvfUmFwOZCXmWqP-NmEfrsRdxZW66JzaL6vP6Qb5TA",
"matchHistoryUri": "/v1/stats/player_history/TR1/2425255479341888",
"profileIcon": 4568
}
},
{
"participantId": 2,
"player": {
"platformId": "TR1",
"accountId": "gKXPhNTNeYEttj-xV9AWziRs6eDCGyWfxvxDiar4j4FpxIW23KGn9GKc",
"summonerName": "aproxthethat",
"summonerId": "ug1XDV8d5Bh4M6CmTiQVfvT7Gi4953SOnDrnKpKByaq9ouo",
"currentPlatformId": "TR1",
"currentAccountId": "gKXPhNTNeYEttj-xV9AWziRs6eDCGyWfxvxDiar4j4FpxIW23KGn9GKc",
"matchHistoryUri": "/v1/stats/player_history/TR1/2033771425100256",
"profileIcon": 4655
}
}
]
}
JS?
yeah
const randomname = require('directory to json');
randomname.player
but your structure is different so it needs accessing differently.
so you'd start at participantIdentities[0].participantId === ID
let len = randomname.length;
for (var i = 0; i < len; i++) {
if (participantIdentities[i].participantId === id) {
// do something
}
}
I guess I misunderstood.
summonerName = I want to get the participant ID of "aproxthethat"
Okay so same thing
you want to get the id from a summoner name?
yeah tim
use array.find()
let len = randomname.length;
for (var i = 0; i < len; i++) {
if (participantIdentities[i].player.summonerName === name) {
// do something
}
}
ezpz
how do i ban someone
You can run a break after done looping if that's all you need done too @earnest phoenix
will that do regardless of role satus
Good morning
Well if you're a everyone role, and trying to do it to admin
Nah.
You get an error from discord, but if allowed to it will
your bot can only ban members with lower roles than your bot
Yeah nope
damn
Role priority it's explained in the servers role too when making them.
IF your bot will ban any violator regardless of role, you could run a try catch, for the cases they can't be banned it'll dismiss it and let you know why.
what abt a command
where i do !!echo [text]
how do i do that in js
ik in c# and py
You get a message emit from discord when you are ready.
the bot will echo the text
(have authed/logged in); you can take the received messages and process them accordingly.
client.on('message', (receivedMessage) => {
receivedMessage.channel.send("I got something can you get the rest?");
});
I gave you the first part to the solution thus, "can you get the rest?".
hi
if (receivedMessage.content.startsWith("basic check")) {
// do something
}
đ„
Can't feed you a full solution from nothing.
Oh that's more specific
Person: !!echo test test
You need to split it then and strip the prefix
Bot: test test
Imagine this
Command.Check(receivedMessage);
function Check(receivedMessage) {
var splitCommand = receivedMessage.content.substr(1).split(/\s+/);
// Command Check
try {
if (typeof PublicCommands[splitCommand[0].toLowerCase()] == "function") {
PublicCommands[splitCommand[0].toLowerCase()](splitCommand.slice(1), receivedMessage);
} else if (typeof Aliases[splitCommand[0].toLowerCase()] == "function") {
Aliases[splitCommand[0].toLowerCase()](splitCommand.slice(1), receivedMessage);
}
}catch (e) {
console.log("ERROR", e);
}
}
substr(1) removes 1 letter from beginning, that's if it's matching prefix of coarse. No other time!
.split(/\s+/) splits the string into an array based on \s+ which is spaces newlines
splitcommand[0] is our command after the prefix sent to slot 0
in JS it's just .substr(1).split(/\s+/) and accessing your array accordingly but making sure to check if it's a command to split by doing a prefix check.
đ
the echo command will just make the bot repeat everything after !!echo
!! being my prefix
echo is the command
any text after echo
will be the text the bot responds with
i have this same thing in c#
i gotta find the class file
check if command starts with prefix, then check if command is echo, then remove the prefix and the command from the string, and send the rest
client.on('message', (receivedMessage) => {
if (receivedMessage.content.startsWith("!!")) {
var splitCommand = receivedMessage.content.substr(2).split(/\s+/);
receivedMessage.channel.send(splitCommand[1]);
}
});
I explained this
it's no easier than that.
I tap out
i think its a miscommunication
Miscommunication = provide full answer?
Is glitch good to use for a bot? I dont know really ANYTHING about bots so idk
fairpoint
That structure there should be all the spicey noodles you need
to get it working and deciphering your users input
that code will only send the first word, not all words
It's a demo
yes, just for him to know, in case hes copy pasting
đ
Expanding is fast from here, spend an hour
its that simple
It is that simple
wow
also, make sure you account for prefix length in the substring, so its not hardcoded
Yeah
100% substr minuses the length of string you set for prefix
That could be set differently, but most just use 1 so no fancy code needed to calc length of string
Adjust accordingly and you're off to the races
Well back to figuring out an adapter for this site login, gonna get messy with their auth required.
if you know C#
@unique patio did someone say C# :)
YES
c# gang
Any spanish people?
c# gang and spanish gang? nice
if(taco == burrito) { no === speako() => {burrito})
Please keep this channel for actually providing support
how would i make it so when a user sends for example #development the bot translates it into 272764566411149314?
discord.js
oh ok, so just like username mentions?
/language pt
almost
thanks
Almost right but not
AlguĂ©m fala portuguĂȘs??
Ni
What is Bot's library ?
@swift umbra ya explain it for him please, ty
Que ???????? NinguĂ©m fala portuguĂȘs?
TĂĄ vou pegar o Google tradutor pra me ajudar kk
To
One message removed from a suspended account.
Que??????
One message removed from a suspended account.
Eu sou do Brasil
đŹđ§đŁïž
opa linguagem errada desculpe
One message removed from a suspended account.
Thats spanish
One message removed from a suspended account.

Oque parece ser o problema
I'm from Brazil
nĂłs falamos inglĂȘs aqui
I can't add my bot
Ah, ele enviou alguma mensagem de erro?
Yes
VocĂȘ poderia me mostrar?
@sick viper what's the problem?
@swift umbra I can't add my bot
VocĂȘ poderia me mostrar a mensagem de erro?*
Verifique se o seu firewall bloqueou a conexĂŁo
Verifique se o seu firewall bloqueou a conexĂŁo
@earnest phoenix thanks
Its development topic wdym
not in english though
Comment:
Quick.db is a very trash db don't bother your time on it. It's not even saving the stuff correctly

One message removed from a suspended account.
*laughs in i told you to use postgres *
i have no freaking idea what this br dude was on about
but even his pt messages made no sense to me
One message removed from a suspended account.
@quartz kindle tim tim
@_@
Can you make discord.js light sharding complatible with TS?
It doesnt accept JS file
whats wrong with ts
"allowJs" = true
nope
Awh
Oh lol
thats what im on about
all ts files must be compiled to js before being able to run
^^
I am fucking dummie

all good
bruuuh making api's in ts harder than i though
being 3/4th s of a bottle down doesnt help either
whats so hard about it?
the whole learning

i havent had the chance to play with api's much in-depth
so playing with body, request, middleware, css, php and all the sorts its quite new stuff for me
Same
i want to move all my web shit from php to js, but im too lazy...
lemme know if you want to have some fun with me
Koa seems to be quite powerful
its the same and you know it

its just that i type my objects

who needs typing
who needs bugs?
i dont have bugs :^)
me neither|| lies||
all my bugs are discord.js's fault
all mine are twitch-js
f
so up until now we on the same field

still kinda annoyed that i havent recieved a reply in a few days
went out of my way to simplify my code and add it to a private repo to give to the authors and havent got a reply in a few days

So I'm trying to port over some node code that uses the ws npm module to the browser, using the native WebSockets API in the dom. But, I'm stumped on this part. How can I mimic the second two parameters of websocket.send() (options and callback).
how to keep the music bot 24*7 in vc ??
dont make it leave
why the heck would u keep it 24/7 in a vc?
why the heck would u keep it 24/7 in a vc?
@opal plank to make the vc in use
but why
just dont go offline ?? ?
@thick gull wdym
yea
tnx
you welcome, i guess?
The user aborted a request.
đ€Ł
try to reconnect
@opaque eagle why do you need those options and callback in a browser context? The internal websocket implementation in the browser will handle packet sending, and therefore does not have a callback.
If you want to increase code reuse, you can create your own class wrapper around the native WebSockets impl yourself and overriding the send method to include those parameters
oh alright
helkpo
i get this error
at RequestHandler.execute (/home/container/node_modules/discord.js/src/rest/RequestHandler.js:107:21)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:11) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:11) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.```
restart the application or wait a few minutes then restart again
@quartz kindle make your own fork of d.js instead of only d.js-light
problems solved

oh and what about websocket.ping()
just make Discord 2, problem solved
@opaque eagle ping is another low-level function that is not exposed by the browser API if I'm not wrong
oh alright
I really wonder if theres a good way to use apache with typescript
the browser only provides an abstraction on top of the websockets

i dont wanna make a fork, otherwise i'll have to update it myself when discord changes shit
so i dont have to recompile code
i rather have the djs team do the discord api updates for me
i'm technically working in deno but it's the same WebSockets api with the same methods and stuff, so I just say dom
you can always rebase 
constantly rebasing would be a pain lol
its not lazyness, its just 'future proofing' by pushing onto non lazy people
hrm fair enough
@opaque eagle if you want to use ping with extra data, you will need to implement your own protocol for that
oh ok
hmmm
lemme see if i can find that
im just setting any rn which is absurdely idiotic on my end
it has body, response, headers, request, params, holy shit
is that koa?
there probably is an interface for that, should be a popular lib
damn another bloat-ish web server framework
im looking for it but still
doesnt it attach its classes to the exported object?
cant you do res: Koa.response
or something
what are you trying to do?
well ok if you don't need templating/rendering its better to use a more lightweight library
Hmmm
you dont need the framework to support it, you can use a renderer manually
pretty much as well
GOT IT

what library are you using to parse the body
hoho then you are going to have fun
ah
make sure that is use'd before your routes are loaded
though thats on the main app, not the router
what if i do router.use()?

time to break shit, brb
well the thing is typescript can't deal with dynamic contexts that well yet (in terms of syntax and pre-processing)
or just process the stream yourself xd
lel
send main code
thonk
lmao
also typescript
cant even
it comes parsed

i could use headers
but it bothers me that body isnt comin
oh
i need to put applciation-type json on header dont i?

Promise {
User {
id: '453103897012338688',
username: 'Plebus Supremus',
bot: false,
discriminator: '2784',
avatar: '64de2606d3fc0833e6a6747c7e81369a',
flags: UserFlags { bitfield: 64 },
lastMessageID: '759963963541684246',
lastMessageChannelID: '753764342503309324'
}
}
``` how to get the username?
and now i just crashed it

jesus christ if you ever want to break code, just put it on my hands and gimme 10 minutes
@silver lintel await the promise, then use the obtained value and access its username property
ooh it works ty
you can try Content-Type: application/json in postman @opal plank
thats precisely what i did willi
oof then
im getting no response
send entire sauce pl0x
foine
@earnest phoenix nice ghost ping oily
@earnest phoenix Please don't invisible ping people
@fluid basin any clue?
@lofty otter dont ask to ask
I need help
Cause there is my music bot
And i am not able to find the HTML
So can you produce one
music bot
What "html"?
@lofty otter why does your music bot need html?
HTML doesn't play music, buddy
Cause itâs my first time
HTML is for websites not music bots.
I'm pretty sure you write markdown in there not html
And we can't write your bot's description, it's up to you to describe your own bot.
(you can use HTML, but if you don't know it, better just use markdown)
@opal plank wait just curious why are you using both commonjs and es6 imports?
i think i sent you outdated code
its cuz making a json for config is annoying
so i just leave it as json and require it
importing json is annoying
though its legit 2 lines more

export default {}
import * as config
done
but you see, thats one extra line to export it
its worth it

How would you make this display an image here? Like i habe this url: https://images.shibebot.ga/test
Ex. https://tab.2b2t.dev (im using python)
@fluid basin this is what bugs me
root is fine but any other endpoint it just 'nopes'
weird
OOOO
@nimble kiln someone use ur api!!!
@earnest phoenix lmao
yeah I saw
@earnest phoenix lolrittter is my freind so i tend to use some of his work as examples
.-.
using JWTs for authentication is bad. 

i have no clue what half of those things are
front end dev in learning

im fiddling with cryptop now
Well, learn this: https://gist.github.com/samsch/0d1f3d3b4745d778f78b230cf6061452
i'll ask around for a better alternative, brb
How would you make this display an image here? Like i habe this url: https://images.shibebot.ga/test
Ex. https://tab.2b2t.dev (im using python)
O
that explains a bit but not much
any JWT should not be used for auth
the gist I posted has a link to a youtube video that goes in depth if you're interested. But overall, TL;DR, session cookies are what you want to use.
so im gonna have to figure out cookies
fok
jest, cookies, koa, middlewares, php, laravel
ffs how much shit is gonna get thrown at me today?

what are you trying to make in the first place even
short, dashboard
ah ok
long: learning
i already got a dashboard
though its in php
and i'd highly like to move away from that hell
express would be easy if you want to use nodejs
bad
and great for starting off
bad
tbh
ive used express
koa is express 2.0
ive used express quite a few times in the past
though koa has a bit of a learning curve
and i havent gotten too much into express
i went to dick with php for web stuff
php html css and js combo
eeey theres a middleware for this

I usually just do passport and passport-discord if I'm logging in discord users
wont work in my case i dont think
specially cuz im dealing with multiple oauth's
twitch youtube AND discord
ah well
although if you're developing an api then maybe using jwt will be better
(though imo I think jwt is still rather big)
Why do I keep getting this.. I have reinstalled the library 2 times.
https://prnt.sc/up0o67
https://prnt.sc/up0nx9
https://prnt.sc/up0nt1
PING ME WHEN I GET AN ANSWER
Can i send 2 embeds in 1 message?
@earnest phoenix thats json not json with comments
I don't think you can send 2 embeds, no
2 different types
I've never actually seen it done so I gotta say no.
@opal plank Mkay, so what do I need to fix?
ok
hey all, so for a class assignment we have to design a chat application that allows for user file uploads in a secure way, if I never execute the file in the upload directory, I simply allow it to be downloaded in a read only way, I should....? be fine right?
this is in node^
I couldn't really find an exact answer so I figured id ask here
"in a secure way" often means, like, with encryption
secure way server side for clarification here
as in like, keeping the server side safe from attacks via file upload
I mean, if a file is never accessed or executed, it's "secured" but you could also block some file types I guess
aight, that's kinda what i figured but this textbook is from like 2012 and I didn't really trust it lol
tysm
uwu
@queen moss please don't block file types .txt, .text, .mcworld, folders pls
You can't use comments I json
@karmic compass yes you can
@karmic compass @umbral zealot you can have comments in JSON in older versions 
older versions that nobody uses and nothing supports. sure.
why does Visual Studio Code have a language called JSON with comments 
is it possible to round message.guild.members.cache.size to the nearest whole number
A qt is typing...
is it possible to round
message.guild.members.cache.sizeto the nearest whole number
@earnest phoenix ```
Math.round(collection.size); // Collection#size returns a number so you can doMath.round()on it
because it keeps giving me this weird huge decimal
oof
because it keeps giving me this weird huge decimal
@earnest phoenix wutdafuk
lemme see the docs
oh wait
im stupid
wrong line
````(`${guildInfo.humans}%` Humans ```
tthis one
it gives the percentage of humans
but idk how it gets a decimal
wut da fuk
it gives the percentage of humans
but idk how it gets a decimal
@earnest phoenix a percentage can be defined as a decimal multiplied by 100..... don't skip meth classes
you can use .toFixed() to get the number with a specified amount of digits
or is it .toPrecision()
idk
lemme search the docs
name: `Members: \`${message.guild.members.cache.size}\` (\`${guildInfo.humans}%\` Humans | \`${guildInfo.bots}%\` Bots)`,```
where would i put it
guildInfo.humans.toFixed(2) or something like that
me bots in 101 servers i wanna make sure it dont break
@earnest phoenix try doing GuildMemberManager#cache and filter it using Collection.filter
im trying the thing POOLED told me
if that doesnt work ill try that
ok

to fixed determines the amount of numbers after a decimal point.
Ey
So
Do you have the image stored as a local file?
Or is it an image you get from somewhere in bytes?
Just an image stored as a local file
I usually just get my images from my other webserver lol
Omp
Oml
Lmao
Yeah well
Ig that works
show code os sharding.js
ok
Of*
let apiInfo = {};
const manager = new Discord.ShardingManager("./app.js", { totalShards: "auto", respawn: true, token: config.token })
manager.spawn();
manager.on("launch", async shard => {
console.log("Shard " + shard.id + " starting.")
})
webAPI.listen(80)
webAPI.get("/", async (request, response) => {
response.json(apiInfo)
})
async function updateInfo() {
let rawShards = Array.from(manager.shards.values()), shards = {};
for (var shard of rawShards) shards["SHARD_" + shard.id] = shard;
let newInfo = {
guilds: await manager.fetchClientValues("guilds.size").then(r => r.reduce((prev, val) => prev + val, 0)),
users: await manager.fetchClientValues("users.size").then(r => r.reduce((prev, val) => prev + val, 0)),
shards: {}
};
for (var s in shards) newInfo.shards[s] = {
status: await shards[s].fetchClientValue("status").catch(() => 6), // https://discord.js.org/#/docs/main/stable/typedef/Status & 6 = unable to reach shard
guilds: await shards[s].fetchClientValue("guilds.size").catch(() => null),
users: await shards[s].fetchClientValue("users.size").catch(() => null)
}
apiInfo = newInfo;
}
setInterval(updateInfo, 30000)```

?
I think this should be manager.on("shardCreate", shard => console.log(`Shard ${shard.id} is active`)


sorry for only 4 guilds
i released this bot publiclly like a few hours ago
and only to 2 friends
đ
how can I use apostrophes in the messages the bot sends? using quotes doesnât work
what lang
usually u can use like \' in some or if u want to use quotes in a string 'hey "hey"'
i tried installing a package on repl.it with -g flag but npm said it doesn't have permissions to. I removed the flag but now bash says firebase ain't a command (i'm not dumb i know what global means). How would I use firebase then?
@earnest phoenix escaping is done with backwards slash
yeah i thought i put that guess not
oh wait
cant put thta
there we are
had to escape a fake escape
lmao
anyone help
nvm got it to work
sorry for only 4 guilds
u supposed to shard at like 2k guilds
How to stop node process from terminating when uncaught ..... occurs
and no pls don't suggest try,catch
it doesn't work
not recommended
not recommended
hmm
any uncaught/unhandled errors can lead to unsafe situations and instability, terminating the program is the intended behaviour to prevent any unwanted/unexpected stuff to happen, whether it is to your bot responses and code execution or even database
oh
process.on('uncaughtException', function (err) {
console.error(err);
console.log("Node NOT Exiting...");
});
this is what i tried using
please use an autorestarter/process monitor for your bot, and fix the errors when you see them
pm2 logs bot.js --lines 100
bruh i made a template bash file for pushing changes to my GitHub repo and i used underscores in places where i need to put stuff and i just executed the file without putting em so now i have an underscore hell
wholesome 100
it says Error : few things then .......................
find the error and find out why it happened
if you can't then unless you post the exact logs here no one can help you
it says Error : few things then .......................
@delicate shore you're passing too many things it's telling you to pass few things
ok
chat dead
@earnest phoenix 2500 enforced, 1000 recommended
please resurrect chat
How to make a bot which will post facts related images or suggest me a bot
How to make a bot which will post facts related images or suggest me a bot
@shrewd shore you need to code it or search a bot like that on top.gg
adverts aren't allowed so we can't directly suggest you bots
search an api for that and integrate that api on a bot
748100257761460364 you need to code it or search a bot like that on top.gg
adverts aren't allowed so we can't directly suggest you bots
If it's reasonable and actually helpful, we're lenient
h
Nyoom
so the reason why imho you shouldnt auto fetch changes from gh to your production is.... its easy to break production
either have the update be manual, and/or pull only from a branch called 'live' so you must merge that branch to have it show up
OR, dont do it at all
and if you do do it, then dont do it via git pull or anything like that, because you dont want the .git metadata knocking around especially e.g. in dashboard content
oHhHHhHhhhHhHhh
use rsync, or fetch and untar a release
So they're functionally the same oRrrrrr?
you could call a C++ header file "mystuff.owo" and do #include "mystuff.owo" gcc wouldnt give a crap
:O
C++ compilers basically just dump the contents of any file you say is a header directly at that point in the file
That's so dumb and amazing
yeah
Thank you brain, very cool :3
it allows for stuff like template metaprogramming, but at the same time its so returded and 1970s
headers are usually .h if i remember
or .hpp, or no extension at all
So I could just have a file with machine code?
the official standard e.g. C++11 onwards encourages you to not have a file extension, so then you can just do e.g. #include <iostream>
no, visual studio has something called precompiled headers, which is like that, but generally no, the compiler parses and compiles header files
precompiled headers is just a way to speed up compilation
Smart vs
because the biggest thing that sucks most of all about C++ and C is compilation times
Also I'd assume that vs > vsc for .net?
my bot takes about 5 mins to compile fully on my dev server đŠ
vsc is a simple editor, if you want to compile C++ youll need visual studio community and the windows 10 platform SDK
both free
how do you get id of emoji?
same for C# iirc but its been a while since i did C#
Also, when including a file, does compiling mean it turns it into a dockerfile of sorts where you don't need the other file?
@silver lintel personally i make my bot log everything on my special test server and just put the emoji there... and it'll show me the <:emojiname:\123456>
ahh k
theres other ways but i find that the most convenient, so long as only you and your bot are on this special test server that isnt a privacy violation
dockerfiles are completely seperate to compilation
the process of compiling a C++ program or project just outputs executables
its then up to you how you choose to deploy or manage them
What I mean is, does the exe need to see the file included?
the way i do it is i have two systems, physically separate a live and dev environment, when im happy i git pull them onto live (but not for web parts e.g. dashboard) and make -j to build it
then restart at my convenience
i really do need to learn docker
Same 
the exe when compiled does not need the source code at all
That's weird
after compilation youll be given some other files too e.g. .pdb, you also dont need those in production - theyre for debugging crashes
this only happens if i do the kill command only
When people download the cpp game engine exe on my GitHub it says if errors because a file isn't there
which file?
kill.js
i was asking OwO but ok đ
Glut.h
sorry lul
if its a game engine, wont people be compiling it against their own code?
btw.... mind if i ask, why do you make a game engine?
is it to make a game in?
e.g. for you to make a game in?
yeah lol what else
see now thats an interesting question... because im a game dev and ive released a game, and most people who release a game dont make an engine.
theres a phrase in the game developer community "make games not engines"
conversely those who make an engine rarely ever make a working released game
if youre making an engine for the fun of making an engine by all means just dont expect it'll lead to a released game
you can spend so long wrapped up in the minutae of tiny stuff you'd never get finished, much like if you chose to make your own discord lib before making a bot
btw.... mind if i ask, why do you make a game engine?
Wanted to learn C
Very
It almost works
The rays go fucky sometimes 
And there's no collision

But it's my baby
I'm a big fan of not using mainstream stuff 8)
respect to you for making something though đ
Yayyyyyyy
for every person who creates something theres a whole horde of "ideas people" who say 'wouldnt it be great of i could convince someone else to do this for me'
especially in game dev
I can definitely see that
the words you hate to hear on a game dev discord "so i had this great idea for a game and all i need is 20 programmers, 30 graphics people, a sound guy" (note they dont say anything other than 'graphics people' as they have no clue whats actually involved)
these people dont often even have any background in project management đ€Ł
At least I know what's going on, pretty simple if you chose the right lib ngl
you ask them what their budget is they say "oh i thought we could all work for free.... but if it hits it big, we'll share profits"
I just gotta be careful when looking for a programming job/gig then?
nah just stick to proper companies that dont advertise their jobs solely on a discord server đ
if you want to get paid, i mean
no idea, i dont work at discord
they released a vid about that on their yt channel i think
im guessing if you wanted to develop for them you;d need react, flux, electron for front end dev
but their backend is elixir
i only remember that you should be 18+ to work at discord 
you need to be 18+ for any real job that isnt peeling potatoes or washing pots đ
not for americans tho
i mean you could in theory become an entrepreneur at age 13 and make a business but it would all be in your parents name as you cant legally sign any contracts
im guessing if you wanted to develop for them you;d need react, flux, electron for front end dev
I think they use py for backend but this is all manageable
its not python
https://discord.com/jobs/4006662002 it says python
theres something in the api docs that hints at what they use too
programming pay very well now
one second
im pretty sure a lot of it is or was erlang
this is one of the two choices of data stream format you get for the websocket
either json or ERLPACK
if it wasnt a lot of erlang back there, they probably wouldnt be sending erlpack
i wonder what tiny fraction of bots use erl
oh nice full stack
be prepared to have tons of frontend and backend experience
and coordinating the two in general
here we go
https://blog.discord.com/scaling-elixir-f9b8e1e7c29b
https://blog.discord.com/using-rust-to-scale-elixir-for-11-million-concurrent-users-c6f19fc029d3
erlang/elexir and rust
since its a full stack pos you'll prolly get pulled left and right from frontend and backend groups
imagine making a dank memer currency system clone using json
this only errors for the kill command which is in kill.js
does the kill command have an execute method?
brb
https://pastebin.com/6qfcZjvT hastebin was acting gay so pastebin
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.
wait shi i think i know what is causing this error
i forgot the execute
@earnest phoenix whats your current level of programming knowledge? how you answer will determine the best way for you to create a bot đ
I'm using typescript, how do I structure the client?? I've tried extending the Client but it won't helps in typechecking.
Hey, does soneone know a beginner guide for canvas? I try to get better in it 
for djs?
Yes
There is already an guide on djs. Have u read it?
Yes, but i mean a more in depth guide
probably do a quick search in yt or google
my bot cant reacts messages older than reboot..
Probably won't make it đ
Alright, thanks
I'm sorry jeb đ đł
how do i like get the next message of the authjor after a command like
"!ping"
"type pong"
"pong"
"thank you"
how do i know if the next message of the user is "pong"
my bot cant reacts messages older than reboot..
@carmine summit If you use discord.js, check this so your bot fetches "old reactions":
https://discordjs.guide/popular-topics/reactions.html#listening-for-reactions-on-old-messages
(Scroll all the way to the bottom)
If you own a bot that is in over 250,000 guilds, there are some additional considerations you must take around sharding.
^^ discord api docs
does anyone know what these additional considerations are? im just curious, nowhere near that figure.
from what i heard its just a requirement that your shards must be a multiple of a number they give you, and not less than a multiple of one of that number
usually a power of two number
I think you email support
^and this yes
ratelimits and shit too
since at 250k you will probably have to get a specialised token that allows you to have higher ratelimits and stuff depending on what you do
yeah true
is ther a way to change letter spacing with canvas?
split("").join(" ") 
hey could someone help me?
my setinterval sends the same embeds over again
setInterval(function Myfunction(){
T.get("search/tweets", { q: args, count: 10 }, function (
err,
data,
response
) {
console.log(data);
status = data.statuses[0];
data.statuses.forEach((status) => {
const embed = new Discord.MessageEmbed();
embed.setTitle("Twitter Feed Poster");
embed.setDescription(`${status.text}`);
embed.setImage(`${status.user.profile_image_url}`);
embed.setFooter("Command created for Pokehub!");
embed.setColor("#FF0000");
embed.setAuthor(
"@" + `${status.user.screen_name}\n` + `${status.user.name}`
);
embed.setURL(
`https://twitter.com/${status.user_screen_name}/status/${status.id_str}`
);
message.channel.send(embed);
});
});
},5000)```
ok
this is a tweet searcher and displayer for discord
but it sends the same 10 embeds every 5 seconds.
why doesn't it update?
Who can help me to made a bot of facts, which will give a random facts in server
Who can help me to made a bot of facts, which will give a random facts in server
@shrewd shore nobody because of the way you asked
hey
but it sends the same 10 embeds every 5 seconds.
@eternal osprey erm, ofc, you are sending it{ q: args, count: 10 }10 times,},5000)every 5 seconds
i know
it sends the SAME
mesage
if i use !feed fifa for example
without the use of interval, it ssends 10 messages that are different.
how would i fix that'
I'm using Nodemon.JS and I want to run a restart command from discord, where the bot would execute rs in its own console
Can anyobe help me in making a bot that will give facts automatically?
where do you want to get the facts from?
you're making a request every 5 seconds, and for each request you're sending 10 messages? thats already blowing up your rate limits lol
API abooose
i know
i have reduced it to 1 message every 20 seconds
but that was not my question Tim.
Well have you tried logging the feed it gets
maybe you messed up your loop and it only gets one message for some reason










