#development
1 messages · Page 1072 of 1
woah
Gz
my bot is 5 days 2k guilds, big sad, it took a bit of time
I use this code to find the index of an array element:
genIndex = generators.indexOf(element => element.generator === newChannel.id)
This is the array element that it's supposed to find:
{"generator":"728903742539431948","category":"715868270133248010"}
But the index always results -1, is there something wrong with my code?
.
Is that how index of works
?
Wait. Your code has an random {
No I removed it in the actual code not the issue
Looks like your using indexof like you'd use a filter
Using .find should do what you want indexOf to do.
Solved, yeah I need to use find or findIndex, not indexOf, thanks guys
custom methods
https://lumap.is-inside.me/XVynrxA3.png
Pretty sure indexof works here, your just using it wrong
who wants it
yeah it doesn't take a function
Your custom method is a method that's built into Ruby called each_split.
The code for it is really simple.
Let the boy be proud
😐
try to do it in js lol
Will do.
String.prototype.sliceEvery = function sliceEvery(ChunkBy) {
if (!ChunkBy || isNaN(ChunkBy)) {
throw new TypeError("No string chunk char was provided or the provided amount is not a number");
}
let ChunkArray = this.match(new RegExp(`.{${parseInt(ChunkBy)}}`, "g")).map(z=>{
return z;
}
);
return ChunkArray;
}```
could be improved
better
/**
* Slices a string every x
* @param {Number} num - The number of time to slice the string
* @returns {Array} an array
*/
String.prototype.sliceEvery = function sliceEvery(num) {
if (!num || isNaN(num)) {
throw new TypeError("No number provided");
}
return this.match(new RegExp(`.{${parseInt(num)}}`, "g")).map(a => a);
}```
is it?
Or should do.
mapping something to itself
hey does anyone know CSS
doesnt make sense 
thats just how js works
https://oliy.is-just-a.dev/w9nfdk_5105.png when you map it to itself you'll just get the original array
git auto deplyo is very useful
wait a sec
Define know css
learn css urself
and i need css for that right?
Why is Discord keep saying
Hang tight, we're still processing your submission.. This can take a few minutes.
and also inspect element
What's wrong?
Looks like its going to take a few minutes tiny
does anyone just know a simple command for the background to put in HTML
man
i only need that one command, dont rly need entire css
Lol
https://oliy.is-just-a.dev/rcmhek_5106.png yes, it's the same with and without the map
Have you tried Googling?
congrats u just learned how to use css
Pro
What I have to do ;_;
lmao
Means?
@fringe axle discord gives that when you fetch a user thats not known
youre tryung to put the owner as a client option
And how can I fix it?
and u cant
And how can I fix it?
Don't search for users that don't exier
remove it
Exist
smh
What I have to remove? ;__;
Yea
it didnt work sad
@silver spear it's backround, not background-color
lol
@fringe axle dont tell me its not your code
ok
background-color is for the color but background will do the exact same.
fucking
ok
in this case
Go to your bots page.
Click edit @silver spear
dont use tutorials
Mine with a tutorial
ok
D:
i clicked edit
the only 'tutorial" you can use is the official discorD.js guide
others r shit
You need to be logged in
i am woo
only you can see this page
wait nvm
lol
h1 {
background-color: lightblue;
}
that seems to be the right
because thats HTML
plz
background-color --> background
and thats css, not html
put it inside <style> </style>
Hello
hi
Are variables shared between try and catch?
My bit
yes pls no
Your "bit"
Is it a 1 or a 0
lul
its a 2 @solemn latch
Quantum computing @misty sigil ?
indeed
how can I prevent return to stop the loop
@wet dove we got ads above
@midnight blaze thx
@restive pebble ?
yeah, I thought it wouldnt be too hard, I mean, all you have to do is save screenshots and transform them into a gif
just dont make too many fps so performance is good^^
ill make it configurable
on a bot page, I know how to change the <body> color though, but how do you change it for the description
Inspect element, get the class.
Then in css
.classname {
Stuff here
}
#botdescription iirc
i couldnt
.content {
background-color: black;
}
does discord automatically makes the link into an attachment?
yes
does discord automatically makes the link into an attachment?
@restive pebble wdym
ok
Is there a way for a bot to have a daily counter like its been x days since ive been created
yes it is
The id of the bot is a snowflake, snowflakes have timestamps for when things are created @versed igloo
Or if you have the user, there may be a created at timestamp depending on the lib
@restive pebble if you manage to do that gif command, it would be amazing. I dont think anyone else ever done something like that 🤔
Well it was just an example i really just need something like its been x days since Nintendo realeased a new game
rendering html
Yeah not hard
I will test it, let me know when u are ready
woo, he is doing animations, not only rendering html
ok, good for you xD
Ok so how do I set up a days since
Gif encoder 2, combined with pupetter or any html renderer
Get the timestamps for each, get the difference.
Convert into days
yeah, I see, you are very experienced in this field. Your bot is cool
Oh ok
do iframes work for bot descriptions or..
Yep
is preview just broken
pangloss
yes?
i made a type error
xD ok, np, take your time with your bot man
lol
Who knows a free bot hosting thingy which is NOT heroku
Glitch.
But they are taking down bots
Wdym
Its against glitch tos
Ah
glitch isnt free anymore, they even blocked pinging your server
🤷♂️
so what do I use ;-;
Google and aws have some free trials
wait, what is against tos ?
Pinging services
how so?
how is pinging your own server against tos
how would you find the person who reacted in awaitReactions
glitch isnt free anymore, they even blocked pinging your server
They made it against tos when they did that
Pinging to make your website 24 7 without paying for their 24 hour service is against tos
I thought u were talking about discord for a second, sry^^
but it being against tos is not new
what new is that they blocked, so you are not able to do it
Hmm I wonder what they updated their tos for then
Because it happened the same day
🤔
can anyone help me have this code save the channel ID's into an array instead of a new file every save? https://sourceb.in/89740891ea
ok another quick question I have the last direct day now how do I have the bot do the equation than send the result
im trying to make a days since bot
Check the docs
I'm making a bot command called search, The search command is done but you need to catch it with a command but im not sure how to do it, It sends a random embed every time or a you found no hostile mobs, How would I make a catch command [discord.js v12]
like 7/20/20 - 9/10/19 = days since
what
those are dates
yes?
so i need how many days in between dates
@solemn latch library of code = better & safer glitch if you rly want free hosting
probably me :p
hello I was wondering if you have two bots and the two bots have the same code, for example, .play, is there a way to prioritize one bot to the other to execute that command?
you own both bots?
no
How to make a python discord bot on Android?
1 question....
Why is my nickname White_Devil
android isnt really a place to host a bot.
its possible, people do it, but it wont be a great choice
@solemn latch ok
android isnt really a place to host a bot.
its possible, people do it, but it wont be a great choice
I just tried doing that about 2hrs before I joined. Trust its a real pain
@commands.Cog.listener()
async def on_dbl_vote(data):
channel = self.client.get_channel(734610683718664203)
embed = discord.Embed(
colour=discord.Colour.purple(),
description=f"{data}"
)
await channel.send(embed=embed)
this doesn't work and doesn't show an error
are you sure the webhook is properly setup'd ?
i need a webhook?
oof
i'll do that
@commands.Cog.listener()
async def on_dbl_vote(data):
async with aiohttp.ClientSession() as session:
webhook = Webhook.from_url('https://discordapp.com/api/webhooks/734809239486464040/DfqCd8VQbsUxUcRY-a3JfB9xMDT0B3IJQ_5jdzsrzb96xVbzEC5d3bVGAc0pFmNyKL02', adapter=AsyncWebhookAdapter(session))
embed = discord.Embed(
colour=discord.Colour.purple(),
description=f"{data}"
)
await webhhook.send(embed=embed)
will this work?
i can only vote every 12 hours
so I need to get it right @tight plinth
hi i already done the a?avatar feature but idk how to do the a?avatar <your id> .
Hi can someone help me with my code?
This is my code
jsfile.forEach((f, i) => {
let pull = require(\`./commands/${f}\`);
client.commands.set(pull.config.name, pull);
pull.config.aliases.forEach(alias => {
client.aliases.set(alias, pull.config.name)
});
});
It throws an error
TypeError: pull.config.aliases.forEach is not a function
at /storage/emulated/0/project-genesis1/index.js:25:23
at Array.forEach (<anonymous>)
at /storage/emulated/0/project-genesis1/index.js:22:9
at FSReqCallback.oncomplete (fs.js:163:23)
ATTATCH_FILES includes sending images through embeds correct?
It doesn't.
@hoary lily - One of your jsfile doesn't have a defined alias array.
const { config: { aliases } } = pull;
const hasAliases = aliases && Array.isArray( aliases );
if( hasAliases )
aliases.forEach( ...
Or cleaner:
( pull.config.aliases || [ ] ).forEach( ...
Or, if Node 14.* use optional chaining.
anyone here know how to make temp mute , even if i restart bot it still works?
what are you currently using?
mongodb
setTimeout()?
Timeout doesn't address bot restart
Ik but their bots usually don't restart
They likely do
so i am hoping to start workin on a bot, but was wonderin if anyone could help me figure out if my idea would be even possible
can someone help me here
let sortSelection = { Money: 1 };
let test = bot.db.collection("Profiles").find()
test.sort(sortSelection).toArray(function(err, result) {
if (err) throw err;
console.log(result);
})
``` i want to just show the money not the user id ect.
so i am hoping to start workin on a bot, but was wonderin if anyone could help me figure out if my idea would be even possible
@heavy flame what's that
.
@earnest phoenix - I would look into "Cron". There are great Cron packages designed to execute tasks (such as removing a mute) on a schedule that accept Date objects.
When someone is muted, I'd generate the Date they're to be unmuted, start a Cron job, and store the Cron syntax/string (or just the unmuted Date) in your DB. When someone is unmuted, remove it from the DB.
When the bot starts, grab all Cron jobs from your DB.
ok i will see
@opaque seal I write on a website as part of an RP group and we have several characters we each write, along with 'common places' to have characters, things for them to do such as this; sometimes we like to just let things be random for place or have a random activity happen; could a bot be potentialy written to allow for the imput of say two writer names (or one character and a writer, or just two characters) and the bot pick out a character and location and/or action? I know you would haev to program all the locations, actions, characters, and writer in if possiable, but could it be possiably set up to function that way?
Also appolagies before hand if that doesn't make any sense
(async()=>{
let sortSelection = { Money: 1 };
let test = await bot.db.collection("Profiles").find()
test.sort(sortSelection).toArray(function(err, lb) {
message.channel.send(lb)
})
})()
``` not working please help
@heavy flame this seems to be not so easy to make. but its possible
don't mind not easy so long as it seems liek something that /could/ work in theory
@heavy flame so, if I understood correectly, you want a "random" generator of specific things? If that's the case then yes it's possible
@paper phoenix thank you so much sorry for late response I'm trying to fix it. Thanks a bunch bruv
can ppl please help me
@opaque seal yep pretty much I supply part of the input and based on what i give the Bot it gives me the rest of the random back
ohh just a "database " thats easy
or wait you want to generate a random place from snippets if i see it right?
someone please hwlp
shiny thanks much just wanted to make sure the whole concept didn't seem to out of reach cause sadly I'm only familiar with a few bots so not sure of their entire capacity
this could end in ML terretory
someone please hwlp
@earnest phoenix with what
;-;
(async()=>{
let sortSelection = { Money: 1 };
let test = await bot.db.collection("Profiles").find()
test.sort(sortSelection).toArray(function(err, lb) {
message.channel.send(lb)
})
})()
``` this
i can’t read
sortta like a data base I guess, but it would be one that I only fed part of the info too and it returned me random results for the rest where I have varrables of A, B, C, & D I give it say 2 As, 1 A & 1B, or 2 Bs and it returns me a random C and/or D
sorry
;-;
Hey
I'm working on a "language" command for my bot, because it's in french and i want the users to be able to switch between french and english
hang on
but the problem is, i don't know how to make it save the language for each guild (server)
@earnest phoenix are you getting any errors?
@cobalt eagle use a database and store settings in there
@earnest phoenix show code
@earnest phoenix in the console?
@lusty quest ok i'll try that
try catch
?
try{}catch() ??
@earnest phoenix
try{
code .. . . .
}catch(e) console.log(e)
?
do i really need to use the mysql thing ?
@lusty quest @opaque seal thank you both
@cobalt eagle yes
ok !
@cobalt eagle there are many ways. you could use a json based database(not recommended) or SQLite or SQL or NO-SQL based DBs
there are many databases to choose from @cobalt eagle
@lusty quest or maybe MongoDB
mongodb is NO-SQL
i'll go with mysql
what
@cobalt eagle ok
@earnest phoenix show cose
Code
Show me ur code
Yes
only the command file
ONLY the Command file
also, another question, i have command logs in the console, how can i put them in a file ?
maybe it could copy the logs before closing the file
Oh boy
:l
Omg why don't you use a handler it's literally 4 lines
:l
my index is 200+ lines and i have a command handler 
So ur command handler is bad
my index.js is 20 lines
No, in the console i have a log of command used like this :
you might be obsuring your code then 
My eval command doesn't seem to work anymore. When I eval "message.channel" or doesn't know what "message" is, while the bot is in a "try" function and in "index.js".
if (message.content.startsWith("!eval")) {
if (message.author.id !== "207557174660956160") { return; }
try {
let codein = args.join(" ");
let code = eval(codein);
if (typeof code !== 'string')
code = require('util').inspect(code, { depth: 0 });
let embed = new Discord.RichEmbed()
.setColor(0x0078D7)
.addField(':inbox_tray: Input', `\`\`\`js\n${codein}\`\`\``)
.addField(':outbox_tray: Output', `\`\`\`js\n${code}\n\`\`\``)
message.channel.send(embed)
} catch(e) {
message.channel.send(`🆘\`ERROR\` \`\`\`js\n${e}\n\`\`\``)
}
}```
@twin marsh first replace RichEmbed with MessageEmbed everywhere in the code
if he ise v11
no
I'm in 11.6.4
no
v11 will be depricated
It has always worked before
idk i were still in v11 and everything stopped working until i updated to v12
v11 untill october
idk i were still in v11 and everything stopped working until i update to v12
@cobalt eagle weird, my other bot, @ocean carbon is also still in 11.6.4 and functions completely normal.
Yo
It will work but no more future updates
How do i upgrade from discordjs 8 to disvordjs12
WHAT
DJS 8
discord.js 8?!
WTF
Go to discord.js.org and look at every single page to upgrade
I have an very old project in my harddisk
starting from 9 to 12
why are you making a new collection for each command alias @earnest phoenix wouldnt it be better to have one for each command?
🤔
then check for aliases
nope
hmmm
idk
@earnest phoenix djs mod
What time is it for you
Its totally not in the picture
😳
how to edit a embed ?
What would be the proper way to upload 150 emojis to a guild?
since the rate limit is kinda harsh
well you can upload multiple in the client at a time
it's just slow
cant bypass the ratelimit
so its really just the ratelimit being harsh to me
How to check
If my bot has specific perm
I wanna check if he has Manage emoji
Perm
Uhhhh
read docs
^
oop
Reach for the docs
no.
ok
hey is it possible to have a bot get an attachment url from an attachment put into a channel?
Yes
<message>.attachments
Its a collection
can anyone help me with my fucking leaderboard as i have no clue how to amke one and also tried @torpid forge code and doesnt work
wait
i dont mean it UPLOAD something
you don't just use other people's code wtf
i mean i post a picture of flowers
<message>.attachments
you don't just use other people's code wtf
@pale vessel no he was helping lmfao
you don't just use other people's code wtf
facts 100
and it replies with the cdn.discordapp.com/attachments(blablabla)
Np
sorry if my question seemed a bit "noobish"
🤷♂️
stop being a help vampire and rely on other people to help you
he uses mongodb
thing is it worked for him but it returned as Object object and he got confused and said iT dIdn'T wOrK
fuck off
mk
dunno
what do you mean by you don't know
@pale vessel and @pure lion i used msg.guild.me and it worked
yes since hasPermission is a member attribute
guild#me is your bot as the guildmember
yes feel free to
ok
my nitro will run out
i would troll my friends
please do
😳
for bot verification
if you're under 18 do you need like a guardians consent or anything of the sort
dont think so
No
so i can just submit it on my own
yeah
well even if it did require guardians consent
you need to be in the legal age in your country to make contracts
depends on the country
Depending on your state starting from 18
but idk for the US
in germany it was 15 IIRC
you can get married in the us at 16
If you're below that, yeah, you need a guardian's consent
doesnt matter when you can get married
marriage is a contract is it not?
it is
it's about when you can sign a binding contract without the consent of a parent
18 to make sure. but you could google it
It's 18 minimum in the US
is it?
Varies for each state
^
May vary*
but no state is lower than 18
that's a federal thing
this is US only
other countries have different ages of majority
OK
so im still CONFUSED
what age do i have to be to get verified
I am a 13 year old male who will turn 14 in about a month and a half
is that good enough?
with guardians consent?
Aye
Below 13 is a no no
13-XX (legal age in your state) is a yes with guardian's (official?) consent
XX-YY is a big yes
honestly, contact discord support
i did that
and they said just get my parents to make an account
and then just get them to verify it 
parent/guardian
Official guardian
im good
sisters are not typically legal guardians
I don't think sister counts as official guardian
Yeah
well i mean
she's done my school things instead of my parents
you know
the things where they're like
"ask ur parents or guardian to sign this this and that"
so
someone still needs to explain why my IQ is so high
it's probably alright

If your school accepted that, Discord might as well, but there's no real guarantees
also i dont get it
why is discord doing this?
things were fine just the way they were before verification
muahaha
its ok
im pretty sure the conversation ended
['cooldowns', 'rateLimit'].forEach(x => bot.x = new Map()); doesn't create new Maps and I don't understand why not.
It literally overwrites bot.x
bot.x is literally bot.x, try bot[x]
thanks guys, it workes 👍
help
how i can parse String to Boolean
"true" to true
how
Can A Command Called "Spinbottle" fall under NSFW even though its not aimed to be a lude command
ok
hi guys, without coding knowledge i'm trying to start fresh creating a bot and following the steps. but i stuck at the command part which i need to put "npm init -y" so i can download discord.js through NPM, any help please?
install node
You need to install node.js
one QA
@balmy raptor this might come off as rude but you need to hear this, i suggest you learn programming first because your gonna always run into errors without knowing how to solve them you're gonna need to learn how to use NPM and you're gonna need to learn what an API is and how to read documentations
after that you can start bot dev
if i have
bot.guild.get(message.guild.id).logs is true
so how i can change it to false
bot.guild.get(message.guild.id).logs.push(false) ?
Hello!!
Hi?
@client.event async def on_message(self, message):
if message.content == "<@643881402227621898": if message.guild.name:
await message.channel.send(f'Hi there. I am {self.user}. Current prefix is of {message.guild.name} is `-`') else:
await message.channel.send(f'Hi there. I am {self.user}. Current prefix is of {self.user} `/` or mention prefix.')
i got this error
app[worker.1]: await message.channel.send(f'Hi there. I am {self.user}. Current prefix is of {message.guild.name} is `-`')
app[worker.1]: IndentationError: expected an indented block
why
@earnest phoenix = false ?
its not an array, why would u use push?
when cloudflare had that issue my discord bot went offline and didn't come back online until i manually restarted the service. does discord.js not auto reconnect?
the issue wasn't with discord, the app was down. so there was no way for it to reconnect to the non-existent websocket
so it will only reconnect to the same socket?
and yeah, discord does auto-reconnect by default, unless you manually changed it in the clients options
im not too sure, but i dont think so
wait
yes
it does
my js websocket connects to the same one everytime anyways, so im guessing its the same with discords
https://discordapp.com/api/auth/login this is the url that my app was having issues with when cloudflare went down
i guess it was trying to reconnect and couldn;t
it only tried once though
@hazy girder python forces you to indent your code, press tab on ur keyboard before both await message.channel.send
if(!mutedRole) {
message.guild.roles.create({
data: {
name: 'Muted',
color: 'BLUE',
}
})
let mutedRole = message.guild.roles.cache.find(x => x.name === "Muted")
message.channel.overwritePermissions(mutedRole, {SEND_MESSAGES: false })
}
i want to add muted role to text channel permission
but it didnt work where is the problem please
data: {
name: 'Muted',
color: 'BLUE',
}
}```
remove data
name: 'Muted',
color: 'BLUE',
}```
oh
@earnest phoenix just use == and not ===
the command create the role but didnt add it to channel permissions
also await the message.guild.roles.create
why not the === ?
if anything, you should use === instead of ==
most cases anyways
use updateOverwrite instead
message.channel.updateOverwrite(mutedRole, {SEND_MESSAGES: false })
so i have this code
1 import dbl
2 import discord
3 from discord.ext import commands
4 import asyncio
5 import logging
6 class TopGG(commands.Cog):
7 """Handles interactions with the top.gg API"""
8
9 def __init__(self, bot):
10 self.bot = bot
11 self.token = 'token' # set this to your DBL token
12 self.dblpy = dbl.DBLClient(self.bot, self.token, webhook_path='/dblwebhook', webhook_auth='password', webhook_port=5000)
13
14 @commands.Cog.listener()
15 async def on_dbl_vote(self, data):
16 print("HIHIHIHIHI")
17
18 logger.info('Received an upvote')
19 print(data)
20
21 def setup(bot):
22 global logger
23 logger = logging.getLogger('bot')
24 bot.add_cog(TopGG(bot))
``` and when i go to test it by upvoting, nothing happens anyone have any idea why?(password and token are replaced)
name: 'Muted',
color: 'BLUE',
})```
ok ill try
You press test, don’t upvote @fathom patio
are you getting any errors?
print something at the top of the listener, check if anything logs
wdym at the top of the listener?
nope
show your code
well $yes is a guild object
$yes->id is the guilds ID
and im getting the data from my sql database
the one called guildconfig
what does $yes->id do? is that how properties are accessed in php?
you're trying to define a double variable
$variable = "something", "somethingelse" is not valid
you're not even using the $serv variable anywhere
ITS NOT FINISHED
chill....
lol ok
ive only just added the select * thing
anyway what database wrapper are you using? mysqli?
is there anyway to get upvotes without using a webhook?
no
@trail trout those promises are static, they are never updated. everytime you run the postStatistics function, you will be posting the same number as before again
also, should be client.shard.ids[0]
also, you're basically sending a duplicated server count
if you send the shard information, it expects the server count for that shard only
not the server count for all shards
i think thats how you do it https://cdn.vurighosting.com/u/lWPx60.png
my eyes
it doesnt work
$stmt->execute();
$result = $stmt->get_result();
``` also:
-ask2ask
Don't ask to ask.
Just ask your question, it wastes time if you say "i need help" or "can someone help me?" instead of just saying what the problem is. Save your time and other people's time and just ask the question.
Please read https://dontasktoask.com/ for an explanation on why this is an issue.
lol
lol
if you're doing multiple operations, use transactions
or just have it the database do it for you if possible
for example SELECT * FROM bla WHERE id IN (array of all guild ids you want to fetch)
btw if you're just starting, better go for PDO than mysqli
save the pain of switching later
frick now i have to check if the bots in the server
Map(1) { '701141875628834906' => { prefix: '/', logs: 'false' } }
this website is gonna take like 60 years for people with hella slow internet
bot.guild is not a thing
ah you defined it yourself
yes
if (bot.guild.get(message.guild.id).logs == 'true') {
but idk why this is not working
console.log(bot.guild.get(message.guild.id))
Map(1) { '701141875628834906' => { prefix: '/', logs: 'false' } }
this
if thats the actual result, then it should work
hi what client/driver should i get for postgres
just a question why are you using strings over booleans?
node.js
this one seems good https://www.npmjs.com/package/postgres
but then there is pg
https://i.imgur.com/P9tOhgr.png what is this
F
how do i use this https://www.npmjs.com/package/is-odd
ok are u being serious
read the docs?
im making my website if you decided to take 5 seconds to look up in the chat
is this the easiest way to check if a number is odd?
is there a easier way
this seems like the right way cause it has 121m downloads
npm downloads is fucked
int % 2 !== 0
yup
its like very inaccurate
then why is there a library with 121 million downloads
its got to be more than that right?
because js devs are stupid
ok so how do i check if a number is even then?
what does the % sign mean?
Lol
funniest shit i've seen 
yup
this is probably gonna sound dumb
but
is there a maker thing to make tos? like with licenses there is
this always prints 1 (true) in the console and i know for a fact my bot isnt in every guild i have admin in https://cdn.vurighosting.com/u/IvUwa6.png
there are many tos and privacy policy generators
ohok
oh yea also
many are pretty basic, but offer customizability for a small fee
i want to use that postgres package since it seems simple and nice bug pg seems to be better
smfh
does anyone know why sometimes my bot stops connecting to my database? I'm hosting the bot on heroku and using mlab to host the database everything works fine for days and then suddenly the database keeps throwing a timeout error, I then restart the bot and everything works again, why does this happen?
im going to blindly point fingers at heroku since heroku IS NOT a bot hosting service and shouldnt be used for such
really? that's like the most popular option I've seen, they run node and the bot is written in node, what's the issue?
heroku isn't for websockets
Is there anyway to do this? Im trying to have a health bar made with emotes
I want to repeat the emote based on the health for example:
❤️ ❤️ ❤️ ❤️ ❤️ for full health
❤️ ❤️ depending on the rage
So in otherwords, is there a way to repeat the emote based on a number?
Without having to do if statements
yes js
so what's the alternative? I'm hosting it there cause it's free
do n.tag host on #265156322012561408 @unique shore
wait its that simple, thanks! does it autojoin it?
but if no other alternative is free I'll just restart the bot every few days
for example if u do
'hello world!'.repeat(2)
does it respond
hello worldhello world?
indeed
@cunning gorge https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/String/repeat
Thank you!
np
i recommend using https://beta.libraryofcode.org @unique shore. its a free host
and good
thanks @opal plank and @digital ibex
i figured out how to make clock

np
good 4 u
@digital ibex for some reason I can't access their site
wdym?
the subdomain is beta
good
bad gateway
yeah still same error
yeah no problem
ok
what is member and what library are you using
js
That's a programming language; not a library.
member.id will return the member's user ID. If you want the username of the member, you should use member.user.username instead.
thank you!
your welcome, though your code may throw an error if it defaults to the client user instead.
I want to set like a status for my bot
But I’m not sure how
I’ve tried a few things like setPresence and that and it’s not working
which lib?
I assume you're using Discord.js
Yes
How are you trying to set the presence at the moment
@digital ibex how would i look if the user has perms for a specific guild
Thank you

sup
So the bot like
Sends the same message like spams
but when I get a new token it fixes it
let serverinfo = req.user.guilds.filter((e) => e.id == req.params.id && e.permissions & 0x00000008)
works right?
dont spam
idk, try it
if its big, put it on hastebin
ok
I’ll send the code
When I regen the token it fixes it so idk why that is
its likely because you are triggering spam flags
but both work ig
aight
likely only command
Ok
how r u doing it?
unless other commands also send multiple times
ya des Français
then its likely the handler(assuming you got one)
All commands do it ye
then send me the handler
Okay
Question: for the repeat function
I have a duel command where if the health goes into the negatives they lose:
However, when im repeating the health emote its going to break if its in the negative.
Is there anyway to restrict it if its negative to no hearts but for the rest Math.ceil(health)?
@digital ibex it shows some other servers if i do 0x08 but if i do 0x00000008 it works fine so if it works it works