#development
1 messages ¡ Page 515 of 1
Database 101: Its a base for data
@oblique sequoia *because it doesn't want to be attacked with corruption
or the RAM void. Where dead memory sections go.
I need help, I'm making a command that ban all Users that is in the database. The problem is that is giving too many errors.
IndexError: tuple index out of range
await ctx.send("**Command list:**```{0} - {1}```".format('\n'.join([cmd.qualified_name for cmd in client.commands])),''.join(ree))
where ree = ["" if x==None else x for x in [cmd.qualified_name for cmd in client.commands]]
I use discord.js with sqlite
I use python
Why can't level store objects? If I put in an object, I always get [object Object] when I get it.
@hollow fulcrum Uh, I see a parenthesis after client.commands thing
There are two of them, actually
That's the issue
ty
``python
ello = ree[eee] + [" - "] + [cmd.qualified_name for cmd in client.commands][eee]
TypeError: must be str, not list```
can someone explain this error
please
Did you write the whole bot yourself?
It freaks me out that arrays are named lists in python. The error is , that whatever you're trying to do with it should be a string. And you are using an array.
And arrays are the thingies that have [] around them
yus
I'm guessing eee is not a number
Also how do you even code with such horribly named variables
I need help on databases, how do I start using it and how do I start off with them. I really need to add some useful commands to my bot to help it become more useful.
Language?
py
I want nothing to do with py lol
pog alright
databases are hosted, so get a mysql database from ebay or 000webhost or something
I've tried py today. Everything about it creeped me out.
If you're using js and want something really basic, use enmap. very good thing.
stop making people switch to js fam
js is superior fam
i like py better
i'll be learning java next year i hope
js is very useful, especially for web development. Many programmers hate it, but imo it's much better than py
and there are amazing things such as node
Rewrite your bot in js.
lol
Yes, I should rewrite 5 months of work.
java's the best
Is there a way to see what invite code the user used when they join a server?
Using Eris btw.
yep
store invite counts + their code before an user joins
user joins
check all invite counts
look what increased with 1
return that code
@winged shell what database do you even want to use
anything that i can use
I have only used sqlite and mongodb so far
a database is where data hides so its safe from corruption and ram which is where dead memory sections go
mongodb >>> *
im aware on what a database is
Aye sir
i just dont know how to use/make one
mongodb is gud :^)
still using discord.py not discord.js
oml
@carmine echo People use what they want 
ok
@hollow fulcrum What error is that even
idek
All I can guess from there is your [] + [] shit
Oh actually nvm, list + list works too
list
array
Which is better?
golang slice is better
arr.slice(1, 5)
// array of string
[]string
// array of ints
[]int
len(str)
str.length
Which is better?
len
no
As I said already, it's about opinions, not "X is better than Y because I Want It To Be Like That"
You're obviously really wrong
he isn't tbh
Okay, your opinion is yours. I am not the one to tell you what to like.
Got you there boi :^)
python lists are called that because of https://en.wikipedia.org/wiki/List_(abstract_data_type)
In computer science, a list or sequence is an abstract data type that represents a countable number of ordered values, where the same value may occur more than once. An instance of a list is a computer representation of the mathematical concept of a finite sequence; the (pote...
Someone is trying to get my bot removed for âspamming his serverâ even though I didnât spam it. People in my server spammed them but I didnât know anything about it. How do I make sure that DBL wonât remove my bot?
tell the person they are a moron
they can't unless they try to impersonate you and somehow trick the moderators, also this is the development channel. (Pst. someone was asking to do that previously)
and blacklist them from your bot
alright so i keep getting errors from phin right
and its saying all these aren't valid links what not
but it shouldn't be trying to get all of them because they dont .match(/http/)
urls need a http and stuff and all so, yeah your regex is a bit broken
doesn't really work https://regex101.com/r/FUM9nQ/1/
ok well the same thing happens when i do arg[i].match(/http/gi)
that errir is not even related to ur regex
ur just a brainlet and making a request to an argument
instead of joining it into 1 string
idk what ur doing
or are u doing some magic
i mean starting with http isnt right but still
I'm trying to test if each argument might contain a link and if it does request the link to see if its a valid website
no
u know somebody will just put a link and get ur bots ip
then ddos 
so u shouldnt do that
It's too prevent my censor bot from picking up website links that contain random characters and ends up censoring
ah ok
and also with this you wouldnt be posting anything so it wont send the ip
uhh
what?
im pretty sure it will send HEAD request or something
and then i started actually trying to do it and it does this
whatever link ur using it will 100% get ur ip
lmao tony
what
just did that still does the same thing
just a nitpick
it trys to run phin on everything regardless of it it matches the regex???

do a console.log in the if for regex match
see if it matches always
wait a second

check line number in error
did u leave it in? 

and im back once again
2 second later
because even if its a thing it still errors
like it gets status code 200
actually i think i have to do it in editedswearfilter because the whole thing yeah
lol
y e e ee ee es
and it still doesnt work
ok
yk what
hhh
idec
lol
what are you making
How can I make my bot leave the server in another shard
ipc
What are shards?
o wait i think broadcasting is working lol
broadcast eval
well dont servers get assigned to shard based on id?
ye i was just confused because of this, thanks ^^
some formula iirc
so no need to broadcast
u can calculate which one to send to
idk if d.js can do that. eris btw 
^
but return isn't an expression
so that webhook thing from yesterday was a really good idea
not only do i not have to use a bot, but i can run a simple webserver to listen and post said webhook

n0w i just have to teach nginx to behave
aka website/api redirects internally to webapp:12514
but website/api:80 doesnt
I used dnd in client.user.setStatus and it didnât work
what lib
http://yourdomain/api is the same as http://yourdomain:80/api
http implicitly uses port 80
https uses 443
Nvm it was a typo

i should be moar clear
http://mydomain/api redirects to mydomain:<some weird port>
$ curl http://<my domain>/api -X POST -d @test.json
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (7) Failed to connect to <my domain> port 80: Connection refused
eg this
/etc/nginx/sites-available/default:
location /api {
proxy_pass http://localhost:21514/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
this might be out of the scope of this channel tbh
as in /api?
ohhhhhhhh
my "web app" is trying to be /
@app.route('/', methods=['POST'])
async def listener(request):
if request.method == 'POST':
#print(request.json)
#return HTTPResponse(body=request.json,status=200,content_type='application/json')
the_embed = await build_embed(request.json)
webhook.send(embed=the_embed)
return HTTPResponse(status=200)
else:
raise exceptions.abort(400)
if __name__ == '__main__':
app.run(host='0.0.0.0', port=21514)
i SUPPOSE i could try making it /api instead of /, that might do something
I usually put the vps ip instead of localhost but idk if that could be the problem
yea cause im using 0.0.0.0 on the other 3 web apps i have running
i mean i can curl to <mydomain>:<weridport> and it works fine
but i cant curl <mydomain>/api
it did
@sick cloud omg what is the plan
tooonnnnyyyyyyyyyyyyyyyyyyyyyyyyyyyy my project is failing
because of youtube

omg
i wanna kill you
dont mention people for help...
did u try reinstalling the thing
tb>play duck song
ytdl died
uh oh
use another api
youtube is not down
does it look down to you
if reinstalling the package doesnt work maybe create an issue in the package's repo
ytdl is dead
and how do you do that
5 times
use another package
dead.
lol
dead
.- .
i was planing to study but now i cant because i have to fix this
@sick cloud google owns youtube why would google want to help me?
when i am harming youtube
ok fine
yea
daam what the hell is yum?
yeah it IS dead
# yum install youtube-dl
thats not ytdl, thats different to what we use lmao
works perfectly fine
it even plays, maybe its just on you
it makes me more when not much people facing the issue
ÂŻ_(ă)_/ÂŻ
oooooooof
my code
was working fine
always has been working fine
@sinful lotus what lib are you?
o
:(
aaaaaaaaaaaaaaaaaaaaaaaaaaaa
i need a bot in js now
thats is it my bot is going to be coded in js
blocked
Because i am freaking done with those stupid stuff
simple but quick q whats the max number of bots a user can own?
25
25bots?
k thanks đ
np
regex is hard
25 per discord account?
it literally took me forever to do this
reg := fmt.Sprintf(`<[@!?]+?%s>$|^%s[a-zA-z]+$`, s.State.User.ID, regExpEsc("tb!!"))
ew regex
thats a pretty simple regex lol
i cant regex either
Can I pretty please with a cherry on top have a tutorial on SQLite because I'm dumb :(
(im using discord.py)
Don't forget to use a lib such as aiosqlite
try node bot in console
what are shards?
Does anyone know how to run a script when you start a node application?
style="width:100.2% margin-right:20px!important"
there would be no colour
when i do it
well gray
ops what ever
@amber stone multiple connections to the discord API because the max for one shard is 2500 servers, sometimes each shard runs in a separate process
Hello! Is there any date when bot certification application will open? (I know early november, but is there ~date?)
apt-get
apatche
lmao
thanks, umm whats the differents
i heard nginx is better
but i never tried it
nginx handle many concurrent connection better m9
aaaa
ok
fine
where is nginx directory?
type "whereis nginx" in console
or google
i got it
but the issue
or /etc/nginx
is
lol
the issue is
it doesnt work
!!
like the directory does
check status. is it running?
but when i put the website in the direcotry it doesnt work
is configured correctly?
do you need to config nignx?
idk if default will just work for the www data folder or whatever
best to view a tutorial
i always just wipe the config since im using it as reverse proxy lol
ouch
guys
is there is anyway
i could stream music on a vps without it the sound stopping when i close remote connect?
why would you do that

Hey, i need help. The console says DiscordapiError: Unknown User
You have provided either a user you don't have shared servers with or an invalid one.
why am i getting "Possible EventEmitter memory leak detected. 11 message listeners added." when i use broadcasteval lol
how can i use internal sharding thing and is that really possible to get guild datas in a shard from a different shard without broadcasteval
Look, I have this error: Error: Can not find module './staff.js' but I do not have in any file a require or include of that file, what could it be?
Is it coming from your file alone or is it coming from an npm package?
send the exact console
@sonic glade that is from node.js itself
look at line 550
and it says that it can't find a file called staff.js
that there is no file called staff.js
I do not know, one has capital letters in the D and the other does not, that's what makes me not error
Yes
Send?
DM send
I do not know, but it's public so I could see it anyway
ok?
literally all he needs to do is create a file called staff.js in the current directory
well he shouldn't have too
Same error :c
but hes trying to get a file that doesn't exist
đ
yes so get rid of the thing calling the file
he should actually fix the problem instead of doing some halfassed solution
If I do not have the file created or anything that requires or includes it, why does the error come out?
changing the `` in a file to a "" is not a part of the problem
that he is trying to get
@sonic glade if you don't know the file just stop trying to get it
yes
Gentlemen, I added the code that of the command / staff and I started with these errors, but I do not understand why they come out if I do not have the file nor the require and / or the include
@sonic glade can i see this github thanks
Resolved, thanks to both of us, I deleted a code that had an old command reset the bot and now it was fixed, I do not know what that command would have to be but good @earnest phoenix @slim heart
đ
o o f
hmm
Is there any way to make an embed that when using for example: / owners shows you the users with the owner role?
I use discord.js
How can I use this ?
Is there a way to join a server through my bot. Like my bot has been joining servers and I want to join one of them. Like a command !backdoor [server id] and it will send me the invite to the server? Im new to code so sorry if i dont understand anything
what lib?
https://discord.js.org/#/docs/main/stable/class/GuildChannel?scrollTo=createInvite looks like this is one of the ways
just fetch a random channel from the server
and create an invite on the channel
what if im not in the server though
(btw i think this might be against tos lol)
about what
SkarffToday at 19:32
what if im not in the server though
do not add a backdoor
unless the users request an action
it shouldnt do anything
do not add a backdoor
okay..
its for support though
like if they need help they can do !support and it will send a team an invite
nvm
help should show the command list
example
Help is a common command to get a brief information about a bot or how to use it, not to ask for support to scrap invites to those servers
it was an example command
A terrible example then
ill edit it then jeez
Either way, it's not bad to have it, as long as the user fully committed for support to join and actually knows what the command does
dream already sent the link
yeah but im dumb lmao
idk how to incorporate .createInvite() into a command
ill go to stackoverflow to ask 1 sec
fetch the channel
if any
and use channel.createInvite()
Also it would be better just to send a support server invite for a support command.
would guild.channels.first().createInvite() work?
also yeah I realise it now but im in to deep
That will force it to use the first channel, and there is a possibility that that channel may now be accessible for creating invites
You should loop through channels and see which one allows you to create the invite to
it wouldnt work anyways
Channel can also mean a category channel
^
oh
it would be easier to just try it for the channel they tried it in
^
ya
but it would be more likely to work if u just go to the guild invites list and get the first one
or you can filter through the type the channel
^^ Which can be done by doing https://discord.js.org/#/docs/main/stable/class/Guild?scrollTo=fetchInvites
any librarys that have voice recognition that would work with a discord voice channel? like a fs stream?
you'd have to code voice recognition yourself
but discord.js might be the best there
it has onvoicestream and all afaik
Iâm curious, Iâve seen a lot of bots show how many commands have been ran since the last restart. Anyone have any idea on how I would do that?
just increment something whenever a command is used
Iâve doing that but ehh
My brain is hurting right now trying to get something done before I get off
So. I've been working on a little project which requires me to emulate memory
let memory = {}
class Table {
/**
* A class that acts as a means of emulating a chunk of memory
* @param {String} name A String to prefix memory addresses with
* @param {String} id A unique ID in which to fill memory addresses with
* @param {Array} values An Array of values to populate the table with
* @returns {Array} An Array of memory addresses that were filled
*/
constructor(name, id, values) {
this.name = name;
this.id = id;
this.values = values;
values.forEach((item, index) => { memory[`${name}${id}${index}`] = item; });
this.addresses = Object.keys(memory).filter(o => o.startsWith(`${name}${id}`));
return this.addresses;
}
/**
* Destroys the table from the memory
* @returns {void} void
*/
destroy() {
void this.addresses.forEach(item => delete memory[item]);
}
}
I call something like:
new Table("U", "320067006521147393", [1, 2, 3]);
And it does what it's supposed to but I'm wondering if there might be a better storage method I could use for what I'm trying to achieve at least or if there's any way I can improve on this
@lament rock The void keyword in destroy(), in this case, does nothing. You can remove it and behavior will be the same. return this.addresses; in the constructor also does nothing, you can remove it.
so, if I were to set something to = a new Table, it would be pointless to return an array?
yes, "this" is always returned from the constructor, you don't get to choose what to return from it
Ah right. I could just call this.addresses
How you compiling it right now 
Anyone know how to use internal sharding in d.js (master?)
o, is that all? And can i ask you a question about if you know how it works
well I never tried it myself on the production code, but on internal sharding, you dont create new client instance per shard
although things can get problematic when you use internal sharding on a big bot
how so
because javascript is single threaded
if you got a lot of guilds for example 20k, you are stuffing 20k guilds on a single thread
oof i have 28k i need the only one client instance bevause i dont want to broadcast eval everytime on the dashboard for guild stats etc.
you will suffer from single thread disadvantage tho
if you dont want to broadcastEval why not make the shards send a message to the master process
then master process will do the computation and get the data from there
umm, can u explain it
Shards will send a message to the Master Prcoess through this, and on that message is the data you want from that shard.
https://discord.js.org/#/docs/main/master/class/ShardClientUtil?scrollTo=send
https://discord.js.org/#/docs/main/master/class/ShardingManager?scrollTo=shards
Then access each shard data from this in master process.
inside the shard object of sharding manager there is a message event
https://discord.js.org/#/docs/main/master/class/Shard?scrollTo=e-message
well, how am i going to find the guild and send the data to the dashboard
send a message to shards from the master process. if shards can send message to master process, master process can send messages to shards too
and on the shard, process the data you want to get, then only the shard that has the data will send back a message to the master process
oh ok, thank you very much i'll try that 
Guys
How can i make like
Name1, name2,name3```
That has "ADMINISTRATOR" permission
check for those that have it
@hardy sierra js?
Hey! My 8ball cuts out the first word of the question... Can someone help?
yea send code
me?
yes
@hardy sierra
You mean like this?
{
"token": "hi theere",
"prefix": "!",
"admins": ["478583597633372172","414764511489294347"],
"uBlack": [],
"gBlack": []
}
k
const Discord = require("discord.js");
module.exports.run = async (client, message, args) => {
if(!args[0]) return message.reply(":uUntick: Usage: {prefix}8ball <Question>");
let replies = ["Yes","No","Ask again later!","I dont know","Sure","Percisly","Very doubtfull","My program says no","Sign points to yes","Most likely","Outlook not so good!","Without a doubt","Better not tell you now!","Conentrate and ask again!","It is certain","Outlook good","Yes-definetly","You may rely on it","Dont count on it!","Reply hazy, try again","Most likely.","My sources say no"]
let result = Math.floor((Math.random() * replies.length));
let question = args.slice(1).join(" ");
let ballembed = new Discord.RichEmbed()
.setAuthor(message.author.tag)
.setColor("#FF9900")
.addField("Question:", question)
.addField("Awnser", `${replies[Math.floor(Math.random() * replies.length)]}`)
.setTimestamp();
message.channel.send(ballembed);
}
module.exports.help = {
name: "8ball"
}
there
let question = args.slice(1).join(" ");
1 is the 2nd element
array start at 0
so ur removing the first word
yes... just dont slice the first element
no, you need to join args, but you dont need to slice the first element
So the code should be:
let question = args.(1).join(" ");
Or something
I am a retard so yeah...
huh
nvm
@amber junco,
let question = args.join(" ");
Np

@amber junco pst he said array start at 0
ik
So đ
lua is dumb
Where?
You can't right now
oh
k
Using discord.js how do i get my bot to display how many users there are all together in all of the servers?
nvm got it
was doing client instead of bot
Hey, I have a daily command. But the problem is that quick.db is always crashed, and I decided to do it on sqlite3. But I don't know. Someone could help me?
what exactly is the problem
Not knowing SQLite3? 
that quick.db is always crashing @ruby dust
still no context, show code at least
@ruby dust
I don't see the sqlite code, or does it differ between languages?
I'm using python fyi
quick.db crashing? 
also, in my experience you don't need to require the file itself, you just need to let sqlite connect to it
hey, how do I set on message event for shard?
this is what am i trying to do but i don't know how to get this work, any examples?
https://discord.js.org/#/docs/main/master/class/Shard?scrollTo=e-message
@bitter sundial , I'm tagging you for this question, since you are one of the web devs/administrators.
So I saw that patchbot had a clean page on dbl.
The question is, can every user do that, is it free?
If you can do that, how?
css
'k.
And do you just need to put in in the place where the HTML code should stand?
in long description
in discord.py, is there something along the lines of embed.remove_field?
thank
how to use discord js shard's sending message to master process and read it from other shards...
o thank you
it didnt change anything and i dont know why
it doesnt log anything when i do client.shard.send()
process.send
return Math.floor(Math.random() * Math.floor(max));
}
let flipped = getRandomInt(2);
if(flipped == "1") {
//code
} else {
//code
}```
Why doesn't that every randomize?
er no
so your saying you made that code
Indeed.
Alright, get the fuck out of here if your not going to help. Don't just say that there is an error because I obviously don't see it.
When comparing the flipped variable it is an integer. You compare to a string.
@gilded blaze spoonfeeder
shut it
@gilded blaze Does't 2 equal signs compare strings?
you need 3
Learn JS
or just do value == 0
and he doesn't need 3
oof no ""?
its not spoonfeed but ok
he gave me the code
(âŻÂ°âĄÂ°ďźâŻď¸ľ âťââť
thats the exact definition of spoonfeeding
oh wow an if and else statement such spoonfeed!!11!!1!
đ
what exactly does permissions.freeze() do?
d.js?
yes
Looks like it makes them unchangeable
oh thanks
What's actually going wrong here? Because this only happens if there's only 1 arg (after I .split(' ')) but if it's one argument it always does this idk...
we need to see code
for(i=0; i < arg.length; i++) {
if(arg[i].match(/http/gi)) {
linkbypass.links.forEach(bs => {
let bsr = new RegExp(bs, 'gi')
if(arg[i].match(bsr)) {
arg = arg.filter(f => f !== arg[i])
}
})
} else {
arg[i] = arg[i].replace(/("|\*|\.|'|\||\\|\/|`|\<|\>|@|#|!)/gi, '')
}
}```
(actual code)
?
How to put a list of servers into embed pages like i want to separate 50 servers in 1 page
@visual zenith What's your goal. And also your lib?
embed page
like page 1 has 50 servers and page 2 has another/different 50 servers
i already mapped it out
SO there's probably a much better way of solving this, but you see I'm dumb so what I'm gonna tell you to do is forEach your guild array and push it to a separate array and then use your key for every 50
l o l
forEach?
like this?
const guildNames = client.guilds.map(g => g.name).forEach()
so just do js let srr = [] bot.guilds.array().forEach(guild => { srr.push(guild.whateverpartoftheguildyourtryingtodisplay) })
you want guild names?
yes
so
let srr = []
client.guilds.array().forEach(guild => {
srr.push(guild.name)
})```
and that'll give you a list containing all the guild names
so it'd look like
srr = ["guild1", "guild2"] so on
i only have 74 so just up to 74?
Well actually your map does the same thing
so
im confused what you really need help with-
like page 1 has 50 servers and page 2 has another/different 50 servers
or one page has 50 and the other 24
Oh so you need help actually putting them into the embed?
Ok yeah I can't really help you past that point, if I told you what to do you'd end up with code looking like:
embed = {
blah
fields = guildNames[0]
fields = guildNames[1]
fields = guildNames[2]
fields = guildNames[3]
blah ?
or well if you want to actually if you just want to put only the name
let str = ""
for(i=0; i<50; i++) {
str = str +"\n" + guildNames[i]
}```
m a y b e
try that?
Also
I don't think you could fit 50 server names in one embed
since it's a limit of 2000 characters
Not sure
It depends on what people name there servers
I mean I think you'd be fine with 20-30?
But people can just make their server name really long and it'd screw up whatever page it's on
yeah str should be a guild name then a line break then the next guild name etc.
so i just attach it to a embed?
Just replace that i<50 with whatever number of guilds you want in it
what about the next page after one reaction?
const guildNames = bot.guilds.map(g => g.name)
let str = ""
for(i=0; i<100; i++) {
if(i<50) continue;
str = str +"\n" + guildNames[i]
}```
so that'll do 50 to 100
again probably a better way of doing it but thats my janky way
wait so what happens if it goes over 100? like i press the ⥠2-3 times?
then just make more of those
that i<100 is the end of the number so (50-100) and then that if(i<50) continue is the start so (50-100)
so here I'll build you some code for up to 200
const guildNames = bot.guilds.map(g => g.name)
let oneto50 = ""
let fiftyto100 = ""
let onehto150 = ""
let twohto200 = ""
for(i=0; i<50; i++) {
if(!guildNames[i]) break;
oneto50 = oneto50 +"\n" + guildNames[i]
}
for(i=0; i<100; i++) {
if(i<50) continue;
if(!guildNames[i]) break;
fiftyto100 = fiftyto100 +"\n" + guildNames[i]
}
for(i=0; i<150; i++) {
if(i<100) continue;
if(!guildNames[i]) break;
onehto150 = onehto150 +"\n" + guildNames[i]
}
for(i=0; i<200; i++) {
if(i<150) continue;
if(!guildNames[i]) break;
twohto200 = twohto200 +"\n" + guildNames[i]
}```
no all of these are giving you a string
so in the embed just say the variable and it should put them all in an embed
xD
can we laugh at it
So look
when i do it, it gives me a guild name, then it line breaks, then a guild name
so in the embed
just use the variable oneto50 and it'll add them in (i think)
I'm not the best with embed but I'm pretty sure that'd work?

but im using this code for embed pages
forwards.on('collect', r => {
if (page === pages.length) return;
page++;
embed.setDescription(pages[page - 1])
embed.setFooter(`Page ${page} of ${pages.length}`);
msg.edit(embed)
});
I have a seperate embed developer so
Ok well you should be making an embed with json imo
no
i know how to but im having karma
they are sloppy
use that
this is my reaction embed pages
const embed = new Discord.RichEmbed()
.setColor('RANDOM')
.setFooter(`Page ${page} of ${pages.length}`)
.setDescription()
message.channel.send(embed).then(msg => {
msg.react('âŹ
').then(r => {
msg.react('âĄ')
const backwardsFilter = (reaction, user) => reaction.emoji.name === 'âŹ
' && user.id === message.author.id;
const fowardsFilter = (reaction, user) => reaction.emoji.name === 'âĄ' && user.id === message.author.id;
const backwards = msg.createReactionCollector(backwardsFilter, {
time: 60000
});
const forwards = msg.createReactionCollector(fowardsFilter, {
time: 60000
});
backwards.on('collect', r => {
if (page === 1) return;
page--;
embed.setDescription(pages[page - 1])
embed.setFooter(`Page ${page} of ${pages.length}`);
msg.edit(embed)
});
forwards.on('collect', r => {
if (page === pages.length) return;
page++;
embed.setDescription(pages[page - 1])
embed.setFooter(`Page ${page} of ${pages.length}`);
msg.edit(embed)
});
});
});
const { MessageEmbed } = require('discord.js');
const embed = new MessageEmbed()
.setTitle('this is so easy')
.setDescription('mmlol');
msg.channel.send(embed);
i guess just make .setDescription(oneto50)
v12 btw
Not sure how it works so-

const Discord = require('discord.js')
const guildNames = bot.guilds.map(g => g.name)
let oneto50 = ""
for(i=0; i<50; i++) {
if(!guildNames[i]) break;
oneto50 = oneto50 +"\n" + guildNames[i]
}
const embed = new Discord.RichEmbed()
.setColor('RANDOM')
.setFooter(`Page 1 of 69`)
.setDescription(oneto50)
message.channel.send(embed)```
here
and put emotes on it too
Wym?
like \⥠and \âŹ
Yeah ik
so it edits the embed and changes it
I was just replacing the top part of ur code
do i need to change this?
forwards.on('collect', r => {
if (page === pages.length) return;
page++;
embed.setDescription(pages[page - 1])
embed.setFooter(`Page ${page} of ${pages.length}`);
msg.edit(embed)
```?
like the description part
but it needs to change after every reaction clicked
just do like if(page == 1) somevar = oneto50
if(page == 2) somevar = fiftyto100
if(page == 3) somevar = onehto150
if(page == 4) somevar = onefiftyto200
and then setDescription(somevar)
Like I could write it for you but I'm not about to spoonfeed you code. Even if its my shitty code, its still spoonfeeding

Is it possible to have a command ex:
!servericon
and the bot gives you the server icon
and
ex:
!embed hi there
is it possible?
somevar = page * 50
huh?
const Discord = require("discord.js");
module.exports.run = async (client, message, args) => {
let target = message.mentions.users.first() || message.author;
message.channel.send({files: [{ attachment: target.displayGuildURL, name: "Guild.png" }]});
}
module.exports.help = {
name: "serveravatar"
}
my current failed serveravatar
code
error?
How to make a game like slot machines, blackjack, etc.
Try using Plexi Development
They're good at djs
@visual zenith
Also postres > Enmap
yes i do
postgres
im waiting thats all
i post it on multiple servers so I can find different ways of doing it
ew repeat post
const Discord = require("discord.js");
module.exports.run = async (client, message, args) => {
let target = message.mentions.users.first() || message.author;
message.channel.send({files: [{ attachment: target.displayGuildURL, name: "Guild.png" }]});
}
module.exports.help = {
name: "serveravatar"
}
my current failed serveravatar
code
error
sending message incorrectly 
msg.guild.icon Iâm pretty sure
blindly asking for help 
clueless and asking in multiple places to annoy as many people as possible with a googleable question 
taco gets alll the internet points
I did, none of them are using the same message handler
its not working because (and if you read the error you would know this)..
it must be a string
or buffer
Lol
if u make attachment u have to download the file iirc and send a buffer
not just send the url
or just put in in an embed
oh ok
not asking in anidiots.guide
kek
how to make bot?!?!??!!?

usual new coders right now. Fork guide bot without analyzing how it works.
Hi
i need help with lavalink
Are somebody use discord.js-lavalink ?
{ Error: Parse Error
at Socket.socketOnData (_http_client.js:441:20)
at Socket.emit (events.js:182:13)
at addChunk (_stream_readable.js:283:12)
at readableAddChunk (_stream_readable.js:264:11)
at Socket.Readable.push (_stream_readable.js:219:10)
at TCP.onStreamRead (internal/stream_base_commons.js:94:17) bytesParsed: 0, code: 'HPE_INVA
ID_CONSTANT' }
``` my bot got that error
or tell jacz to update
or just use d.js voice
!embed Hi there
@amber junco what is that lol
nvm
lets take a minute of silence to appreciate that we are live
Now that it has been a minute, is is possible to add rich presence to a bot?
Nope
How do I find a channel's id?
No.. like in numbers
264445053596991498/272764566411149314 <=== is this channel id ?
You need context. If you got the id from a channel then yes it is a channel id.
client.channels.get("CHANNEL_ID").send(bugreportEmbed);
So.. CHANNEL_ID Would be replaced by, in this instance: 264445053596991498/272764566411149314
right?
If those are channel id's then yeah
how do you get rid of this backtick in your bots status
theres literally none there so i'm super confused
it has to be there somewhere
it isnt
send code
client.user.setActivity(`yt help [${guildCount}] [${client.shard.id}]`);```
100% not there
console.log(client.shard.id)
It's ok with discord terms of service to use
import discord
client = discord.Client()
#few more lines of code
await client.login('<user email>', '<password>')
@tight heath ?
No?
Automated user accounts are generally banned.
And will get you banned from Discord.
So, why it's included in that library?
In which one?
And there is nothing in documentaion about it
Also maybe because they didn't deprecate it yet
Because like
Devs also have a life
I mean I didn't believe it at first either; I'll he honest
Discord's API provides a separate type of user account dedicated to automation, called a bot account. Bot accounts can be created through the applications page, and are authenticated using a token (rather than a username and password). Unlike the normal OAuth2 flow, bot accounts have full access to all API routes without using bearer tokens, and can connect to the Real Time Gateway. Automating normal user accounts (generally called "self-bots") outside of the OAuth2/bot API is forbidden, and can result in an account termination if found.```
11 months ago







