#development
1 messages Β· Page 1112 of 1
yes
I think regex then
Get each match of groups of digits, and replace with match
lol wut
uh
that's still bad coverup 
no idea why its showing that
it detects git in your process's folder i guess
4320 restarts since you first used pm2 start on it
Only a few
im using a shared host, might be everyones
no its process specific restarts
if you have syntax errors your process gets stuck in a boot loop, which increases restart count a lot
also if you use watch mode
Watch mode gets a lot of restarts
in an ejs file, in the script tag i've got the ejs element thingy
which is causing a syntax error
you can also add your own metrics which is cool
oh
and pretty easy
Practically grafana
for example ```js
const io = require('@pm2/io');
const guildsMetric = io.metric({
name: "Guilds",
id: "MsgViewer/Guilds"
});
client.on("guildCreate", g => {
guildsMetric.set(client.guilds.cache.size);
});
client.on("guildDelete", g => {
guildsMetric.set(client.guilds.cache.size);
});
^ pretty much how I setup prometheus.
Same dealio, just update the metric when things change
im probably gonna move to grafana eventually
but its more work setting it up
you use grafana and prometheus together right?
holy shit is there an eris fork with less connection issues
prometheus gathers stats and saves them, and grafana reads them into a dashboard?
Exactly
eris being eris :P
Prometheus server stores it, and you add a Prometheus client thats pretty much just a webserver.
The prom server will scrape the prom client every x seconds and store it
what about the overhead of running those two giants 24/7
I actually have no idea.
My concern was disk space
you can also add your own metrics which is cool
@quartz kindle what about grafana? is there any npm package for that
@earnest phoenix new Discord.MessageEmbed -> new Discord.MessageEmbed()
I'm storing data every 30 seconds, with like 30 metrics. Its quite a lot of data to store for long
30 metrics per process i track* plus all the defaults
Hi
how do i slice until a certain string in discordjs
how do I use split
string.split(separator);
split a string into an array, separated by separator
here is the error I got earlier when my bot on Heroku suddenly started going offline 2020-08-02T22:28:23.443212+00:00 app[worker.1]: channel = Channel(server=self, **c) 2020-08-02T22:28:23.443281+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.6/site-packages/discord/channel.py", line 89, in __init__ 2020-08-02T22:28:23.443499+00:00 app[worker.1]: self._update(**kwargs) 2020-08-02T22:28:23.443534+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.6/site-packages/discord/channel.py", line 116, in _update 2020-08-02T22:28:23.443763+00:00 app[worker.1]: self._permission_overwrites.append(Overwrites(**overridden)) 2020-08-02T22:28:23.443813+00:00 app[worker.1]: TypeError: __new__() got an unexpected keyword argument 'deny_new' 2020-08-02T22:28:23.453359+00:00 app[worker.1]: Task was destroyed but it is pending! 2020-08-02T22:28:23.453629+00:00 app[worker.1]: task: <Task pending coro=<ConnectionState._delay_ready() running at /app/.heroku/python/lib/python3.6/site-packages/discord/state.py:173> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x7f46ca808d68>()]>> 2020-08-02T22:28:23.547149+00:00 heroku[worker.1]: Process exited with status 1 2020-08-02T22:28:23.586416+00:00 heroku[worker.1]: State changed from up to crashed
deny_new is a recent thing, check if you library needs updating
@digital ibex i mean like how do I find the string in that
like I have a specific string I wanna find in that
show an example of a string
im trying to find the start of a link so "https://" or "http://"
something in quotes
('http') ?
a = "piejvpiwpwe wevwpew ehweip https://bla.com ouhgowuehgouwheg";
url = a.split("https://")[1].split(" ")[0] // bla.com
regex would be better for this though
Regex would be slower no?
regex is slower for almost every case
depends on the situation
idk how to use regex at all
same :p
same :p
I've been learning over time. Worth learning imo
i mean, just the basics
^
I've been trying to make my own regex every time someone asks
I just know how to code with normal python
Even if I dont give them the regex
whats the best way to implement a text mute command? make a Muted role on join and deny it permissoins in every channel in the server? then check for new channels and remove permissions as needed?
or is there a better way
i forgot how you make an aysnc function out of nowhere
without defining it as a function
how u gonna make a function withjout defining it
there was something like
I should update? Python or Heroku?
new Promise()
a self executing function?
ye ye
(async () => {})()
I was mostly there
whats the best way to implement a text mute command? make a Muted role on join and deny it permissoins in every channel in the server? then check for new channels and remove permissions as needed?
@restive willow
string.indexOf(string)
array.indexOf(item)
@restive willow i guess yes
the only other alternative would be to ovewrite permissions for that specific person when muted, but thats not very efficient
occasionally my bot loses its custom status and i have to set it back to what it was before manually; why does this happen?
disconnections and reconnections
Isnt there a connected event or something?
The ready event is something else right?
Or is it just ready
the ready event may fire multiple times on hard disconnects like invalid session
Ah
how do i watch for a disconnect
do you have a dynamic status? that shows guild count or something?
no, it's static
then set it in the client options
new Discord.Client({presence:{activity:{name:"bla",type:"WATCHING"}}})
what about with d.js-light
same thing
second param?
if you set the activity in the client options, will always be used when reconnecting
there is no second param
all client options are first param
inside an object
π ty
@solemn latch i am shard, the emitter of death
How can I do a function via an array?
I tried
['function_1', 'function_2', 'function_3'].forEach(x => x(bot) );
but -> TypeError: x is not a function
[() => {}, () => {}, () => {}].forEach()
[() => {}, () => {}, () => {}].forEach()
??
lmao
May it be possible to give me an example?
f1 = bot => console.log(bot.token)
f2 = bot => console.log(bot.users.cache.size)
f3 = bot => console.log(bot.guilds.cache.size)
[f1,f2,f3].forEach(f => f(bot))
Thank you !!
Does anyone know how to make / have a website for their bot? I'm not very good with UI design. Is their a template or something?
am i stupid https://modeus.is-inside.me/ctnc36gf.png
Yes
that's right
I'm sure you can find some basic templates online.
But you will have to do a lot yourself @earnest phoenix
What library are you using? You'd need to remove permission for everyone (usually the @ everyone role) to view the channel while granting permission to admins, mods, and explicitly the author.
How to change permissions of a channel?
what lib
When creating the channel (https://discord.js.org/#/docs/main/stable/class/GuildChannelManager?scrollTo=create), you can specify the options.permissionOverwrites field.
Which takes an array of objects that should conform to this structure: https://discord.js.org/#/docs/main/stable/typedef/OverwriteData
There's an example on the first link.
good job
denying VIEW_CHANNEL should do the trick. Is it not?
The everyone role id is the guilds id
@pale vessel how would i even make my array into that
[[":tools:", ":lock:", ":pencil:"], "nl", [":zap:", ":blush:"]]
how do you get those emojis?
all right wait
const lines = [];
let line = [];
for (const badge of badges) {
if (badge == "nl") {
lines.push(line);
lines.push(badge);
line = [];
}
else line.push(badge);
}
if (line[0]) lines.push(line); // remaining```
i have a bot
how can i make live server,member count on my site with php
@stray portal so
can you not spam your question
what is your problem
when the channel is created, do the permissions properly set up
aka right click the channel and see the permissions column
Yes, and your issue is when the channel is created (when running the code you showed above), everyone can still see the channel, correct? And that's why I'm asking for verification.
i need share my bot stats for website
@pale vessel so basically https://modeus.is-inside.me/mZ8nT0eY.png
To make staff also see it, you'd need to specify the roles (assuming you're using staff roles) in the array of objects as well
wait i don't push nl
I cheated the system
@knotty steeple did you push nl
let me try on my own
i did yes
What are you doing
Uhh. I can't test my Bot in #commands / #265156322012561408 channels...
i want a newline every 3 badges
because it isnt here
its not approved yet
can I ask why you use map for that instead of something like foreach or just a regular for loop?
This is not the only problem
just curious tbh I doubt that'd be the issue though lmao
just curious tbh I doubt that'd be the issue though lmao
@amber fractal it was
AAAAAAAAAAAAAAAAAAAAA
does anyone have a bot website template or something
problem: its every 2 badges
and idk why
actually
no
a badge is missing
what
lol
does anyone have a bot website template or something
@earnest phoenix id like one too lol
so +1

Try a regular for loop instead of that for of
only thing I could think of
so something like
for(let i = 0; i < Object.keys(this.bot.lib.badges.all).length; i++){
if(i !== 0 && i % 3 == 0){
lines.push(line)
lines.push("nl")
line = []
}else {
let cur = Object.keys(this.bot.lib.badges.all)[i]
line.push(this.bot.lib.badges.emoji[cur])
}
}
``` maybe
only because I could see there being a problem with using indexOf
because it's not guaranteed to be the same every time
man
that counts 4 though, not 3
for(let i = 0; i < Object.keys(this.bot.lib.badges.all).length; i++){
let cur = Object.keys(this.bot.lib.badges.all)[i]
if(i !== 0 && i % 3 == 0){
lines.push(line)
lines.push("nl")
line = []
}
line.push(this.bot.lib.badges.emoji[cur])
}```
then this would probably just be better
i am actually going to cry
or ```js
for(let i = 0; i < Object.keys(this.bot.lib.badges.all).length; i++){
let cur = Object.keys(this.bot.lib.badges.all)[i]
if(i !== 0 && i % 3 == 0){
lines.push(line)
lines.push("nl")
line = [this.bot.lib.badges.emoji[cur]]
}else {
line.push(this.bot.lib.badges.emoji[cur])
}
}
but these have the same effect
ok im adding u 2 as contributors
could it be because it never gets to the 3 again
for(let i = 0; i < Object.keys(this.bot.lib.badges.all).length; i++){
let cur = Object.keys(this.bot.lib.badges.all)[i]
if(i !== 0 && i % 3 == 0){
lines.push(line)
lines.push("nl")
line = []
}
line.push(this.bot.lib.badges.emoji[cur])
if(i == Object.keys(this.bot.lib.badges.all).length - 1) lines.push(line)
}
``` 
bruh bruh bruh
the 1 before the blush is missing
if you log cur right after you define it, do you see all of them?
how do i see how long someone has been boosting for
It might be easier to loop through Math.ceil(length / 3) with arr.slice(3*i, 3*i+3)
all of that could be like 3 lines
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
and a hell of a lot less readable
idk its more obvious to me what its doing but thats just me
idk what ceil is
@zinc condor in what lib
it rounds up
opposite of floor
so 2.3 -> 3
it's floor but up
imagine if we weren't explaining this in a coding context
"what's ceiling"
"its floor but up"
@amber fractal doesnt matter, i just wanna know if its possible, i use my own modified fork of discordgo
I know that you can because d.js does and https://oliy.is-just-a.dev/mpvwd_5376.png
you can always use the REST api
https://modeus.is-inside.me/HBmAySvj.png hopefully it doesn't break, thanks π
Whene a bot in 75 serveur how many time to discord send you a message in dm
Neko girls are actually coming to life if βfundedβ
so anyway js const arr = this.bot.lib.badges.all const n = Object.keys(arr).length let height = 240 for (var i=0; i < Math.ceil(n / 3); i++) { await fillTextWithTwemoji(ctx, arr.slice(3*i, 3*i+3).join(' '), 48, height) height += 30 }
lmao i just realized it doesn't check if the user has the badge anymore
Hey, any dotnet devs know what my issue here is?
When I attempt to access my SQLite db I get, Unable to load shared library 'SQLite.Interop.dll' or one of its dependencies.
I'm using System.Data.SQLite and attempting to publish to linux-arm64
I restarted my bot on heroku. and now I'm getting this. I'm just so confused where this is coming from.
it went offline a few days ago. it's been running for years. and now i restarted it in hopes that it would work again.
when the num of the reaction change,will the event discord.on_reaction_add(reaction,user) be triggered?
yes, if someone new reacted
thanks
How to code
hayper please #memes-and-media
HOW CODE
An auto drivibg car

Am working at tesla and no know how to code
wrong place, you know this, why not stop?
pay someone on fiverr
pay someone on fiverr
@indigo geyser good idea
it went offline a few days ago. it's been running for years. and now i restarted it in hopes that it would work again.
@gilded dawn as a question do you use free Dynos?
@karmic compass yes!
Damn
Just as a question since Iβm starting out there
So ty
Btw at the bottom it says a type error, idk what it is but itβs there
Yeah. :/ wish I knew what the type error meant lol.
If ur starting out Heroku is kinda weird that way. I have used it for years tho so it does work but then stuff like this can happen especially if u have free dynos.
Is there a way in discord.py to have my bot announce?
Basically I wanna say that I plan on taking it down for a short amount of time
You should announce it in your bots support server.
Announcing in each server, would probably be api abuse.
^ Along with Discord making public announcements usable, it's better in every single shape and form
Yeah my bot got more popular than I expected and I cant maintain it yet
I would do a for loop for the guilds table and msg them all if you dont want to announce on your support table but I would still not recomend it because of discord spam
@earnest phoenix suggest making a second bot and don't publish it for testing purpose.
@unreal bluff I did do that
can i have some help?
however it's become costly server wise
my db costs are rising and becoming unaffordable
Testing isnt the issue it's cost
i am using a role giving command, and i have a .then()+.catch() command in case things go wrong, however it assigns the role but it only displays the message for if there is an issue
here is my code:
member.roles.remove(role).then(message => {
message.channel.send(`${theUser.tag} no longer has ${roleName}!`)
}).catch(err => {
return message.channel.send('An error occured while trying to remove a role from this user!')
});
Your doing remove.then()
Remove returns a promise of guildMember.
So your message variable is actually a guildMember
how do i fix it?

Don't assign guildMembers as a message?
help vampire
its 1am can i have like an example
Its late for me too
because my brain is slower than the decay of the economy or something
If your not in a state of mind to program, you probably shouldn't waste people's time asking questions
if i'm thinking correctly then do i have to change .then(message) to .then(role) or something? or should i just wait until i manage to find another solution
It returns a guild member
Not a role
Nor a message
Its in the link to the docs I posted
Hello all, I am here again with another guestion
how do I check args[0] to see if it is a url from https://imgur.com/ or http://imgur.com/
i came up with a relatively okay solution, would if(member.manageable) {executes the code} else {message.reply('Cannot do this action!')}
@sweet ruin regex
You coulda just set the variable to not be a variable already in use
creepa ya, use regex
Or args[0].includes("imgur.com")
Less pretty but probably good enough for what he wants
so make it say
Malicious what?
Idk why they need to check the website but im guessing it's for user input
if (args[0].includes(https://imgur.com)
again it could still just have that all in the query param
the safest way is to just use a regex, they're pretty easy
you're using js right?
Waste of time imo if your just getting images from imgur
well
what im doing is letting patrons set rank backgrounds
but i want to to be a guaranteed image to save to the database
aka a link
and imgur seems safest
Yeah, waste of time doing regex imo.
Just save the path and attach it back to the url when you get it
to use it in js all you have to do is js someString.match(/^https?:\/\/imgur\.com.*$/)
hmm okay
It's null if it's not an imgur link
Ah Okay, so I need to build a link checker to see if it check if it is null
well no, im just saying the match function returns null if the regex doesn't match
so if someString was a google link it'll return null
How to set a timestamp at footer in discord.js v12
@surreal notch js .setTimestamp()
Ok
that sets the current timestamp
Yeah
You
Okay cool. thank you!
@sweet ruin
alright am here to help, any question
oh okay
So my problem is that
this regex
isnt recognizing imgur links either
it still returns "null" I believe
wait
im a fking idiot
the link provided has an "i" in it!
;n;
Ok so
const URL = require("url").URL;
const url = new URL("https://www.imgur.com/");
const name = url.hostname; // imgur.com
hmmm
excuse the spaghetti code this is practically a year old code but why isnt discord recieving these webhook requests
wbh and wbh2 are both valid webhooks
._.
Hi!
Does anyone know what represents js const collector = message.channel.createMessageCollector() in eris?
let responses = await message.channel.awaitMessages(m => m.content === "yes", { time: 10000, maxMatches: 1 });
if(responses.length) message.channel.createMessage("You said yes :)");
else message.channel.createMessage("You didn't say yes :(");```
@pale vessel isn't there a built in one in eris?
trying to auto purge some channels but it's not doing, solution??
async def auto_purge():
cid = [722442867xxxx, 722767457xxxxx, 722767582087xxxxx, 722767758521xxxx]
for c in cid:
channel = bot.get_channel(c)
def not_pinned(msg):
return not msg.pinned
await ctx.channel.purge(limit=100, check=not_pinned)
auto_purge.start()```
return message.channel.send("Given User is already muted")
}
```
It doesn't identifying that user have muted role or not
@surreal notch is the user cached?
why its not sending the message?
@lusty quest Um what
is the user cached?
also make sure your user is the member object
@stiff stream i just say it straight away. this is a bad idea. if someone now writes Mb as My Bad the bot will start to spam
@stiff stream message.channel.send({embed:prefixerr})
Hello
?
i just realized this, but how does @gilded plank edit the message of the embed to change the timestamp? if you look in #mod-logs it says "yesterday (random time here)" on the footer
luca is open source iirc you can look into the github repo
with shitty code
there is Luca ascii art
@earnest phoenix not edited, that's discord's internal embed code
the bot is just filled with cursed code and memes
if you set the "timestamp" field
what would you set the timestamp to?
@languid dragon did what you said last time we did this
// let req = await import(f.replace(".ts", ""))
// f: "./src/events/messageCreate.ts"
Error: Cannot find module 'messageCreate'
Require stack:
- WHYISITSPICY\Documents\Coding Projects\Economy Thing\src\client.ts
- EXTRAHOT\Documents\Coding Projects\Economy Thing\index.ts
at Function.Module._load (internal/modules/cjs/loader.js:841:27)
at Module.require (internal/modules/cjs/loader.js:1025:19)
at require (internal/modules/cjs/helpers.js:72:18)
at EVENHOTTER\Documents\Coding Projects\Economy Thing\src\client.ts:138:31
at processTicksAndRejections (internal/process/task_queues.js:97:5) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'HOTTER\\Documents\\Coding Projects\\Economy Thing\\src\\client.ts',
'HOT\\Documents\\Coding Projects\\Economy Thing\\index.ts'
]
}
you should make it path relative
i'm assuming you have src/events if you set your tsconfig up correctly, you should be able to import like events/messageCreate etc...
uhh
it's going to try and find a module in node_modules if you import without any directory
does everyone here use .js? lol
i'm practicing typescript
guys
i was try to download quick.db
but
this happen
C:\Users\User\Desktop\DiscordBot\node_modules\integer\build\integer.vcxproj(19,3): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was
not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
can anyone help me?
@sinful sorrel https://stackoverflow.com/questions/41695251/c-microsoft-cpp-default-props-was-not-found Maybe this helps?
il try read
ok
what's the correct command for this?
@tasks.loop(every=datetime.timedelta(hours=1))
how can i specify a specific time under tasks.loop??
guys what is the problem if the error said
if (!pull.config.blocked) {
^
Cant read property of 'block' of underfined
my command handler is commands
Do from wich function is the error coming ?
Could you send the complete error log?
what exaclty is pull? did you use something like quick.db?
Yeah
this is a critical information that help a lot
your query is probably not correctly then
where did you define config for pull?
How set like that if my bot catches some error it will send in that channel in discord.js v12
It's a different structure that's why
@surreal notch
try {
//Do something
}
catch {
//Send message in channel here
}```
I'm using a mysql database but it looks like only one of my shards connects to it - what is the proper way to give all shards access to the same db?
Would I create the connection in the index file or something?
bot.guilds.cache.reduce im using this code for collect all members size from all guild but how t collect members size from channel
how can we add bot reaction on an embed!
message.channel.send(embed).then(react( "π " ))
its also possible that you dont need to set the emoji as a string
ohk
var msg = await message.channel.send(embed)
await msg.react(':thumbsup:');
msg.react('β');
react is not defined
sry you need to pass the message object into then
message.channel.send(embed).then(m => m.react( ":thumbsup: " ))
bot is not taking it's own reaction as on_reaction_add , what to do ??
I've added a on_message command for bot to react to message , and on_reaction add to give roles
this is on_message
if len(set(message.mentions))>= 4:
await message.add_reaction("β
")```
this is on_reaction_add
```if reaction.emoji == "β
" :
if reaction.message.channel.id == 7224428676xxxxxx:
Role = discord.utils.get(user.guild.roles, name="3PM IDP")
await user.add_roles(Role)```
it's not working
i have to add reaction manually for role
o
is this thumbnail(mentioned.user.avatarURL()) ?
@blazing ravine discord.js?
Can someone tell me how to do a person can't warn or mute a person above the role of him in discord.js v12
ye
msg.mentions.members.first() ||
msg.guild.members.cache.get(args[0]) ||
msg.member;
let emb2ed = new MessageEmbed()
//.setAuthor(member.user.username)
.setImage(member.displayAvatarURL)```
but not work
v12: displayAvatarURL()
Can someone tell me how to do a person can't warn or mute a person above the role of him in discord.js v12
@surreal notch
Hey, So I have a new system which is a premium feature system, where people purchase my premium using patreon and it gives them the Premium Role.
But I have a problem with it, when someone has the premium role and uses the command outside of the Attitude Support server, it will run an error stating cannot read property 'id' of null
I didn't know what to do, so I decided to put a solution for now and ask the solution for it later, I putted this solution for now,
if(message.guild.id = "721372685275234436"){
if(!message.member.roles.cache.has("736643325863395331")){
return message.channel.send(embedPErrorTwo)
}
}```
My question is, someone has premium role on my support server, and when he uses the command outside the support server, it will error, how to fix?
Use bot.guilds.cache.get(...) to get your server, then check the roles from there
Where?
What do you mean where?
Like how to put it?
if(bot.guilds.cache.get(...).members.cache.get(msg.author.id) checks if they are in your server
Can someone tell me how to do a person can't warn or mute a person above the role of him in discord.js v12
No
Ok
Just compare the role positions
I have to use >?
But i dont think you understood my problem @true ravine
when someone has the premium role and uses the command outside of the Attitude Support server, it will run an error stating cannot read property 'id' of null
Yeah because your premium role only exists in your server
@feral aspen your code only checks for guilds, however when a user DMs your bot it isn't a guild and thus is guild undefined
Yeah that too
You might need to add a check for that
Personally my bot just ignores all messages in DMs apart from using message collectors
@feral aspen your code only checks for guilds, however when a user DMs your bot it isn't a guild and thus is guild undefined
@sullen harness I have it disabled through DMS
So if the premium command is runned outside the server, what should it run?
Just make it check if it's a guild or a DM
Just make it check if it's a guild or a DM
@sullen harness I have DMS disabled.
Oh
This is the code now if(message.guild.id != "721372685275234436") return message.channel.send("Must be in server") if(message.guild.id = "721372685275234436"){ if(!message.member.roles.cache.has("736643325863395331")){ return message.channel.send(embedPErrorTwo) } }
Here is the pseudocode you need
server = your server
if your server contains a member whose id matches the message author id{
if that member object has the premium role{
//they are premium
}else{
//they are not premium
}
}else{
//they are not premium
}
If you read the docs you'll be able to figure out how to do that in js
I did, I sent the wrong one.
if your server contains a member whose id matches the message author id?
if(bot.guilds.cache.get(...).members.cache.get(msg.author.id)checks if they are in your server
Basically this
UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'name' of undefined
can anybody help?
no idea where the error is coming from
hm
i mean
Ig command.config.name doesn't exist it'll be just command.name?
i dont know where its coming from because you provided ur whole code instead of just whats needed
just send the code where its erroring
ok
Basically from line 35 u used command.config.something
does command.config even exist
@digital ibex ```.setAuthor(${command.config.name} Command)
.setDescription( - **Command's Description** __${command.config.description || "There is no Description for this command."}__ - **Command's Aliases:** __${command.config.aliases || "No Aliases"}__ )
.setColor('#2EFF00')
message.channel.send(embed);
}}
}
}```
what's wrong ?
UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'name' of undefined
You need help with the code?
yeah
what is this ? ```js
command.config.name
This looks weird
it is from command collection
Can you send me a ss
ok
wait...
Why are you not using like the other stuff
Like Git or the other stuff
Thats a webapp?
@silver dust what do you use to host the bot?
Why r u asking all this
Then what was that website for...
The problem probably is command.config doesn't exist
@digital ibex ```.setAuthor(
${command.config.name} Command)
.setDescription(- **Command's Description** __${command.config.description || "There is no Description for this command."}__ - **Command's Aliases:** __${command.config.aliases || "No Aliases"}__)
.setColor('#2EFF00')message.channel.send(embed); }}}
}```
@silver dust
return message.channel.send("That role is above you as result you can't kick him.")
}```
Is it correct?
command.config.anything with command.anything and try @silver dust
The problem probably is command.config doesn't exist
@jolly quail look tho
command.config.anything with command.anything and try @silver dust
@jolly quail good idea
Is this true?
Any error showing up?
Try console.log(msg.content) inside the if
ok i fix @jolly quail
Lol
Np

loom i want make somethings like
i tag bot then bot says prefix
like it
is it same?
let's try
any dev can help me?
don't ask to ask xD
don't ask to ask
@jolly quail dont answers
Hmm
I am working on kick cmd that a person cant kick a person with higher role but how to do that
@dull badger turkish i suppose?
@dull badger u need to do bot.mention.something like that
I am working on kick cmd that a person cant kick a person with higher role but how to do that
@surreal notch easy
just check roles position
and compare
i tried this but failed - if(target.role.id > message.author.role.id) { return message.channel.send("That role is above you as result you can't kick him.") }
@earnest phoenix
this? @jolly quail
LOL
Nah
@dull badger Oof
Hey, I have a couple arrays labeled a1-a27, how would I display all the items inside of that array?
i am done
First of all @isimsiz and the actual ping r different things
#GuildMember.roles.highest.position
Hmm
bruh
Hey, I have a couple arrays labeled a1-a27, how would I display all the items inside of that array?
-bots @earnest phoenix
@median gust
@crimson hare
@tiny lodge
@crystal obsidian
so how to
@dull badger
message.mentions.first()===Client.user something like this
Maybe
hm
Bruh msg not message btw
msg.mentions.first()===client.user
Try this
@dull badger
can some one tell me i did a setup command which send an embed with a emoji reacted on it i want if someone click on that emoji a new channel create with his/her name
@dull badger
@dull badger js cant do ifs without parenthesis
Hey, I have a couple arrays labeled a1-a27, how would I display all the items inside of that array with a command?
javascript?
yes
i will use this π @jolly quail
you can array.join("some delimiter")
error?
msg.reply('WHATEVER')*
your welcome ^^
don't ping me pls :/
i saw
Try now
also error
Show
no
Then?
"Hi, The prefix is * "
What's that * doing
its prefix
owh bruh
Error
delete it?
Itβs probably his prefixπ
ty @jolly quail
indent the code too
Np
but why it dont says my message? @jolly quail
i finally done something good in my life
@dull badger for the love of god, press shift + alt + f to format your code.
because you didnt tell it to
@dull badger code
π
learn js
I wonder how js actually parsed that
ty
Np
@jolly quail can dm
Is there any library able to convert voice stream into text and use that text to trigger commands?
So it would be possible
I mean, what matters is that the bot is able to receive the audio
I can't find anything online though
you need to send valid audio data to start receiving
What you mean?
exactly what i said
you cannot receive data as soon as you join the channel
instead you need to send data, i usually send some white noise or a beep, and then you'll start receiving audio data for other users
Oh ok
not hard then
What language would be bettter for this task?
Because I'm comfortable with js but I think Java would be best
Wait I can use google's API with any language right?
https://cloud.google.com/speech-to-text/docs That's what you are referring to right?
correct
it's not entirely free though, be sure to look at the pricing
it's just sending bytes to an api
I mean the bot has to be listening and receiving audio 24/7
You could use wit.ai
@sullen harness isn't that just text AI?
Pretty sure its now able to use voice as well.
You might have to check it out yourself though.
it's not voice
I'LL TRY google cloud speech to text
Did you use any guide online for that @earnest phoenix?
probably just the api docs
just docs yeah
ive specifically used ffmpeg + discord.net + google cloud
I'll try with Java since I wanna learn that for school
Is it allowed to make my bot dm users when they vote for the bot? Or is this against the discord TOS
however it's a 50/50 chance it will actually succeed
@earnest phoenix because mutual servers and dms enabled or?
correct
Ok thanks
for that, pls make it togglable for it to dm / not dm u, cuz i'd not vote for ur bot if it dmed me
Why
for that, pls make it togglable for it to dm / not dm u, cuz i'd not vote for ur bot if it dmed me
@digital ibex il do that :) thanks, didnt think about that people might not like it
show your commit names
posting my bots stats to top.gg works fine, but once it sends for the tenth times, i get an error
MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 ready listeners added to [client]. use emmiter.setMaxListeners() to increase limit
one sec lemme get some
do you have some client listeners inside the vote thing
client.once("ready", () => {
setInterval(() => {
dbl.postStats(client.guilds.size);
}, 1800000)
});```
this?
and thats not inside anywhere?
no
anyway remove the postStats interval altogether
you have the autoposter enabled already
i cant find it anywhere
oh im dumb
this is for my bot:
and this is for my site:
not even that bad lmao
i guess i write a lot of unneeded code and then remove it
i have a mental breakdown in my commit messages
or, well, have had
github actions killed me
but it's a nice CI
n1cΒ£
^ that was because for some reason i was doing commit > npm install > test
instead of save > rebuild > test
hmmm i know only glitch 7/24
bilmem
aga tΓΌrkmΓΌsΓΌn
lan ingiliz sandΔ±m puahhaha
aasdnmf-aljsdf
aga 7/24 yaptΔ±m
ay dont sipik tΓΆrkiΕ
ay dont sipik tΓΆrkiΕ
@unreal edge ben taym
napΔ±osunuz lan hΔ±Δ±
-notr
Δ°ngilizceden baΕka dillerde sohbet etmek iΓ§in #memes-and-media kanalΔ±nΔ±, top.gg hakkΔ±nda (TΓΌrkΓ§e olarak da) destek almak iΓ§in #support kanalΔ±nΔ± kullanΔ±n.
Bu kanalda TΓΌrkΓ§e konuΕmayΔ±n.
ok
okey
so we have to speak english while we are able to speak turkish huh?
dont use glitch
it was just a question
but basically here, you cant.
#rules-and-info Rule 6
on how to host 24/7
Rules do state "English-only" but other languages are allowed in #support (questions related to top.gg) and #memes-and-media
ok
@silver dust getavps
what
Hey, when i do this command on discord --> !eval client.emit("guildCreate", message.guild); the bot should reply true, but it reply false. Someone can help me ?
U can buy an EC2 instance or use heroku
if you're looking for a good hosting solution, you will need to spend some money
there are free solutions, but they are not as good
use it for ur host den lul
a $3/month virtual private server will be more than good enough to start with
Hey, when i do this command on discord --> !eval client.emit("guildCreate", message.guild); the bot should reply true, but it reply false. Someone can help me ?
@autumn ice I don't know what you mean with replies. That depends on what your eval command looks like...
a $3/month virtual private server will be more than good enough to start with
@quartz kindle i might try
GG starts at $1
@blazing portal I can send you a screen in dm if you want
i'd look into a vps with at least 1gb ram
i found this
βΊ HOST YOUR OWN DISCORD.JS BOT 24/7! - 2020! (UPDATED)
π€― Join into our DashCruft Nation by Hitting that Subscribe button and Leaving a Like!
βΊ Join into our Official Discord Server if you need Help!!
https://invite.gg/dashcruft
LINKS IN THE VIDEO:
1οΈβ£ https://bit.ly/36yFi2...
when u wont even use 15% of it xD
Aws will give u 1 year free ig?
The question is, is it emitting the event? are you listening to it?
its going to say false because the event already exists
Aws will give u 1 year free ig?
1 month they did give for me... skem
after 1 month i had to start paying
I use aws tbh
Right I have a question that requires a yes or no answer: Does <ClientUser>.setActivity set the presence for all shards or not?
(djs)
you can specify
Ah thank you
however im not sure if it works with the sharding manager
you'll probably need to broadcastEval the setActivity
wtf is this
Yeah that's fine I can do that
@silver dust GCloud also gives you $300 credit and/or a years worth for free @silver dust
But it is very expensive after the credit runs out
Like triple what some smaller providers charge
And you need a credit/debit card to sign up
if ur young, i suggest paying monthly since you dont know what you're going to be doing in like the next month
you might not even be coding
GCloud lets you pay monthly & so does basically every other provider, so its no issue
gcloud does have an always free tier too
that tutorial uses heroku
which is one of the "free hosting" options
free hosting options exist but may have several limitations and worse hardware, so they are usually not recommended unless you cant afford an actual vps
- heruko resets data every 12 hours
λμ λ―Έ λ¬λλΌ κ°λ μμ΄λ₯Ό μ¬μ©ν κ² γ γ γ
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:617:28)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/rbd/pnpm-volume/de343ecc-d6b5-4252-a21d-186c7dc2d5e0/node_modules/.registry.npmjs.org/discord.js/12.2.0/node_modules/discord.js/src/index.js:8:11)```


