#development
1 messages Β· Page 371 of 1
the function returns this
Promise {
{ title: 'Node.js command prompt - node chrome.js',
id: 3483840,
owner:
{ name: 'cmd.exe',
processId: 13644,
path: 'C:\Windows\System32\cmd.exe' } } }
and it is title am looking to check
let test = activeWin()
test.title.includes("chrome") ?
thanks, will test
alright
what do i do with test.title.includes?
you can put that in an if statement
so if (test.title.includes(..)) doSomething()
so test is activeWin() right
and that returns a promise
yes
are you doing await activeWin()
no
do you need to await it or does it return the results anyways
it just returns the results
okay thats fine
im gonna spoonfeed you a bit since its 3am and im a bit tired so pls no angery but heres the basic idea of what i mean
async function testForChrome() {
let test = await activeWin()
//from this point, assuming that test is an object that includes "title", we can access "title" which should be a string
return test.title.includes("chrome"); //if it includes "chrome", return true, else return false
}
the reason your code wasn't working was because you need an async function to use await
okay
mm ok it seems to be working, but i can't get it to log anything to console by using js if (test.title.includes("Node")) { console.log(title); }
if thats the case then the if statement isnt getting triggered meaning that the title doesn't include "Node"
or something else is bad
hmm
well
title is undefined unless you've defined that elsewhere
needs to be test.title
and you should try console.logging that outside of the if statement
still returns nothing
can you give me your code?
sure
sorry if this is taking a while im just having a bit of trouble understanding what test is returning
const DiscordRPC = require("discord-rpc");
//DiscordRPC.register("412270730168762369");
//const rpc = new DiscordRPC.Client({ transport: "ipc" });
const activeWin = require('active-win');
function setActivity() {
rpc.setActivity({
details: "",
state: "Google Chrome",
largeImageKey: "chrome",
largeImageText: "Chrome",
instance: false
});
}
//rpc.on("ready", () => {
//console.log("RPC is ready!")
//setActivity();
//});
//rpc.login("412270730168762369");
async function testForChrome() {
let test = await activeWin()
//from this point, assuming that test is an object that includes "title", we can access "title" which should be a string
return test.title.includes("Node"); //if it includes "chrome", return true, else return false
console.log(test.title);
}
testForChrome()
``` pls ignore messy code
okay
first of all
that console.log will never get triggered
since you are returning before it
kal
it logs but it doesn't check if it is the right window
how do i fix this?
events.js:188
throw err;
^
Error: Unhandled "error" event. ([object Object])
do you handle the error event in your bot.js file
x.on("error", console.log)
^

no
preferrably not
i dunno how to use google
true
lmao
ewwwwwwwwwwww
WHY DO i smell java 
if (message.content === '-purge') {
message.channel.bulkDelete(100).then(() => {
message.channel.send("Deleted 100 messages.").then(msg => msg.delete(3000));
}
});```
what is wrong OwO
@earnest phoenix idk i don't smell anything
@austere meadow i don't use discord rpc for it atm it just logs
.
?
but i could help
?
ok
Already got login stuff kinda working for blurbal :D https://weed.is-for.science/nLVDWZQQ.gif
hm
US-Central
is it possible to get a users roles by name and not id number in eris?
you need to have access to the guild roles
then just map the user roles with the data from the guild roles
as in I'd need manage roles perms?
no
you can always see all of a guild's roles, channels, members, categories
regardless of permissions
How to post server count onto DBL? I tried looking in #312614469819826177 for a javascript one but for the discord.js one you need an API key and it doesn't list where to get the key
so it's kinda a dead end and I'm looking for alternatives
Β―_(γ)_/Β―
mk
how do i fix this
TypeError: Cannot read property 'has' of undefined
at Object.exports.run (C:\Users\sande\Desktop\mybot\commands\member.js:5:25)
at Client.client.on.message (C:\Users\sande\Desktop\mybot\mybot.js:28:17)
at emitOne (events.js:116:13)
at Client.emit (events.js:211:7)
at MessageCreateHandler.handle (C:\Users\sande\Desktop\mybot\node_modules\discord.js\src\client\websocket\packets\handlers\MessageCreate.js:9:34)
at WebSocketPacketManager.handle (C:\Users\sande\Desktop\mybot\node_modules\discord.js\src\client\websocket\packets\WebSocketPacketManager.js:103:65)
at WebSocketConnection.onPacket (C:\Users\sande\Desktop\mybot\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:330:35)
at WebSocketConnection.onMessage (C:\Users\sande\Desktop\mybot\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:293:17)
at WebSocket.onMessage (C:\Users\sande\Desktop\mybot\node_modules\ws\lib\event-target.js:120:16)
at emitOne (events.js:116:13)
let guild = message.member.guild;
let Role = guild.roles.find('name', 'MEMBER');
if (message.member.role.has(Role.id)) {
message.channel.send('You already have this role!');
console.log('${message.author.username} already has a role')
}
else{
message.member.addRole(Role);
message.channel.send('WooWho, You got a role!')
console.log('${message.author.username} got a role')
}
}
I don't think so
how do i define it?
can i change that bit and have a ``` if(message.member.role.id === number) {other shit}
would that work?
the number is the id of the role
Does anybody have any experience with jQuery.post
I'm trying to post to my web server, but It doesn't get the data
I can CURL just fine
show code
let guild = message.member.guild;
let Role = guild.roles.find('name', 'Member');
if (message.member.Roleid === 36044994179078553) {
message.channel.send('You already have this role!');
console.log('${message.author.username} already has a role');
}
else{
message.member.addRole(Role);
message.channel.send('WooWho, You got a role!');
console.log('${message.author.username} got a role');
}
}
$.post(url, "{"user_id" : user_id, "server_id": server_id, "captcha": captcha}")
now it gives the role but just skips the first if and goes to else and always puts out Woohoo...
var's have been defined above
@glass inlet
I think the issue is is that it's not sending valid JSON
It's not about string concat
Holy moly
New java lib
the day after I spent like 2 hours figuring out why my statistics submitting wans't working....
im sad but happy at the same time...lmfao
I have a question about this:
dbl.postStats(client.guilds.size, client.shards.Id, client.shards.total);
Do you have to add the 2nd and 3rd parameters or are they optional?
What lib?
JS
Yeah they're optional
thanks
@glass inlet Found the issue, it seems like Firefox is blocking the POST function because it's http, not https
"This request has been blocked; the content must be served over HTTPS."
Does dbl.getVotes(true) return a promise?
@quasi marsh ah of course. glad you got it fixed..
should have seen that at the console from the start tho
Yeah I should have been looking at it π
Does any here know how to shard?
depends on the lib
@deep parrot
https://discord.js.org/#/docs/main/stable/class/ShardingManager
For an in-depth guide: https://discordjs.guide/#/sharding/
(JS)
Discord.js is a powerful node.js module that allows you to interact with the Discord API very easily. It takes a much more object-oriented approach than most other JS Discord libraries, making your bot's code significantly tidier and easier to comprehend.
A guide made by the community of discord.js for its users.
Thanks π
np, use ?sharding on Discord.JS server to get the links above @deep parrot
@earnest phoenix thanks for the info π

ModuleNotFoundError: No module named 'dblpy'
Installing collected packages: multidict, idna, yarl, async-timeout, chardet, idna-ssl, aiohttp, dblpy
kill me
ah well i did
pip install dblpy
and i imported it, and now it's saying that there is no module named 'dblpy'
help
npm install dplapi.js --save
it installed but my bot died on startup and is vomiting errors
dplapi?
dblapi
Can't get it
you can't?
See the docs
Link?
dbl.getVotes(true, 1)
sorry the days part was like last minute change and didnt get documented
π€
@bitter sundial thanks π
Im getting a bad request when i try to post my servercount and shards,
Hello guys, Im needing someone to code somethings on my bot. My bot have the function of send a message of AFK-CHECK and who is not afk will reac to the message, and I want he do somethings more, this is : Who reac to the message will be movoed from channel, to Queue to Raid, and 50% of guys reac get a pm of the bot saying Group 1 and other 50% . I group 2. I can pay to who do this to me.
Why are u gonna pay?
Sorry to repeat my message, but does anyone have a good tutorial on how to shard with JDA?
I think just learn and code ur-self is better
@inner jewel Where on the github readme does it talk about sharding?
JDA - Java wrapper for the popular chat & VOIP service: Discord https://discordapp.com
I cant learn now @gleaming summit , so I am paying someone to do this
can some1 help?
Need help with mkaing bot
Can you make your request a little more clear @upper pumice
Like lay out some bullet points
@ornate elm way too unspecific
hey guys are gonna need help with making bot. I'll give a tutorial
And the docs is the right way to learn.
@errant bone what?
He wants to be able to do 1. afk check. This part is done. and 2. move those who reacted to the message half to one room and half to another
(node:7964) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: 401 Unauthorized
got this when doing dbl.postStats
Change the token
at _response.transport.finalizeRequest.call.then (/root/Bots/SiriBot/node_modules/snekfetch/src/index.js:195:23)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:160:7)
(node:21066) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4)``` updating my servercount/shards error (dblapi.js)
Generate new token
And try again
I think the API server was down again
Error: 400 Bad Request
π
Nope still the same error
Again?
wait a sec
// Discord Bot List Patch
const DBL = require("dblapi.js")
const dbl = new DBL(process.env.dbl_token)
setInterval(() => {
dbl.postStats(client.guilds.size);
}, 10000);
Can you show me the code?
const DBL = require("dblapi.js");
const dbl = new DBL('atoken');
client.on('ready', () => {
setInterval(() => {
dbl.postStats(client.guilds.size, client.shard.id, client.shard.total);
console.log('DBL Stats updated!')
}, 450000);
});
Try without shard
dont post every 10 seconds thats just dumb
if you have 11 shards
i have it on 7,5 minutes
that'd give a nice 1h ban
wrong chat
mm what was that
wanted to ask something π€
Is it good practice to send your list of commands in direct messages? (for the help command)
It depends. You could. All kinda up to personal preference. If you plan the bot to be used on large discordβs then yes
alright
well you wouldn't exactly want
this
...
monstrosity```
in chat would you :^)
i guess that's where formatting comes in
Maybe a stupid question.. using discord.js, how would one simply grab all the roles a user/member has? Just looking for an array of their current roles.
i think you can get it using
member.roles
that'll return a collection
lemme check for u
So, something like roles = member.roles
https://discord.js.org/#/docs/main/stable/class/Collection
and you can use these methods to gain information from the "collection"
i dunno
depends on what you wanna do with the roles?
do you want to list them like
[1](Website Administrator)
[2](Special Bot)
[3](...)
that's just
message.member.roles.map(r => r.name)
Just looking to put the role names in an array to be able to send them inn a massage actually
use message.member.roles.map(r => r.name)
00f
Okay, cool, that does the trick. Thank you ken!
no problemo
Im sorry
let guild = message.member.guild;
let Role = guild.roles.find('name', 'Member');
if (message.member.roleId === 36044994179078553) {
message.channel.send('You already have this role!');
console.log('${message.author.username} already has a role');
}
else{
message.member.addRole(Role);
message.channel.send('WooHoo, You got a role!');
console.log('${message.author.username} got a role');
}
}
the first "if" wont work what did i do wrong/ how do i define roleid?
I think the number needs to be in β β
message.member.roleId isn't a thing
what are you trying to do?
IDs are in quotes yah
^ that too
what version of d.js are you running @fleet mason
the newest
stable
use message.member.highestRole
that returns a Role and you can use .id on that
i want it to see that if it has that role it will not give the person that role. but if he dosnt have that role i want to give him that role
yes
let guild = message.member.guild;
let Role = guild.roles.find('name', 'Member');
if(message.member.role.has("36044994179078553")) {
message.channel.send('You already have this role!');
console.log('${message.author.username} already has a role');
}
else{
message.member.addRole(Role);
message.channel.send('WooHoo, You got a role!');
console.log('${message.author.username} got a role');
}
}
TypeError: Cannot read property 'has' of undefined
at Object.exports.run (C:\Users\sande\Desktop\mybot\commands\member.js:5:24)
at Client.client.on.message (C:\Users\sande\Desktop\mybot\mybot.js:28:17)
at emitOne (events.js:116:13)
at Client.emit (events.js:211:7)
at MessageCreateHandler.handle (C:\Users\sande\Desktop\mybot\node_modules\discord.js\src\client\websocket\packets\handlers\MessageCreate.js:9:34)
at WebSocketPacketManager.handle (C:\Users\sande\Desktop\mybot\node_modules\discord.js\src\client\websocket\packets\WebSocketPacketManager.js:103:65)
at WebSocketConnection.onPacket (C:\Users\sande\Desktop\mybot\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:330:35)
at WebSocketConnection.onMessage (C:\Users\sande\Desktop\mybot\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:293:17)
at WebSocket.onMessage (C:\Users\sande\Desktop\mybot\node_modules\ws\lib\event-target.js:120:16)
at emitOne (events.js:116:13)
has didnt work
you've put role not roles
rolesrolesroles
same as before
oof
message.channel.send('You already have this role!');
console.log('${message.author.username} already has a role');
}```
just to make it do the others thing if its right
then else
thats how i learned to do the things
o yes
wait
o
one sec
?
lmfao void are you just saying yes to everything
yes
message.guild.fetchMember(message.author.id).then(member => {
if (member.roles.has(..)) //...
});
then you won't have the possibility of having message.member be null
like this?? ```exports.run = (client, message, args) => {
let guild = message.member.guild;
let Role = guild.roles.find('name', 'Member');
message.guild.fetchMember(message.author.id).then(member => {
if (member.roles.has("36044994179078553"))) { //...
message.channel.send('You already have this role!');
console.log('${message.author.username} already has a role');
}
else{
message.member.addRole(Role);
message.channel.send('WooHoo, You got a role!');
console.log('${message.author.username} got a role');
}
}
}```
where
yes
ok
ok
sorry
its all good
let guild = message.member.guild;
let Role = guild.roles.find('name', 'Member');
message.guild.fetchMember(message.author.id).then(member => {
if (member.roles.has("36044994179078553"))}); //...
message.channel.send('You already have this role!');
console.log('${message.author.username} already has a role');
}
else{
message.member.addRole(Role);
message.channel.send('WooHoo, You got a role!');
console.log('${message.author.username} got a role');
}
}
i closed it with the ))})
``` if (member.roles.has("36044994179078553"))}); //...````
nonononon
if (member.roles.has("36044994179078553")); //...
message.channel.send('You already have this role!');
console.log('${message.author.username} already has a role');
})}```
now?
what in tarnation
});
you've done it completely wrong
oof
yea im so lost XD
What code editor do you use. It should show you what closed what and what connects to what.
^
ye
if (member.roles.has("36044994179078553")); //...
message.channel.send('You already have this role!');
console.log('${message.author.username} already has a role');
});```
exports.run = (client, message, args) => {
let guild = message.member.guild;
let Role = guild.roles.find('name', 'Member');
message.guild.fetchMember(message.author.id).then(member => {
if (member.roles.has("36044994179078553"))}); //...
message.channel.send('You already have this role!');
console.log('${message.author.username} already has a role');
} else {
message.member.addRole(Role);
message.channel.send('WooHoo, You got a role!');
console.log('${message.author.username} got a role');
}
}); //here is the missing }) to connect fetchMember
}
yeah uh
you haven't done the if statement properly
you've removed the { from the if statement
if (member.roles.has("36044994179078553")) {
i thought i did that at the start with the }})} but did i miss the ;?
no no

see my code i posted there
me irl
thats where it was supposed to go
ok
SyntaxError: Unexpected token }
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:607:28)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
at Client.client.on.message (C:\Users\sande\Desktop\mybot\mybot.js:27:23)
im even more lost now
let guild = message.member.guild;
let Role = guild.roles.find('name', 'Member');
message.guild.fetchMember(message.author.id).then(member => {
if (member.roles.has("36044994179078553"))}); //...
message.channel.send('You already have this role!');
console.log('${message.author.username} already has a role');
} else {
message.member.addRole(Role);
message.channel.send('WooHoo, You got a role!');
console.log('${message.author.username} got a role');
}
}); //here is the missing }) to connect fetchMember
}
?
spoonfeed temptation 100
XD
spoon feeeed is bad
I know
im so lost now. XD i normally learn from my mistakes if i know where to fix it XD. But now idk
go back to it later, then
doesn't know how to use if
it skips the if check role and just outputs it to false
because ur code brok
Meaning you don't know how to use if/else
the if statement is incorrect
the code won't trigger without a proper if statement
why can't we spoonfeed
Because they won't learn.
temptation :(
it depends actually.
i learn from spoonfeed if i understand what i did wrong after i got the correction
but you understand we won't spoonfeed you
yea ik
let modRole = message.guild.roles.find("name", "Mod"); //finds the role. . .
if(message.member.roles.has(modRole.id)) return; //doesnt do anything if they hv the role```
yea
and then i add the {} so the bot would do thingsd
piss
wat kind of command are u makin?

a command that makes it so that if the member already have a role it will tell them they have it. Else it will give them the role
oh
why not trigger it when they join
Also I haven't used Discord.js in awhile but I'm pretty sure you don't have to fetch the member if it's in a guild
is it not message.member
Last time I used D.js it was.
because i want to learn how to do different thinges. I iwll do that asweal @earnest phoenix
(check the docs to detect the msg author . .).addRole(muteMember.guild.roles.find("name", "Memed by Telk"));```
it shouldnt be dat hard to fill dat part π€
@azure yoke message.member returned null for them
documentation is your best friend
Is it a DM or in a guild?
guild probably
you can't assign roles in DMs
ye
I know, but the only time that should be null is if it's in a dm, unless D.js has changed significantly since I last used it (which it could have)
o k
wat lang do u use now @azure yoke
js still, though I switched to eris because sharding with eris is easier
cool
@fleet mason how is it?
i dont like spoon feeding
yea i understand
im living on mars
nice
calm down elon
jk. . .
this is what i can provide
D.js won't spoonfeed either, though they'd know more.
ye
hopefully it'll help you navigate around the lib more
Also, this isn't related to D.js, they'd probably just say "not lib related"
TCD would be better, if anything. Or MDN lol
or. . . email support@discord.com a big chance they wont anwser xD
discord.com isn't their domain so a 100% chance
Yes it is
discordapp.com is their main domain though, they have like ~5
ok so i tried to play a bit and got this code``` exports.run = (client, message, args) => {
if(message.member.roles.has("36044994179078553")) {
console.log(Yay, the author of the message has the role!);
} else {
console.log(Nope, noppers, nadda.);
}
}
the role.has(role id)
it wont work
i just goes to noep, noppers...
did i put in the role id wrong?
should i change it and make a memberId in my config?
and then have has(config.memberId)?
got it to work by making memberid in the config and then doing config.memberid
idk why it work it just worked XD
exports.run = (client, message, args) => {
let guild = message.member.guild;
let Role = guild.roles.find('name', 'Member');
if(message.member.roles.has(config.memberRole)) {
message.channel.send('You already have this role!');
console.log('${message.author.username} already has a role');
}
else{
message.member.addRole(Role);
message.channel.send('WooHoo, You got a role!');
console.log('${message.author.username} got a role');
}
}
this worked
wat is the **let Role = guild.roles.find('name', 'Member');
** for π€
u can also change the config.memberRole into Role.id
all that other shit people said i got wrong never worked XD
im making the dumbest bot ever
iirc addRole() can take an entire role object and use its ID in the background, but that's not the case for Collection.has() well as its a collection so you need to provide the key, and obviously the object isn't the key π
^ has is a map method so d.js doesn't extend it utility, so you need to provide an ID there
ok i have a question why wont the console.log('${message.author.username} got a role'); work
${message.author.username} got a role
Use backticks
`` instead of ''
Google is your friendβ’
xD
ok but how do i use the string
because when i copy paste somethimes it workes
when i type it dosnt
step 2: dont ask to be noops deef
Step three: use Googleβ’
i copy paste to test the code. and then make my own version XD
noops deef
goes like a train
and copy/paste are for losers
they will learn
nothing but sh*t
haiku:
Please don't no-ops deef
It disrupts proper learning
And it really sucks
ok
For the bot giving a welcome message to the user on each server would I have to do a json with the servers with their text channels? would you know informs if this is viable?
wat u mean?
https://i.gyazo.com/239ef71fedae07b689f527d6a510606d.png
Something like this in async def on_member_join (member)
thats python?
right?
javascript programmers this right?
if(message.content.startsWith ("+kangtest")) {
message.channel.send(`Testing message.`, {
files: [
"./imagens/imageone.gif"
"./imagens/imagetwo.gif"
]
})
}
this is discord.js
no its c#
looks alright but i dont see the need for the space between startsWith and (
actually
on the array
you are missing a comma
like erlite said
shoutout to my boy erlite
@earnest phoenix yeah is this python
Python is my weakness
only yours? haha I understand 1 bit of python because of my school, then I decided to do a project (yes my project is my bot.)
Sorry if my english is bad, I do not usually speak much english because ,I'm Brazilian.
I need help
With?
That's what you use to invite your bot to your server
Like invite that bot to the server u want?
Not working..
?
ok
How to make a bot to like for example, DM an user when that user upvoted the bot?
it's not possible without checking on a regular interval
^
Should I really make a chat platform or should I make something else?
Yea you're right
I would need some help with a command that assigns roles to the person using it. The addRole() attribute in discord.js, how exactly do we use that?
I cant make http requests bc it says XMLHttpRequest is not defined wtf
what am I doing wrong
var xhr = new XMLHttpRequest();
xhr.open("GET", "https://discordbots.org/api/bots?limit=1&fields=id&search=id:264811613708746752", false);
xhr.send();
message.reply(xhr)
fuck
@drowsy yarrow you can install it https://www.npmjs.com/package/xmlhttprequest
First
yeah
#development isn't the right channel for this @weary lily
#memes-and-media I'd say
#memes-and-media , but you can ask people in general to check it out if you want
what is the custom emoji code to add reactions
with an id you just need to fetch the emoji (in discord.js)
replacing the stuff as needed
Someone, please tell me how to make a bot to DM an user when that user upvotes the bot.
please
watch your ratelimits
...no?
Since you poll every 1 minute
Fetch votes every fixed time period
And detect changes
How can I get the emoju Id?
This doesen't seem to work...
Code:
db.get(`SELECT * FROM all WHERE ID = '${message.guild.id}'`, function(err, row) {
if (!row) {
db.run(`INSERT INTO all(ID) VALUES(?)`, [message.guild.id], function(err) {
console.log(`A row has been inserted with rowid ${this.lastID}`)
message.channel.send('lul')
});
}
message.channel.send(row.laungage)
});```
Console Output:
```TypeError: Cannot read property 'laungage' of undefined```
SQLite Studio Columns:
https://my-bot.dabs-on.me/DDDuycQfb.png
sqlite3 is the package
discord.js
Guys , how can I get the Emoji ID?
@upper pumice in node or python?
or... send the emote => right click => copy id
Inspect element
prob does tbh
Go to emoji source image
Copy link for the emote works though
or just escape the emote lol
Wait really?
I mean yeah but who wants to do that
:mmLol:
Mobile can't escape
I just did
<:Spooky boi:407324790202957825>
Ok this is the emoji and the ip
And now How can I get the raw to me put on codes ?
@elder rapids How Can I get the raw emoji to put on my codes now?
That is the raw?
@upper pumice what lib are u using?
How do i make my bot edit their own message (i tried message.edit)
\
@wispy axle fetch the most recent message as soon as you send the message then edit that
@upper pumice the raw thing is <:Spooky boi:407324790202957825>
yes, but isnt to my it : http://prntscr.com/idriq0
Not a ''pic'' , I need to put code <:Spooky boi:407324790202957825>?
Ok, I made
If you want to fix it you need to learn how to code first ...
client is you're bot object
Check if you call it client
if you call it bot you can't call client
k whatever i deleted the api latency, but when i tried it again it shows : DiscordAPIError: Cannot edit a message authored by another user
You are editing you're own message or someone else one ?
the bot message
Can you show us ?
m?
Yep
"m.edit"?
m is your bot message π
Oh
So yep m.edit ^^
That's okay just ask us if you don't know what to do exacly with something
Some of us love helping and everyone started somewhere ^^
K its working thx for the help!
Okay
Anyone can help me...?
For ?
enmap
not the code
npm i enmap-level
This isn't working for me
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! leveldown@1.7.2 install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the leveldown@1.7.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Attribute\AppData\Roaming\npm-cache\_logs\2018-02-12T20_03_30_446Z-debug.log
Any idea?
π
Nope.
Don't
so many files
Heroku will build it themselves for Linux
yes
Based on dependencies
right
SDK?
k
Source developpment kit
question
to me?
yes
can you take the log
remove personal info
and put it on hastebin/pastebin
then DM me the link?
the log
C:\Users\Attribute\AppData\Roaming\npm-cache\_logs\2018-02-12T20_03_30_446Z-debug.log
k
Installing
gets executed as admin
you can run anything
it may take some time
https://stackoverflow.com/a/42713948/5612484 and yes, I used google
yes
This is not installing Visual Studio on my PC, is it?
Is the required space too large?
you can cancel and test on linux virtual machine
but this is what it requires
on windows
and I don't know, I personally don't use windows
π€
I am a linux user
oh..
Its ok
π
hmmm
yellow = warnings not errors
Thank you~
yw
However, this error did not occur in the past.
you most likely never dealt with native modules
native modules have code written in C/C++
oh
and it needs to be compiled for your computer
(which in this case runs windows and needs a windows specific compiler)
I would guess all modules you installed earlier were just js-only modules
so node knew how to run them out-of-the-box
this sounds awkward, just call me Rph
π
Hi, does anyone know how to change an environmental variable? thanks
well I am trying to add login with discord using express to a site and for the login to work I need to insert the USER_ID and USER_TOKEN
π€ and?
CLIENT_ID & CLIENT_SECRET
so I have looked and I need to change the environemntal variable
password change?
const CLIENT_ID = process.env.CLIENT_ID;
const CLIENT_SECRET = process.env.CLIENT_SECRET;
no
you put them in .ENV file
and use a module called dotenv
to load them
then you add .ENV to gitignore
so you dont commit it
Are you windows or linux
Ok thank you
Delete it with flag -u
what would be good to make using web sockets?
A chat app
Kek I'll keep working on it
wot lib are u using m9 @drowsy yarrow
d.js
no thats not what I need
Im getting bot statistics from the DBL API
and I get this shit for avatar "avatar":"7055c85e548db7d7000724e6d1518888"
its the avatar hash I need to figure out how to convert that to a avatar url
how to get a format in a rich embed like this using the discord.js rich embed builder method 
inline fields
ok
@drowsy yarrow so this is my avatarURL:
https://cdn.discordapp.com/avatars/291620336078684170/18226bcdcdf99ec321ea7ac3e35953f7.png?size=2048
and the basic structure is:
https://cdn.discordapp.com/avatars/<user Id>/<avatar hash>.png?size=2048
But my question still stands.. How do we use the addRole() attribute to the message author?
For example, when someone uses !kbs game Minecraft, the bot will give the Minecrafter role to that user. How am I able to accomplish this?
discord.js btw
just the message.member? Hmmmm
whatever you definded message as
ye
and you can call member functions on that
<Message>.member is the author as member object
Okay. I'll try that. Thanks
@drowsy yarrow of it starts with a_ it's a gif
how come
i failed so horribly
<html>
<body>
<style>
body {
background-color: #2C2F33;
}
.bot-name {
color: #FFFFFF;
}
</style>
</body>
</html>
this isnt turning the bot name white
.-.
even though bot-name is the name of the class
xD
iirc you need to !important the username
color: <hex> !important
makes the change only overrideable by other important flags
and I believe username had one
so you need to use one aswell for it to take affect
ye
k π
ty
same
lars D
bot-name is the class
<span class ="bot-name">Infinite</span>
how come this still
isnt making the background white for the buttons :/
.botpagebutton {
background-color: #FFFFFF !important;
}
try indenting background-color



you have to add it in
?
but didn't get id

