#development
1 messages ยท Page 1312 of 1
Wait
no point in doing api requests when it might not be changing
bot.user.setActivity(`${bot.guilds.cache.size} servers (!help)`, { type: 'PLAYING'}).catch(console.error).then (bot.setInterval(function(){
`${bot.guilds.cache.size}`
}, 300000));```
Why not just update it when it leaves or joins a guild?
now its better?
I dont think setInterval works the way you think it does
Woo
it just runs the code inside the function
foreach( $order->get_items(topgg@gmail.com) as $item_id => $item ) {
$product = apply_filters( 'mailchimp', $order->get_product_from_item( $item ), $item );
echo $product->get_image();
}```
how come this code works
You have to help me with canvas and gif encoder 
Would you?
i need to make lunch rn, 30 min and i can help
why doesn't this work
maybe 40
foreach( $order->get_items(topgg@gmail.com) as $item_id => $item ) {
$product = apply_filters( 'mailchimp', $order->get_product_from_item( $item ), $item );
echo $product->get_image();
}```
explain
Imma go to bed soon, can I explain you what In trying to do on DM and you read it when you can?
shush
yes
it doesn't work
where did you copypaste the snippet from
@vapid oasis You sent it another 2 times
this has to be a troll
We are not mindreaders man. You have to explain everything clearly
alright so
Sending it multiple times is not going to help you at all, if someone knows they are going to respond but if you are spamming your message we can't help the others that we are currently helping
"Explain why this doesn't work" isn't enough info for people to help you
You are asking us to explain something that works
does anyone have or know of a bot the can auto mute discord when playing among us?
Nope. You could have a bot that a command will mute everyone in vc
i do
But you'd manually have to do it
@vapid oasis what is the bot?
hold on
embed site name
what do you mean
thx
wait @vapid oasis where is the download link I am not very familiar with reddit
.
Im confused
@woeful pike so, is that screenshot where tonkku is owner ever gonna get changed
How do you go on the bots dashboard
We are not support for that bot
@trim saddle no point
(node:12784) UnhandledPromiseRejectionWarning: DiscordAPIError: Invalid Form Body
embed.fields[0].value: Must be 1024 or fewer in length.
wth
We do not know because we are not them
K
Has to be less then 1024
read what it says @tardy hornet
@trim saddle Let it stay, to remember the old times of dbl
โจ read your errors โจ
Yes @tardy hornet
better
It can't send if it is to long
k ty
what? @trim saddle
the -wrongserver screenshot
@earnest phoenix it hurts to remember he got banned ๐
It's not a significant issue
user flags
ok
Public user flags are a thing
Thought so lol
@honest perch ```js
fs.readdir("./configuration/", (err, files) => {
if(err) console.error(err);
let jsfiles = files.filter(f => f.split(".").pop() === "js");
if(jsfiles.length <= 0) {
console.log("No Commands To Load!")
return;
}
console.log(`loading ${jsfiles.length} commands!`);
const header = [['Command', 'Status']];
jsfiles.forEach((f, i) => {
let props = require(`./configuration/${f}`);
header.push([`${+i + +1}. ${f}`, 'Loaded โ
']);
client.commands.set(props.help.name, props);
});
console.log(table.table(header))
});
๐
yep thanks
remember how the thing that if i click in a reaction it do what i want?
reactions something
TypeError: Cannot read property 'on' of undefined
const { app, BrowserWindow } = require('electron');
app.on('ready', createWindow);
app.on('window-all-closed', () => {
app.quit();
});
app.on('activate', () => {
if (mainWindow === null) {
createWindow();
}
});
app is undefined
howww
console.log(app)
No clue
is app a class?
idk Im trying to do an exapmle of discord rpc
if that not work what you said, you can try
const electron = require('electron');
const app1 = new electron.app();
//then try below code
app1.on....
const electron = require('electron');
const app = new electron.app();
just add space after prefix
app still undefined
oh, then idk but does looks really easy.

maybe read the github page
'use strict';
/* eslint-disable no-console */
const { app, BrowserWindow } = require('electron');
const app = new electron.app();
const path = require('path');
const url = require('url');
const DiscordRPC = require('discord-rpc');
console.log(app)
let mainWindow;
function createWindow() {
mainWindow = new BrowserWindow({
width: 340,
height: 380,
resizable: false,
titleBarStyle: 'hidden',
webPreferences: {
nodeIntegration: true,
},
});
mainWindow.loadURL(url.format({
pathname: path.join(__dirname, 'index.html'),
protocol: 'file:',
slashes: true,
}));
mainWindow.on('closed', () => {
mainWindow = null;
});
}
app.on('ready', createWindow);
app.on('window-all-closed', () => {
app.quit();
});
app.on('activate', () => {
if (mainWindow === null) {
createWindow();
}
});
// Set this to your Client ID.
const clientId = '';
// Only needed if you want to use spectate, join, or ask to join
DiscordRPC.register(clientId);
const rpc = new DiscordRPC.Client({ transport: 'ipc' });
const startTimestamp = new Date();
async function setActivity() {
if (!rpc || !mainWindow) {
return;
}
// You'll need to have snek_large and snek_small assets uploaded to
// https://discord.com/developers/applications/<application_id>/rich-presence/assets
rpc.setActivity({
details: 'Developing',
state: 'in slither party',
startTimestamp,
largeImageKey: 'snek_large',
largeImageText: 'tea is delicious',
smallImageKey: 'snek_small',
smallImageText: 'i am my own pillows',
instance: false,
});
}
rpc.on('ready', () => {
setActivity();
// activity can only be set every 15 seconds
setInterval(() => {
setActivity();
}, 15e3);
});
rpc.login({ clientId }).catch(console.error).then(console.warn('Started rpc!'));
Yeah
its exactly what it says to use
isnt that what Im doing
yep
also cringe
'use strict';
ok
Eslint

did you install the electron module?
I wanna make a command with my bot where when you react a certian emoji to the bots message, it gives you a role, and I'm using discord.js but i really dont know how to make the command.
duh or else the browser windows wount work
I did npm i electron
Could I jsut remove the website making and the discord rpc or does a window have to be open
I can add a bot to your site for free, right?
No its $100000
8+
offically 7+
No its $100000
@solemn leaf O. Thanks. I'll go get my money
yall answered everything BUT the question they asked
datetime.utcnow is the date?


@solemn latch Can I remave the app.on and just use the broswerwindow
I really only need a window open
to say im playing soemthing
id guess so? ๐คทโโ๏ธ
f
app.on
creates the window
just reinstalled
same thign
@solemn latch any other ideas?
?
Apparently it's 8+ weeks now. Shiv said it's more like 8 weeks on average.
I know
can some 1 help me
I said 7 to someone and he corrected to say 8+ on average
ok ill try it
it's more than 8 weeks rn
bcs somehow
people working at home
get slowed by covid
ยฏ_(ใ)_/ยฏ
@solemn latch
someone help me. i can't put a hyperlink in the footer of an embed
im using python
text doesn't work in the footer
on windows @solemn leaf ?
someone help me. i can't put a hyperlink in the footer of an embed
im using python
text doesn't work in the footer
@ocean pasture yeah you can't do that
Set-ExecutionPolicy -ExecutionPolicy Undefined -Scope CurrentUser
o
electron . in console?
Yeah
pretty sure the page i linked to suggested to put it in package.json
not sure dont have it open anymore
@rose warren is there a way i can make it the description
Yes use the same code
yeah, asks you to update the package.json
[text](link) will work in description
ik
{
"name": "Discordrpc",
"version": "1.0.0",
"description": "Hmm",
"main": "main.js",
"scripts": {
"start": "electron .",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Aki",
"license": "ISC",
"dependencies": {
"discord-rpc": "^3.1.4",
"path": "^0.12.7",
"url": "^0.11.0"
}
}
then if on windows you might have to jump through some hoops to make electron work
Yes
how do i do that
theres also like 30 other solutions listed online @solemn leaf
could be any number of them
Rest of your description here.\n\n[text](link)```
f
im on python
o thx anyways
pretty sure its the same exact thing though
But it's a string
^
Should be same
yeah
const electron = require('electron');
const app = require('app');
const BrowserWindow = require('browser-window')
How do i use for?
var for_loop = 0
for (; for_loop > amount; for_loop++) {
console.log(true)
}``` this doesnt log true once
How am i able to log it?
(Also amount is a integer ex: 15)
Use google for (help) { console.log(itseasier) }
@solemn latch erm
the npm app is broken
That might be why
TypeError: core.require is not a function
/*global require module console*/
(function(){"use strict";
var fs = require('fs'),
qs = require('querystring'),
url = require('url'),
sys = require('util'),
path = require('path'),
mime = require('mime'),
core = require('cornerstone'),
util = core.require('util'),
Model = require('./Model'),
Router = core.require('Router'),
Emitter = core.require('Emitter'),
connect = require('connect'),
mongoose = require('mongoose'),
Controller = require('./Controller');
๐คทโโ๏ธ
โ
it was last updated 2 weeks ago
did the last update break it lmao
you should probably check out the github and checkout the published issues
before doing anything
atleast thats how I debug lib issues
should I reinstall
and install it like this
npm install electron --save-dev [--save-exact]
idk
case 'kick':
if (!message.guild.me.hasPermission(["ADMINISTRATOR"])){
return message.channel.send('I dont have permission to do that, please give me "`ADMINISTRATOR`" permission.');
}
if(!message.member.hasPermission("ADMINISTRATOR")){
return message.reply('you dont have the premissions to use this command!');
}
const kickembed = new Discord.MessageEmbed()
let person2 = message.guild.member(message.mentions.users.first());
if (!person2) return message.channel.send('you did not provide a GuildMember! - `!kick @mention <reason>`');
if (!person2.kickable) return message.channel.send('I can not kick this person')
if (person2.id === message.author.id) return message.channel.send('you cant kick your self dummy.')
if (args[2]) reason2 = args.splice(2).join(" ");
if (!person2.user.bot) {
person2.send(kickembed)
}
person2.kick({
reason2: reason2
})
.setTitle('__**you got kicked!**__')
.setAuthor(`${message.member.displayName} kicked you!`)
.setColor('YELLOW')
.setImage('https://cdn.discordapp.com/attachments/747141794587738228/764234399071862824/unknown.png')
.setThumbnail('https://cdn.discordapp.com/attachments/759432823840702474/762016483374530600/image1.png')
.addFields({
name: 'kicked member id:',
value: person2.id,
inline: true
})
.setThumbnail('https://cdn.discordapp.com/attachments/759432823840702474/762016483374530600/image1.png')
.setImage('https://cdn.discordapp.com/attachments/747141794587738228/764234399071862824/unknown.png')
.setDescription(`Reason: \`${reason2}\`,and because you were pretty sus`)
bot.channels.cache.get('764211893560541205').send(kickembed);
message.channel.send(kickembed)
break;
worked good till today,
type of error:
.setTitle('you got kicked!')
^
TypeError: person2.kick(...).setTitle is not a function
person2.kick({
reason2: reason2
})
.setTitle('__**you got kicked!**__')
you cant use .setTitle on a kick
"764194876341616701": [
{
"id": "764194876341616701",
"name": "Bots Cave",
"language": "en",
"setcommand": [
{
"id": "764194876341616701",
"setcommand": "sa", < how i read this with lowdb
"setanswer": "as"
}
],
"prefix1": "pls",
"prefix2": "reb",
"prefix3": "@void epoch"
}
]
person2.kick({
reason2: reason2
})
.setTitle('__**you got kicked!**__')
@solemn latch
then what do i do?
it worked till today
i think you edited your code and didnt realize it then
because theres no way that can work
i think you deleted where you defined "kickembed"
oh, you just moved it
yes
Does NginX is free ?
nginx is free yes
@solemn latch it worked 1 time now and then it say everytime: can not ban this person
who is know lowdb?
the bot needs ban perms, and more perms than the user to ban them
Why could this be?
whats your find look like?
How so?
please dont ping random people
not random
oke Thanks for the information
in v11 and v12 the find function changed
@solemn latch
also sendCode is removed
@split hazel
how i get this data
let setanswer = db.get(message.guild.id).get("setcommand").map("setanswer").value()
i was tried it
bot doesnt work
anyone can help me?
stop using json as your database
why
can my bot be in two voice channels in the same guild at the same time?
no
dang
i am migrating my search functionality from a firebase db to a elasticsearch db
elasticsearch is pretty cool
i dont using a config
that's not what that message is about
using a json stub is fine until you make a db
What is the rate limit for the API?
10,000 per 5 minutes i believe
which api?
the bot api to post data
google maps
lol
that narrowed it down by exactly 0 results
oh well im set lol
1 every 5 mins
they're returned in request headers
thats what i send atm
lol i didnt see that link haha
its hidden
it was right in front of me
took me a minute to find it too
awesome thanks
anyone knowing lowdb?
ive never even heard of it until you brought it up
is that just a quickdb version of json
yeah
why
seems like it
yikes it uses lodash
lodash was good for it's time
do you guys think storing an encrypted discord OAuth token on the user computer through cookies is gud?
@opal plank I found it
it can probably be decrypted
namespace Main {
const app: App;
but is said Electron.Main.App isnt a thing
from experience, dont
how can i run 2 bots on heroku? with one start file?
i dont think that works
can we do dms
Just ask here
Im bored and erwin is ghosting me now
so it must be stupid
const Electron = require('electron');
const path = require('path');
const url = require('url');
const DiscordRPC = require('discord-rpc');
let mainWindow;
function createWindow() {
mainWindow = new Electron.BrowserWindow({
width: 340,
height: 380,
resizable: false,
titleBarStyle: 'hidden',
webPreferences: {
nodeIntegration: true,
},
});
mainWindow.loadURL(url.format({
pathname: path.join(__dirname, 'index.html'),
protocol: 'file:',
slashes: true,
}));
mainWindow.on('closed', () => {
mainWindow = null;
});
}
Electron.Main.App.on('ready', createWindow);
Electron.Main.App.on('window-all-closed', () => {
Electron.Main.App.quit();
});
Electron.Main.App.on('activate', () => {
if (mainWindow === null) {
createWindow();
}
});
@sand dune user.displayAvatarURL({dynamic:true})
I don't know how to work electron
Electron.Main.App.on('ready', createWindow);
^
TypeError: Cannot read property 'Main' of undefined
Never used it before
Have you looked at github yet?
erwin did
okay, why dont you?
client.run('token 2')```
how can i run both at the same time on heroku?
when i tried, it just ran the first one (the one closest to the top)
Electron.Main.app.on('ready', createWindow);
^
TypeError: Cannot read property 'app' of undefined
now I got this
@solemn latch https://github.com/electron/electron#readme
ok so discord hates me
hi i had a question! can i use .replace() 2 times in a single string?
.setImage('https://cdn.discordapp.com/attachments/754604183210164268/764578010065797130/screen2.png')
why its not working!
dont use discord for storing stuff
Wat bots do yiu work whith
hi i had a question! can i use .replace() 2 times in a single string?
@sharp thicket string.replace().replace()
why i get this error?
mongoose.connect('url', {
useNewUrlParser: true,
useUnifiedTopology: true
}, async(err, db) => {
if(err) console.log(err); else console.log('Conectado a mongodb.');
});
Error
valder
do poll bots ever get any traction?
its really hard to say if you make a bot if itll get a lot of users
its really hard to say if you make a bot if itll get a lot of users
@solemn latch well i mean do ppl use them?
cuz like i have a main bot, arch as u know
yes, they are used by many
and i made one called Pollr
it has the same system
but just a bot with ONLY polls
Python or js for web servers?
@dire obsidian depends
just a static site?
oops
not sure what route youd go with for an online store ngl
oh no
Also python is semi Communist
lol
what do you mean
oh no python 
You're a snake
its our website
i wish python was faster.
I'm brainstorming a bot idea and was wondering if anyone with experience could help me out
interpreted languages are a no go for speed
i also wish it had a form builder built in. what can i say? i was spoiled by visual studio c# and c++
durty tbh I think it's better you be the one to come up with the idea rather than seeking us, as the idea you think of will probably be better for you
durty dave i'll toss ideas at you
Well, I don't know if it would work/if it can be done
So if your server is boosted then users can stream at higher quality.
I was thinking, if possible, of creating a bot similar to a music bot but instead you can queue it to play videos
lol that was the idea i was gonna give you.
What would prevent or be an obstacle in doing so
what did this means ReferenceError: error is not defined
your coding capability
So I have a VPS
it means you tried to use a variable/function/etc. that doesn't exist
you could get thicc and create a cGan to generate images from other images - like a photo of yourself and it converts it into farmer durty
ReferenceError: error is not defined
a pix2pix deal
Which I am going to use to run the bot off of. Is it even possible to pass that through discord? Like I don't understand how you would code the behavior to make a bot share their screen or stream
Electron.Main.App.on('ready', createWindow);
^
TypeError: Cannot read property 'App' of undefined
or a waifu generator
well, if you're looking at music, i'd suggest youtube because it posts easily.
ReferenceError: error is not defined
plus it's not forced on people
What about video streams?
same. youtube allows for video streams.
keep it simple.
i'd definitely start off with just trying to get your bot to interact and listen to commands before anything else though.
create a skeleton plan for it, write some pseudocode. then get it functional.
ReferenceError: error is not defined
lel
could always make a dnd game in your bot. lol.
@solemn leaf you named it app not App
appp also got the error
Show code
Electron.Main.app.on('ready', createWindow);
^
TypeError: Cannot read property 'app' of undefined
Main is undefined
'use strict';
/* eslint-disable no-console */
const Electron = require('electron');
const path = require('path');
const url = require('url');
const DiscordRPC = require('discord-rpc');
let mainWindow;
function createWindow() {
mainWindow = new Electron.BrowserWindow({
width: 340,
height: 380,
resizable: false,
titleBarStyle: 'hidden',
webPreferences: {
nodeIntegration: true,
},
});
mainWindow.loadURL(url.format({
pathname: path.join(__dirname, 'index.html'),
protocol: 'file:',
slashes: true,
}));
mainWindow.on('closed', () => {
mainWindow = null;
});
}
Electron.Main.app.on('ready', createWindow);
Electron.Main.app.on('window-all-closed', () => {
Electron.Main.app.quit();
});
Electron.Main.app.on('activate', () => {
if (mainWindow === null) {
createWindow();
}
});
How is main undefined
wait
const a = require('electron/main');
a.app
I wanna do a dashboard for my bot but i know almost nothing about backend (I use python)
I think I wanna hire somebody Do you guys know the average price of a backend JS developer?
I am looking for mongo stuff i would say like just linking an action to a cluster.
A good developer will likely charge 20-40+ usd/hour
A good developer will likely charge 20-40+ usd/hour
@quartz kindle Do you have like an estimate on how long it could take for like one bit that i could modify to each table?
Like an average basically
@rough obsidian i sent you a DM lets discuss some dashboard stuff
i am making a npm module and i want it to send it random stuff from my const test list how will i structure it in the file of bot
'use strict';
/* eslint-disable no-console */
const Electron = require('electron');
const path = require('path');
const url = require('url');
const DiscordRPC = require('discord-rpc');
let mainWindow;
function createWindow() {
mainWindow = new Electron.BrowserWindow({
width: 340,
height: 380,
resizable: false,
titleBarStyle: 'hidden',
webPreferences: {
nodeIntegration: true,
},
});
mainWindow.loadURL(url.format({
pathname: path.join(__dirname, 'index.html'),
protocol: 'file:',
slashes: true,
}));
mainWindow.on('closed', () => {
mainWindow = null;
});
}
Electron.Main.app.on('ready', createWindow);
Electron.Main.app.on('window-all-closed', () => {
Electron.Main.app.quit();
});
Electron.Main.app.on('activate', () => {
if (mainWindow === null) {
createWindow();
}
});
// Set this to your Client ID.
const clientId = '';
// Only needed if you want to use spectate, join, or ask to join
DiscordRPC.register(clientId);
const rpc = new DiscordRPC.Client({ transport: 'ipc' });
const startTimestamp = new Date();
async function setActivity() {
if (!rpc || !mainWindow) {
return;
}
// You'll need to have snek_large and snek_small assets uploaded to
// https://discord.com/developers/applications/<application_id>/rich-presence/assets
rpc.setActivity({
details: 'Developing',
state: 'in slither party',
startTimestamp,
largeImageKey: 'snek_large',
largeImageText: 'tea is delicious',
smallImageKey: 'snek_small',
smallImageText: 'i am my own pillows',
instance: false,
});
}
rpc.on('ready', () => {
setActivity();
// activity can only be set every 15 seconds
setInterval(() => {
setActivity();
}, 15e3);
});
rpc.login({ clientId }).catch(console.error).then(console.warn('Started rpc!'));
Electron.Main.App.on('ready', createWindow);
^
at Object.<anonymous> (C:\Users\Owner\Desktop\Discordrpc\main.js:34:15)
yikes
do you really need electron for rpc 
i dont think so
i know that's why im asking
message.channel.send(list[listgetter]);
^
SyntaxError: Unexpected token .
What is the issue here
electron is too heavy just to be used for rpc
you dont
or somethign
the example for discord-rpc uses electron
because its interactive kinda
like you click the button and it updates on your rpc
and that is where their code is from
:)
@earnest phoenix what should I use
Just use that lol
Dont I need a window
no
no
you can use it in console if you wanted
Click on what i sent you
So I can remove
message.channel.send(list[listgetter]);
^
SyntaxError: Unexpected token .
what do i do
98% of my file
or just use https://github.com/Pizzabelly/EasyRP
That's over kill
i am sobbing i wanted to make something like that
The npm module can be done in a couple lines
message.channel.send(list[listgetter]);
^
SyntaxError: Unexpected token .
what do i do
ffs
'use strict';
/* eslint-disable no-console */
const DiscordRPC = require('discord-rpc');
// Set this to your Client ID.
const clientId = '';
// Only needed if you want to use spectate, join, or ask to join
DiscordRPC.register(clientId);
const rpc = new DiscordRPC.Client({ transport: 'ipc' });
const startTimestamp = new Date();
async function setActivity() {
if (!rpc || !mainWindow) {
return;
}
// You'll need to have snek_large and snek_small assets uploaded to
// https://discord.com/developers/applications/<application_id>/rich-presence/assets
rpc.setActivity({
details: 'Developing',
state: 'in slither party',
startTimestamp,
largeImageKey: 'snek_large',
largeImageText: 'tea is delicious',
smallImageKey: 'snek_small',
smallImageText: 'i am my own pillows',
instance: false,
});
}
rpc.on('ready', () => {
setActivity();
// activity can only be set every 15 seconds
setInterval(() => {
setActivity();
}, 15e3);
});
rpc.login({ clientId }).catch(console.error).then(console.warn('Started rpc!'));
send the rest of your code
so this would show that on my pfp
message.channel.send(list[listgetter]);
^
SyntaxError: Unexpected token .
@earnest phoenix what is the rest of it
const randomwordsgetter = require("random-words-getter")
var listofwords = ["test1", "test2", "test3", "test4", "test5"]
exports.module = {
message.channel.send(list[listgetter]);
}
tea is delicious
im using my own npm module
EasyRP is just a small exe to set your rpc to whatever lol
i mean
i made a module for process.exit(-1)
im about to do an is-undefined module to check if a variable is undefined
k

peak of npm packages is is-odd

its not even using
its 3 i mean lmao
const randomwordsgetter = require("random-words-getter")
var listofwords = ["test1", "test2", "test3", "test4", "test5"]
exports.module = {
message.channel.send(list[listgetter]);
}
i need pix
fix
for . unexpected
is-odd has so many
i just wanna make a new global list of users that should ahve their coding priviledges revoked
Imagine not checking
if (process) console.log("code is running");
Im reporting all those modules as spam btw, just saying 
while im making a npm module how do i request a thing from it like module.test
what
its not spam
smh
its a legit use case
how do you know when your code is running without it
@honest perch
PS C:\Users\Owner\Desktop\Discordrpc> npm i discord-rich-presence
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno -4058
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://git@github.com/discordjs/rpc.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Owner\AppData\Roaming\npm-cache_logs\2020-10-10T21_54_16_292Z-debug.log
ok i will add a 100 lin console log
nice way to get beaned
while im making a npm module how do i request a thing from it like module.test
PS C:\Users\Owner\Desktop\Discordrpc> npm i discord-rich-presence
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno -4058
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://git@github.com/discordjs/rpc.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoentnpm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Owner\AppData\Roaming\npm-cache_logs\2020-10-10T21_54_16_292Z-debug.log
@solemn leaf you don't have git
ยฏ\_(ใ)_/ยฏ
npm i git?
No
what is
@honest perch what does the queue expect? as in like res.tracks[0]
Search up git on Google
@solemn leaf, Ormanlardan, รงรถllere ve kutuplara kadar farklฤฑ yerlerde yaลayan tรผrleri bulunmaktadฤฑr.
Iirc that plays the first song/result
The song url?
message.channel.send(list[listgetter]);
^
SyntaxError: Unexpected token .
HELP
ffs
Its whats being loaded from lavalink
put the song url in?
@misty sigil yes, check radio
@honest perch https://git-scm.com/
https://github.com/devsnek/discord-rich-presence/blob/master/index.js is all it is, and i've done it under 10 lines so its useless installing it
message.channel.send(list[listgetter]);
^
SyntaxError: Unexpected token .
message.channel.send(list[listgetter]);
^
SyntaxError: Unexpected token .
Again check radio.js
Stop
dont ignore me
Spamming
@earnest phoenix show more code
help me
ok
const Discord = require("discord.js");
const randomwordsgetter = require("random-words-getter")
var listofwords = ["test1", "test2", "test3", "test4", "test5"]
exports.module = {
message.channel.send(list[listgetter]);
}@quartz kindle
Jesus
message doesnt exist
wtf
Youre declaring an object
Objects need keys
also that
Even i know that its wrong, and tim knows I'm an idiot
message isnt even declared
you'd prob need a constructor or at least get a parameter in a function
Discord
randomwordsgetter
listofwords
those are the only things in your code.
where is message?
ok I installed git @honest perch
no
you have to pass message
if thats nto in the message handler
which looks like its not
ah i needed that shit sec
i think you could extend the MessageChannel class as well to use the send() method
PS C:\Users\Owner\Desktop\Discordrpc> npm i discord-rich-presence
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno -4058
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://git@github.com/discordjs/rpc.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
but i installed git
Restart the console
Heey guys pls i need any tutorial video for develop my bot for send message private to all member discord !!
message.author.send
โsend private to all member discordโ is mass dm which is against the API
it can get you banned
What can I do with a vps, as in how many bots/ websites, etc?
it's a machine
its a virtual machine
the second part of that question is dumb
it's like asking how many games does your pc run at the same time
you can have as many bots in a vps as you can afford?
One message removed from a suspended account.
itโs like asking how many games does your pc run at the same time
thats a good analogy to put it
cry, how many games does your pc run at the same time
0, windows just BSODs
One message removed from a suspended account.
thats why i use templeos simpletons
@prisma oriole srsly bro , just i want to send annoncement for my new server !!
well dont do it with a mass dm
Error:
message.channel.send(list[listgetter]);
^
SyntaxError: Unexpected token .
Code:
const { Message } = require("discord.js")
const randomwordsgetter = require("random-words-getter")
var listofwords = ["test1", "test2", "test3", "test4", "test5"]
exports.module = {
message.channel.send(list[listgetter]);
}
you clearly didnt read what neither Tim nor i said @earnest phoenix
what am i looking at
wtf is happening
@azure jolt usually thats internet problem (disconnect/reconnect)
is there a way to check if a member is boosting in discord.js
lmao
Lol
does anyone know
of course if you are boosting it returns a timestamp, otherwise does it return null or just
null
if i have a vae
var
how can i only get like part of it?
like the first 3 letters?
@prisma oriole This is just a simple question. Are websites okay for making discord bots?
hey i need help with my bot
its an xp bot
and its works
but it loops
forget
i think i fixd it
For some reaosn
It isn't collecting reactions
With this
It has worked in the past
But now it isn't
What did it change to?
everything changed a bit
Ok but what is it supposed to be now?
I figured it out
Old time MySQL โค๏ธ
does anyone know the difference between .net framework and .net core?
i cant set references in core but can in framework
aka import some windows functions
from the looks of it i assume framework is used to make standalone windows apps and core for something else
else if(cmd === "detain")
{
var member = msg.mentions.members.first();
if(typeof member === "undefined")
{
sendMessage(msg.channel, "You must mention a valid user!");
return;
}
var jailedRole = msg.guild.roles.find(role => role.name.toLowerCase() === "detainee");
if(jailedRole === null)
{
sendMessage(msg.channel, "This guild does not have a \"Detainee\" role!");
return;
}
if(!member.manageable)
{
sendMessage(msg.channel, "I don't have the permissions necessary to punish this member!");
return;
}
member.roles.forEach(role => {
member.removeRole(role.id)
.catch(err => {
console.log("Failed to remove role: " + err);
});
});
member.addRole(jailedRole.id)
.catch(err => {
console.log("Failed to add role: " + err);
});
sendMessage(msg.channel, "Jailed " + member.displayName + "!");
}
``` am i stupid?
msg.guild.roles.cache.find
from the looks of it i assume framework is used to make standalone windows apps and core for something else
@split hazel Core can be ran on Mac, Linux and Windows
didnt work @sonic lodge
so show the new error
i dont have a fn
it seems like the error's coming from within discord.js and not your code
are you on the latest version
update discord.js/node @sudden tulip
i have
does anyone know the difference between .net framework and .net core?
@split hazel https://docs.microsoft.com/en-us/dotnet/standard/choosing-core-framework-server
Everything is moving towards .net core
the thing is with .net core it doesnt let me use any windows-only methods such as message boxes/etc
and i dont really need to make it work for other platforms so i'm fine with fw
Anyone here knows the support server for discord developers?
Bots having problems joining servers
ty
why does the screenshot says โBootsโ lmao
the thing is with .net core it doesnt let me use any windows-only methods such as message boxes/etc
@split hazel Thats because things like messagebox is made for Windows
exactly and my whole app focuses on interacting with windows ๐
Thats why u better use fw if u focus on windows only*
@split hazel Anyway, I asked in #topgg-api but do you know why the widget doesnt show up in discord?
How do I specify more than one arg in .findOne({})
wait a minute
i haven't fully checked everything
fuck
Okay I'm waiting
Probably
i'll give it a shot
wdym more than one arg
You just create an object with keys and values you search for
its 1 am give me a break
hey
so i got an avatar cmd and when i do lb!avatar 437019658374348801 it wont show the user ids avatar
it shows the person who triggered its avatar
else if (command === 'avatar') {
let avatar = message.mentions.users.size ? message.mentions.users.first().avatarURL({ format: 'png', dynamic: true, size: 2048 }) : message.author.avatarURL({ format: 'png', dynamic: true, size: 2048 });
if (message.mentions.users.size > 0) {
const embed = new Discord.MessageEmbed()
.setColor(0xFFFF00)
.setTitle(`Avatar for ${message.mentions.users.first().username}:`)
.setImage(`${avatar}`)
.setFooter(`ยฉ LightBot `);
message.channel.send({embed});
} else {
const embed = new Discord.MessageEmbed()
.setColor(0xFFFF00)
.setTitle(`Avatar for ${message.author.username}:`)
.setImage(`${avatar + "?size=2048"}`)
.setFooter(`ยฉ LightBot `);
message.channel.send({embed});
}
}```
No one will answer me ? 
whats your question
If it was normal that when I post my widget image link in Discord, it doesn't show up
no; it should show up. Which means its not getting the image currectly.
(node:4014) UnhandledPromiseRejectionWarning: Error: 400 Bad Request
client.on('ready', () => {
console.log("Ready")
setInterval(() => {
dbl.postStats(client.guilds.cache.size);
}, 60000);
});```
The 60sec is for the first time
how do I send an embed message by dm?
Same way you send any other
And how do I define user?
Fetching by id or getting from a mention
isn't the rate limit per posting your stats supposed to be like 15 minutes/an hour
(node:4014) UnhandledPromiseRejectionWarning: Error: 400 Bad Request
client.on('ready', () => { console.log("Ready") setInterval(() => { dbl.postStats(client.guilds.cache.size); }, 60000); });``` The 60sec is for the first time
no; it should show up. Which means its not getting the image currectly.
@obtuse wind It is getting the image
Since it shows up on the webbrowser 
@earnest phoenix
isn't the rate limit per posting your stats supposed to be like 15 minutes/an hour
Why do you think I know the answer tho
It's in there documentation somewhere.
But 60 seconds is probably too short already.
So can't you look for it?
Of course, do you want me to?
I mean, if you want the answer, go ahead
are you using dblapi.js
what does this mean unexpected token break
what does this mean unexpected token break
I'm gonna change it to like an hour after
what does this mean unexpected token break
ok
@pale vessel 
your code is shit
@pale vessel
i suppose
isn't the rate limit per posting your stats supposed to be like 15 minutes/an hour
@sudden geyser for top.gg?
client.on('message', message => {
let args = message.content.substring(prefix.length).split("");
switch (args[0]) {
case 'play':
function play(connection, message){
var server = [message.guild.id];
server.dispatcher = connection.playStream(ytdl(server.queue[0], {filter: "audioonly"}));
server.queue.shift();
server.dispatcher.on("end", function(){
if(server.queue[0]){
play(connection, message);
}else {
connection.disconnect();
}
});
if(!args[1]){
message.channel.send("you need to provide a link!");
return;
}
if(!message.member.voiceChannel){
message.channel.send(" You must be in a channel to play the bot!");
return
}
if(!server[message.guild.id]) server[message.guild.id] = {
queue: []
}
var server = server[message.guild.id];
server.queue.push(args[1]);
if(!message.guild.voice.channel.join().then(function(connection){
play(connection, message);
})
break;
}
});
what
it's
message.jump_url@drifting wedge
@pale vessel do how do i choose the messagr to get the link from? message.message.jump_url
wait
lol
i got it
me is not very inteligent
(node:4014) UnhandledPromiseRejectionWarning: Error: 400 Bad Request
client.on('ready', () => { console.log("Ready") setInterval(() => { dbl.postStats(client.guilds.cache.size); }, 60000); });``` The 60sec is for the first time
@earnest phoenix It started spamming it for some reason, (the time was like 60 seconds each interval) and now i get (node:7771) UnhandledPromiseRejectionWarning: Error: 429 Too Many Requests
my code is shit because i just started coding a week ago
my code is shit because i just started coding a week ago
@lucid prawn LEARN WHATEVER UR DOING
before making a bot
or else ppl will just say learn (whatever) and wont help you
can you show us your code?
I have bots online
like if u ask how do i print hello world, 99% of the servers will like mute you
ok
Can you stop? I think he got it
can you show us your code?
@pale vessel ๐
here my code
Use pastebin or something, we won't download a file
you have more than one message events
to make sure lmao
It's 60/60s
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
you have more than one message events
@pale vessel wuts the issue?
i have more than one, should they all be together
but isn't it different for posting stats
@earnest phoenix It started spamming it for some reason, (the time was like 60 seconds each interval) and now i get (node:7771) UnhandledPromiseRejectionWarning: Error: 429 Too Many Requests
When will this error go away?
break;
^^^^^
SyntaxError: Unexpected token 'break'
So?
and please use only one message event for your commands, it's really important @lucid prawn
so I send an embed to md?
No,
because right now, it looks like you're only copy pasting commands from other bots
wym
A user can be defined by a mention, ID, etc
So lets say a user has the ID of "1"
let user = <client>.users.cache.get("1")
user.send(embed)
Is that triggered by a command?
If yes, Replace client.user.createDM() with message.author
npm update
Iirc
Might be wrong
Yep definitely wrong
That updates packages
Not node
Yeah, but if you're self hosting your bot you prob want to move to a VPS
but isn't it different for posting stats
@sudden geyser nope. it's a global ratelimit
I'm using a VPS to run my bot with github code, how can I make it so the code automaticlly updates in the host when I change the github file? without having to reinstall the github files
You mean auto-deploy?
Yeah, you gotta searh it up with the platform you're using
Its different for every platform
wtf literally everything is updated
else if(cmd === "detain")
{
var member = msg.guild.roles.cache.find();
if(typeof member === "undefined")
{
sendMessage(msg.channel, "You must mention a valid user!");
return;
}
var jailedRole = msg.guild.roles.find(role => role.name.toLowerCase() === "detainee");
if(jailedRole === null)
{
sendMessage(msg.channel, "This guild does not have a \"Detainee\" role!");
return;
}
if(!member.manageable)
{
sendMessage(msg.channel, "I don't have the permissions necessary to punish this member!");
return;
}
member.roles.forEach(role => {
member.removeRole(role.id)
.catch(err => {
console.log("Failed to remove role: " + err);
});
});
member.addRole(jailedRole.id)
.catch(err => {
console.log("Failed to add role: " + err);
});
sendMessage(msg.channel, "Jailed " + member.displayName + "!");
}
});
why tf is it still erroring
which node ver are you on
you have v11 and v12 code mixed up
and that error came from that find() i'm guessing
you didn't provide a function
I'm only having error because I'm trying to add a skip command
assuming you just upgraded to discord.js v12, fix these
and provide a function to this
but it looks like it should be msg.member
i'm not sure what you're trying to do
since you used member.roles
so member can't be a role
else if(cmd === "detain")
{
var member = msg.mentions.members.first();
if(typeof member === "undefined")
{
sendMessage(msg.channel, "You must mention a valid user!");
return;
}
var jailedRole = msg.guild.roles.find(role => role.name.toLowerCase() === "detainee");
if(jailedRole === null)
{
sendMessage(msg.channel, "This guild does not have a \"Detainee\" role!");
return;
}
if(!member.manageable)
{
sendMessage(msg.channel, "I don't have the permissions necessary to punish this member!");
return;
}
member.roles.forEach(role => {
member.removeRole(role.id)
.catch(err => {
console.log("Failed to remove role: " + err);
});
});
member.addRole(jailedRole.id)
.catch(err => {
console.log("Failed to add role: " + err);
});
sendMessage(msg.channel, "Jailed " + member.displayName + "!");
}
});
the guy told me to replace it from this
so you're fixing the command





