#development
1 messages · Page 1227 of 1
i host on Galaxy Gate
Looks like my bot lives in future
use an online time service like https://time.is
almost perfect
@delicate shore atomic clocks are the best clocks invented by humanity (till date)
what does the ? operator in JavaScript do
value?thing that execute if true:thing that executes if false
its the ternary operator
it's like a mini if else
guys what emoji can i use for my help command's 'image' section? i wanna split the 'fun' section
@hazy sparrow your choice bud
;-; i cant find any good ones
use that
i can escape the emoji for you so you can grab the id without having nitro
(only if you pay me 100$
)
but can it use emojis from servers it isnt in?
...
no need
k
i dont wanna use a diamond from mc in the image section of my command lul
🖼️ is better
its for a image thing correct
yup
so photo frame is fitting
i might use the diamond gif later so i'll save it
is message.channel.send possible to do with guildCreate, and make it so it'll dm the first channel avaiable, or the owner
🙌
Google Discord emojis, there's a really good site that has thousands @hazy sparrow
kk, ty for the info!
is message.channel.send possible to do with guildCreate, and make it so it'll dm the first channel avaiable, or the owner
@ancient nova yeah thats how all of the bots that when they join a guild do it
mine doesn't really send anything, though.
If you are talking Python, then it would be 'on_guild_join' not on create
I'm coding in javascript
was the server very recently made
difference between Java and js
java has better oop
no message doesnt exist
unless u assigned something to a var message
ah
alright
I think I get what you mean
save the TOP channel ID to a var onCreate and then use it in the channel.send right?
alright, thanks
or just use it in a loop in general i mean like
alright
guild.channels.forEach(channel){
if (channel.type == "text"){
channel.send("message")
break;
}
}```
Hi. I would like some help if someone is able to advise. I have built a tiny simple bot for a server I’m on, for keeping track of a specific kind of queue. I’m not really a JavaScript programmer and this was my first Discord bot. I deployed it via Github+Heroku and set Dyno to worker. However, my bot briefly went offline anyway, and lost the queue array. Was this just something strange or should I be looking into storing data? A database seems like an overkill when I just need an array with <20 names at a given time but if I can’t count on heroku to actually not be going to sleep, I guess I’ll have to?
hm
let upvoter = Tet7.roles.cache.find(role => role.name === "Upvoter!");
let mo = Tet7.members.cache.get(vote.user);
mo.roles.add(upvoter);
setTimeout(() => {
mo.roles.remove(upvoter);
}, 43200000);```
this does not work
but if i enter a short time
like 10 seoncds
seconds
then it works
@outer lodge Heroku dynos restart every 24 hours afaik
And it seems that you do need a database in this case, preferably one that can be connected to remotely
Thank you. Yeah sounds like it. Turning out to be more involved than I hoped. Do you have a recommendation if my priority is simplicity and saving time troubleshooting above all else?
@hazy sparrow 2nd one
as i thought
Agreed

yo
how do I get when a user was created
can some one aprove my bot allready
why not
@earnest phoenix <user>.createdAt is what i use
@earnest phoenix i already added there
hey just asking for an opinion here but do u think this bot would be usefull?
to explain it connects to a mcpe server and links the server chat to the discord channel. DEMO pic:
lmao
I mean invite
@paper fjord just wait till a server adds it no need to advertise
^^
u see bots are exponential once they get into many servers they spread faster

ya just like the virus
say someone sees ur bot on a random server and they think its cool u know they do !invite and then they have ur bot and it repeats
its basically stonks
^

@hazy sparrow yu play pubg?
-development

@weak parrot fuck i forgot i cant do tag
let upvoter = Tet7.roles.cache.find(role => role.name === "Upvoter!");
let mo = Tet7.members.cache.get(vote.user);
mo.roles.add(upvoter);
setTimeout(() => {
mo.roles.remove(upvoter);
}, 43200000);```
this does not work
but if i enter a short time
like 10 seoncds
seconds
then it works
does it add the role?
The number could be too high
does it add the role?
@cinder patio yep
How do you know it doesn't work? You have to wait 12 hours to see if it works
Can i make a cooldown system by checking if the author's ID is in a set and if its not then execute the actual command and then add the author's ID to a set for a amount of time?
U can
Ok cool
How do you know it doesn't work? You have to wait 12 hours to see if it works
@cinder patio
I have seen it smh
i waited 24 hr
it still
did not remove
Did your bot process stop at one point?
@cinder patio yes many times
Thats it then
Thats the reason then
When it stops the timeout stops too
By not stopping your bot process
^^
Where can I make a bot?@fickle sapphire
@hollow forum anywhere
Alright
It depends pnnthe bot really
By not stopping your bot process
@hazy sparrow How can i stop my bot from turning off when an errors occurs
I mean where do you make them?
By catching the error and like sending a console/channel message that a error has occurred?
@hollow forum Visual Studio Code is an easy program to use
Is it available on android, tho? 😶
@delicate shore you can .catch the error and then log it somewhere what the error is
@hollow forum nope.. I suggest you use a laptop or a desktop
It is possible tho.. using github repository
and then hosting on heroku for example
But typing the code..
It breaks your fingers
"A small price to pay for mobile coding"
get a bluetooth keyboard /s
What aboutnthe mouse
bluetooth mouse
That basically makes a PC
Just use a laptop or desktop XD
How can we get multiple parameters of users' choice in functions
For example
I have x and y arguments, but user wants to send 5 x and 2 y arguments
Please ping on reply
@fickle sapphire I'm doing on android. Mind helping me a bit?
The commands are my wrking.
You can drop your questions here
Alright. I'm using Bothub to do it.
Wait. I'll share the co-creator @fickle sapphire option with you. So you can hell.
Hell*
How can we get multiple parameters of users' choice in functions
@earnest phoenix please explain your problem better
I did??
I have made an custom command '!PHTime' by the bot I not responding.
@hollow forum Wat is the purpose of the command?
@fickle sapphire an custom command. It should write 'go to sleep {user}'.
wtf
show code
def function(x:str, y:int):
for value in x:
...
I was trying to get more than one amount of x so I can process all one by one
absolutely terrible idea
from earlier
@earnest phoenix python? I'm out i dunno spaghetti i only know javascript
function(x, y){
for(i=1; i<10; i++){
...
}
}
@earnest phoenix
i havent used js for a while
but heres the same case
that's python right
for():
looks like js and py mashed weirdly
im not tryna write js
explaining a thing in functions
still not js
typescript it is
def function(x:str, y:int): for value in x: ...I was trying to get more than one amount of x so I can process all one by one
@earnest phoenix Do you think you can usex: List[str]?
omg
ask shivy
he knows python
so I'll call the function using a list?
function(['a', 'b'], y)
Is there any specific separator in the message?
1,2,3 or 1, 2, 3?
1,2,3
x.split(",")
thank u
@hollow forum Send me a link of the website in DM pls
why
@hollow forum It works fine for me
@fickle sapphire Huh? Then why not me?
What did you fill in as command name?
!PHTime
Oh. Alright
Yup. Thanks!
np
If you did !!PHTime it would've worked
indeed, but it is easier to use just one !
or no !
yeah but the host automaticly uses !
I want to restrict a command for voters, how can I do this
@Oscar.#7370 I want to create an command where an user says '!hug <username>'
And the bot says, {user} hugs {member_mention}. Aww! :3
@fickle sapphire I want to create an command where an user says '!hug <username>'
And the bot says, {user} hugs {member_mention}. Aww! :3
What to write in the trigger command?
Since, it is not a single person in that server.
use a $ symbol before the {
How to ping a role ??
<@id> i think
k
role.mention @obtuse saffron
@still merlin yes? Where?
Before all the { put a $
Oh, okay! Thanks!
<@id> i think
@still merlin no
that's for normal users
you need to do <@&id> for roles
do NOT test this on <@&304313580025544704> role
edited message please don't kill me
@still merlin I put the trigger command as '!pls hug ${user}'
And reply = {user} hugs {member_mention}. Aww! :3
Not working
what are you using to make the bot
@pale vessel me?
yes
@pale vessel botghost
I dont get why everytime I try to use this eval command it throws out an Exception every time
ik i shouldn't ask2ask but anybody's got an example of how to push your changes in a local git repository to the master branch of a GitHub repository?
@Tim#2373
@hazy sparrow help
uhh wut
?
I meant could someone help me with a Little coding?
Tim is offline
He's idle
I meant could someone help me with a Little coding?
@hollow forum just ask your question
ik i shouldn't ask2ask but anybody's got an example of how to push your changes in a local git repository to the master branch of a GitHub repository?
what i needed help with
I'm using botghost to make codes. And I want to make a code where somebody says 'pls hug <user>'
And the reply comes. {user} hugs {user2} @hazy sparrow
whats a ghostbot
@hazy sparrow botghost is an website
Or botghost srry
whats a ghostbot
@hazy sparrow it's a freaking terrible service for making bots
not sure if ghost bots exist tho
You never know
Hey, where can I make bots on android?
I can help with code if you want i have no idea how that thing works
Oh, wait. you can? But I'm an android user.
android users can also code
Hey, where can I make bots on android?
@hollow forum you can make bots anywhere but you cant code anywhere
but it's harder
Oh, wait. you can? But I'm an android user.
@hollow forum you can code with android too
https://repl.it https://glitch.com both are popular services for making STUFF and they work on Android
Repl.it is a simple yet powerful online IDE, Editor, Compiler, Interpreter, and REPL. Code, compile, run, and host in 50+ programming languages: Clojure, Haskell, Kotlin, QBasic, Forth, LOLCODE, BrainF, Emoticon, Bloop, Unlambda, JavaScript, CoffeeScript, Scheme, APL, Lua, Pyt...
I don't want to code. Just some custom commands.
Again, i can help with code if you want
if you can't help them just shut up man god damn it
I don't want to code. Just some custom commands.
@hollow forum without coding you're very limited with what you can do with your bot
find a bot that has it or find someone willing to add it to their bot
^
no
@earnest phoenix but, where can I code on Android? Like for an bot
They can be used to code bots?
You can even code in samsung note if you want to
they both are optimized for mobile too
Discord bots?
They can be used to code bots?
@hollow forum coding bots is basically coding
Using Glitch for Discord bots is a bad idea
not even an idea
can you be more accepting of people's decisions
we're forced to use it cuz we're broke to buy a good VPS
store secrets in .env
ping itself?
repl sucks
we're forced to use it cuz we're broke to buy a good VPS
@earnest phoenix hey there are actually good ones which are free
yeah
Bot crashes randomly every few hours on repl
like BlueFox for example
ping the project website using the project itself
@earnest phoenix hey there are actually good ones which are free
@hazy sparrow credit card verification intensifies and most of us are under 18
works for my eval vm
"crashes"? You mean just going to sleep mode because that's intended behavior?
BlueFox doesesnt ask for credit card
google is re||blahblah||ed to not show me a search result for blue fox
Where can I make the bot then?
You say glitch is trash.
I just want to make a command. A try
@slender thistle nope an error would appear on console
@earnest phoenix https://BlueFoxHost.com
Where can I make the bot then?
@hollow forum you can use repl or glitch as a temporary service but you'll have to move to a VPS in the future
Everything free is trash
"fields.flat is not a function" every time
It's not fit for Discord bots and Glitch themselves are... against it
repl.it, on the other hand, don't mind it but you'll still have to ping the service every X minutes
Must of been outdated node
@thin turret that means outdated node yes
Everything free is trash
@quartz kindle bluefox is actually designed for bots and is actuall good for small bots like which are in like 3000 servers, they have a paid option if you want more ram/ etc
Or more databases if that makes sense
@hazy sparrow
thats the wrong button
Bluefox is paid?
Bluefox is paid?
@hollow forum it has paid and free options too
I finnaly made it such a way that music filters in my bot can only be used by people who upvote my bot
finnaly
That's a lot to offer for free
256mb though
well try it if you domt believe
Yeah, that much RAM is... eh
only good enough for a small bot
if you manage your caching, you could probably make it handy
I finnaly made it such a way that music filters in my bot can only be used by people who upvote my bot
@delicate shore uhh music playback without asking permission from the artist/service which you're ripoffing is illegal/against TOS of the service which you're ripoffing
Yea wait hold on
true
@delicate shore uhh music playback without asking permission from the artist/service which you're ripoffing is illegal/against TOS of the service which you're ripoffing
@earnest phoenix
bruh
AHhh
I search from YT download ut
it
@earnest phoenix and which music producer is going to spend thousands on suing a discord bot maker?
if you think Rythm is also illegal
I need all caching possible for my private bot and I'm using 2 GB RAM just fine
Rythm isnt legal lol
@torpid forge and thats supposed to be cheap..?
$1.88/month ($2.5 without discount)
@earnest phoenix and which music producer is going to spend thousands on suing a discord bot maker?
@earnest phoenix youtube banned discord bots that don't ask for permission from em before using the API because services like youtube and spotify ACTUALLY PAY THE ARTISTS FOR MAKING SONGS
mine included
Alot of upfront cost though
@earnest phoenix Lol
wdym lol
@earnest phoenix are they gonna watch our bot
Moreover i scrape and don't use API
You think rythm pays the artists?
hahahaha
What a joke
but still
against yt tos to ripoff em
Get your facts right kid 😄
wtf
If you are going to discuss legal matters, keep it civil at least.
Unless youre hosting on RPIs, a servers electricity cost will likely be much higher than the cost of renting it as a vps/dedi
hi tim lul
It's kind of annoying me, @slender thistle.
I've seen code913 spread random information that is wrong most of the time.
What is meaning of civil
If you are going to discuss legal matters, keep it civil at least.
@slender thistleuhhh i never read legal shit
I am not saying in an offended way
@quartz kindle how did you learn coding?
just rub a ruler against your hair for free electricity smh
@hazy sparrow by reading, testing and experimenting
a pen works too
What do you mean?
a lot is happening mate
what is not happening is the real question

;-;
Himself
Paid or free
both
bleh
discord should make their own bot hosting service even if it's paid
Imagine if we had a $/month for owning a server on discord
@earnest phoenix Can you start being more serious and stop giving people shit for asking questions
Yea I hate paying external services
This isn't #ping-brag channel
does anyone know how to detect spotify premium on discord?
Looks unorganized
Detect what now?
Ill never get people whos server list is stacked with mentions
@thin turret lol i keep the servers with tons of pings on a folder at the very bottom
?
What do you mean by "detecting" Spotify premium?
~/codeco-discord-bot$ git push bot-repo
fatal: The current branch master has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream bot-repo master
Uhhh what?
with discordjs, if u have premium you get a role or something like that
🤔
Do what it says, you have to specify the branch you want to push to
Do you mean Nitro/server boosts?
Do what it says, you have to specify the branch you want to push to
@cinder patio i tried the command that it showed
i wanna make a pull request to my repo through git bash
use their API
No one gets roles for Spotify Premium 🤔
omg
I think u just dont understand
It would be preferred if you could elaborate on your question
He means that if someone has spotify permium they get a role on a server
but you are trying to push
@cinder patio my eyes are buttons or what
^ with a discord bot...
~/codeco-discord-bot$ git push bot-repo fatal: The current branch master has no upstream branch. To push the current branch and set the remote as upstream, use git push --set-upstream bot-repo masterUhhh what?
@earnest phoenix
~/codeco-discord-bot$ git push bot-repo
i needed to open a pull request on my github repo and i tried to PUSH directly to the master branch
Use Spotify API if they allow you to get users' Premium status 🤷
lemme check 👍
Without OAuth?
no

If(person.has("SPOTIFY PERMIUM"){
// code
}
Lul
Without OAuth?
@slender thistle we need to authorize discord first using spotify's oauth thingy so discord can grab a token and use their api
If(person.has("SPOTIFY PERMIUM"){ // code }Lul
@hazy sparrow you can actually make that work tbh. javascript classes intensify
With a custom wrapper, sure
Yea ofc but you have to define a bunch of things
@cinder patio basically i wanna do this. Make a new branch and start a pull request.
has anyone ever tried to make a all-in-one bot
like everything; reactroles,automod,games,moderation,leveling system,giveaway system,ticket system, a AI thing to chat with like jarvis, etc
can anybody help me with my git shit?
like everything; reactroles,automod,games,moderation,leveling system,giveaway system,ticket system, a AI thing to chat with like jarvis, etc
@hazy sparrow jarvis? visible marvel fan
dyno has a lot of shit
and mee6
and dank memer
even more bots
But none have all
they all are open source too (not sure about dyno)
cuz
that's a huge hit on performance
Like every feature on every bots combined
what if all the owner of those bots combined and made a big shit
Lul im thinking too much at this point
how to delete a folder in bash
rm
why is git so weird
~/codeco-discord-bot$ git push bot-repo master
Username for 'https://github.com': code913
Password for 'https://code913@github.com':
To https://github.com/code913/codeco-backup-repo.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://github.com/code913/codeco-backup-repo.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
~/codeco-discord-bot$ git push --help
warning: failed to exec 'man': No such file or directory
fatal: no man viewer handled the request
~/codeco-discord-bot$
! [rejected] master -> master (fetch first)

In Javascript, what is the fastest method to divide this string (-o list -c collection -w test -p { id: 1234 }) according to different identifiers (-o, -c, -w, -p)? I specify that these identifiers can be in any order.
Can someone help me about HTML & Markdown
@balmy knoll how about String.split("-"); and in every element of the array the first letter will ALWAYS be the thingy after - and you use -someletter for the identifiers
And can someone give me Vote API
@earnest phoenix yes but - split also where the following letters isn't o, c, w or p
how to see if user is in a specified server
by checking if it exists in the member cache
yea
filter the guilds collection to check if a member exists
<client>.guilds.cache.filter(guild => guild.members.cache.has('<id>')).first();
kkk thnx
no problem
but @queen osprey i wanna see if user is in my server
get the guild
@delicate shore
and then check
client.guilds.cache.size```
module.exports = (client) => {
console.log(`Ready as ${client.user.tag} to server in ${client.channels.cache.size} channels on ${client.guilds.cache.size} servers, for a total of ${client.users.cache.size} users.`);
var i = 0;```
what
What?
what
wot on earth
@topaz sleet yes?
module.exports = (client) => {
console.log(`Ready as ${client.user.tag} to server in ${client.channels.cache.size} channels on ${client.guilds.cache.size} servers, for a total of ${client.users.cache.size} users.`);
var i = 0;```
@topaz sleet .
function random(min, max) {
return Math.floor(Math.random() * (max - min)) + min;
}
module.exports = (client) => {
console.log(`Ready as ${client.user.tag} to server in ${client.channels.cache.size} channels on ${client.guilds.cache.size} servers, for a total of ${client.users.cache.size} users.`);
var i = 0;
setInterval(function() {
var gamePlaying = ['on ' + client.guilds.cache.size + ' server!', 'with ' + client.users.cache.size + ' thành viên!'];```
git is making my brain go nuts 
thats not even a ready event-
^^
No that it
@twilit rapids sorry for ping but i found the real problem
But idk what is it
see this timo
Put your logging in this (inside your main file, not a command file) @topaz sleet, including your game activities
//your code
}
Lmao
@balmy knoll you can use https://npmjs.com/lexure
Why emojis doesn’t appear anymore ??
like it’s written :coin_emoji:
But there isn’t the emoji
it needs ID
Even tho it was working since few weeks
Everything is good
Like today it stopped working
Everything is good
@fast quail
yea
The code is good
Why have Zero 2 as profile pic
You know whats funny, you dont need the name of the emoji, you can put there an emoji id with a random name and it will still work lol
That make me sad cuz Ik they aren’t making another season
Oof
Have you tried googling?
@quartz kindle yes
It looks like something related to debian
Ok for the verificaficatiln process I kicked out my bot from the server were the emojis are
verificaficartiln
@delicate shore have you checked that file?
Go to their support server
hi
Don't Just Say "Hello" in Chat.
Go to their support server
@warm marsh yea ie asked there and still waiting for 30 mins
Hey @quartz kindle I kind of figured out
My bot crashes saying this 4|index | abort(DiscordAPIError: Missing Permissions). Build with -s ASSERTIONS=1 for more info.
make sure it has the correct permissions
So i was wondering if I can stop my bot from crashing if it doesn't have perns
also, you can try logging commands and see what command a user used that caused the error
how
bruh
instead of trying to put a band aid on the error, why not check if you have permissions to do the action in the first place?
developer badge not given anymore???
const db = require("quick.db")
module.exports = {
name: 'work',
description: "work!",
execute(message){
const bal = new db.table('bal')
db.set('mybal', 0)
db.add("mybal", 2)
message.channel.send(`You worked! Your balance is now ${db.get("mybal")}`)
}
}
shoudn't it be 4 the 2nd time?
developer badge not given anymore???
@earnest phoenix nope
developer badge not given anymore???
@earnest phoenix no
@hazy sparrow aren't you setting it to 0 right before adding 2 to it
it's always going to be 2
also
that db structure is very weird
how do i fix it?
you'll share the same data for all users
It works as if it were a map
how do i fix it?
just don't set it to 0?
i feel like you're misusing the entire library
instead of trying to put a band aid on the error, why not check if you have permissions to do the action in the first place?
@earnest phoenix
I do but idk why it gives the error
maybe it is when bot cannot send msg ?
do you know where and when the error is happening
no
then debug
try catch, log at closures
you'll share the same data for all users
@earnest phoenix yea thats not a problem for now since i'll delete this thing later
step through your code one by one
i have
btw ty. ill try that
i have catch all over my code
if you have try catch and still have those errors then you probably didn't await a promise
it's either try catch with await or .catch
await promises
Show your try catches
ok
function catchErr(err,msg){
let channel = bot.channels.fetch("751795624932016168").then(channel => {
code here
channel.send("The message content was" + msg )
return;
})
code here
}
bot.on("message", async msg => {
try{
/// ALL CODE
}catch(err){
catchErr(err,msg)
}
})```

What is all code
My commands
Try catch doesnt work on promises if you dont await them
So you have to await everything
oh
await channel.send
everywhere?
Everywhere that you do something that involves the api
Also possible
Does anyone have any yt api for searches that has no limits
I used googles yt v3 api but limited
I am just gonna remove the function
use a scraper like youtube-dl @late cedar
you'll often have to shuffle through ips though since youtube really doesn't like scraping
guys, how do i add code in a const's name?
like ```js
const <message.author.id>bal = new Set();
can you elaborate?
i want everytime a person does a command, a new set to be created with the author's ID as the set's name
oh wair nevermind
you should only have one set
yea nevermind i was stupid
Why does a set reset once bot restarts
Because its stored in the programs memory
and what is the alternative to it
A database
it gets added to the cache, when ur bot restarts it gets cleared.. something
like that
depends on what db ur using
^
call get()
it'll return undefined if it doesn't exist
Oh
i did
i just skimmed over the docs
you're calling it on a dbl voter
not on your database
please look at your code
no
let voterrrrrrrr2 = db.get(`voter`);
voterrrrrrrr2.add(user.id)```
ok
@earnest phoenix i am still having issues
in checking if user has his id in db
i cannot get docs correctly
let voterlist = new db.table(`voterwow`);
voterwow.add(user.id)```
this is how am i adding
db.set(key, value) literally
what exactly do you think add does
it adds it to a table
Like
Table => One id
Second id
third id
i am reading them
read them fully
and don't skim them
because each method is thoroughly explained and very well documented
ok
let db = ....
// lets "add" aka set a user value
db.set("user", { some: "value" })
// lets get the user and log the contets
let user = await db.get("user")
console.log(user) // -> { some: "value" }```
but it will always change user if i am not wrong
oh
key
yes
const Command = require('./command');
const { DiscordAPIError, RichEmbed } = require('discord.js');
const Discord = require ('discord.js');
const exampleEmbed = new Discord.RichEmbed()
.setTitle('**All the available commands!**')
.addFooter("**Birthday Bot Hosted for throwin parties!**")
.setColor('#FF0000')
.addField('*`!help` => Shows all the commands of this bot*' + '\n' +
'*`!add [' + process.env.DATE_FORMAT + ']` => Add your birthday*' + '\n' +
'*`!delete` => Will delete your name and birthday from the database*' + '\n' +
'*`!setDefault` => Set the channel where the birthdays will be announced (Admin only)*' + '\n' +
'*`!ping` => Pong (simply to test the bots status)*');
module.exports = class Help extends Command {
static match(message) {
return message.content.startsWith(process.env.PREFIX + 'help');
}
static action(message) {
message.channel.send(exampleEmbed);
}
};```
addFooter("Birthday Bot Hosted for throwin parties!")
^
TypeError: (intermediate value).setTitle(...).addFooter is not a function
it's setFooter
also you may want to not hard-code all your commands in if you're using a command handler.
This
i made a music bot if anyone can anyone add more feature to my music bot
no
no
we're not gonna add features for a bot you made
^
-needdev
since you made it, you should be able to add features yourself
ok np
what are these "more features"?
Hey, does anyone know, is there any free 24/7/365 hosting site, app thing
Hey, does anyone know, is there any free 24/7/365 hosting site, app thing
@prisma wraith Yeah, check the pins
@prisma wraith Cheapest option is to host it on your PC
Well yeah, that's the point of a server
hey i am using weather-js package
how can i actually also display the coordinates
of the places
get a pocket pc like an rpi
though renting a vps is usually going to be cheaper than an rpi
const title = '**Countries/cities ranked by weather type**';
async function get_weather(options) {
return new Promise((resolve, reject) => {
weather.find(options, function(error, result) {
if (error) reject(error);
else resolve(result);
});
});
}
async function get_data(locations) {
return Promise.all(
locations.map(
location => get_weather({search: location, degreeType: 'C'})
)
);
}
async function get_location_by_skytext(text) {
text = text.toUpperCase();
let result = await get_data(locations);
console.log(result)
result = result.flat();
return result.filter(entry => {
return entry.current.skytext.toUpperCase() === text
});
}```
i have a list of 68 countries
I can only justify getting an rpi because I like owning my own servers
||which isn't a great justification||
but it is only showing the country names. Any way to display the coords?
power bill
power bill
@sudden geyser I've got a wattage reader, and it really isn't too expensive tbh
Now, I could see a tower PC being overkill and power hungry for a server though
Good evening
I want to ask about a syntax in nodeJS
exports.run=(client,message,[mention, ...reason])=>{
I don't understand about [mention,...reason] what it is mean ?
@earnest phoenix https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax
It's a combination of destructuring and the spread operator.
mention is the first element of the array, and reason is the rest of the array, not including the first element since it starts at the second.
hey guys, how do i actually show my coordinates using weather-js? I have like a list of 70 countries, but it is return the name and weather only. Is there any way to show the coords right next to the place name.
voiceStateUpdate and a real pain
are you talking to me?
how can i make a progress bar?
@drifting wedge in discord?
is that even possible?
pillow
You could edit a message at certain points
Is pillow equivalent to canvas?
It's probably be easier to do something like
[======>............]
edit previous msg after a function finishes
[==============>....]
Then edit again when done with your pillow image or something
or make gif, but then you need to know how much time the function consumes
Which would be prediction rather than actual
^^ yeah true
I mean, I do some loading gif, and replace the link with the result
discord.js
ok
actually for nodejs
yarn and npm are for nodejs
yeah exactly.
/home/container/lemonbot.js:76
if (!cooldowns.has(commandName)) {
^
ReferenceError: cooldowns is not defined
at Object.<anonymous> (/home/container/lemonbot.js:76:1)
https://hastebin.com/ewogoqapar.js
i cannot see that anywhere, and its really confusing me
cooldowns is not defined
maybe read my code
hey guys, hello again, im working on a command that send DM to the mentioned users. The content of the message is the text addd in the command
before guessing
well its not in there so u clearly are
anyway to remove the mentions at the time to send it?
@granite echo not same file
it doesn’t appear to be defined
Look it says which file
what
Why can't you type whole sentences, I am just wondering? 🤔
/home/container/lemonbot.js line 76
if (!someUndefinedVariable.has(commandName)) {
^
ReferenceError: someUndefinedVariable is not defined
?
Oh
ive just proved to u its the right code, and im telling u its not in there becuase i removed it all
and i doubled checked
Are you saying that the error is in a line that doesn't exist?
yes
Ah
Right folder tho?
See, shoulda opened with that lol
/home/container
@fickle sapphire open ur eyes
I have them open
@granite echo can you not be rude to people trying to help
lol ok staff
Then go suck your toes
and if u actually looked i proved it was right
Imma eat and you figure it out yourself
The entire line isn't in it
OPEN UR FUCKING EYES, FFS BECAUSE IT ISNT IN THERE IVE SAID THIS 5 TIMES,
So make sure you saved, and try rerunning
WHERE IS IT THEN YOU TWAT
Easy, Matt
its not gonna error about something that doesnt exist
ok yea
BECAUSEE IT ISNT FUCKING IN THERE
the right file
ok
Bro, you gotta chill out
what is on line 76
goddamn
right there
the channel name and id where it was last restarted
send?
wdym?
the file
its reading that file
and there is something not defined
on that line where its reading it
Hi, what you guys discussing about
pain.
hm
how do you track al mentioned users in a message?
message.mentions
message.mentions.members
check the docs
._.
what library r u using
"mentioned user"
message.mentions.users``` ?
im p sure u shouldn't spoon feed members ace
didnt work
iirc its in rules
@dreamy thistle what lib
it’s a collection
and we forEach a collection ?
i only made it worrk with ```
message.mentions.users.first();
yes, like its meant to, it has always worked but sure
@granite echo did you change host or something?
you’re looking for members, brenchu. members r the people the server
i only made it worrk with ```
message.mentions
.users.first();
@dreamy thistle yup that’s what u do for collections
ye, but that only takes the first mention
i switch between self host and vps, self host to edit, but thats my vps rn and ik its rn cuz my friend sometimes checks it over for me
does it work self hosting?
whats the issue, ashley?
ye
ye, but that only takes the first mention
@dreamy thistle message.mentions.users is a collection you can .map() it iirc
how do i align these to the center?
align=center? not sure
text-align:center;
is it copyright infringement to use discord.js collections for stuff outside of discord
<div align="center">
no
no i dont think so
hmmm
could you explain it?
uh sure
@fervent goblet, you have a lot of options
wait
center tag on html
@thick gull
text-align: center;
@fervent goblet css or html
using flex
using flexbox or grid
text align only aligns the text when i tried
i want the entire table to go to the center
dnt use text align center over containers
is it copyright infringement to use discord.js collections for stuff outside of discord

why no center tag?
copyright is fucking weird
@earnest phoenix no
so if i mention @dreamy thistle and @thick gull
message.mentions.users
has data on @dreamy thistle and @thick gull
so i could map it;
.map(u => u.tag)
returns Bremchu#4593,borboss#7877
@thick gull thxs for being patient and helping, it fixed itself it seems
it does, thank you
@dreamy thistle you can check this to see what you can get with message.mentions https://discord.js.org/#/docs/main/stable/class/MessageMentions
but im not 100% sure that collections use map
@thick gull "A compound has different properties from its constituent elements"
Well technology involves a fuckton of chemistry so ig collections are different from Maps
but be warned, its in order by the API
Yeah
i mean
.tableArea{
width: 600px;
text-align: center;
}
did nothing
collections extend map, so why wont you be able to use map?
because i dont memorize that kind of stuff
no do it in body
?
better
collections extend map, so why wont you be able to use map?
@digital ibex compounds also extend elements
cuz that align the text in ur table
bye
not gonna waste my lunch break on dev again
have fun discussing djs and chemistry
@thick gull lmfao
what


what i needed help with



= in code !
