#development
1 messages ยท Page 694 of 1
i agree
sorry im too dum for that
why r u programming if ur dumb
try r.headers.get('content-length')?
idk man
node-fetch is gay
yes that works
when did they add that
now to figure out how to make a progress bar
so it does kinda work
but obviously having it spam the console like this isnt really efficient is it
so how do i make it essentially edit the line
Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for.
@knotty steeple
arent you helpful?
i already figured it out myself btw
also do i have to specifically say that "googling that didnt work because the result i wanted wasnt the one i got" because thats what happened
which is why i asked here

if you cant actually be helpful dont say anything
fuck off
:<
yall be nice to each other please
@copper cradle pls dont just tell people to google it

how do i actually get the amount of latency to the discord api in djs master
client.ping got removed
and apparently client.ws.shard.ping isnt actually accurate either
does anyone know how to play a playlist using discord.js
if yes, please dm the code to me.
@valid frigate check out client.ws
@earnest phoenix we dont spoonfeed
Use arrays and shift
It's the same as client.ping was I believe
all i need is a precise number lo
One sec
well it's the average of all websocket shards
probably fine
Which I'd assume for you is 1?
yeah 1 shard
Code differences if you really care
๐
thanks mate
Discord.js
How would I remove all reactions from a message? I'm having a bit of trouble with this.
Ping with response, please.
module.exports.run = async (client, message, args, auth) => {
console.log(auth)
auth is defined in main js
gets undefined
not like error
So code from main
you use, js commandFile.run(client, message, args, cmd, auth);
yeah
In your file you use client, message, args and auth
it runs commands with these right?
why is cmd defined in there
if you want to pass cmd just add that as a parameter to your function
I did it too xd
In your file that has command in it. You're going to need to use js module.exports.run = async (client, message, args, cmd, auth) => { console.log(auth); }
Although, Is there any need to pass cmd through?
you can get it from message doing message.content.split(/\s+/g)[0]
Because people don't always use single spaces
Also, I started learning regex when learning JS so it kinda stuck.
ew regex
It's actually nice and useful.
people try to avoid it but it's inevitable
Yeah, Bot making doesn't really use it.
cough regex attacks
Meh.
the only problem i have with it is it's easy to deploy attacks on something that's supposed to parse regex
not in the context of bot making
Fair.
also readability
@unkempt ocean your best bet is to remove the cmd from .run() as you don't need it there and then try running your command.
How so?
I think it's easy to read.
it wasn't really helped my problem xd
for someone who doesnt know regex it's impossible to know what it does
Removing it from .run didn't help?
I just want to learn that can I use auth without defining again
with module.export
it didn't work
Or you could bind it to message or the client.
can you send like
He already did.
all of your code
The useful stuff was sent.
thats wack
console.log message.content or args in your command and see if those log anything
if we provided the solution but it still doesnt work he needs to provide more context
I fix it
by doing?
Ok.
wait I need one more question
boi
Fire away.
I need to pass it run command right. Should do it for both
module export and run ?
I mean main.js and command.js
what
When you pass a variable as a parameter inside of commandFile.run()
you only have to do module.export.run in command.js
I can't explain myself sorry
and call run from index.js
Those can be used by the module.exports.run function only.
No problem.
Getting this error or discordjs, tried updating literally everything, nothing seems to work. Anyone know what could be causing the problem?
/root/DiscordBotApp/node_modules/enmap/src/index.js:260
static async migrate() {
^^^^^^^
SyntaxError: Unexpected identifier
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/root/DiscordBotApp/node_modules/enmap/index.js:1:77)```
Yes, it's a module.
Does enmap have a support server?
yes actually lol. thinking i should be asking there.
https://hastebin.com/iyifojuvun.js can someone help xd.
prefix is different
I typed outputs after console.log parts
found it
@valid frigate Everything is attackable.
Can someone help me with if user perms?
let args = [["o", "mayo"], ["tomato", "mayo", "mays"]]
let options = {}
for(let i = 0; i < args.length; i++) {
options[args[i][0]] = args[i][1]
}
``` quick question how do i make this work for more than 2 elements in an array
cuz currently it will only take 2 stuff
{
"o": "mayo",
"tomato": "mayo"
}```
๐
What do you want the output to be?
"tomato": "mayo mays"
Check if the array length is > 2?
Join all >=1 index with space?
So shift the array first then join 
Remember array.shift() returns the one item not the array
i just did this ```js
if(args[i].length > 2) {
options[args[i][0]] = args[i].slice(1).join(" ")
}
lul
Well that works 
yes it does
Hello,
If containerize and distribute my bot over multiple machines, will i be using 1. one container per machine with a sharding manager that spawns multiple instances of the bot or 2. spawn multiple instances of the bot in multiple containers?
i assume, because it is distributed, i will anyways have to tell each container/shardingmanager its id/ids. So am i right, it does not really matter if i send multiple ids to the shardingmanager or single ids to the single containers?
I need change this:
return Math.floor(Math.random() * (max - min + 1)) + min;
because i want to make it consecutive no random
just.. increment?
look this is the all ocde
code
function randy(min, max) {
min = Math.ceil(min);
max = Math.floor(max);
return Math.floor(Math.random() * (max - min + 1)) + min;
}
client.on('ready', async(message) => {
client.setInterval(() => {
let randInt = randy(0, 9);
let canal = canal1[randInt];
let channel = client.channels.get("621308997462523905"); //<-- pon el id de tu canal pa'ca
channel.setName(canal);
}, 10000);
});```
mmm api abuse
what is api abuse?
that code
quickly changing a channel name
but he changes in 10000ms
still
that is very low
a okay
10secs
make a command for it
But how do I change the name consecutively, don't you aleatriamete?
But how do I change the name consecutively not randomly?
i have problem with guildMemberAdd event.
it dont sends any message
code?
wait
while True
declare value
array[value]
value += 1
if value == array#length
value = 0
const embed = new Discord.RichEmbed()
.setDescription(`Welcome`)
message.channel.send(embed)
})
thats not how guildmemberadd works
how then lol
the only param is member
to send to a channel you have to either get a specific channel or find a channel in the guild
like
member.send(`Welcome to the server!`)
you can do that or
also you can do member.guild to get info about what guild the member joined
and that that point you can find a channel
to post your welcome message
@stray garnet
No
uh oops
let guild = member.guild
const embed = new Discord.RichEmbed()
.setDescription(`Welcome`)
guild.channels.find(`name`,`welcome`).send(embed)
})
no
k
guild.channels.find??
Find function doesn't work like that
how then
.find(c => c.name === 'name')
ah ye
so its basically member.guild.channels.find
so the same?

and it should work
hey guys
oh shit i lost my green role
anyways
I have a question regarding role management in discord.py
what version
newest
k then I'm out lol
I want to save every role in a json file and with them the permission value
it already has all that on the api endpoints
well it says python AttributeError: 'Role' object has no attribute 'value'
wait
you can?
oh hekk
Yep
i have never considered that ๐คฆ
roleid? isnt that just the id? or am I wrong?
That pinged me...
and the ID contains all the permissions?
the & is missing
Note to self, when you need oliy to respond to something, give him the trial mod role and pongerino that

What does the & do?
when the bot sends a message, how do you check for a response for the next 30 seconds?
What's a good database which I can use which is fairly easy to learn
Sqlite
LazyNeko user mentions use @ ! <snowflake>
Where can i host my .net discord bot for free?
I don't think you can
for free? likely nowhere
Rip
maybe heroku supports .net but im not sure
I can't do that because of my location
no
@gilded plank
what are you trying to do
ok
i think to i want make a bot so i don't know how , i know coder
do you know any programming languages
okay dokie
but i don't know the languages of bot
https://github.com/SinisterRectus/Discordia/wiki
This works with Lua
ok thank u
let mssg = await message.channel.send(`Step 1:\nType the word \`${word}\` below.`)
let filter = (user, channel) => user.id === message.author.id && channel.id === message.author.channel.id;
let collector = new Discord.MessageCollector(message.channel, filter, 1, 1);
await message.channel.send(collector.collected[0])```
js
i need it to send back what the user says,
currently says: DiscordAPIError: Cannot send an empty message
so im guessing i need to wait until the user actually sends a message
how would i do that?
collector.once("collect", collected => {})
idr if it was on or once
then you can do
collector.on('end', collected => {})
but I'm not sure
Help someone
Why I use command and he spam?
because you aren't encasing your code block that's supposed to go under the if condition
if(condition)
line of code
rest of the code
is not the same as
if(condition)
{
code
}
dang, code blocks are so much more readable now
there should be a { after the if statement and a } under the message send
another thing is that's glitch
Shouldn't the two var lines end with semicolons?
Joining late and not sure of the language, but I see a semicolon at the end.
no
now i can't unsee that
lol right
putting a semicolon after RichEmbed() would cause the next line to not chain onto it
No, not that line.
(and javascript has asi or whatever its called anyways)
what about that
i kinda love it
because that's not a valid path
So my bot has been unable to login today. i went to check stuff and eventually figured out it was rejecting the token (oddly it doesnt give any error for that, just say that the shard takes too long to become ready) so i go to developer menu on discordapp.com and recopy my token, and i just noticed that every time i refresh the page, the token is different. why is my token getting regenerated?
Discord%20Bot
Itโs the exact path
If I remember thats what space is
that's html encoding
oh
I copied it and tried it 50 different ways
it's not a valid path
use quotes
no
well
yeah nevermind
i got used to unix file system and forgot how it works for a second
Hello, is there a easy way to get all user ids that reacted to a message from Bot? im using ReactionCollector with time filter but it want work :O
im using js ๐
MovementToday at 9:27 PM
So my bot has been unable to login today. i went to check stuff and eventually figured out it was rejecting the token (oddly it doesnt give any error for that, just say that the shard takes too long to become ready) so i go to developer menu on discordapp.com and recopy my token, and i just noticed that every time i refresh the page, the token is different. why is my token getting regenerated?
tag: TL;DR: Calm down. Your bot tokens still work.
Discord doesn't store tokens. Instead, it create tokens by cryptographically signing a user ID and timestamp. Each time you refresh the page, the current time changes, and you get a new token. However, all the tokens you see are still valid until you click Generate a new token?
So itโs should be
cdโUsers\Onedrive\Documents\DiscordBitโ
those are apple quotes, but yes
Ok thanks
you're also missing a starting backslash
Oops
Also you forgot to do like C:
you don't need to define the drive
Thatโs there by default
Yes?
you don't
your bot tokens still work
hmmm great now i have no idea whats going on then back to the drawing board
lol
ok so found an error message finally, it says "invalid token". i print the token out and its being read correctly from config, and i try regenerating and putting new in, nothing work
are you sure it's the token and not the secret
the only other thing that comes to mind is that you rapidly logged in and logged out
so discord changed your token, check your email for that
got no email
im sure its the token not client secret
does it work if you try to log in with another bot app
trying that now
using example from discord.js.org
same error. (dont worry about token in ss, regenerated after taking)
which discord.js version are you using
12.0.0 (its a fork of official where i changed one line in sharding to let me capture pipes. as the test program doesnt use sharding, that rules out that change from breaking stuff)
its worked for over a month tho?
yes
any simple way to update my fork without having to redo my change? (i normally dont do much with git)
rip xd
uh you can add the code yourself ig?
you mean the commits that my fork is behind?
i noticed it was offline this morning when i went to work on new features. i last used it on sunday.
i did not make any changes to my discord.js fork (havent since the day i made it)
ima go delete and recreate my fork just to do something
cant rly hurt
still "an invalid token was provided"
pure fork of discord.js with no modifications
hm
AHA explicitely installed stable branch and test program works now
well that's why it's stable
indeed
Ok I still can't get the path to work
you need a space between the command and the arguments
So a space after cd
yes
Overnight my discord bot has gone from working fine to the music being broken.
When issuing the play command, the bot does manage to get the video data but after connecting to the voice channel it simply disconnects and outputs "undefined" in dark gray. I've tried reinstalling node-opus, prism-media, going back to previous versions and I'm lost at this point.
I know about the deprecation warning, but thats been there for ages.
The line that calls ytdl-core is as follows:
const dispatcher = serverQueue.connection.playStream(ytdl(song.url))
Using;
Node.js 11.15.0
discord.js 11.5.1
node-opus 0.3.2
prism-media 1.1.0
ytdl-core 0.29.6
it's an issue on ytdl's side
How would that just break overnight though? I haven't even restarted the application
like i said
yeah youtube was a b**** and made it impossible to download songs
Oh.
literallly every bot that pull from utube is broken rn
I still cannot get the path to work, I have to be missing something
Well damn. Thanks for clarifying
Should I try moving the file to a different place?
the directory you searched for simply doesn't exist
Hello is there a support channel?
Ok
@cobalt kestrel support for bot development goes here
I was just wanting to ask if there is a way to bump servers up the list?
ok thanks. I am still going to use the site because its advertisement at the end of the day ๐
kk
I did it and I feel stupid
I had re-written it to leave out the drive and I changed OneDrive to OneNote for some reason
SQLite3
So i made 2 tables, both have the same column name. I inserted values into the column for each of the 2 tables, then ran SELECT * FROM table1, table2 but i only got data from one of the tables, not both.
let money = db.fetchAll(`money_${message.guild.id}`, { sort: '.data'})
console.log(money)
let lol = "";
for (let i = 0; i < money.length; i++) {
let user = client.users.get(money[i].ID.split('_')[2]).username
lol += `${i+1}. ${user} ~ ${money[i].data}$\n`
}
const embed = new Discord.RichEmbed()
.setAuthor(`${message.guild.name} - Leaderboard`, message.guild.iconURL)
.setDescription(lol)
message.channel.send(embed)
(node:4362) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'username' of undefined
tried to log money
[ { ID: 'money_400845681574674442', data: 315 },
{ ID: 'daily_400845681574674442', data: '1568259097556' },
{ ID: 'money_401360645720899584', data: 102 },
{ ID: 'daily_401360645720899584', data: 1567679601757 },
{ ID: 'money_601331300925702144', data: { sort: '.data' } } ]```
idk how to log user the err prevented it from showing + idk how to eval it
im using v7
update: i tried to edit (money.[i].ID.split('_')[2]).username to (money.[i].ID.split('_')[1]).username same thing
i'd love some opinion on how to make this more appealing somehow
put a horizontal line beneath the first title
maybe will help it stand out
otherwise you're onto something
or use a separate field
oh yeah and footer text can display how many pages in the queue, total queue length, etc
yes
inline fields are very subjective
depending on if youre going for readability or prettiness
also maybe video duration if you are up for that
it might cause the text to wrap around making it U G L Y but your call
okay
@earnest phoenix did you fix it?
Ugh nope
const economy = new db.table('money')
let money = economy.fetchAll(`money_${message.guild.id}`, { sort: '.data'})
let lol = "";
for (let i = 0; i < money.length; i++) {
money.length = "10";
let user = client.users.get(money[i].ID.split('_')[1])
if (!user) console.log("lol");
lol += `${i+1}. ${user} - **${money[i].data}$**\n`
}
const embed = new Discord.RichEmbed()
.setTitle(`**${message.guild.name} - Leaderboard**`)
.setDescription(lol)
message.channel.send(embed)
Cannot read property 'ID' of undefined
it was literally working hours ago
Is the ID undefined for the guild
Then it could be that the command has been run from a DM
No?
money.length = 10
this will truncate the array
if the array is bigger than 10, then you will start looping into non-existent items
move that line to before the loop
and then?
Nope same thing
then log money
Is this where im supposed to put it?
const economy = new db.table('money')
let money = economy.fetchAll(money_${message.guild.id}, { sort: '.data'})
console.log(money)
let lol = "";
money.length = 10
for (let i = 0; i < money.length; i++) {
let user = client.users.get(money[i].ID.split('_')[1])
if (!user) return console.log(money[i]);
lol += `${i+1}. ${user} - **${money[i].data}$**\n`
}
yes
[ { ID: 'money_400845681574674442', data: 563 },
4:47 PM
{ ID: 'money_401360645720899584', data: 7 } ]
4:47 PM
so your problem is that you're making the length 10, when its actually smaller, not bigger
so it fills up with empty items until it gets 10
just make an if
if(money.length > 10) money.length = 10
Ok ty! It worked ๐
it is possible to add video to embed ? (discord.js)
Ok, i have another problem
The lb is out of order
const economy = new db.table('money')
let money = economy.fetchAll(`money_${message.guild.id}`, { sort: '.data'})
console.log(money)
let lol = "";
if(money.length > 10) money.length = 10
for (let i = 0; i < money.length; i++) {
let user = client.users.get(money[i].ID.split('_')[1])
if (!user) return console.log(money[i]);
lol += `${i+1}. ${user} - **${money[i].data}$**\n`
}
fetchAll doesnt accept any options, everything inside the () is ignored
it just dumps the entire database
Just filter the returned data.
then what function do i use in v7
v7 of what?
quick.db
how?
What do you get when console.log money?
[ { ID: 'money_400845681574674442', data: 607 },
{ ID: 'money_401360645720899584', data: 7 },
{ ID: 'money_507580053501247489', data: 24 },
{ ID: 'money_568356933967544330', data: 184 } ]
Ok.
const money = await economy.fetchAll().filter(entry => entry.ID == `money_${guild.id}`);```
Something like that but you will have to test.
And that will most likely not work it's just an example.
using startsWith is probably more efficient
unless your entire table only has money rows
quick.db docs are all over the place, many things are not even documented
ik, people say v7 has startsWith but then when i use it, it says it's not a function
what a joke of a db lul
according to the docs in their official website, you should use db.all()
not even fetchAll lol
anyway, if you're using all or fetchAll, if your table only contains money entries, use .sort(), if it contains other types of entries, use .filter().sort()
Discord.js v12, how we do it. so that when a user boosts a server, the bot sends him a private message?
its a message type isnt it
Integrate your service with Discord โ whether it's a bot or a game or whatever your wildest imagination can come up with.
Yeah it would be one of the server messages or whatever they're called
System message
But you can turn it off
message.system
True or false if it's a system message
Then you can check if the content includes boost 
js, how do you wait until a user sends a message?
i currently need to run a block of code, wait until you get a response, run another bit, get a response and send something
but it just runs the first block, and second, and output
channel.awaitMessages()
ok thanks
i did message.channel.awaitMessages(m => m.author.id = message.author.id) but it just ignored it
@quartz kindle
no
duh
ive literally never seen the function before
// Await !vote messages
const filter = m => m.content.startsWith('!vote');
// Errors: ['time'] treats ending because of the time limit as an error
channel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })
.then(collected => console.log(collected.size))
.catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));```
@wide ruin you did = instead of ===
let filter = m => m.author.id === message.author.id
await message.channel.awaitMessages(filter, { max: 1, time: 60000, errors: ['time'] })
is that right then?
should be
tryna have my bot react using message.react but its being stingy rn
what should i use for the emoji string? i'm trying to use ๐๏ธ but it rejects it as unknown emoji
djs master
Use unicode
that's what i'm using
believe its because the wastebasket emoji actually has 2 characters
i used the x emoji and it worked fine
Hi, please tell me how to add new rights to an existing role?
Discord help me now!
what
@keen karma what with
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
haven't set the root password yet, you should just press enter here.
Enter current password for root (enter for none):
ERROR 1698 (28000): Access denied for user 'root'@'localhost'
ok but just pressing enter throws that error wtf
running it with sudo worked :(
cyber lmao
how was i supposed to know
same
i ran into that issue aswell
pretty sure it's because mariadb wants the login request to come from the root acc
or at least thats what i heard
anyone else ran into an issue with the Discord iOS app double encoding spaces in URLs?
doesn't happen on desktop or android, but any links my bot sends, iOS discord encodes %20 to %2520
how would one host a completely separate process to do one thing, and other processes can like send it its params and it'd lighten the load onto that process but also keep it only running once for many of them
Im sure theres a way to use ipc on it but it doesnt seem optimal since it doesnt have a direct way of calling back rather than sending an event to all processes for that one processes result.
you mean like an internal api?
Cool
that's what lambda functions are for
aws lambda / google cloud function / zeit lambdas
How can i see how many Guilds are in a shard
๐ค
Discord.js
How would I remove all reactions from a message?
Ping with response, please.
I'm gonna assume you're on stable and that you already checked the docs like a good developer, so I'm just going to give you the docs https://discord.js.org/#/docs/main/stable/class/Message?scrollTo=clearReactions
@floral bloom
I checked the docs, but didn't see that. Thanks.
Eris, a NodeJS Discord library
How would i do an uptime command for discord js
client.uptime gets you the uptime in ms
you cant be this basic
Aah ok
Im stupid
Wait
Im using glitch
And that doesnt work
For me
Ok nvm
I got it
@dusky marsh how would i convert it into minutes
im stupid
https://www.npmjs.com/package/moment also there is something called google
dude, i meant google it yourself instead of pinging me ๐คฆ
how much is discord nitro boost
$10
Ok
but thats off topic question
@short ocean do you know how milliseconds work?
https://oliy.is-just-a.dev/bqb48_1299.png not to mention google
@short ocean uhm u know, i can give u mine...
No spoonfeeding please
@slender thistle kk
yes
(async() => {
let db = require('quick.db')
let items =await db.fetch('users.test');
let index = items.indexOf(message.author.id);
let newSet = items.splice(index, 1);
db.set("users.test", newSet)
})()
Why is this not removing my user id from the array?
Splice return the values it removed, redefining the original array
One message removed from a suspended account.
oh?
One message removed from a suspended account.
One message removed from a suspended account.
adding a space will really make no difference
Yeah
Anyways youโd want to splice it and then use the original array to post, because when you do .splice it redefines the original one, it doesnโt return the new value
One message removed from a suspended account.
(async() => {
let db = require('quick.db')
let items =await db.fetch('users.test');
let index = items.indexOf(message.author.id);
let newSet = items.splice(index, 1);
db.set("users.test", items)
})()
this?
Alright, thanks for your help!
const discordbotsorg = new DISCORDBOTSORG(config.discordbotsorg, bot);
This ain't sending my stats over?
#topgg-api would probably be a better place to ask
await msg.guild.members.find(m => m.nickname.toLowerCase() == newNickname.toLowerCase())
discord.js lib
why it's throwing me: toLowerCase is not a function
Then that member hasn't set a nickname
hold on
member.nickname returns null if a member hasn't set a nickname
So you could search for username
module.exports.run = async (client, message, args) => {
const economy = new db.table('money')
let money = await economy.startsWith(`money`, { sort: '.data'})
let lol = "";
if(money.length > 10) money.length = 10
for (let i = 0; i < money.length; i++) {
let user = client.users.get(money[i].ID.split('_')[1])
if (!user) return console.log(money[i]);
lol += `${i+1}. ${user} - **${money[i].data}$**\n`
}
const embed = new Discord.RichEmbed()
.setTitle(`**Global Leaderboard**`)
.setDescription(lol)
message.channel.send(embed)
}```
it doesn't send anything
gives me this in log
{ ID: 'money_467569016924274709', data: 24 }```
after ```js
if (!user) return console.log(money[i]);
on the next line add ```js
console.log("Passed");
or something to see if it isn't returning there.
Although, That shouldn't even be the problem. Maybe lol.length is too long?
user might not be cached
if one user is not cached, it returns and exits the function, so it never sends
You could change the return to a continue
meaning it will skip that user.
Or get the user the other way.
master: client.users.fetch(id); I think.
Right, say I have a message like this:
https://gyazo.com/330b868c8c0da5ab92d40edb2ce5445d
and I run a command "b!chooseWinner"
How can I get it to get 1 random person out of everyone that reacted, with a specific emoji?
Get message that was chosen either in the command arguments or in a different process -> get list of reactions -> find specific emoji -> get list of people that reacted -> get random index of the list -> you found your winner @snow urchin
Anytime I do this, it just returns undefined:
message.channel.fetchMessage("message id").then(msg => {
msg.reactions
})
what do the docs say?
And wdym it returns undefined, log it
maybe it's because msg.reactions has no action, so the bot does nothing with that code
whelp maybe except storing it
it will only collect it, but after collecting, based on the code you sent, it will do nothing after msg.reactions
How to upload own bot
i have typed above 300 characters but still saying this only
300 characters is 300 words
ik @grim aspen
@slim heart not helping
I have typed 300 words
Thatโs why I deleted it thanks
Does anybody here know how to host a c# (.net) bot 24/7 for free?is there a way?
vps
what is vps?
No there isnโt @manic blade unless you run it on your computer thatโs on 24/7
Or like an old laptop, some people even use their android phones
PLEASE HELP ME
posting your issue would be nice
how can i add bot to official discord bot list
yes it dosent work
Define โdoesnโt workโ
whats the problem
how do i check for a specific error code
@modern elm error.code it usually is
ok thx
@ebon tiger can you read
yes but dont know what to do now
lmfao
bye
Well add some more things to get 300 characters
And not random bs either like actual stuff
i made this bot on discord bot maker apk
That has nothing to do with this
๐คฆโโ๏ธ
what should i do in this html section
where i can read ?
i said i dont know what to fill in this
you dont know what "detailed description of your bot" means?
yes i dont know
do you know what the word "description" means?
in detail
to describe something = to talk about something and explain about something
detailed = with a lot of information
My bot commands?
@ebon tiger we dont allow bots on our site that are made on a phone
why
lol rly
@quartz kindle because no code 
wait is dbm also banned?
then what i am saying
dbm is allowed
@ebon tiger because we want our bots to actually be coded, not just made in a template
cuz its not just templating
@quartz kindle it allows people to do more than just template bots like botghost and dbd
well he said hes using dbm apk, is it different from dbm desktop?
yeah, its a completely different thing
ah ok

quickly need help, for channel overwrites how many overwrites can I set up ๐ค
e.g. can I have permissionOverwrites for one thing and permissionOverwrites for another role or user (library is discord.js)
nvm resolved
so basicially
i try to make a message collector
and on collect it should add a previous made role
but if i run it to add the role
which confuses me
just
a little big
Oh I didnt even see that
Author returns the user object, you need the member object to add a role.
It does
the docs have everything you need
message object
learn to use them
Properties
@twilit rapids hoW can i get the member obj from him then?
Docs
You can use message.member instead of message.author.
thaNK
(Which is in the docs)
man i love it when people are willing to cry, pout and beg for an answer for 5 minutes instead of reading the docs which would've taken a minute or less
I wish YouTube bot tutorials put more emphasis on how to read docs
ive yet to see one that mentions docs
I wish YouTube tutorials dont give the code in description
if youtube tutorials were actually good at teaching, teachers would not have jobs
yes
But my teachers show youtube videos
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
yeah
not every y occurance in x
easy pagination https://www.npmjs.com/package/discord.js-pagination
ew pagination
pagination is better than cluttering a channel
true
^learned this the hard way lol
My pagination is 9 lines long 
pagination is supposed to be used to show large amounts of content in a small message, a lot of people use it for other things too which becomes really bad UX
yeah that's fine
where it returns hundreds of results
Its nice for stuff like help command too, if you want to display by module
yes
How ?
message.edit(newEmbedWithNewImage)
use another embed
Im using sqlite3 (discord.js) and was wondering if anyone knows how to make it so if a response is "true" continue the code, and if it is something else, don't.

if statement?
?
if (variable) {} else return
Braindead.
You literally have to define a seperate embed. End of story @lofty hamlet
he wants to edit the message
there's no way to directly edit the embed, you need to replace it as a whole
^
use this
get data
I for once agree with @earnest phoenix
add to it
you can literally new Discord.RichEmbed(<MessageEmbed>) I believe
then treat it like any other embed you're coding
It's a little different on master
I assume you're on stable though
who said they were using javascript
d.py async has <embed>.setimage(url)
likely same case for rewrite
Because I've helped him before...
fair enough
He could've moved to another lang
I'm meaning right now tho
but I'm using past knowledge
does any one know how to use youtube_dl search function properly please send me a code snippet example
youtube-dl?
ytdl
@amber fractal ytdl fixed it after like 10min
they could be using ytdl alone without packages
ยฏ_(ใ)_/ยฏ
let them breathe lol
^
@earnest phoenix They have lungs for a reason.
node-opus, ytdl-core, ffmpeg are required to make a music bot.
Turbulent.Today at 11:10 PM
node-opus, ytdl-core, ffmpeg are required to make a music bot.
this is false
^
that's a standard for node.js bots
required to make a music bot in node*
you can make a music bot with anything that encodes audio into opus bytes and that converts non standard audio to PCM
That better?
andesite/lavalink 
still wrong
@small latch leave if you arent helpful
@west spoke it is giving me an Exception of command Invoke
wait i will send u a code
send here
Use hastebin or pastebin, code blocks in discord are meh.
^
having to open a new tab annoys the shit out of me
because i usually have 50+ tabs open
why
Fair.
@quartz kindle i mean chrome on phone is optimized a loooot so I have like 100 idle tabs
Since it opens new ones for discord

by "optimized" you mean, it saves the link, then refreshes the page every time you open said tab
lul
hey i had a question
so im adding a feature which adds a user a role when they send the bot a dm
but I don't know how to specify a guild for .guild
@slim heart ok tnx for replying i didnt see that
I know what it is im just having a massive brain fart
it doesn't exist, you need to get it from your client
im hoping to define it by id
@earnest phoenix they need to define server ID/get servers that the user is in
and that the bot is in as well
either the user needs to supply the guild in the dm
no its the same guild no matter what
or you need to save the guild information if the user talks to your bot before moving to dms
then just get the guild by id
client.guilds.get(id)
that
if(message.author.bot) return;
if (message.channel.type == 'dm')
let guild = 622175430501335050
let role = message.guild.roles.find(r => r.name == 'Currently Being Helped');
message.guild.members.find(m => m.id == message.author.id).addRole(role);```
this is the code at the moment
@west spoke I don't help brain non-existent people.
@modern sable can you brighten this guy's mood pls
Of course, who else Messi.
wow
@earnest phoenix look at my last message
Are you serious?
i know i fixed it
๐
Hellyea
....
Make me walk, make me talk do whatever you please.
@small latch stop
Can you not
marco pls
@small latch can you stop insulting people and take this chat seriously
he's so goddamn annoying
this is for development only
if you want to meme, #memes-and-media is available for you
Do you use macros @modern sable
Cmon dude

You 're not even funny anymore
@manic blade Want to brush my hair?
thank you
wow
Good enuff marco

Anyways what's the endpoint for user roles
or better yet, server roles
Aaaads
Ban
@modern sable have fun
Is that not allowed?
ะฝะตั
Is there a way to check if someone is invisible with a .net bot?
Discord makes the invisible(5) offline(0)
api calls
Having some issues, anyone know how I can fix this code? (discord.js)
const guildConf = client.settings.ensure(message.guild.id, defaultSettings);
TypeError: Cannot read property 'id' of null
at Client.client.on.message (/root/DiscordBotApp/bot.js:107:58)
at Client.emit (events.js:203:15)
at MessageCreateHandler.handle (/root/DiscordBotApp/node_modules/discord.js/src/client/websocket/packets/handlers/MessageCreate.js:9:34)
at WebSocketPacketManager.handle (/root/DiscordBotApp/node_modules/discord.js/src/client/websocket/packets/WebSocketPacketManager.js:105:65)
at WebSocketConnection.onPacket (/root/DiscordBotApp/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:333:35)
at WebSocketConnection.onMessage (/root/DiscordBotApp/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:296:17)
at WebSocket.onMessage (/root/DiscordBotApp/node_modules/ws/lib/event-target.js:120:16)
at WebSocket.emit (events.js:198:13)
at Receiver.receiverOnMessage (/root/DiscordBotApp/node_modules/ws/lib/websocket.js:789:20)
at Receiver.emit (events.js:198:13)```
```javascript
client.on("message", message => {
client.settings = new Enmap({
name: "settings",
fetchAll: false,
autoFetch: true,
cloneLevel: 'deep'
});
const guildConf = client.settings.ensure(message.guild.id, defaultSettings);
if (guildConf.inviteblock) return; {
const inviteLinks = [`liam:invitelinktest`]
try {
if (inviteLinks.some(word => message.content.toLowerCase().includes(word))) {
message.delete();
let warnConfirm = new Discord.RichEmbed()
.setTitle(`Punishment Successful`)
.setDescription(`${message.author} was warned for sending invite links`)
.setColor(`#006aff`)
.setFooter(`By [AUTOMOD]`)
message.channel.send(warnConfirm);
}
}
});
I want it for .net btw
make sure that these messages occur only in a guild
if (!message.guild) return; at the top will stop dms
It wasnt a dm



