#development
1 messages · Page 1542 of 1
hey so i need help making a bot so when i go to cmd and type in cd desktop and then cd Discord bot and the discord bot one it says The system cannot find the path specified.
Some weird thing with a switch case and a let variable not working together. Can I stream it to you?
me?
what's the error?
idk
and you can't stream here
The variable looks like it is null inside of case "stop" but not inside of case "play" even though it was instantiated outside of the switch scope.
sure
Watspopin could not help me but said that you could, would you mind helping me?
can you show your code?
can't right now
ok
a screenshot would suffice
one moment
break; should be inside the {}
oh
ill see if that helps real quick
should it also have the same indentation as other lines in the case?
it doesn't matter
but sure, to make your code clean
it would matter in languages like python where indentation is crucial
ok
did you use the play command first
yes
I have talked to other people that are better at JS than I am and they seem just as confused as I am
can you show your new code?
oh I think I know why
i'm so stupid
@spring bane dispatcher needs to be outside your function
otherwise it will keep on being undefined on every command
let dispatcher;
function run() {
...
dispatcher = ...
}```
what did you do
can you send your full code lmao
you still have let dispatcher down there
remove that
and movieInterval
oh ya
Oh no
im dumb

thanks for catching that
I want a code so that if you type in a particular chat, the bot will send an image to other chats
Can somebody tell me, what these packages are used for, in my react project?
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
for server in client.guilds:
print(server.name)
for ex this
how can i add the number of members in each server?
and print it
@sacred trout are you with discord.py?
yup
oh sorry man i cant help
np
for members in client.guilds:
print(members in server)
they banned saying that I was being toxic, like what?
Does anyone know why
message.channel.bulkDelete(10);
wouldn't work?
um
whats the error
if it says missing permissions try this
are you making a purge thing?
sort of
i can send my code if you want
message.channel.bulkDelete(10).catch(e => message.reply(e))
@sacred trout he using js
ik js by heart doe
@spring bane try this
(node:4821) UnhandledPromiseRejectionWarning: TypeError: Object.entries(...).filter(...).flatMap is not a function
that error only happens with bulkdelete
matter of fact you can even take someone’s off github and change it a bit
I say try something like this
i use the one provided by discord.js
message.channel.bulkDelete(args[0]);
that will delete the first argument said
if ur args are defined correctly
Objects.entries, how is Objects defined?
is Objects a array or a string or a integer?
const paramater = message.content.substring(prefix.length + command.length + 2);
const paramaters = paramater.split(" ");
if it returns [object Object] that could be ur issue, try inside console calling Objects
i have tried it with a sting and with an array
it give me the same error even when i do
message.channel.bulkDelete(10);
some function along the lines of this
function doPurge(message, args) {
var purgeamnt = args[0];
var purgelimit = Number(purgeamnt) + 1;
message.channel.messages.fetch({ limit: purgelimit }).then(messages => {
message.channel.bulkDelete(messages);
message.reply("deleted " + messages.array().length + " messages, including deletion command.");
}).catch(err => {
message.channel.send("Failed to delete messages. This may be caused by attempting to delete messages that are over 2 weeks old.");
});
}```
Is having many events in discord.js against discord tos? It gives me erros i have like 3 msg events and 2 guildmemberadd ev.
Nvm
ratelimited
How to create webhook for bot
webhooks are unrelated to bots
did you mean to ask how to create a webhook with a bot?
Is anyone familiar with threejs
Yea
in which library
hey guys
does anybody know a database with bad words?
I am too lazy to type in every bad word myself..
what did you want to do?
profanity filter.
like a Machine learning dataset?
no no, just a bad word filter.
well just use trumps twitter feed
alternative idk maybe join a Modern Warfare 2 lobby
sheesh always got bullied back in the days of bo1 and bo2..
https://www.kaggle.com/c/jigsaw-toxic-comment-classification-challenge/data here is a real thing
have you seen the regex one
wdym?
wtf is this regex
the page ive sended you gives you datasets ready to get used for Machine learning
profanity filters are useless on discord
the number of ways to bypass them are so huge that if you make it sensitive enough to include that range
you'll get way too many false positives
1111998^1990 is the approx. number of how many combinations there are on discord to bypass filters
most calculators can't even calculate that big of a number
profanity filters work only where you're restricted to a specific set of characters to use
yeah i understand.
It worked so far!
however, i am trying to send a message to all channels.
client.channels.forEach(channel => {
if(channel.type === 'text') channel.send(exampleEmbed).catch(console.error)
})```
client.channels.forEach is not a function
nvm it should be cache
looks like api aboose
i work with Machine learning to detect Toxic behavior, for now it works fine
const getInsult = require("insults") console.log(getInsult()); \
why is this returning getInsult is not a function
is it a function?
no..?
so then you cant call it as a function
hmm okay
but like, i was lookin at w3schools
function name(parameter1, parameter2, parameter3) {
// code to be executed
}``` what are parameter1,2,3 standin for.
it depends on what the insult modules exports as getInsult
if it exports a function it should work but it doesnt looks like it
it's a npm package so i have no clue.
Guys can someone help me when i make a embed it says Client is undefinied but i am on v12
well then RTFD
uhh?
send a code snipped of the area that errors out, please put it in a codeblock, if it is a longer paste use hastebin. also make sure to redact ips, and tokens
Read The Fucking Docs
gg in using a package that got the last update 4 years ago
love how earlier you wanted a profanity filter and now you want your bot to send insults
i am checking on bad words
and then throwing an insult at their fucking heads
so you want your bot to insult them back?
yessir
2021-01-23T10:40:29.992212+00:00 app[worker.1]: /app/node_modules/discord.js/src/structures/MessageEmbed.js:132021-01-23T10:40:29.992242+00:00 app[worker.1]: Object.defineProperty(this, 'client', { value: message.client });2021-01-23T10:40:29.992243+00:00 app[worker.1]: ^2021-01-23T10:40:29.992244+00:00 app[worker.1]: 2021-01-23T10:40:29.992244+00:00 app[worker.1]: TypeError: Cannot read property 'client' of undefined2021-01-23T10:40:29.992245+00:00 app[worker.1]: at new MessageEmbed (/app/node_modules/discord.js/src/structures/MessageEmbed.js:13:60)2021-01-23T10:40:29.992246+00:00 app[worker.1]: at Client.<anonymous> (/app/bot.js:47:16)2021-01-23T10:40:29.992247+00:00 app[worker.1]: at Client.emit (events.js:314:20)2021-01-23T10:40:29.992248+00:00 app[worker.1]: at MessageCreateHandler.handle (/app/node_modules/discord.js/src/client/websocket/packets/handlers/MessageCreate.js:9:34)2021-01-23T10:40:29.992249+00:00 app[worker.1]: at WebSocketPacketManager.handle (/app/node_modules/discord.js/src/client/websocket/packets/WebSocketPacketManager.js:102:65)2021-01-23T10:40:29.992250+00:00 app[worker.1]: at WebSocketConnection.onPacket (/app/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:325:35)2021-01-23T10:40:29.992250+00:00 app[worker.1]: at WebSocketConnection.onMessage (/app/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:288:17)2021-01-23T10:40:29.992250+00:00 app[worker.1]: at WebSocket.onMessage (/app/node_modules/ws/lib/EventTarget.js:103:16)2021-01-23T10:40:29.992251+00:00 app[worker.1]: at WebSocket.emit (events.js:314:20)2021-01-23T10:40:29.992251+00:00 app[worker.1]: at Receiver._receiver.onmessage (/app/node_modules/ws/lib/WebSocket.js:146:54)2021-01-23T10:40:30.037651+00:00 heroku[worker.1]: Process exited with status
this is the error not the code snippet
Oh wait
const client = message.client;const invite = new Discord.MessageEmbed() .setColor('RANDOM') .setTitle('CleanUp Help') .setDescription('To invite the bot [click here](https://discord.com/api/oauth2/authorize?client_id=802452819378307072&permissions=126160&scope=bot)!') .setTimestamp() .setFooter('c!help'); return message.channel.send(invite);
where is message defined
In the message event
sure but not even a nn can filter our profanity masked by a bunch of (invisible) characters
I have everything in one file
sure its not designed to fire on each word, more on overall behavior. if someone gets toxic they usually throw around a lot of insults
yeah for casual detection it works just fine
however if someone, for example, intentionally wants to spam slurs
they're going to find a way to do it
sure, they will always find a way around
but with the ML stuff i can atleast reduce a lot of Administration work by just having the bot to deal with them
stuff like Raiding users that just spam everywhere insults as example
show your entire flow for the embed including the message handler, bcs the error complains that message is not defined
const Discord = require('discord.js');const client = new Discord.Client();client.on('ready', () => { console.log('I am ready!');});client.on('message', message => {
if(message.content.startsWith("c!invite")){ const client = message.client;const invite = new Discord.MessageEmbed() .setColor('RANDOM') .setTitle('CleanUp Help') .setDescription('To invite the bot [click here](https://discord.com/api/oauth2/authorize?client_id=802452819378307072&permissions=126160&scope=bot)!') .setTimestamp() .setFooter('c!help'); return message.channel.send(invite);} });client.login(process.env.BOT_TOKEN);
Sry i am on phone and i have to copy it
yea you have a ghosted variable, you have the client defined as your Bot Client and then again define it inside your message event
Yeah but when i take it out from the message event there is the same error
why did you need message.client?
client == message.client in most cases if you haven't extended it
Send me a friend request i will send u my script private
well he defines the client earlyer as a Discord.Client()
i dont do DMs, ended up more than once with some annoying stuff
also use code formatting: ```js
code
```
becomes
code
that js makes the code coloured
@lusty quest https://github.com/allamjonas/cleaner
Hey guys, can you guys give me the documents of discord.js I can’t find them
have you tried googling
Also the other ones
why did you define client again inside your if statements? and then never use them in there?
Alr, thanks
it still doesnt work when i take it out
next time google is your friend
it where just a question
do you get a new Error tho?
2021-01-23T10:59:09.361692+00:00 app[worker.1]: TypeError: Cannot read property 'client' of undefined
2021-01-23T10:59:09.361693+00:00 app[worker.1]: at new MessageEmbed (/app/node_modules/discord.js/src/structures/MessageEmbed.js:13:60)
2021-01-23T10:59:09.361694+00:00 app[worker.1]: at Client.<anonymous> (/app/bot.js:13:14)
2021-01-23T10:59:09.361694+00:00 app[worker.1]: at Client.emit (events.js:314:20)
2021-01-23T10:59:09.361695+00:00 app[worker.1]: at MessageCreateHandler.handle (/app/node_modules/discord.js/src/client/websocket/packets/handlers/MessageCreate.js:9:34)
2021-01-23T10:59:09.361697+00:00 app[worker.1]: at WebSocketPacketManager.handle (/app/node_modules/discord.js/src/client/websocket/packets/WebSocketPacketManager.js:102:65)
2021-01-23T10:59:09.361697+00:00 app[worker.1]: at WebSocketConnection.onPacket (/app/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:325:35)
2021-01-23T10:59:09.361697+00:00 app[worker.1]: at WebSocketConnection.onMessage (/app/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:288:17)
2021-01-23T10:59:09.361698+00:00 app[worker.1]: at WebSocket.onMessage (/app/node_modules/ws/lib/EventTarget.js:103:16)
2021-01-23T10:59:09.361698+00:00 app[worker.1]: at WebSocket.emit (events.js:314:20)
2021-01-23T10:59:09.361699+00:00 app[worker.1]: at Receiver._receiver.onmessage (/app/node_modules/ws/lib/WebSocket.js:146:54)
remove the client = message.client line in line 13
in your help command used to be the same
did you saved and uploaded the code? bcs it still tryes to set client = message.client
hey how do i make a command that restarts the bot?
if you use pm2 configure it to restart crashed instances, then just stop the process with code pm2 should restart it
client.destroy() client.login(token); like this?
(not sure if this works tho)
stop the process and start it again.
like what happens when i use the vsc restart function
use spawn from child_process and spawn in a detached state
and then process.exit() in the current one
wait i might not need that tbh
because i can also just use an setinterval to update and read after my info's are updated.
nvm, thanks for the help!
with a setinterval like this
it would read the updated code right every specific interval>?
Y I’m a pinged here
Hello
Can you help me with counting letter in this:
please
Yea
in javascript of course
Thanks
please someone?
const data3 = fs.readFileSync("./cases2.json", "utf8")
if(data3 == "Enabled"){
const randomuser = message.members.cache.array();
randomperson = (Math.random() *0 + guild.membercount)
message.channel.send([randomuser])
.then(msg => {
msg.delete({ timeout: 60000 })```
why is cache undefined?
bcs message doesnt contain any managers
managers?
cache only works on managers
🥺
ooowh shit
how would i do it with servers then?
as cache only works for guilds
use it for the guild?
okay
message.guild.members.cache iirc should be valid
:c
what did you want to do? want to get the length of a string?
yes!
shouldn't it just be
i dont think you have to split it, since this will make it an array
and i think your split function is invalid
and then array.length.
thanks, I'll try it 🙂
message.delete()
const userList = message.guild.members.cache.array();
var randomNumber = Math.round(Math.random() * message.guild.memberCount)
var pingPerson = userList[randomNumber]
message.channel.send("<@" + pingPerson.user.id + ">")
.then(msg => {
msg.delete({ timeout: 0 })
})
}```
string.length is also valid
for some reason this gets me Cannot read property 'user' of undefined
i have defined guild.
console.log your array
yessir
also the way you get the randomNumber is not good. it will be possible to generate invalid indexes
just use your array.size() as max number
owh
accidentally logged it 2x btw
if you use the memberCount it could generate invalid indexes
okay.
i changegd it
but it still would throw that error
also why did you use the member?
just use the users and then call the id on it
now you use member.user.id
if you use user you just can use pingPerson.id
message.delete()
const userList = message.guild.user.cache.array();
console.log(userList)
var randomNumber = Math.round(Math.random() * userList.length)
var pingPerson = userList[randomNumber]
message.channel.send("<@" + pingPerson.id + ">")
.then(msg => {
msg.delete({ timeout: 0 })```
yup got it!
but still would throw errors?
users
also i think userList.length is wrong, would say you want size
your string is not defined
but it is an array
why value?
which means that i can get the whole length using .length
where did you get value from>?
yea mybad
np
when I start it without value, it shows "undefined"
does it show an error?
bcs value is not defined
https://i.s8s.app/QyoH0Wra is valid for me
pointereval cool
I want to make name of user counter, maybe that's why:
var str = `${User.id}`
let counter = 0;
if (thing) {
counter++;
}```
and when i put counter in here, it will works?
👁️ 👄 👁️
also name ur variables properly kthx
😎
this seems like an https://xyproblem.info to me 🤷♂️
Asking about your attempted solution rather than your actual problem
it's literally me
xdD
only removes 4 characters
in the sense of how?
var is deprecated, its still there for keeping millions of older scripts functional. better use let or const
OK
I tried and it doesn't work, it's the same, the nickname still shows up
it doesnt fix the code, its just for more consistent code
also you want to count your members?
umm, no I want to count name letters, and slice it by the number of letters in name
to get an array of individual letters?
?
yyy
I want to make the counter number of the letters in user.id
I want to delete this mention
so you want to have just the name there?
yes
why make it simple when you can reinvent the wheel
hm?
try user.username
if you want the one set in the guild you need to go over the member object
user.username gives you the username without mentioning the person (embeds doesnt mention anyways)
replace to ${user.username}
I know
anyone can help me?
but
I don't want
to delete
mention
if you send your issue sure
then dont set the username?
const Discord = require("discord.js");
module.exports.run = async (_client, message) =>{
let User = message.mentions.users.first()
let mention = message.mentions.users.first();
username1 = message
const str = `${User.id}`
let counter = 0;
if (str) {
counter++;
}
if (mention == null) { return; }
message.delete();
mentionMessage = message.content.slice (4 + counter);
console.log(mentionMessage)
const infoEmbed = new Discord.MessageEmbed()
.setColor(`#ffff00`)
.setFooter(message.author.username, message.member.user.displayAvatarURL({dynamic: true, size: 512}))
.setDescription(mentionMessage)
.setTimestamp();
mention.send(infoEmbed)
message.channel.send ("Done!");
}
module.exports.help = {
name:"pv",
}
or does the string contain the username?
i think i know what your issue is now.
oh
did you got a command handler?
umm
yes
I wanna know the code from which if someone says ?setjoinchannel #<channel name >
sets that channel as the joinchannel
ok the command handler will split your arguments already into an array
you just want to get rid of the first item in the array
we are not allowed to spoonfeed you. but if you want to have an idea how i can help you, if you supply your language (programming language)
I want to simply delete a username/mention in DM, I removed the prefix, but I want also delete the username
spoonfeed meaning?
sending you full code
did you know how your command handler works?
umm
oh ok thnks
I get it from a tutorial :/
I wish someone could help me though
so you have no idea
your arguments that the command handler passes to your command is an array of strings
my bro also not teaching me how
My command handler:
fs.readdir("./commands/", (err, files) =>{
if (err) console.log(err);
let jsfile = files.filter(f => f.split(".").pop() === "js");
if(jsfile.length <= 0){
console.log("Error! Folder ./commands/ Is empty!");
}
jsfile.forEach((f) =>{
let props = require(`./commands/${f}`);
client.commands.set(props.help.name,props)
})
})
so your command message will be first [!][command][mention][string][string]
your command handler will get rid of the prefix and command
you now want to get rid of the first item of the array to get only the string
um
yes
aaaandddd
can you help me with this ?
For all those people who find it more convenient to bother you with their question rather than search it for themselves.
Hey, I hope someone can help me out a bit with discords permissions... I am slightly lost currently.
So my bot has (among others) the permissions VIEW_CHANNEL, MANAGE_ROLES, MANAGE_CHANNELS.
Now i want to create a category channel where i give the bot the manage roles permission overwrite. But for some reason I am unable to, because of Missing Permissions.
Is that one of the many discord permission oddities?^^ And what permission would i need to make this happen (i know admin works, but there must be another way?!)
Thank you 🙂
hello i look docs but i cant found anything. whats mean of Authorization at Webhook?
https://i.imgur.com/rMwSzmC.png
uu
What exactly do you mean with this. If you want to set an interval in js you can do that with setInterval
Vote events are sent to you by top.gg
The authorization header is an extra field that you define, and all top.gg vote events will include this field
(In the Authorization header)
So when you receive it, you can confirm that its really coming from top.gg and not a fake thing from hackers
Because the authorization you set will be there
If someone has your ip address, they can send you fake requests, but since they dont know your authorization code, they cant fake that
@versed thorn stop
the bot cant see commands in this channel here
@versed thorn stop
tf is wrong with this guy
eeee
fuck it ill do it myself
Ok
what are the best npm packages, that can generate a unique random id?
crypto
crypto.randomBytes(8).toString("hex");
generates a 8 chars long random string
what about uid?
crypto is buildin into node, also does the job
uid also works but i bet it uses crypto to generate the string
you can, but there is the possibility to get duplicated ids
does anyone here uses slappey?
there are some very rude developers here
like?
like?
@tough glen just told me to shut up and blocked me when i tried to get help
dms?
Hey I need help something is going on when im making a bot can i show you i dont know why to do its my first time and something is going on
sure
ok dm
heard of it but never used it
ohh ok
attach the prefix to your message handler
so you can use it in every command
i do it with my guild settings
¯_(ツ)_/¯
Hey I need help something is going on when im making a bot can i show you i dont know why to do its my first time and something is going on
If bot sends 1 message to 1 channel in every guild, will it be against discord ToS?
no
It is
don't spread false information out there tbh
it legit is, same with dm all commands
can u show me where it listed in the tos?
Hi
Talk with ToS please
u have something backing it?
whats wrong
it is against to ToS
they asked if they can make the bot send a message ( that can be an AD ) to each guild, that's spam and against the terms
@torpid valve ^
what bout bot updates?
someone help me
many bot feature that
against ToS
dont think many get banned
against ToS
@torpid valve that is api abuse and breaks ToS
that doesn't mean it is allowed

it's legit considered as spam, give me your bot ID and I can get it banned, you stop spreading false information and making people break the terms, ty
bro do u even know what is false info means?
it means spreading of false info on prpose
stop telling to people that it isn't against the terms them
if you're not sure, don't help
simple as that
whats wrong with this my token is new and i even regenerated
and you legit said above that your bot has that, so you're lying now for 2nd time :D
cant u read!
want an official message if it against the terms or not ? or read the tos, "spam" category or email at https://support.discord.com/hc/en-us
IT'S against the ToS
can't you read?
what does that mean how can i fix it please?
it appears u are lying
yeah I don't have the time to play with kids, just stop spreading false information that can get people banned.
i am noob☹️
u are dodging my question
No answer
He's just tired dealing with you
he is the one spreading false info about me lying
even tho he mis understood he is spreading false info
how old are you?
Why am i supposed to tell u that?
I am not interested in battling kids in a basement lets stop this have a nice day be safe
Pleasure to have talked to u
lol, yeah stay safe and stop telling stuff to people that can get them banned for breaking discord ToS spam category.
xD
Yo
Can someone help w node
its telling me its missing a module "moment" but the module is installed
its like showing up when i do npm list
i guess there is a way to do it with next to no spam by sheduling the messages, but anyways i would not suggest doing it
what host are you using
vsc, repl.it?
remove the node_modules folder and run npm i
aight
lol vsc is not a host
now to my problem
bot.fetchInvite(args[0])
.then(invite => {
const embed = new Discord.MessageEmbed()
.setTitle(`Invite Information`)
.setColor('BLUE')
.addField(`General Information`, [
`**Invite:** ${invite}`,
`**Created At:** ${moment(invite.createdAt).format('LT')} ${moment(invite.createdTimestamp).format('LL')}`,
`**Expires At:** ${moment(invite.expiresAt).format('LT')} ${moment(invite.expiresTimestamp).format('LL')}`,
`**Invite Author:** ${invite.inviter}`,
`**Maximum Age:** ${invite.maxAge} seconds`,
`**Maximum Uses:** ${invite.maxUses} uses`,
`**Uses:** ${invite.uses}`,
`\u200b`
])
.addField(`Invite Server Information`, [
`**Invite Server:** ${invite.guild}`,
`**Invite Channel:** ${invite.channel} (${invite.channel.id})`,
`**Server Membercount:** ${invite.memberCount}`,
`**Online Users Count:** ${invite.presenceCount}`,
`\u200b`
])
.setThumbnail(invite.guild.iconURL())
.setTimestamp()
message.channel.send(embed)
})
.catch(err => {
const error = new Discord.MessageEmbed()
.setTitle('Error')
.setDescription('Your Invite is Wrong!')
.setColor('#bb1414')
message.channel.send(error)
})```
it sends me this
half of that is like null or invalid
and yes all i wrote is written in the documentation
is the invite.createdAt a valid timestamp?
what's that
is invite valid? bcs invite.maxAge is also null
idk but its possible that you need a Gateway intend for it
Server Members Intent is approved for me
Presence Intent is not..
Maybe that's the problem
GUILD_INVITES enabled?
nvm the stuff i where thinking on is something different
oh guild invites is on
i dont think presence is needed.
but if you expect a competent quick answer i guess ask on the Discord Developers Server
is there an easy way to know when the height/width of a div has changed?
its for threejs; i need to know if a div has changed width and then resize the viewport display
Supposedly there's a thing called ResizeObserver
That seems to be recently supported by all major browsers within the last year
The resolution of that screenshot is almost too low to read anything
oh i just read the mdn docs and saw the compatibility sheets
i got the impression that it was chrome only for some reason
this is ok?
this is 1920x1040
I think it was the first to support it. It seems new, so maybe MDN hasn't been updated.
I'm not sure though. The best way is to try and test 
Is that last } needed?
It's hard to tell with your random indentation
Missing ); on L36
Yeah. I think replace the } with );
Nah, you need both
I mean the one on L38
thanks
@hasty sparrow found the real problem though 
Properly indenting your code would make your life easier though
I'm currently rewriting my bot and plan to make a site for easier customization. Would I use OAuth2 to enable login and be able to get guild information through the user?
correct
Noice. Thanks
Hi, I tried to let my bot run on pm2 24/7 but after 10m or so my bot stop responding to any command but still being online
No, it doesnt
Try restarting the bot
Did it a few times, still
i'll try running it without pm2 and see if it happens the same
ok
That looks like API abuse and async doesn't even work with forEach
you hosting on what?
one of my VPS
hmmm
I had the same problem on raspberry pi, and I fixed it by disabling network power safe mode
try forever
npm i forever -g
or sudo npm i forever -g
if you are on ubuntu
forever should work
it is almost the same
what does forever do?
it works for me all the time
pm2 not always
type forever -h for help
you have commands like: forever start, forever list, almost the same as pm2, and if you want to stop, it's forever stopall or stop and instance name
@ionic dawn
would still recommend using pm2 for node projects, it can handle certain stuff better than forever
I want to track votes with my bot for server that i have in top.gg listing website, but how do i get a DBL token for a server
forever works better for me, idk
ummm
i don't test it
but
Does anyone know how to fix this on python
Traceback (most recent call last):
File "main.py", line 648, in <module>
bot.loop.create_task(app.run_task(host='0.0.0.0', port=8080))
AttributeError: 'Quart' object has no attribute 'run_task'
i have 2 discord.js bots, and forever can handle this
i talking about the fancy web dashboard
oh
idk
pm2 don't working on f1 micro, and my raspberry pi, unless I'm using it wrong
i can use pm2 on my rpi
im using it on my f1-micro too
Alr, thanks! @quartz kindle
Does .env.local variables has no effect when NODE_ENV != development
yes, I also read that. But I'm stil confused, Tim
Do I still make you laugh 😉 LOL
A lot of fields

Ping me
Syntax Errors, shame shame 😆 @earnest phoenix
for your own sake, please use addFieldSSSSSS
for your own sake, please use a dynamic help commandDDDD
also isnt there a 10 limit?
25
i though it was much less than that
Well done
idk how
Not possible without losing ur account
congratulations
like its just for my server bot somehow he got the link of my bot
Like, you can just refresh the token

i didnt
What do you mean by link
It's not stolen then
if he's using your bot, he got the token
How do you know it is not your token? 
like he told me throught traffic he could get my bot
they can get the token
through the traffic
bruh
ok
He said "link", so I guess the other dude invited his private bot
because it's sent in every REST request
i cant explain it properly
because of my english
so like one of the persons who got my bot i know him
and he didnt want to damage it
and he said
your bot can be stolen
with wireshark
but not the token
like the invite link
what
lol
Invite link meaningless
yeah idk too
I can get it really now
an invite link is constructed of just the id that is just public data
whoever you're talking to is a moron
All i need is the id

No hack involved
anyways what can i do that my bot is not getting stolen
i didnt leak my token
to anyone
It's not getting stolen
by "stolen", do you mean invited to other servers?
Why?
yes
Why isn't it a private bot
ohhhhhhhhh wait i didnt think about that
Dot dot dot
wait
Aren't bots private by default?
Yeah
yeah?
i don't think they are
So they disabled it...
You need to manually set it to public
i just did it
it's on public by default
Oh
o
Wtf are yall talking bout
Stuff
dildos
yes
😌
You cant make a bot public in code wise
( without using a third party platform like github )

What are you talking about?
client.on('guildCreate', guild => {
guild.systemChannel?.send('Bye bye fuckers');
guild.leave();
});
These stuff
Not that kind of "public"
we're not talking about the source
That's not about code
o
Oh
Its public by default
You can make it so only the application owner can add the bot
too late
🥲
i got a "please install sqlite3 manually" error and i was told to do npm rebuild, that didnt work so i deleted the node_modules folder and did npm install, then i got other errors which i fixed and im back at the please install sqlite3 manually error
does anyone have a fix for this?
Did u install sqlite3 manually?
"dev": "export NODE_ENV=development&&nodemon --require dotenv/config src/index.ts dotenv_config_path=/private/.env"
Is this my script correct?
Good job
Is / a regex char?
V
acute angle
No, i mean, is it a reserved char?
you need to escape it otherwise it'll denote the end of regex
U
no
Round angles
C
Tim's blue
Good role
Timblue
:O
cyan*
Since like half an hour ago
notable member pog
<3
yo Tim congrats
Pog tim
ty ty <3
pog
tims from brasil
time to rename this channel to #tim-house
Does anyone know how to make a bot dashbord
Yes
Can I pm you
No
Can you help me make one
your best bet is to learn to how do web front end, and then learn how to use discords oauth apis. Its a long task but you'll learn something from it and it could benefit you greatly
Were is the place to Learn
Also research about websockets, it's the best way to interface your bot with your site
If you're newbie, I recommend react native
I have web hosting
One message removed from a suspended account.
One message removed from a suspended account.
<3
Can you help me
Here's a good tutorial for react: https://www.youtube.com/watch?v=0-S5a0eXPoc
React Native Tutorial for Beginners - Learn to build an amazing React Native app for iOS & Android.
🚀 Get the full React Native course: https://bit.ly/3f40a4l
👍 Subscribe for more React Native tutorials like this: https://goo.gl/6PYaGF
CONNECT WITH ME
My Courses: http://codewithmosh.com
My Blog: http://programmingwithmosh.com
My Facebook: htt...
it'll take time to master but it'll pay off
You missed a ) here https://img.pyrocdn.com/0Iusyi_M
I had to go lmao
i hate making localisations, and the way i started it is probably stupid
well i have now 4 supported languages and the file is now at 714 lines
intl is a pain
Why does it say timestamp is missing a semicolon wtf?
atleast i found a way to make it easy for me if someone else wants to make a translation. opened a github repo and the bot pulls on start a fresh translation
its normal just add a semicolon behind the line
Like 1 more semicolon?
show the exact error
.setTimestamp();
Huh
const { MessageEmbed } = require("discord.js")
module.exports = {
name: 'help',
run: (message, args, client) => {
message.channel.send(`<@${message.author.id}> check your DMs!`);
const help = new MessageEmbed()
.setColor('red')
.setTitle('Command list')
.setDescription('')
.setTimestamp(new Date())
.addField("+ban", "- bans a user")
.addField("+unban", "- unbans a banned user")
.addField("+kick","- kicks a user")
.addField("+purge","- purges messages (99)")
.addField("+bomb","- completly purges a channel")
.addField("+setprefix", "- set your own costume prefix")
.addField("+userinfo", "- shows user information")
.addField("+serverinfo", "- shows server information")
.addField("+role", "- adds a role")
.addField("+remove", "- removes a role")
.addField("+avatar", "- shows a picture of your) avatar")
.addField("+hug", "- shows a gif")
.addField("+meme", "- shows a meme")
.addField("+kill", "- shows a gif (SFW)")
.addField("+slap", "- shows a gif")
.addField("+gayrate", "- shows gay rate")
.addField("+joke", "- shows a joke")
.addField("+height", "- shows a random height")
.addField("+verify", "- needs a setup")
.addField("+invite", "- sends a bot invite")
.addFooter("if you’re having problems, please join the support server")
.setTimestamp();
message.author.send(`**thank you for adding this bot**\nPrefix: ${client.prefix}\nCommands: https://discor.gg/5AJFadyJKZ`, help);
}
}```
It’s not showing error, but just not working
well you have 2 timestamps
also keep in mind there is a max amount of fields
another thing since you have a command handler make a dynamic help command, or you will hate the day you didnt made one. ususally they are a one time thing and doesnt require any maintainance.
oh god, hard coding commands
My tip is: if you ever need more than 15 fields in a single embed, consider using pagination
One message removed from a suspended account.
One message removed from a suspended account.
Do you have a dynamic command handler?
If you do, you should just be able to loop through the commands the same exact way, just adding the specific content to the help command.
In the case of my help command it loops through it at startup and saves it so it only does it once.
the d.js guide got a good tutorial for a dynamic help command. idk for py or other languages
@lusty quest lmao sorry I forgot totally
const { MessageEmbed } = require("discord.js")
module.exports = {
name: 'help',
run: (message, args, client) => {
message.channel.send(`<@${message.author.id}> check your DMs!`);
const help = new MessageEmbed()
.setColor('blue')
.setTitle('Command list')
.addField("+ban", "- bans a user")
.addField("+unban", "- unbans a banned user")
.addField("+kick","- kicks a user")
.addField("+purge","- purges messages (99)")
.addField("+bomb","- completly purges a channel")
.addField("+setprefix", "- set your own costume prefix")
.addField("+userinfo", "- shows user information")
.addField("+serverinfo", "- shows server information")
.addField("+role", "- adds a role")
.addField("+remove", "- removes a role")
.addField("+avatar", "- shows a picture of your) avatar")
.addField("+hug", "- shows a gif")
.addField("+meme", "- shows a meme")
.addField("+kill", "- shows a gif (SFW)")
.addField("+slap", "- shows a gif")
.addField("+gayrate", "- shows gay rate")
.addField("+joke", "- shows a joke")
.addField("+height", "- shows a random height")
.addField("+verify", "- needs a setup")
.addField("+invite", "- sends a bot invite")
.addFooter("if you’re having problems, please join the support server")
.setTimestamp();
message.author.send(`**thank you for adding this bot**\nPrefix: ${client.prefix}\nCommands: https://discor.gg/5AJFadyJKZ`, help);
}
}```
For some reason, this isn’t working..
its setFooter not addFooter
multiple footers 🤔
Damn after adding so many addFields my brain was like add
LMAO
ahh yes something fucked my localisation file, its saved as json and node-fetch finds an illegal char that vsc and a jsonpathfinder cant find
nvm fixed it somehow
if you have a command handler its probably better just to loop through all the commands and addField(${prefix}${command.name}, - ${command.description})
Error: Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (83)
Google is your friend https://medium.com/@proustibat/how-to-fix-error-node-sass-does-not-yet-support-your-current-environment-os-x-64-bit-with-c1b3298e4af0
but..
(83)
still... try it, we don't know if that number matters in this case

Lol
Can soneone help me fix my code when I upload a new videos or start a new steam on YouTube ans twitch it is not sensing it to my discore
Most likely something on your code, can't help you much without any starting point
Can you have a look
No clue about py, read a few docs
Also i suggest not coding on a plain editor/phone in general
that's copypasted
fun
this is like the 10th time im seeing the exact same snippet in this channel
Can you help me
What is the problem?
when I upload a new videos or start a new steam on YouTube ans twitch it is not sensing it to my discore
Youtubes API
So every time I delete cool down, it dosent work since it gets really annoying
Like the commands don’t reply anymore..
Line 66 to 74
DAMN NO ONE?
honestly, i hate support questions with photos as their code source.
same
im a helper in the d.py server and
you will
freak out
when you see the amount of images as source code
its so hard to tel
At start, you're if cooldowns has the command, if not then you attempt to set an empty collection, and you're not setting the user to that collection at all
Have you seen d.js support server?

Ye..
What about it?
@earnest phoenix
If you're not setting the user it won't apply the cooldown for them at start tho
So what can I do?
Also why are you checking if the timestamps has the ID of the author twice?
if(timestamp.....?
Lol
Yea, you're doing that twice for no reason lmao
And you shouldn't use collections nor maps for cooldowns since they reset when the process exits
At least use a database
I don’t have one... I can’t afford one lmao
What
Most databases are free, even MongoDB
So um, what can database be used for?
and efficient
I have no idea how to do it is there any kind of tutorials you recommend?
honestly, most databases are straight forward just by looking at their documentation
montodb best db
