#development
1 messages Β· Page 409 of 1
@craggy summit ^^
Hello
@hot sleet I recommend updating the module and reading the readme over at the npm page
i just installed it
The readme should help you out :D
npm url ??
kk
How do I make a discord warn command with, discord.py
anyone know which of the common acii symbols are allowed in discord names?
like is there a list somewhere
Any.. i believe as long as its a legitmate character
what u mean Favna?
which symbols are allowed like these: !#$%^&**(
I'm generating a bitmap font for my welcome messages so I need to know which to include
actually apparently the most common all fit into 1 page so i think I'm good. I found a function to swap all diacritics (the characters like Γ©) with their normal counterparts so I dont need to include those which saves a lot of space.
async def emoji_list():
await client.say()
client.get_all_emojis()```
Why wont it show the server emojis?
I actually updated it
async def emoji_list():
await client.get_all_emojis()```
How Do I make It View All Server Emoiji's
for emoji in bot.emojis:
do_stuff_with(emoji)```
what do you want to do π
Make the bot get all the emoji's a server has
all emotes in the server right π
yupyup
just put it in your command def and get emojis from ctx.message.server.emojis for async i assum π
ok
async def emoji_list(for emoji in bot.emojis:
do_stuff_with(emoji)):
await client.get_all_emojis()```
Like that?

do_stuff_with(emoji)): isnt a thing and why for emoji in bot.emojis: in def π
you need a pass_context=True and a ctx
its giving an error
async def emoji_list(ctx, for emoji in bot.emojis:):
await client.get_all_emojis()```
remove for emoji in bot.emojis: 
await client.get_all_emojis() is also getting every emote from the bot
async def emoji(ctx):
all_emojis = [] # Make a list.
for emoji in ctx.message.guild.emojis: # For all emojis in the server where the message was sent.
all_emojis.append(emoji) # Add to the list you made the emoji
send_message_thingy_here("".join(all_emojis)) # Join it all togeather /shrug ithink forgotlol``` :^)
done
ty'
It gives me an error
'Message' object has no attribute 'guild'
@solid cliff
nou
no u
I have an error
sequence item 0: expected str instance, Emoji found
@solid cliff

turn it into a string on append /shrug
if u dont know that i suggest
https://automatetheboringstuff.com/ (for complete beginners to programming)
https://learnxinyminutes.com/docs/python3/ (for people who know programming already)
https://docs.python.org/3.5/tutorial/ (official tutorial)
http://python.swaroopch.com/ (useful book)
see also: http://www.codeabbey.com/ (exercises for beginners)
str(emoji)
What do you mean
str(emoji) in the append
I turn all_emojis into str(emoji)
k
Ok it works but
@solid cliff its kinda not showing the emoji's because they is no spaces between the emoji
so its kinda just
:BLOB:BLOB
Where to put it???
" ".join() 

how do u you center everything using css?
Ok so there is a bot called the Rosalina Bot used for sharing friend codes but when I type in the command for another person it says invalid. Even though both of our codes are sent to private
I mean public
Not private
Oof I was just told to go here
What they where trying to tell you is if it's a bot you're developing and need help go to this channel if it's about a bot you're trying to use ask in #general or go to the support server
^
thats meh message
Oh ok
embed was never defined
we dont spoodfeed
also i believe 0xFF0909 shouldn't be a string
@earnest phoenix tou need to define the embed with Discord.Embed
@lament meteor text-align: center works
@lament meteor dm me
text-align center texts tho
@hushed oyster but it only aligns text
no
not everything
pretty much everything
@earnest phoenix we will probably not spoonfeed
not just text
not pretty much everything
@hushed oyster i tried didnt work
ok
Didn't define embed or have a closing bracket for the if statement
We aren't going to fix it for you
ΛspoΝonΛfΔd/
verb
verb: spoonfeed
provide (someone) with so much help or information that they do not need to think for themselves.```
@earnest phoenix need to define the embed with Discord.RichEmbed
how 2 get commands from cog :^)
euhm
let prem = require(`../premium/${msg.guild.id}.json`).catch(err => {
if(err) {
let premium = new Discord.RichEmbed()
.setColor('#FFD700')
.setThumbnail(client.user.avatarURL)
.setAuthor('Premium perks',client.user.avatarURL)
.setDescription('Mustang Premium users get these perks:\n'+
'**Cooldowns** - Premium users wont have any cooldowns!\n'+
'**Webpanel** - Premium users get a Webpanel(Coming soon)!\n\n'+
'Donate on [Patreon.com](https://www.patreon.com/user?u=11124683) or on [Paypal.com](https://paypal.me/burningnexus)\n'+
'To get premium donate atleast 10 dollars\n'+
'Mustang premium lasts a lifetime!\n')
.setFooter('Mustang | Premium perks!',client.user.avatarURL)
msg.channel.send(premium)```
This
isnt preventing
(node:12124) UnhandledPromiseRejectionWarning: Error: Cannot find module '../premium/410347404043485184.json'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:548:15)
at Function.Module._load (internal/modules/cjs/loader.js:475:25)
at Module.require (internal/modules/cjs/loader.js:598:17)
at require (internal/modules/cjs/helpers.js:11:18)
at Object.module.exports.run (C:\Users\jeffrey\Desktop\mustang\commands\premium.js:4:16)
at Client.client.on (C:\Users\jeffrey\Desktop\mustang\index.js:234:24)
at Client.emit (events.js:185:15)
at MessageCreateHandler.handle (C:\Users\jeffrey\Desktop\mustang\node_modules\discord.js\src\client\websocket\packets\handlers\MessageCreate.js:9:34)
at WebSocketPacketManager.handle (C:\Users\jeffrey\Desktop\mustang\node_modules\discord.js\src\client\websocket\packets\WebSocketPacketManager.js:103:65)
at WebSocketConnection.onPacket (C:\Users\jeffrey\Desktop\mustang\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:333:35)```
How can i fix that
i dont want to make modules for every guild
@solid cliff [i for i in bot.commands if i.cog_name == 'NSFW'] 
okay so
.catch() can't be used on synchronous functions
this is exclusive to promise-returning functions
you have to use try catch
I would advise against using JSON files as a database in the first place
that's another issue 
You'll enjoy the corruption I assure you
JSON isnt bad, make sure to use something like fs-nextra that offers atomic methods for fs, as when you atomically write you're less prone to corruption
its not bad
not really
It's nowhere near the best tho
if you want to use JSON you have to make a wrapper around it
to handle stuff
while actual DBs already wraps that
isnt that with any db?
like you still have to use db modules
at least json is native
that's ignorable
the very point of modules is that you don't have to do the work yourself
I know someone using json for a bot in 3K guilds and 139K users, he stores one file for each guild and user
so
Who
Kashall was not sure if he still is
Ah
that's my point but kek
JSON does the job up to a certain point that's true
but it doesn't actually scale
whereas most DBs do
Use mongodb. Its basically json
Or rethink
or just sqlite?
Amazing
I want my application's data to be encrypted once it's transferred to another client (local network) right?
lets say public key encryption
So GPG encryptions
I must provide the other client the secret
however
if I provide the secret
it wont be encrypted
so what can I do to solve that
Do you know how GPG encryption works? or the back and forth usage
Public and private key
If not I'd recommend looking up how that works
Yea but I must give my other client a private key right
please add the egg bot
No
GPG encryption works by signing a message with the "receivers" public key
transferred over a network
The receiver decrypts it with their secret
If you want to secure the connection better I'd recommend doing a SSL/TLS style handshake system
But you could do other stuff
I'm going to have to research about that
yea Im going for ssl
ssl works client-to-client right
doesn't have to necesarrly be a server?
SSL/TLS is just encryption on a socket
i see
Doesn't really matter who's on each end (you know what I mean by this)
(it actually does care who's on each end)
yes
ok
That's kind of how it works
SSL/TLS performs a handshake and then traffic becomes encrypted
https = tls + http
Of course if you're encrypting traffic I'd make sure to use valid certificates
what if the data I'm trasnferring is from my application to another instance of my application
It's recommend to use valid certificates signed by a well-known CA which you can trust and then have each client/server check and accept that
you can still encrypt
Your encryption is fundamentally non-existent if you don't check and validate certificates
.
I don't think I would be able to use that, since the certificate needs to be checked (my app is completely offline)
then how would I verify the integrity of the certificate
it needs to be verified by its issuing server
verification is done offline (iirc)
Your computer has a list of CA's it trusts and their signatures and such
Which you can of course make your own CA and have your computer trust that
I'm sending a POST request to https://discordbots.org/api/435122825632940032/stats with the proper authentication and body however I'm getting a 404
404 means not found
^
I know
Also it's /API/bots
Might want to update your API reference then π
/api/bots/id
Anyone got a good snippet I can use to embed my bot's website on the bot page
Anyone know a script of code what can be used to logout of discord oauth2?
Using flasdk?
@earnest phoenix
def logout():
del session['oauth2_token']
return redirect(url_for('.home'))
I mean self-signed certificates would work for that task if you create your own root certificate and import that or just use letsencrypt as it's free.
@earnest phoenix delete the session
Whatβs the best way to do that?
I'm not sure
umm anyone knows how to configure ffmpeg with c# in visual studio?
wat
48.98 MB of what
if ram then yes if memory then it's bloated
In discord.py how the move_member function works ? I've tryed with member object and channel object but it doesn't work
Without error
maybe you forgot to await?
pls send full code in hastebin or other paste service
it's really hard to help like that
it's ok you don't need to translate the strings π
Already done π
You want try ?
I've a dev server
And made many tries
Not members , member
are you using rewrite?
what does it output?
There is
the problem is not with move_member, but with the code, try to debug where it doesn't work
it never reaches the move_member
ok type here if you found something maybe I can help
for music on my discord bot, node-opus or opusscript?
@knotty steeple node-opus
lavalink
he wasn't asking about lavaloink u weeb
but its music u weeb
So these are going to be my bot's join messages and now i'm kinda stuck on the text for the leave messages. any ideas?
https://favna.s-ul.eu/yguDNV9V.png
nvm, this'll do I'd say https://favna.s-ul.eu/qgn8p6Br.png
Jesus how'd you get it to do that?
It looks awesome
depends on the lang
image generation 
How would i make it so if for example i do !HELP itll still recognise my command even tho its capitalized
i tried .toLowerCase()
but didnt work
@tulip kraken don't do anything with it then
wdyM?
Why is everybody so early on discords bday
discords bday is on the 13th of may
u guys r 5 days early
actually i was 7 days early
lol
fastest way to learn LUA?
haspermission
let me get the code sniperino
message.guild.member(client.user).hasPermission("ADMINISTRATOR")
ok
does anyone know how to get the number of users your bot has?
@earnest phoenix what lib are you using?
idk how it's in python, but in many languages there is a client.users array so you can get how many users your bot has from getting the length of this array, look for something like that and you should find easily
How do I get it so that when my bot joins a server it auto creates a role?
delete system32
?
google can help you
Ok
when you ask something, remember that we all dont use the same language, nor the same API, so if you want an accurate answer, dont forget to say which lib you're using x)
oh, if it's this role you're talking about, you just need to specify permission in the invite link
https://discordapp.com/developers/tools/permissions-calculator an useful tool for that ^^
thx
Im getting an error TypeError: Cannot read property 'plural' of undefined in this https://hastebin.com/mofekabavi.js
Could anyone link me to some good learning scources for discord.js?
Some good places to start are youtube videos, the docs, and the discord server
Also it is recommended to learn javascript before using d.js

is vps and vds is same?
Vds?
VPS = Virtual Private Server
It's just a Linux computer that someone else has that you have access to
Well a virtual one at that
So you have a small bit of a computer that someone else has
ohh
You can rent them from sites like Vultr, Digital Ocean, Scaleway, VPSDime and many more
Cheapest start at around 2$/month
They are fine for basic, non-music bots
okay
But I've never heard of a VDS
is there anything which can host free
why?
They are not intended for bots
I don't use them but you are 1. Limited in uptime and they may close your stuff if they need resources for paying customers
Also I think you need to do some things to keep them online
No?
O
is glitch good for hosting bot?
ohhh
it cost money dude
yes
it's pretty much like hosting on heroku, which is even worse btw
its worst
use skysilk
or buy your own VPS
is it good for big bot?
yes
they are currently in beta testing with 100% discount, and will have a free plan after closing beta
VPSes are good for bigger bots
if someone pays for me i will buy vps
no
xD
I doubt anybody is going to buy you a VPS 
OwO skysilk

last time suggesting, use skysilk's free plan for now, it should be enough to host a bot for up to 1k servers unless it's a heavy bot
actually idk how many servers, it's 500MB something RAM iirc
getting your own VPS allows more control 
definitely 
And you'll prolly have more shit to host than just a bot anyway
So in long term it's worth
^
anyone here know python
Also, I would say that sharing a vps without giving others any benefits won't do as well
wuts python? 
lol?
XD
python = slow language and big meme
a lot of people know python here
@trim plinth ikr
i need big hlep
hlep it is then
THE PYTHON SERVER IS DEAD NO ONE IS HELPFUL THERE
But state what you need
agree
i got a map generator
@trim plinth how much for vps?
python is ded haters no hate

@dusty shuttle skysilk is free in beta testing, and even after it will have a free plan
you just need a credit card still
Yup
ohh
but after the water loop is done the rest of the function ignores it and keeps going
@dusty shuttle if you want reasonable prices, go for galaxy gate or bakery hosting, or go for skysilk
idk how to get it to not
DO is also nice
credit card is needed to verify your identity, but that's it
im π ±retty beginner
Python not slow 
^^^^^^^
you can get like $50 in credits for DO from Github's Education Pack (or whatever it's called)

@solid cliff it compiles slowly
Wat compile 
needs to hurry up and not take it's sweet time :^)
yes

CAN DSOMEONE HELP ME
Lol.
At least give us something that we could help you with
Like code or smth
The main idea hardly helps
@fluid basin I don't think you need a credit card if you're using redeemed credits, otherwise you'll need it
Well idk
def newworld(xAxis, yAxis, nOutputFileName):
# VARIABLES (dimensions, filename, basic stuff)
outputFileName = (nOutputFileName) # Name of file
MaxTerrainX = xAxis # Width
MaxTerrainY = yAxis # Height
# VARIABLES
# GENERATOR
RepeatX = 0
RepeatY = 0
chunkCache = open(outputFileName + '.map', 'w')
chunkCache = open(outputFileName + '.map', 'r+')
while RepeatY != MaxTerrainY:
while RepeatX != MaxTerrainX:
ChunkTypeChance = randint(0,40)
if ChunkTypeChance <= 37:
chunkCache.write('//')
elif ChunkTypeChance == 38:
chunkCache.write('^^')
elif ChunkTypeChance == 39:
chunkCache.write("^^")
elif ChunkTypeChance == 40:
chunkCache.write('~~')
YpoolLayers = randint(1, 3)
XpoolLayers = randint(1, 3)
repeatPoolY = 0
repeatPoolX = 0
while repeatPoolY != YpoolLayers:
while repeatPoolX != XpoolLayers:
if RepeatX + repeatPoolX <= MaxTerrainX - 1:
chunkCache.write('~~')
repeatPoolX = repeatPoolX + 1
else:
repeatPoolX = XpoolLayers
if RepeatY + repeatPoolY >= MaxTerrainY - 1:
repeatPoolY = YpoolLayers
else:
XpoolLayers = randint(1, 3)
repeatPoolX = 0
repeatPoolY = repeatPoolY + 1
RepeatY = RepeatY + 1
RepeatX = MaxTerrainX
RepeatX = RepeatX + 1
chunkCache.write('\n')
RepeatX = 0
RepeatY = RepeatY + 1
chunkCache.close()
# GENERATOR

should i get my bot here?
if you want
Wait why is the code after chance==40 in there


@dusty shuttle https://discordbots.org/newbot

<- I have your avatar
Honestly I would say if there is any reason you can't really get an vps you should just make your bot, run it in glitch/heroku and if it goes well and servers increase, be prepared to migrate and change to an actual vps. @dusty shuttle
or ask a friend to share a vps
Well yeah if theres anyone willing to share
also glitch will restart your bot if it's up for more than 10 hours 
WELL i gotta yeet to school
Travis bot hosting :^)
Best would be if you have an irl friend who has a vps and you can share the cost by paying them directly
Could also host at home and just pay for electricity + internet.
And the hardware ofc.
Rpi
Also true, but when it grows it'll burden your home network
Get 1 Gbps.

and your electricity bill will increase a lot
owo
If you buy old enterprise hardware with non-efficient stuff yes, but if you buy new stuff it won't raise it that much.
Btw rpis aint good for music bots
Ya don't use rpi for music π€£
They prob work for one server (?)
Never tried music bot on a raspberry
Anyone knows how i can print bot invite link in console when i launch node bot.js
It's using discord.js
How can I get uptime with discord.py Async. Preferably with aiohttp or datetime.
Should i use mongoDB or mariaDB ?
@earnest phoenix well you can use the original link https://discordapp.com/oauth2/authorize?&client_id=BOT_ID_HERE&scope=bot&permissions=perms and change the BOT_ID_HERE into client.user.id
hm i see, thank you!
So like this? @lament meteor https://trashbag.pw/u/i/mybntw.png
So, I have an API key for idoitic api
How can i store text channel & voice channel count in discord.js?
I'm trying with message.guild.channelCount
if you have an eval command, you should try those things with it ^^
Aye it worked
hm
i need to make one, idk how tho
this is my first discord bot i'm coding from scratch
oh
it has some progress though
dont even know scratch x)
util can stringify objects so you can get the result of your eval
eval is a thing
natively with js x)
oh so how do i implement it to the bot as a command?
gonna secure it first with a owner id in the config
yeah you should x)
const args = message.content.split(" ").slice(1);
if (message.content.startsWith(config.prefix + "eval")) {
if(message.author.id !== config.ownerID) return;
try {
const code = args.join(" ");
let evaled = eval(code);
if (typeof evaled !== "string")
evaled = require("util").inspect(evaled);
message.channel.send(clean(evaled), {code:"xl"});
} catch (err) {
message.channel.send(`\`ERROR\` \`\`\`xl\n${clean(err)}\n\`\`\``);
}
}
});```
process.exit() 
So like that?
yey
any message in the console?
so, remove clean x)
oh ok
still nope
what does the console say? x)
const args = message.content.split(" ").slice(1);
if (message.content.startsWith(config.prefix + "eval")) {
if(message.author.id !== config.ownerID) return;
try {
const code = args.join(" ");
let evaled = eval(code);
if (typeof evaled !== "string")
evaled = require("util").inspect(evaled);
message.channel.send(clean(evaled), {code:"xl"});
} catch (err) {
message.channel.send(`ERROR`);
}
}
});```
that's the code now
Console said nothing
add console.log(err) in the catch statement
wth
forgot brackets
ah
uhm ok so now the console error is this
at Client.client.on.message (/home/testbot/app.js:164:30)
at Client.emit (events.js:187:15)
at MessageCreateHandler.handle (/home/testbot/node_modules/discord.js/src/client/websocket/packets/handlers/MessageCreate.js:9:34)
at WebSocketPacketManager.handle (/home/testbot/node_modules/discord.js/src/client/websocket/packets/WebSocketPacketManager.js:103:65)
at WebSocketConnection.onPacket (/home/testbot/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:333:35)
at WebSocketConnection.onMessage (/home/testbot/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:296:17)
at WebSocket.onMessage (/home/testbot/node_modules/ws/lib/event-target.js:120:16)
at WebSocket.emit (events.js:182:13)
at Receiver._receiver.onmessage (/home/testbot/node_modules/ws/lib/websocket.js:137:47)
at Receiver.dataMessage (/home/testbot/node_modules/ws/lib/receiver.js:409:14)```
When i evaled 3*3
AH you didnt removed all clean functions x)
message.channel.send(clean(evaled), {code:"xl"})``` there
Do i remove the "send" part?
oh ok
why did you think clean was a function? did you use it anywhere else?
after changing the line it's unresponsive again
:d
const args = message.content.split(" ").slice(1);
if (message.content.startsWith(config.prefix + "eval")) {
if(message.author.id !== config.ownerID) return;
try {
const code = args.join(" ");
let evaled = eval(code);
if (typeof evaled !== "string")
evaled = require("util").inspect(evaled);
message.channel.send(evaled, {code:"xl"})
} catch (err) {
console.log(err);
message.channel.send(`ERROR`);
}
}
});```
i'm pretty noob at js
PS C:\Users\home\Desktop\Discord bot (attempt)> npm install quick.db -s
C:\Users\home\Desktop\node_modules\integer>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
PS C:\Users\home\Desktop\Discord bot (attempt)> node discordbot.js
internal/modules/cjs/loader.js:550
throw err;
^
Error: Cannot find module 'quick.db'
at Function.Module._resolveFilenam
``` How can I get it to find the quick.db?
try just npm i quick.db
I did
wait
does i and install change anything or?
without the -s
nvm
i'm retarded
and tired
Ok
Any idea on my eval command? @halcyon torrent
what is {code: 'xl'} tbh?
I dont use discord.js so idk how it works x)
also nothing in the console?
nope
and regarding {code: 'xl'} ?
what are some good commands for bots?
Ones that probably every other bot already does
ping 
@earnest phoenix ```js
client.on("message", message => {
const args = message.content.split(" ").slice(1);
if (message.content.startsWith(config.prefix + "eval")) {
if(message.author.id !== config.ownerID) return;
try {
const code = args.join(" ");
let evaled = eval(code);
if (typeof evaled !== "string")
evaled = require("util").inspect(evaled);
message.reply(evaled, {code:"js"})
} catch (err) {
console.log(err);
message.reply('ERROR');
}
}
})``` run this
Did you just spoonfeed 
Giving code entirely like that is more of a spoonfeed but π€·
If you fixed anything for them or it is now working then you spoonfed π
It's ok
i solved it anyways
without that code, but thanks alot for the help @halcyon torrent !
^^
var server = servers[message.guild.id];
server.queue.push(args[1]);
if (!message.guild.voiceConnection) message.member.voiceChannel.join().then(function(connection){
play(connection, message);
})
``` Why doesn't it join the voice channel?
first line
^^
is there an error message?
no
Did you make a play() function? I mostly see music bots who need a play() function specified
what is the type of message.guild.voiceConnection ? 
VoiceConnection
is it null when the bot isnt in a voiceChannel?
I suppose so, it can be undefined
How do I get my bot to pm a user?
message.member.send
``` right?
well
send is undifined in this case a pperently
apparently* undefined
lol
memeber 
What should i use as database to store messages
Now I'm using mysql but I have a feeling that it's slowing my bot down
JSON
oke
Cassandra ;)
JSON
txt files are the way to go
.then(presence => console.log(`Activity set to ${presence.game.name}`))
.catch(console.error);```
How do i set the streaming url in this?
i know it's options.url
but idk how to implement it to it
it's in the object
client.user.setActivity('discord.js', { type: 'STREAMING', url:'your url'})```
yey
^^
i can put url to anything right?
yes
Ah cool
idk, in Eris links that dont redirect to twitch dont appear
are you sure type is supposed to be a string?
Yeah, got it from the discord.js docs
nvm
now it shows as streaming
so it'll only show as streaming if you use twitch link
type is usually an integer 
i'm just learning to code a bot with discord.js using the docs
url for streaming can be only twitch
yeah i noticed
its 7am, bot is freezing and having timeout errors and just had 100 ServerDisconnectedError: None 
Oof
How do I get my bot to log how many servers its in
lib
What programming language/lib?
discord.js/node.js and javascript
would it be
node.js is not a lib
console.log(bot.guilds.size)?
yes
yes
bot.guilds.size should work just fine though
I forgot in when I sent it
but its written bot.guilds.size
console.log("Juptian bot is in", bot.guilds.size, "servers");
that's the code
ok
not ,
console.log("Juptian bot is in " + bot.guilds.size + " servers");
no use template literals
also you can do template literals
?
`${stuff}`
```js
console.log(Juptian bot is in ${bot.guilds.size} servers);
example of template literal is ```
console.log({fyreuseyfuw})
Ol
es6 is hawt
like u
ikr

nope
nothing
console.log(`Juptian bot is in ${bot.guilds.size} servers!`);
rdog.js loaded
Removerole is online!
removerole.js loaded
Report is online!
report.js loaded
Say is online!
say.js loaded
Serverinfo is online!
serverinfo.js loaded
Tempmute is online!
tempmute.js loaded
memes :3 is online!
tf2memes.js loaded
JuptianBot is online
``` Console
nvm
it worked
lol
someone had to send a message though
I put it under the messages instead of the logging on part
you have to put that in the ready event
collections
from all the servers its in
just map it
bot.guilds.size.map()
```that?
no
Oh my god this person
ikr
I am still learning ok
remove .size
ok

bot.guilds.map() π
we dont need to help you
so just
bot.guilds.map()
```?
I never said I don't want help, I said you do not need to help me
same thing

this dude
in d.js to get the clients guild size, you do bot.guilds.size. end of story
anyone have any tutorials on webhooks?
discord webhooks?
What is a webhook? This is a really nice question that I get asked a lot of the times. Well time has come to create a video explaining what is a webhook, wha...
hecc
trying to get if someone voted within the last 24 hours
dbl webhook
you can use the endpoint
k bye
https://discordbots.org/api/docs#bots Individual user ID vote checking
ah
const requestUrl = 'https://discordbots.org/bots/422088562586943489?/check';
request({
url: requestUrl,
data: {
'userId': parseInt(message.author.id),
},
json: true,
}, (error, response) => {
console.log(response.voted)
});``` i fell like im doing this all wrong
so what would i use
also don't parseInt it
fuck the docs
adding it as a string is fine
okay
just concat the string
Also query params are always strings
They can't really tell you the datatype in a query
Im currently using discord.io and node.js for my bot, but I can't find a way to get user permissions
@quasi hearth just warning you, but discord.io is deprecated
ok, but its working for me so far, so i don't want to switch over to discord.js yet
You want to switch
It is that outdated and deprecated it's not recommended for use anymore
discord.js is easy
so easy
alright, taking a look at it. The docs are a bit confusing though
it's big, but it's well done tho
but if u get rlly big you should use eris
^
djs docs are easily the best docs i've ever used
yeah
how big is considered big @topaz fjord
20000
10k tbh
ill switch at 10k 
That's a bad idea
use Erisβ’
aeth said he didnt do it till 20k
You should always be programming for the future forward
Terrible to switch at a later date
By then it's too late
d.js is the futureβ’
Eris is the future
discordia > all libs
eh ill switch at 5k
unless they fix their meme shards and cache, d.js will be fine
discordia is lua
internal sharding is pretty nice tho @elder rapids
lua is roblox
Roblox uses their own remixed Lua
You don't realize how often Lua is used outside Roblox
in a real-world better state
Internal-Sharding puts all shards together and treats like 1 process
kewl
First off you have Luvit
Many games like Tabletop Sim, Factorio, and Garrys Mod use Lua for modding
i've used lua before
Counter-Strike will use Lua soonβ’
0w0
Talk to FiniteReality on that
OwO What's This?
My dads work place is switching from .Net to React.js for its stuff
.NET to React.js
r.js 

bad business choices
so, in d.js can I use client.on('message','function(message){}'); instead of client.on('message',message => {}) (to make it easier to read for me)
ok
also use es6 arrow functions
ES6 Arrows | Lambda/Anonymous functions > everything else
but can i not use arrow functions if i want to?
you could, but you'd rather stick with arrow functions
ok
@quasi hearth you can
lol
why rather stick with arrow functions ?
but its better to adapt to the new terms
es6 functionality
it's basically the same, isn't it ,
It's not really
no
but if it makes it easier client.on('message',message => {}) can be turned into client.on('message', (message) => {}) @quasi hearth
It's a different structure
not at all ^
forgot how much js is fucked up
You do realize every language has lambdas
but u dont have to client.on('message', (message) => {})
just client.on('message', () => {})
C# has () => {} too
Β―_(γ)_/Β―
yeah, but it's just another way to write it
@knotty steeple no
wait wat
you are going to need a param for the message event
@knotty steeple it may make it easier to read for people
It's a matter of point of view
kk
mmm okay
But is there any functionnal difference ?
But Lambdas are easier to read/write than writing out function() and such
client.on('message', (messagesaregreatilovethemsomuchtheymakeuscomunicatetopeopleontheinternet) => {})
writing function succs while you can shorten code with an arrow
@knotty steeple that works
It makes more sense to append a function directly to a method when it asks for a callback
The code can be read easier
but who's to say you can't do function() {} inside that
It's just a cleaner way of writing it

vue docs











