#development
1 messages · Page 530 of 1
i'm just wondering is it possible
@knotty steeple edited it
logEmbed: function(content, author) {
return {
title: `\`${author.tag}\``,
description: `\```\n${content}\````
};
}
rip
just gets you api banned
murder is possible but if u do it u go to jail
and lets not turn that into a conversation kthx

const write = (str = '') => {
process.stdout.cursorTo(0);
process.stdout.clearLine(1);
process.stdout.write(str);
}
``` @sick cloud also do i loop this
im assuming yes lmao
you have that in 1 place
and use write()
so like
write('1%')
write('17%')
write('banana')
write('done')```
ook
now what do i do next?
const voted = await dbl.hasVoted(message.author.id);
if (voted) {
message.channel.send(yesvote)
} else {
message.channel.send(novote)
}```
it's a Promise<boolean>
@inner jewel
can anyone help me with !membercount? i am using discord.js and javascript.
alright
@serene sun elaborate please?
@quartz kindle it says false but i did vote đ
@quartz kindle like when i do !membercount in a channel the bot tells me how many members are in the discord server.
Guild has a memberCount property
you can try, but i dont think it will make a difference
have you double checked if your account on the website is correct? could happen that you voted as a different account
no, dbl api key is different
where do i get it đ
is the one you get from your bot's edit page
lmao
but its the same thing đ
it's not
In Discord.py, how could I pass_context, yet still get context from the author anyway? For example, if I wanted to get a user's ID when they run the command, and get arguments they throw in after the command, how could I do that?
idk the specifics of d.py but you need to listen to subsequent messages from the same user
I wasn't clear, I meant for it to be like >command [args from user here]
Not subsequent messages
hmm cant you just get the message content and split it?
I can try that
Actually
That won't work if I have pass_context = True
Because I'd need the context of the message sent
can you do like ctx.message.content?
I'll try
Yeah that worked
From previous experiences for some reason using pass_context didn't let me get the message content
idk anything about python, but the more i see people using it the more i want to stay away from it lmao
it just looks so weird
Someone can help me understand, why my bot doesn't get the JSON from the api-page of GitHub?
I want to display changed files (name, changes, additions and deletions) of the latest commit in my bots repo with a command.
But when I try to get the json from https://api.github.com/repos/:user/:repo/commits/:sha (I obviously replaced the :info with the required one) it doesn't get it?
Alexa help
@mighty pond help
fuck
Alexa race
alexa race
Oh shit wrong channel
that gets a specific commit
Since the commits shows all commits and also don't have the files array which I need
I first get https://api.github.com/repos/Andre601/PurrBot/commits because I also need some other info (That works perfectly fine)
And I use the url in "url", which atm is https://api.github.com/repos/Andre601/PurrBot/commits/9592a5b335827853409f78c130b9210c65284414
And that one doesn't exist for my bot
Like it's just {}
It works for me (my browser) too
Just my bot can't see it for some reason
can someone here help me?
how can i make it to where my play command just searches what ever someone times
types(
play faded
and it plays the first search in the queue
would it be recommended to link a bot client and server (e.x. express) to one file? i want to keep them seperate so if the bot goes down, the web dashboard can still be accessible
@earnest phoenix nobody here is gonna code ur bot for you
you can ask specific questions, not generic questions like that
Does anyone know how to host a bot 24/7 for free? If that is even possible.
Glitch and uptime robot @serene sun
@bright spear never said for anyone to spoon feed me.
@earnest phoenix sounds good thank you
np
i thought glitch wasnât a hosting website though
well its not requested alot because it has problems
but i use glitch for @pliant bluff
and itâs mostly 24/7?
depends.
it may reboot every 6-12 hours
but it depends if uptime robot has a matience
how long is the reboot?
you can use heroku and github
so do uptime robot and glitch work together?
but glitch and uptime is waaay easier.
Today I will be showing you how to host your Discord.js bot on glitch.com Main Links: https://www.glitch.com https://uptimerobot.com/ watch.json Code https:/...
np
Nobody has an idea, what my issue could be?
when you don't specify the issue nobody will know 
I specified it above
How do you use github to host a bot?
I tried finding a vid but it's only like for websites
if u dont wanna sit in ur computer for 3 hours figuring out how shit works.
Today I will be showing you how to host your Discord.js bot on glitch.com Main Links: https://www.glitch.com https://uptimerobot.com/ watch.json Code https:/...
easiest way to host 24/7
Reap I don't use js
py?
Oof
He means c#
glitch is not a reliable host but it works for testing, if your bot gets huge glitch won't be able to handle the load 
Glitch is fine for development but shouldn't be used for production
hi, i have finished writing a bot for our gaming guild server, it's compiled and running smoothly from my powershell
are there places that will host it so i can turn my laptop off at some point?
you can use glitch if the guild is small i guess, or you can read the pinned messages for hosting options
Alright Kinda need help. I need someone to help with the process of a xp system using quick.db (along with a cool down) since Glitch cant update json files
Ping me if u can help me! I will respond either in a few hours or tommorow.
@solemn valve you dont need node.js just need packages.
Yes glitch only takes nodejs
You can host java / python / php / nodejs on glitch
Wait you can host python?
How do you run other langs on glitch
oh neat, looks like their vm has java and python installed
cpu seems very limited
@earnest phoenix FYI you can edit json files on glitch, but never use json for storing data that can change since it will get corrupted
@bright spear like its just increasing but not editing so everytime the bot restarts it reverts back to the empty json
That shouldn't happen đ€
Glitch has persistent storage iirc
Weird
Well anyways you should be using a db
It would probably be easier to just look up a tutorial on how to set up a db
It won't show in the editor unless you run the refresh command in the console to sync it
ive been trying to get it to work but it doesnt seem to like packages
or my pom.xml
all the libs came in fine
cant find my main class
Here's the best guide for hosting on Glitch:
https://its-not-advertising-if-the-website-doesnt-exist-anymore.moustacheminer.com/glitch.pdf
tbh i only use glitch for projects and test rendering markdown
wait... u actually can run py on glitch
@solemn valve after u close ur window ur bot will be online for 5 minutes before turning off. Uptime robot will fix that
but glitch is not meant for hosting discord bots
<@&304313580025544704> my bot is fixed
Pls don't ping all mods
sry
@solemn valve yeah 5
ur project is using too much cpu
if(command === "avatar"){
var member= message.mentions.members.first();
let embed = new Discord.RichEmbed()
.setImage(message.member.avatarURL)
.setColor(`RANDOM`)
message.channel.send({embed: embed})
}
it works, but the embed is just an empty box.
y is that?
maybe you meant to do .setImage(member.avatarURL)
and afaik avatarURL is a function so .setImage(member.avatarURL())
ah avatarURL isn't a function so scrap that
you need to access the user object of the member first
member.user.avatarURL
avatarURL is a function in master
ah yeah makes sense
Excuse me what
Does setColor actually takes RANDOM
that's fun
Ugh i come back to hear glitch
well
look in your code
is there a random <
it'll be in nav somewhere i think
like <nav>> or something
<body>
<div id="navbar" class="nav-container default">
<span id="menu-icon"></span>
<h3 class="nav-title">SamuraiStacks</h3>
<div id="navside" class="sidenav">
<a href="#" class="current">Home</a>
<a href="#">Projects</a>
<a href="#">Contact</a>
</div>
</div>
</body>
mm
I still have the issue with my bot for some reason not getting the json from https://api.github.com/repos/Andre601/PurrBot/commits/9592a5b335827853409f78c130b9210c65284414
iirc you need to be logged in to use the api not sure
No
Since it can get the JSON from https://api.github.com/repos/Andre601/PurrBot/commits without issues
idk then
Hi
is this a .db file format of database's structure or is this unique to sqlite? https://puu.sh/CbGpm/59c5a0f2a0.png why I'm asking is can I simply move from sqlite to lets say monodb without any issues?
Monodb?
The extension doesn't really matter
It can use any extension and data will remain the same, just ease for identification
If you mean mongodb, it's no way similar
so if I have already created the database with sqlite it won't work with other dbs?
not all
^
what
if you want to switch databases you have to migrate the data
there are some migration tools to transfer between rmdbs
but mongo is not an rmdb
still, you will probably find something to migrate between them since they're both popular
but you can also write your own migration code
ie from sqlite to mongo: get all tables, for each table write a collection. for each row in table write a document in collection
client.on('message', message => {
if (message.content === '@anecdote') {
const embed = new RichEmbed()
// Set the title of the field
.setTitle('Zapper')
.setDescription('Chaque jour 10 nouvelles anecdotes à découvrir')
// Set the color of the embed
.setColor(0xFF0000)
// Set the main content of the embed
.addField('Vocabulaire', "NycthémÚre signifie l'espace de temps d'une durée de 24 heures, alternant nuit jour.", true)
message.channel.send(embed).then(message => message.react(':yum:'))
}
});```
and consol says me
events.js:200
throw new errors.ERR_INVALID_ARG_TYPE('listener', 'Function', listener);
^
TypeError [ERR_INVALID_ARG_TYPE]: The "listener" argument must be of type Function. Received type undefined
at _addListener (events.js:200:11)
at Client.addListener (events.js:259:10)
at Object.<anonymous> (C:\Users\ElĂšve\Desktop\Bot\index.js:36:8)
at Module._compile (internal/modules/cjs/loader.js:688:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
at Module.load (internal/modules/cjs/loader.js:598:32)
at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
at Function.Module._load (internal/modules/cjs/loader.js:529:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:741:12)
at startup (internal/bootstrap/node.js:285:19)```
i try a lot of thing for add reaction, but no way :/
mmm
same error when it do message.channel.send(embed).then(client.on ('message', (message) => {message => message.react(':yum:')}))
no
?
why would you add a listener when you send an embed
no...
the first line of the code you sent
is the issue
?
oh
this @earnest phoenix
"300 chars" this is counted as 7 chars cause it doesn't count spaces
what
im confused
Can you please tell me what this error means?
Missing perms
I got that err is command prompt, I have no idea what file that err was in.
It just says DiscordAPI error
missing permissions is just missing permissions
econnreset means the connection was lost
Do you have check if bot have permission to send message to channel?
let ed = new Discord.RichEmbed()
.setDescription(`Welcome to the ${member.guild.name}, ${member}!`)
.setImage(attachment)
channel.send(ed);```
is this wrong to use attachment in .setImage
you have to use .attachFile()
Sets the file to upload alongside the embed. This file can be accessed via attachment://fileName.extension when setting an embed image or author/footer icons.
oh thanks
@lament meteor same error with client.on('message', (message) => { code }
not sure then
throw new errors.ERR_INVALID_ARG_TYPE('listener', 'Function', listener);
so perhaps i can add listener
thus
client.on('message', (message), message => { code }
const { Client, RichEmbed } = require('discord.js');
const client = new Client();
client.on('ready', () => {
console.log('I amdd ready!');
});
client.on('message', (message), message => {
if (message.content === '@anecdote') {
const embed = new RichEmbed()
// Set the title of the field
.setTitle('Zapper')
.setDescription('Chaque jour 10 nouvelles anecdotes à découvrir')
// Set the color of the embed
.setColor(0xFF0000)
// Set the main content of the embed
.addField('Vocabulaire', "NycthémÚre signifie l'espace de temps d'une durée de 24 heures, alternant nuit jour.", true)
message.channel.send(embed)
message.react(':yum:')
}
})
client.on('messageReactionAdd')
client.login('TOKEN)```
remove client.on('messageReactionAdd')
oh yh
change client.on('message', (message), message => { back to what it was
I want to set the attachement like welcomer bot send
@amber junco if the error is ECONNRESET thats a connection error, not much you can do there
its an error coming from the websocket
if the error is missing permissions, then you have you check which permissions your commands need, and add a permission check
Second question on emoji:
client.on('message', message=> {
if (message.content === '@anecdote') {
const embed = new RichEmbed()
// Set the title of the field
.setTitle('Zapper')
.setDescription('Chaque jour 10 nouvelles anecdotes à découvrir')
// Set the color of the embed
.setColor(0xFF0000)
// Set the main content of the embed
.addField('Vocabulaire', "NycthémÚre signifie l'espace de temps d'une durée de 24 heures, alternant nuit jour.", true)
message.channel.send(embed)
message.react('đ')
}
})```
the emoji is on tje msg who send '@anecdote' (and that's logic) and i want put the emoji on embed.
but i can't do embed.react...
you have to wait for the message to send
send().then(message => message.react)
you get the new message after it finishes sending
Someone have Giveaway bot?
bot.on("message", (message) => {
if(message.content == 'snochbot')
var teksty = ['ta gra jest rozjebana jakaĆ','zwal se konia','beka z ciebie typie','ale ja tylko godzine sprawdzaĆem','jo','miaĆem laga','dobra zamknij morde','jebac disa','patrzcie przeskocze','na duza by weszlo','orange ty kurwo',
'ale go ograĆem','ale ĆATWOOO','twĂłj stary pijany'];
var random = teksty[Math.floor(Math.random() * teksty.length)];
message.channel.send(random);
message.delete();
})
TypeError: Cannot read property 'length' of undefined
yesterday it was fine lol
i dont think you can have new lines in the middle of an array literal
said who
said my code last time i tried lul
but well, it was in chrome's console
copy/pasting an array from somewhere else which borked the new lines
How install quick.db?
hey if anyone is using the DBL api like fully plz send me the github to ur bot i just need some info on it xD
also my bots servers is like outdated
so oofofs
its on 600
and it says 511
LOL
]
anyone know what causes this? @pale sparrow
whats up
I was using repl to test out my code and it worked fine, then I used heroku to deploy and the client.user.setActivity function was defined as not a function, why is this?
How do you make it so that a command can only be used one a day
@lofty abyss There a problem with your web socket connection
Are you hosting your bot?
@dusk raft Did you check it is still defined?
how i can make pictures for HTML?
and is this question development?
you can use an img tag https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img
the bare minimum you need for an img tag is the src attribute, but i would also recommend including alt in case the image doesnt load 
@amber junco Save a timestamp of when they use the command
why aint this working anymore?'
.setThumbnail(guild.iconURL)
discord.js is library
anyone use eris or are you too cool for that?
i'm too cool for that
hi, how to make a lockdown command ?
@shell blade its new guild event
has worked before
then stopped like POOF
also
how can i make it so if i eval a role create, i can make the role mentionable
message.guild?
Obviously this wont work, what would replace mentionable to make it work
--eval role = message.guild.createRole({
name: "Owner2",
color: "Blue",
permissions: ["ADMINISTRATOR", "MENTIONABLE"]
})
message.guild.createRole(role)
message.member.addRole(role)
mentionable: true
o
a role being mentionable is a property of the role, not a permission it gives
Why the guild owner returns undefined? ._.
.addField(`Owner:`, msg.guild.owner)
for this server?
Yes
oliy isn't cached for some reason
okay, thanks
np
they have oliy cached then
:/
the best answer would be because your bot doesn't fetch offline members, that is, if when you tried to get the server info back then he was offline @primal egret
there should be a parameter to fetch offline members on startup
xd
I know there is one for discord.py
I use discord.js
yeah, look in the docs if there is something like that
@amber junco i copy+pasted the code from 1 place to the other
there is fetchAllMembers
but that will eat your ram like crazy
much better to just fetch guild owner
how is that eating ram? 
it caches all users
expectable, but not understandable
the two single things that use the most ram in a bot are cached users and cached messages
if you cache ALL users on startup, not only does your bot take longer to start, it also loads all users into memory, which can be a LOT depending on the size of your bot
but what if I'm not caching many messages, like I set a minimum value of cached messages possible
how to make a lockdown command ? (discord.js)
just do it and see
you can do a simple test
console.log users size and check ram usage
then do the same thing with fechall enabled
post results
i mean server name,server usernames server users
server owner mail
details like that
maybe a db yes?
@past crypt what kind of lockdown? prevent people from joining? prevent people from typing? slow mode? increased security?
a db yes, and you cant get owner email lol
internal cache already does keep track of that 
welp i need my own
so if i want to send messages for example to owners i an do that
but i think i can have the email of the owner
cause when they add the bot it gets the email
no, you can't have owner email
you cant have emails without oauth2
ido use oath2
it's not only the owners that add the bots
yes
but mostly owners
wait
is there another way to auth?
than oaut2
?
đ€
oauth2 has many methods
why are you planning on flooding their emails just because they add a bot? cause that's exactly what it sounds like
the one used by bots cannot access emails
you need to create an oauth2 requesting email access
and have people accept it
well what kind of emails are you planning on sending the owners? typical changelogs that can be announced in your server instead?
so is that true?
yes
make one? @_@
it's like 1000 times easier to create a support server than asking people their email access, flood their inboxes with total nonsense, and with a chance that not owners specifically will add your bot anyway

but nobody will join
when ppls see rheres noone in the serv
they quit

its a loop
the purpose of a support server is to get support for a bot they are interested in, if you want a hangout server then create a server specifically for hangouts, asking for emails is totally not the greatest workaround for not getting members in your servers
they think its useless and leave
dont be scared
not hangout lmao
just because server is empty doesnt mean people will insta-quit
you have to start somewherwe
if your bot is cool, people will go there to talk about it
my server has been with 10 members for 2 months, and after a year of my bots' popularities I started getting some cause they needed assistance with them
it's just how it works
if you dont want a dedicated server for you bot, just make some other server do it
no thats not a prob
ie: server where you're more active in, tell people to go there to ask about your bot
How do I make the bot dm you without the mention? - discord.js
nvm
Show code and we can help
Discord.js - Basically every example of a mention prefix Iâve seen does not work in the slightest. Iâve tried it myself but Iâve run out of ideas on how to do this. Iâve also just given up on multiple prefixes. If you have any solutions to this, even if they kinda work Iâll take.
I have per server settings with change able prefix using enmap
does anyone know how to get my bot (discord.js) online 24/7 for free?
- you don't
- you don't
- you don't
i heard you can do it on github, but im not sharing my code.
y not?
and minecraft command blocks are better than scratch
but just use something cheap like galaxygate or virmach
list of good hosts are in pins
im only 13
im fourteen and I can
Glitch is bad too
People don't understand: these services are not meant for hosting discord bots
Then the complain when something doesn't work
its like using an airplane underwater
Donât expect great quality tho
and I just say, "What do you expect"
ITS NOT A SUBMARINE
pls multiplier
Lol
its free and you're misusing it
No
Using glitch for me is like using a axe on metal
It works
But itâs not really effective
Glitch also now has âbuilt inâ support for discord bots
ily
@Rashad_Sams#3840
what?
can someone send me a link to glitch?
and explain how to use it?
or tell me if its a website or not?
Error: Please install sqlite3 package manually - discord.js
So do it...
It puzzles me how people copy and paste an error message which literally says what to do
lol
Here is my repost of a cry for help.
Discord.js - Basically every example of a mention prefix Iâve seen does not work in the slightest. Iâve tried it myself but Iâve run out of ideas on how to do this. Iâve also just given up on multiple prefixes. If you have any solutions to this, even if they kinda work Iâll take.
oh um wdym by global events @rich sail
What's the question?
For me or him?
Global event is basically an event that shares the same data with all the servers, I believe. I can give you an example if I know what language you are using
Either
does anyone know if skysilk is a good discord bot host website?
so it varies whether it is good or not
Idk, I don't use vps, cause they cost money, I just run it on my computer with nodemon
if i have a file called commands/music/command.js
and i want to do const event = // ...., but the file is called events/event.js how i do?
it sounds dumb, but i mean
Have you done an command handler before?
@vernal rivet is that 24/7?
@vernal rivet using commando framework
Nodemon is an improved version of node.js
its not
depends
It will be the same as any other file
Lol
its decent but eh
lol okay
Samurai uses vps
maybe vultr instead?
use digitalocean or galaxygate
const handleVideo = require('../events/handleVideo.js') **Currently File where is the const: commands/music/play.js
Error: Cannot find module '../events/handleVideo.js'
Is ocean actually free, or is it, a lie?
what is your file structure
read the error
@knotty steeple i want to host na east though and ocean doesnt have servers for that
@rich sail
too bad
also how do i do mention prefixes
Always check your error messages
you have to do ../../
lol don't need for glitch
because as you have it there
@serene sun
dont use it?
its looking for ./commands/events/handleVideo.js
What it is saying is it can't find a file named handle video.js in ../events/
no, you can use code to do it
ive seen 24/7 bots on it though
@formal agate
You can also give the full pathway, it works better doing that
Why
pog if it works, it works
@rich sail did you read what i sent
i know
<@&304313580025544704> use this for glitch app.get("/", (request, response) => {
console.log(Date.now() + " Ping Received");
response.sendStatus(200);
});
app.listen(process.env.PORT);
setInterval(() => {
http.get(http://${process.env.PROJECT_DOMAIN}.glitch.me/);
}, 280000);
oop
oops
oh dear
oh dear
If you do what I do, my not seems to be going 24/7 on nodemon
sorry
what even
Oh god
i want to get a vps but i have no clue on how they work so i dont want to buy something i have no clue what im doing on
Run

meant for you twitch
@knotty steeple, don't ever ask me for fucking help
Use nodemon first, and see if it will give you a decent result till you find the right vps
ok, im gonna ask my question again. How do add a mention prefix
@vernal rivet how would i go about doing that
i dont see anything online about using that for 24/7
just use code in your main file
console.log(Date.now() + " Ping Received");
response.sendStatus(200);
});
app.listen(process.env.PORT);
setInterval(() => {
http.get(`http://${process.env.PROJECT_DOMAIN}.glitch.me/`);
}, 280000);```
Look up nodemon in your web browser
and
if (typeof(text) === "string")
return text.replace(/`/g, "`" + String.fromCharCode(8203)).replace(/@/g, "@" + String.fromCharCode(8203));
else
return text;
}```
done
how i donwload
can i use nodemon and node.js at the same time?
what bot??
Nodemon uses node.js
oh simple enough lol
also you won't be able to publish you bot here
i nedd to put groovy bot on my server
this one? https://discordbots.org/bot/groovy
Nodemon is basically node.js, expect a improve version. It will restart the bot when it senses a file been saved
click invite
@acoustic monolith invite it into your server
then select your server
where it says invite
@formal agate you want a mention prefix?
ah okokok
i mean
i love tyou
yes @high anchor
thx
all ex are crap
Just check if it mentions the bot, itâs an object property in all the libraries as far as Iâm aware
.
For the message param
client.mention or something like that?
even if not, just check if the message content string contains the id
message.whatever
It would be helpful if you can say what language your using
ok
Havenât checked in a while though
or do what i do if(message.content.starts(${botmentionprefixthingidon'tactuallyfeellikethisishelpful} `)
If not just do a simple regex
oh
i tried
markdown is broken
That limits it to when it starts with it, but that also works perfectly fine
neat
@vernal rivet so i installed nodemon and also put both of that code into my main code file so now the bot is 24/7?
Look at d.js docs
i am
Well it depends on the stable of your bot
no it wont be 24/7
the second you close your terminal it'll die
then an == right?
no
Yes
And you need your computer to be on and sign in
call first on it
oh... lol, so @vernal rivet do you leave your computer on always?
Yes, well it's lock, but I am sign in
oof, i see
get a vps
that seems like a waste of energy tbh
cost $$$
i was going to @quartz kindle but i have no clue on how they work, i was looking into vultr
aws
Give me some money tim
lol jk
a vps is much cheaper than the electricity bill for leaving your computer on 24/7
google firebase maybe
true
I need money, lol, I am only 17, with no job
my server rn costs less then a vps
then get job @vernal rivet
and its a self host
easy
hard in us
or ask your mother for money
lol
ask your parents for a credit card and sign up at google GCE. its free for like, ever, and you only need the credit card to sign up. explain that to your parents, that its for your education and its free
Because you made it into a function when it cant
i mean
@quartz kindle can you give a small explanation as to how to use a vps. I feel overwhelmed when looking at vultr. Like server startup and ssh keys.
tim is right
@vernal rivet wdym
its easy
HandleVideo is a method, not a function
@quartz kindle does it really
handleVideo file is this:
async function handleVideo(video, msg, voiceChannel, playlist = false) {
const queue = new Map();
const serverQueue = queue.get(msg.guild.id);
const play = require('./events/play.js')
console.log(video);
const song = {
id: video.id,
title: video.title,
url: `https://www.youtube.com/watch?v=${video.id}`
};
if (!serverQueue) {
const queueConstruct = {
textChannel: msg.channel,
voiceChannel: voiceChannel,
connection: null,
songs: [],
volume: 5,
playing: true
}
// rest of code hidden...
link me
or is gce a better option?
https://cloud.google.com/compute/ maybe this is it.
Google Compute Engine offers high performance virtual machines, customer-friendly pricing, fast networking, and carbon-neutral impact.
@vernal rivet check the message
@serene sun basically when you sign up you will be given ssh access to a remote machine running whatever operating system you set it to (linux prefered), and you can access it instantly from their online admin panel
Going off of crawl I see
later on you can configure an ssh key to access it from an ssh program instead of using the admin panel
hmm, cool, someone told me to use ubuntu.
yeah i use ubuntu as well
@vernal rivet yes, hlep me
i might try out gce now that you say it @quartz kindle
awesome, thank you so much
when creating a compute engine instance, select the F1-micro, thats the one thats free
tell her that you need it to study programming
and that programmers make good money
although they dont get girlfriends
Is gce better than AWS?
Ok
just let her know that if she does this she'll won't have to live in a retirement home
how much ram is aws?
Umm not when your almost home and it's cold outside
aws its 1gb i think
750 hours of Amazon EC2 Linux or RHEL or SLES t2.micro instance usage (1 GiB of memory and 32-bit and 64-bit platform support) â enough hours to run continuously each month*
Is that going to be a better option, before asking if I can use a credit, and then regret that their was a better deal then what I paid for
@formal agate it just suddenly occured to me. Itâs .isMentioned(id)
Yeah
Yeah i think thatâs right
@high anchor tried that
just go 1 year free on amazon then go 1 year free on google
then create a new account
lmao
@formal agate oh?
does not work in the way im using
Tried let prefix = [setting.prefix, message.client.users.get(mention.id === "506900253765795842")]; and got ```let prefix = [setting.prefix, message.client.users.get(mention.id === "506900253765795842")];
^
ReferenceError: mention is not defined```
Ok, thanks
Is this in your on message event listener
untill i changed that
Not the âmention idâ whatever that is?
You want the botâs mention as a prefix yes?
yes
like @merry saffronsasasdf
donât remember which
or just hardcode it lol
whitenames failing at discord.js is awesome to watch
what do you think the best way of making regional indicator emojis into letters recognized by the bot?
@sick cloud ok buddy
[setting.prefix, "@primal swan","<!@506900253765795842>"]
ok
ill try that
didn't work for me
lol

i tried the whole internet before i came here lol
(X) doubt
dude
ended up on german vids
Itâs a bult in method
and yes its sarcasm
500EB of data lmao
the dark web too 
Lol, which I can translate
đ
đ

reeeeeeeeee
alright anyways
So confuzzled
anyone got any idea for my question?
what was your question?
Thatâs literally it
ok @high anchor
what do you think the best way of making regional indicator emojis into letters recognized by the bot?
what do you mean? like for emoji buttons?
Map it, hardcode it like these geniuses would suggest. Or just find a module
no like say if i say đŻ it'll be changed into j
ok, i think its just me. Nothing is working
You can make a huge list of it
@formal agate nobody knows what your code is like bro, bugfix it yourself
make a lookup table
show ur code atleast
y e a
im trying
like
maybe its the handler
what if you write the literal unicode? \đŻ
w h a t
i mean i could probably
const lookup = {
"<regional indicator>": "letter"
};```
i think i did that before when my entire thing was just .match()
for 1⣠to 9âŁ, it's the first character
ES6 recognizes all emojis dude, it wonât be a problem at all to map it pairwise
like i can copy the regional indicator from online and i think it'd switch
1⣠== 1<box character>
let prefix = [setting.prefix, "@primal swan", "<!@506900253765795842>"];
if (!message.content.startsWith(prefix)) return;
if (message.author.bot) return;
var cont = message.content.slice(prefix.length).split(" "); //slices off the prefix, then puts it in a array
var args = cont.slice(1); //everything after the command in a array
var cmds = client.commands.get(cont[0]); //tries to grab the command called
if (cmds) {
cmds.run(client, message, args, setting); //checks if command is real, if so it runs said command
};
});```
if you copy the correct one it wont change
omg
^
if (!message.content.startsWith(prefix)) return;
yea
i'd say for loop but probably a better way of doing it
you would need to use startsWith with each item of the array individually
prefixes.find(p => message.content.startsWith(p))
hax
what is p?
lol
the name of the first argument of the closure you pass to prefixes.find
p is just the param in the anonymous function
thingy*
yes, but where would it go?
do you think i could do the regional indicator match thing in my accent removal?
wdym
in the runner itself or just about in the event
w
literally unplayable
it's the same as passing in function(p)
client.RemoveAccents = (str) => {
var accents = "$ĂĂĂĂĂĂ
Ä";
var accentsOut = "sAAAAAAA";
str = str.split('');
var strLen = str.length;
var i, x;
for (i = 0; i < strLen; i++) {
if ((x = accents.indexOf(str[i])) != -1) {
str[i] = accentsOut[x];
}
}
return str.join('');
};```
this is not all the accents but just an example
do you think i could put the regional indicator like unicode actual emojis in it then put an output for it?
$hit
if you want to match regional indicators i dont think that will work because of how discord converts them
.
discord just sends the raw unicode
he is making a swear filter @earnest phoenix
Discord just passes it in as unicde
does it?
yeah
yes
Yeah
there's no reason not to, it's in es6
then it should work
well
not sure about how they're accessed
i mean for some reason if you send it again itll be <:emoji:id> but still
because emojis are multiple characters
totally unrelated, anyways anyone here can help me with a settings command?
oh ye
so a lookup like that is probably going to break
a lookup table would be a safer approach
and in your code you can just use their visual equivalent
im pertty sure regional indicators i one characs but yeah ill do the lookup i guess
yeah if you want it sanitized
pertty
discord replaces :name: with the unicode on messages
but not on reactions
just fyi
so to play safe the raw unicode is better
huh
so how would i even use the lookup thing
.charCodeAt(0).toString() would convert it yeah
const lookup = {
"Ăą": "a"
};```
how can i make it to where it returns after scanning a guild id.
cause me bot gonna get muted for leveling ;p
then for each character in the string, if(lookup[string[i]] !== undefined) string[i] = lookup[string[i]]
leveling should always be disabled by default @earnest phoenix
you should make an admin enable it
Yeah I need help making a settings command
and every person ive asked for help became toxic
nobody is gonna help you make a command lol

if you have a specific question you can ask
if you just want to make a command look up tutorials and docs
but dont ask anyone to help you make a command
since thats just annoying
how many of you guys started learning NodeJS or even programming at all by trying to make a discord bot?
me
nice
i learned node, but not js, through making a discord bot
i learned js
i learned my first programming lang (js) through a book from 2005
quality, up-to-date sourcesâą
so the rest of us in this server were babies
I learned my first Javascript off of w3schools in middle school




