#development

1 messages ยท Page 1312 of 1

solemn latch
#

it might not change for hours

earnest phoenix
#

Wait

solemn latch
#

no point in doing api requests when it might not be changing

tardy hornet
#
    bot.user.setActivity(`${bot.guilds.cache.size} servers (!help)`, { type: 'PLAYING'}).catch(console.error).then (bot.setInterval(function(){
      `${bot.guilds.cache.size}`
    }, 300000));```
earnest phoenix
#

Why not just update it when it leaves or joins a guild?

tardy hornet
#

now its better?

solemn latch
#

I dont think setInterval works the way you think it does

ionic dawn
#

Woo

solemn latch
#

it just runs the code inside the function

vapid oasis
#
    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

ionic dawn
#

You have to help me with canvas and gif encoder CatBlush

solemn latch
#

oo

#

the fun one

vapid oasis
#

i dont get how this works

#

please explain

ionic dawn
#

Would you?

solemn latch
#

i need to make lunch rn, 30 min and i can help

vapid oasis
#

why doesn't this work

solemn latch
#

maybe 40

vapid oasis
#
    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

ionic dawn
#

Imma go to bed soon, can I explain you what In trying to do on DM and you read it when you can?

earnest phoenix
#

what do you not understand about it

#

where did you find the snippet

ionic dawn
#

shush

vapid oasis
#

talking to e?

#

me

#

?

earnest phoenix
#

yes

vapid oasis
#

i dont know man

#

is it supposed to work or

earnest phoenix
#

well

#

try it and see

vapid oasis
#

it doesn't work

earnest phoenix
#

where did you copypaste the snippet from

blissful coral
#

@vapid oasis You sent it another 2 times

vapid oasis
#

dude

#

im asking a question

#

what the hell is your problem

#

fuck off

earnest phoenix
#

this has to be a troll

solemn latch
#

We are not mindreaders man. You have to explain everything clearly

vapid oasis
#

alright so

blissful coral
#

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

solemn latch
#

"Explain why this doesn't work" isn't enough info for people to help you

blissful coral
#

You are asking us to explain something that works

thick raven
#

does anyone have or know of a bot the can auto mute discord when playing among us?

solemn latch
#

Nope. You could have a bot that a command will mute everyone in vc

vapid oasis
#

i do

solemn latch
#

But you'd manually have to do it

thick raven
#

@vapid oasis what is the bot?

vapid oasis
#

hold on

earnest phoenix
#

embed site name
what do you mean

thick raven
#

thx

earnest phoenix
#

256 chars iirc

#

not sure

#

sec

snow coral
#

Oops i found

#

@earnest phoenix can yoi help me whith the owo bots dashboard

thick raven
#

wait @vapid oasis where is the download link I am not very familiar with reddit

earnest phoenix
#

.

honest perch
blissful coral
#

@snow coral This is not OwO bot support, this is top.gg support

snow coral
#

Im confused

blissful coral
trim saddle
#

@woeful pike so, is that screenshot where tonkku is owner ever gonna get changed

snow coral
#

How do you go on the bots dashboard

solemn latch
#

We are not support for that bot

honest perch
#

@trim saddle no point

tardy hornet
#

(node:12784) UnhandledPromiseRejectionWarning: DiscordAPIError: Invalid Form Body
embed.fields[0].value: Must be 1024 or fewer in length.

#

wth

solemn latch
#

We do not know because we are not them

snow coral
#

K

blissful coral
#

Has to be less then 1024

honest perch
#

read what it says @tardy hornet

tardy hornet
#

its giving me error cuz its too long

#

?

earnest phoenix
#

@trim saddle Let it stay, to remember the old times of dbl

#

โœจ read your errors โœจ

blissful coral
#

Yes @tardy hornet

honest perch
#

better

blissful coral
#

It can't send if it is to long

tardy hornet
#

k ty

woeful pike
#

what? @trim saddle

trim saddle
#

the -wrongserver screenshot

#

@earnest phoenix it hurts to remember he got banned ๐Ÿ˜”

slender thistle
#

It's not a significant issue

blissful coral
#

Wait how do I check what badges a user has

#

Is it not Oauth2?

trim saddle
#

user flags

blissful coral
#

ok

slender thistle
#

Public user flags are a thing

blissful coral
#

Thought so lol

earnest phoenix
#

@earnest phoenix it hurts to remember he got banned ๐Ÿ˜”
@trim saddle Yea

blissful coral
#

@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))

});

honest perch
#

thanks

blissful coral
#

๐Ÿ‘

honest perch
#

yep thanks

tardy hornet
#

remember how the thing that if i click in a reaction it do what i want?

#

reactions something

twilit rapids
#

@blissful coral .serialize()

#

.serliaze().SYSTEM

solemn leaf
#
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();
  }
});
blissful coral
#

app is undefined

solemn leaf
#

howww

blissful coral
#

console.log(app)

solemn leaf
#

ok

#

it is

#

but why is it

#

@blissful coral

blissful coral
#

No clue

solemn leaf
#

can I do

#

const electron = require('electron')
electron.app.on?

#

?

spice compass
#

is app a class?

solemn leaf
#

idk Im trying to do an exapmle of discord rpc

spice compass
#

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....

solemn leaf
#

const electron = require('electron');
const app = new electron.app();

pure lion
#

Does anyone know how I can get a prefix with a space after it

#

E.g

#

poopy ping

spice compass
#

just add space after prefix

pure lion
#

Aee

#

No I mean

#

The prefix can either be poopyping or poopy ping

solemn leaf
#

app still undefined

spice compass
#

oh, then idk but does looks really easy.

pure lion
spice compass
#

@ spice

#

lol lemme think

#

and aki idk man what electron really is

compact oriole
#

maybe read the github page

solemn leaf
#
'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!'));
compact oriole
#

or the site

solemn latch
#

const { app, BrowserWindow } = require('electron')

solemn leaf
#

Yeah

solemn latch
#

its exactly what it says to use

solemn leaf
#

isnt that what Im doing

solemn latch
#

yep

compact oriole
#

also cringe
'use strict';

solemn leaf
#

ok

compact oriole
#

jk

#

strict is pretty cool

solemn leaf
#

Why would app be undefined

#

thou

pure lion
#

Eslint

solemn leaf
solemn latch
#

did you install the electron module?

hexed hawk
#

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.

solemn leaf
#

duh or else the browser windows wount work

solemn latch
#

electron has a built in module iirc

#

which isnt the feature complete module

solemn leaf
#

I did npm i electron

#

Could I jsut remove the website making and the discord rpc or does a window have to be open

solemn latch
#

npm uninstall electron
npm install electron

#

๐Ÿคทโ€โ™‚๏ธ

solemn leaf
#

npm uninstall electron | install electron

#

that right?

latent eagle
#

I can add a bot to your site for free, right?

solemn leaf
#

No its $100000

solemn latch
#

approval time is 7+ weeks

solemn leaf
#

8+

opal plank
#

yes, its free

#

@latent eagle

solemn latch
#

offically 7+

drifting wedge
#

ok lemme get this write

#

right*

latent eagle
#

No its $100000
@solemn leaf O. Thanks. I'll go get my money

opal plank
#

yall answered everything BUT the question they asked

drifting wedge
#

datetime.utcnow is the date?

opal plank
solemn latch
solemn leaf
#

@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

solemn latch
#

id guess so? ๐Ÿคทโ€โ™‚๏ธ

solemn leaf
#

f

#

app.on

#

creates the window

#

just reinstalled

#

same thign

#

@solemn latch any other ideas?

solemn latch
#

?

ocean pasture
#

can you put a hyperlink in the footer of the embed in python

#

it doesn't work

rose warren
#

Apparently it's 8+ weeks now. Shiv said it's more like 8 weeks on average.

ocean pasture
solemn latch
#

the offical number is listed at 7+ still ๐Ÿคทโ€โ™‚๏ธ

#

which includes 8+

rose warren
#

I know

ocean pasture
#

can some 1 help me

rose warren
#

I said 7 to someone and he corrected to say 8+ on average

compact oriole
solemn leaf
#

ok ill try it

rose warren
#

Apparently 7 weeks is rare

#

๐Ÿคทโ€โ™‚๏ธ

compact oriole
#

it's more than 8 weeks rn

solemn latch
#

that why we use +

#

and minimum

#

it was 5 weeks + like 3 weeks ago

solemn leaf
#

bcs somehow

#

people working at home

#

get slowed by covid

#

ยฏ_(ใƒ„)_/ยฏ

ocean pasture
#

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

solemn latch
#

on windows @solemn leaf ?

solemn leaf
#

?

#

I got that error trying to do election .

rose warren
#

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

solemn leaf
#

Set-ExecutionPolicy -ExecutionPolicy Undefined -Scope CurrentUser

ocean pasture
#

o

solemn latch
#

electron . in console?

solemn leaf
#

Yeah

solemn latch
#

pretty sure the page i linked to suggested to put it in package.json

#

not sure dont have it open anymore

solemn leaf
ocean pasture
#

@rose warren is there a way i can make it the description

rose warren
#

Yes use the same code

ocean pasture
#

like make a smaller version of descritpion

#

use same code then scale size down

#

k

solemn latch
#

yeah, asks you to update the package.json

rose warren
#

[text](link) will work in description

ocean pasture
#

ik

solemn leaf
#
{
  "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"
  }
}
solemn latch
#

then if on windows you might have to jump through some hoops to make electron work

ocean pasture
#

can i like move down a line in the descritpion?

#

like

this

rose warren
#

Yes

ocean pasture
#

how do i do that

solemn latch
#

theres also like 30 other solutions listed online @solemn leaf
could be any number of them

rose warren
#
Rest of your description here.\n\n[text](link)```
solemn latch
#

f

ocean pasture
#

im on python

rose warren
#

Oh

#

Idk python sorry

ocean pasture
#

o thx anyways

solemn latch
#

pretty sure its the same exact thing though

rose warren
#

But it's a string

solemn latch
#

^

rose warren
#

Should be same

ocean pasture
#

yeah

solemn leaf
#
const electron = require('electron');
const app = require('app');
const BrowserWindow = require('browser-window')
surreal sage
#

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)

blissful coral
rose warren
#

Use google for (help) { console.log(itseasier) }

solemn leaf
#

@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');
solemn latch
#

๐Ÿคทโ€โ™‚๏ธ

solemn leaf
#

idk

#

this is annoying

solemn latch
#

id take a look at their github

#

see the solutions

solemn leaf
solemn latch
#

lol

solemn leaf
#

?

#

wdym by that

solemn latch
#

it was last updated 2 weeks ago

solemn leaf
#

did the last update break it lmao

solemn latch
#

idk

#

your the dev using it

#

never used it in my life

solemn leaf
#

same

#

is there a way

#

to downgrade the version?

solemn latch
#

you should probably check out the github and checkout the published issues

#

before doing anything

#

atleast thats how I debug lib issues

solemn leaf
#

should I reinstall

#

and install it like this

#

npm install electron --save-dev [--save-exact]

solemn latch
#

idk

tardy hornet
#
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

solemn latch
#
  person2.kick({
    reason2: reason2
})
.setTitle('__**you got kicked!**__')

#

you cant use .setTitle on a kick

nocturne sparrow
#

"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"
}
]

tardy hornet
#
  person2.kick({
    reason2: reason2
})
.setTitle('__**you got kicked!**__')

@solemn latch
then what do i do?

#

it worked till today

solemn latch
#

i think you edited your code and didnt realize it then

#

because theres no way that can work

tardy hornet
#

maybe

#

ty anyway

solemn latch
#

i think you deleted where you defined "kickembed"

tardy hornet
solemn latch
#

oh, you just moved it

tardy hornet
#

yes

solemn latch
#

it needs to be before .setTitle

#

because how would .setTitle know where to go?

dark kestrel
#

Does NginX is free ?

solemn latch
#

nginx is free yes

dark kestrel
#

but it says Start free trial ??????

solemn latch
#

free trial for nginx plus

#

not nginx

tardy hornet
#

@solemn latch it worked 1 time now and then it say everytime: can not ban this person

nocturne sparrow
#

who is know lowdb?

solemn latch
#

the bot needs ban perms, and more perms than the user to ban them

earnest phoenix
#

Why could this be?

solemn latch
#

whats your find look like?

earnest phoenix
#

How so?

solemn latch
#

in v11 and v12 the find function changed

nocturne sparrow
#

@opal plank

#

can you help me?

solemn latch
#

please dont ping random people

nocturne sparrow
#

not random

earnest phoenix
#

oke Thanks for the information

in v11 and v12 the find function changed
@solemn latch

solemn latch
#

also sendCode is removed

nocturne sparrow
#

@split hazel

#

let setanswer = db.get(message.guild.id).get("setcommand").map("setanswer").value()

#

i was tried it

#

bot doesnt work

#

anyone can help me?

earnest phoenix
#

stop using json as your database

nocturne sparrow
#

why

proven lantern
#

can my bot be in two voice channels in the same guild at the same time?

nocturne sparrow
#

no

proven lantern
#

dang

proven lantern
#

i am migrating my search functionality from a firebase db to a elasticsearch db

#

elasticsearch is pretty cool

nocturne sparrow
#

i dont using a config

earnest phoenix
#

that's not what that message is about

nocturne sparrow
#

i dont understand

#

why i dont need use lowdb

proven lantern
#

using a json stub is fine until you make a db

cedar maple
#

What is the rate limit for the API?

proven lantern
#

10,000 per 5 minutes i believe

solemn latch
#

which api?

cedar maple
#

the bot api to post data

proven lantern
#

google maps

cedar maple
solemn latch
#

lol

earnest phoenix
#

that narrowed it down by exactly 0 results

cedar maple
#

oh well im set lol

earnest phoenix
#

if you're thinking of discord endpoints

#

the ratelimits aren't static

cedar maple
#

1 every 5 mins

earnest phoenix
#

they're returned in request headers

cedar maple
#

thats what i send atm

solemn latch
#

the top.gg ratelimit is 60 per minute.

cedar maple
#

lol i didnt see that link haha

solemn latch
#

its hidden

cedar maple
#

it was right in front of me

solemn latch
#

took me a minute to find it too

cedar maple
#

awesome thanks

nocturne sparrow
#

anyone knowing lowdb?

solemn latch
#

ive never even heard of it until you brought it up

thick gull
#

is that just a quickdb version of json

solemn latch
#

yeah

thick gull
#

why

solemn latch
#

seems like it

thick gull
#

use quickdb atleast

#

but no ican't help because idk this

earnest phoenix
#

yikes it uses lodash

proven lantern
#

lodash was good for it's time

earnest phoenix
#

do you guys think storing an encrypted discord OAuth token on the user computer through cookies is gud?

solemn leaf
#

@opal plank I found it

azure jolt
#

it can probably be decrypted

solemn leaf
#
 namespace Main {
    const app: App;
earnest phoenix
#

i would keep the token safe server side @earnest phoenix

#

i have an IP whitelist

solemn leaf
#

but is said Electron.Main.App isnt a thing

azure jolt
#

from experience, dont

drifting wedge
#

how can i run 2 bots on heroku? with one start file?

solemn leaf
#

login with many clients

#

?

drifting wedge
#

i dont think that works

solemn leaf
#

Extreme

#

Could you help me with soemthing?

blissful coral
#

Disregard what I sent

#

lol

#

What's up

solemn leaf
#

can we do dms

blissful coral
#

Just ask here

solemn leaf
#

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();
  }
});
blissful coral
#

@sand dune user.displayAvatarURL({dynamic:true})

solemn leaf
blissful coral
#

I don't know how to work electron

solemn leaf
#

Electron.Main.App.on('ready', createWindow);
^

TypeError: Cannot read property 'Main' of undefined

blissful coral
#

Never used it before

solemn leaf
#

pls try

#

im so close to have my presence

solemn latch
#

Have you looked at github yet?

solemn leaf
#

erwin did

solemn latch
#

okay, why dont you?

drifting wedge
#
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)

solemn leaf
#

Electron.Main.app.on('ready', createWindow);
^

TypeError: Cannot read property 'app' of undefined

#

now I got this

tardy hornet
#

ok so discord hates me

sharp thicket
#

hi i had a question! can i use .replace() 2 times in a single string?

tardy hornet
#
.setImage('https://cdn.discordapp.com/attachments/754604183210164268/764578010065797130/screen2.png')
#

why its not working!

solemn leaf
#

dont use discord for storing stuff

snow coral
#

Wat bots do yiu work whith

solemn latch
#

@loud bison

slender thistle
#

hi i had a question! can i use .replace() 2 times in a single string?
@sharp thicket string.replace().replace()

snow coral
#

Mk

#

@solemn latch

#

@solemn latch

#

Wat does woo bot do

solemn latch
sharp thicket
#

yes

#

oop sorry for da ping

earnest phoenix
#

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.');
    });
lucid prawn
#

Error

dark kestrel
#

ree

#

@earnest phoenix the url

#

u have to change the URL

lucid prawn
#

valder

drifting wedge
#

do poll bots ever get any traction?

solemn latch
#

its really hard to say if you make a bot if itll get a lot of users

drifting wedge
#

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

solemn latch
#

yes, they are used by many

drifting wedge
#

and i made one called Pollr

#

it has the same system

#

but just a bot with ONLY polls

dire obsidian
#

Well

#

Python or js for web servers?

drifting wedge
#

Python or js for web servers?
@dire obsidian depends

dire obsidian
#

Depends on what?

#

Im trying to make a """"website""""

#

Aaaaaand you know

solemn latch
#

just a static site?

dire obsidian
#

Hmmm well

#

With databases and that stuff

#

Like a online store

lucid prawn
#

oops

solemn latch
#

not sure what route youd go with for an online store ngl

dire obsidian
#

Soooo python???

#

Yeee python

lucid prawn
#

oh no

dire obsidian
#

Also python is semi Communist

novel fjord
#

lol

sudden geyser
#

what do you mean

lucid prawn
#

oh no python pandasad

sudden geyser
#

You're a snake

solemn latch
#

its our website

novel fjord
#

i wish python was faster.

dire obsidian
#

Yeee

#

Gulag time

lost badge
#

I'm brainstorming a bot idea and was wondering if anyone with experience could help me out

sudden geyser
#

interpreted languages are a no go for speed

novel fjord
#

i also wish it had a form builder built in. what can i say? i was spoiled by visual studio c# and c++

sudden geyser
#

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

novel fjord
#

durty dave i'll toss ideas at you

lost badge
#

Well, I don't know if it would work/if it can be done

novel fjord
#

for every 1 idea you have i'll give you one

#

fair?

lost badge
#

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

novel fjord
#

lol that was the idea i was gonna give you.

lost badge
#

What would prevent or be an obstacle in doing so

lucid prawn
#

what did this means ReferenceError: error is not defined

novel fjord
#

your coding capability

lost badge
#

So I have a VPS

sudden geyser
#

it means you tried to use a variable/function/etc. that doesn't exist

novel fjord
#

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

lucid prawn
#

ReferenceError: error is not defined

novel fjord
#

a pix2pix deal

lost badge
#

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

solemn leaf
#

Electron.Main.App.on('ready', createWindow);
^

TypeError: Cannot read property 'App' of undefined

novel fjord
#

or a waifu generator

#

well, if you're looking at music, i'd suggest youtube because it posts easily.

lucid prawn
#

ReferenceError: error is not defined

novel fjord
#

plus it's not forced on people

lost badge
#

What about video streams?

novel fjord
#

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.

novel fjord
#

create a skeleton plan for it, write some pseudocode. then get it functional.

solemn latch
#

ReferenceError: error is not defined
lel

novel fjord
#

could always make a dnd game in your bot. lol.

quartz kindle
#

@solemn leaf you named it app not App

solemn leaf
#

appp also got the error

quartz kindle
#

Show code

solemn leaf
#
Electron.Main.app.on('ready', createWindow);
              ^

TypeError: Cannot read property 'app' of undefined
quartz kindle
#

Main is undefined

solemn leaf
#
'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

rough obsidian
#

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.

quartz kindle
#

A good developer will likely charge 20-40+ usd/hour

solemn leaf
#

Tim

#

?

quartz kindle
#

That was a question?

#

Lol

solemn leaf
#

scroll up.

#

How is Main undefined

rough obsidian
#

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

ripe quest
#

@rough obsidian i sent you a DM lets discuss some dashboard stuff

earnest phoenix
#

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

solemn leaf
#
'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)
heady heron
#

yikes

earnest phoenix
#

do you really need electron for rpc thonk

misty sigil
#

i dont think so

earnest phoenix
#

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

misty sigil
#

no you don't

#

just use discord-rpc

thick gull
#

you dont

misty sigil
#

or somethign

thick gull
#

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
#

i

#

that's so dumb lol

misty sigil
#

lmao

#

what the

thick gull
honest perch
solemn leaf
#

@earnest phoenix what should I use

honest perch
#

Just use that lol

solemn leaf
#

Dont I need a window

thick gull
#

no

misty sigil
#

no

solemn leaf
#

to show it on my profile

#

O

thick gull
#

you can use it in console if you wanted

honest perch
#

Click on what i sent you

solemn leaf
#

So I can remove

earnest phoenix
#

message.channel.send(list[listgetter]);
^
SyntaxError: Unexpected token .
what do i do

solemn leaf
#

98% of my file

earnest phoenix
honest perch
#

That's over kill

thick gull
#

i am sobbing i wanted to make something like that

honest perch
#

The npm module can be done in a couple lines

earnest phoenix
#

message.channel.send(list[listgetter]);
^
SyntaxError: Unexpected token .

#

what do i do

#

ffs

solemn leaf
#
'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!'));
thick gull
#

send the rest of your code

solemn leaf
#

so this would show that on my pfp

earnest phoenix
#

message.channel.send(list[listgetter]);
^
SyntaxError: Unexpected token .

thick gull
#

@earnest phoenix what is the rest of it

earnest phoenix
#

const randomwordsgetter = require("random-words-getter")
var listofwords = ["test1", "test2", "test3", "test4", "test5"]
exports.module = {
message.channel.send(list[listgetter]);
}

misty sigil
#

tea is delicious

earnest phoenix
#

im using my own npm module

#

EasyRP is just a small exe to set your rpc to whatever lol

opal plank
#

i cannot believe you made a module for a random indexer

thick gull
#

i mean

earnest phoenix
#

its just 4 fun

#

its a random word generator

thick gull
#

i made a module for process.exit(-1)

earnest phoenix
#

with a list

#

borboss u know a fix?+

thick gull
#

nope because im like half awake rn

earnest phoenix
#

is-even

#

isis?

#

@thick gull u know a fix for the unexpected token .

thick gull
#

no

#

i am half awake

#

rn

opal plank
#

im about to do an is-undefined module to check if a variable is undefined

earnest phoenix
#

k

opal plank
thick gull
#

too late

opal plank
#

OMG

#

YOU FUCKING TAKING A PISS

earnest phoenix
#

peak of npm packages is is-odd

opal plank
thick gull
#

why are there 475K downloads

#

wait

#

what

opal plank
#

if you need help with that you should quit coding

earnest phoenix
#

few

#

2

#

no

thick gull
#

its not even using

earnest phoenix
#

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

opal plank
earnest phoenix
#

for . unexpected

opal plank
#

legit

#

can i check who downloaded that?

thick gull
#

is-odd has so many

opal plank
#

i just wanna make a new global list of users that should ahve their coding priviledges revoked

pure lion
thick gull
#

sorry

#

i will fix

pure lion
#

Thank you

#

No way of telling if the code is running without it smh

opal plank
#

Im reporting all those modules as spam btw, just saying mmulu

earnest phoenix
#

while im making a npm module how do i request a thing from it like module.test

thick gull
#

what

#

its not spam

#

smh

#

its a legit use case

#

how do you know when your code is running without it

opal plank
#

if it doesnt ahve more than 100 lines its spam

#

sorry

solemn leaf
#

@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

thick gull
#

ok i will add a 100 lin console log

opal plank
#

nice way to get beaned

earnest phoenix
#

while im making a npm module how do i request a thing from it like module.test

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
@solemn leaf you don't have git

solemn leaf
#

wdym

#

Why would I need git

honest perch
#

ยฏ\_(ใƒ„)_/ยฏ

solemn leaf
#

npm i git?

honest perch
#

No

solemn leaf
#

what is

earnest phoenix
#

lmao npm i git

#

U good there?

solemn leaf
#

idk

#

why would I know

misty sigil
#

@honest perch what does the queue expect? as in like res.tracks[0]

earnest phoenix
#

Search up git on Google

solemn leaf
abstract wolf
#

@solemn leaf, Ormanlardan, รงรถllere ve kutuplara kadar farklฤฑ yerlerde yaลŸayan tรผrleri bulunmaktadฤฑr.

honest perch
#

Iirc that plays the first song/result

misty sigil
#

yes but what is the value

#

misly

honest perch
#

The song url?

earnest phoenix
#

message.channel.send(list[listgetter]);
^
SyntaxError: Unexpected token .

#

HELP

#

ffs

misty sigil
#

so i can just

#

put the song url in?

honest perch
#

Its whats being loaded from lavalink

digital ibex
#

javascript devs are stupid

#

most anyways

honest perch
#

put the song url in?
@misty sigil yes, check radio

solemn leaf
misty sigil
#

do i need to make a player

#

for each fucking song

honest perch
#

No

#

Just play

digital ibex
earnest phoenix
#

message.channel.send(list[listgetter]);
^
SyntaxError: Unexpected token .

#

message.channel.send(list[listgetter]);
^
SyntaxError: Unexpected token .

honest perch
#

Again check radio.js

earnest phoenix
#

help

#

with it

#

please

#

someone

honest perch
#

Stop

earnest phoenix
#

dont ignore me

honest perch
#

Spamming

quartz kindle
#

@earnest phoenix show more code

earnest phoenix
#

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

honest perch
#

Jesus

opal plank
#

message doesnt exist

earnest phoenix
#

wtf

quartz kindle
#

Youre declaring an object

earnest phoenix
#

oof

#

yes

#

now i found

quartz kindle
#

Objects need keys

opal plank
#

also that

honest perch
#

Even i know that its wrong, and tim knows I'm an idiot

opal plank
#

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?

earnest phoenix
#

i am gonna add it

#

not coded

#

in a long time

#

ah shit

#

now i forgot how

solemn leaf
#

ok I installed git @honest perch

earnest phoenix
#

does this work you think

#

const { Message } = require("discord.js")

thick gull
#

no

#

you have to pass message

#

if thats nto in the message handler

#

which looks like its not

earnest phoenix
#

ah i needed that shit sec

opal plank
#

i think you could extend the MessageChannel class as well to use the send() method

solemn leaf
#
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

quartz kindle
#

Restart the console

solemn leaf
#

nvm

#

my old one worked

#

pog

autumn garden
#

Heey guys pls i need any tutorial video for develop my bot for send message private to all member discord !!

solemn leaf
#

message.author.send

prisma oriole
#

โ€œsend private to all member discordโ€ is mass dm which is against the API

#

it can get you banned

drifting wedge
#

What can I do with a vps, as in how many bots/ websites, etc?

earnest phoenix
#

it's a machine

prisma oriole
#

its a virtual machine

earnest phoenix
#

the second part of that question is dumb

#

it's like asking how many games does your pc run at the same time

prisma oriole
#

you can have as many bots in a vps as you can afford?

sage bobcat
#

One message removed from a suspended account.

prisma oriole
#

itโ€™s like asking how many games does your pc run at the same time
thats a good analogy to put it

earnest phoenix
#

cry, how many games does your pc run at the same time
0, windows just BSODs blobsad

sage bobcat
#

One message removed from a suspended account.

prisma oriole
#

thats why i use templeos simpletons

autumn garden
#

@prisma oriole srsly bro , just i want to send annoncement for my new server !!

prisma oriole
#

well dont do it with a mass dm

earnest phoenix
#

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]);

}

opal plank
#

you clearly didnt read what neither Tim nor i said @earnest phoenix

prisma oriole
#

what am i looking at

azure jolt
prisma oriole
#

i really hope this is a troll

#

@azure jolt the http request failed i suppose

opal plank
#

@azure jolt usually thats internet problem (disconnect/reconnect)

azure jolt
#

why does that happen

#

ah

karmic compass
#

is there a way to check if a member is boosting in discord.js

quartz kindle
#

member.premiumSince i think, dont remember

#

Check the docs

pale vessel
#

when you don't remember but still got it right

#

damn

karmic compass
#

lmao

misty sigil
#

damn

#

tim so good he remembers when forget

quartz kindle
#

Lol

karmic compass
#

does anyone know

#

of course if you are boosting it returns a timestamp, otherwise does it return null or just

pale vessel
#

null

karmic compass
#

ah

#

alright

drifting wedge
#

if i have a vae

#

var

#

how can i only get like part of it?

#

like the first 3 letters?

pale vessel
#

try slicing it

#

is it a string?

#

oh and is it python

drifting wedge
#

yes

#

yes

pale vessel
#

weary

#

use string[0:3] i think

#

yeah that works

lilac gorge
#

@prisma oriole This is just a simple question. Are websites okay for making discord bots?

prisma oriole
#

like botghost?

#

i mean if its a really simple bot just for your friends sure

earnest phoenix
#

hey i need help with my bot

#

its an xp bot

#

and its works

#

but it loops

#

forget

#

i think i fixd it

blissful coral
#

For some reaosn

#

It isn't collecting reactions

#

With this

#

It has worked in the past

#

But now it isn't

earnest phoenix
#

yeah

#

discord updated

blissful coral
#

What did it change to?

earnest phoenix
#

everything changed a bit

blissful coral
#

Ok but what is it supposed to be now?

earnest phoenix
#

idk

#

i never used reactions

#

sorry tho

blissful coral
#

I figured it out

earnest phoenix
#

Old time MySQL โค๏ธ

split hazel
#

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

sudden tulip
#
    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?
sonic lodge
#

msg.guild.roles.cache.find

earnest phoenix
#

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

sudden tulip
#

didnt work @sonic lodge

split hazel
#

ahhhh that makes a lot of sense

#

thanks

sonic lodge
#

so show the new error

sudden tulip
sonic lodge
#

that's a different problem

#

where did you define "fn"

sudden tulip
#

i dont have a fn

sonic lodge
#

it seems like the error's coming from within discord.js and not your code

#

are you on the latest version

opal plank
#

update discord.js/node @sudden tulip

sudden tulip
#

i have

opal plank
#

you havent

#

do node -v in console @sudden tulip

faint prism
split hazel
#

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

earnest phoenix
#

Anyone here knows the support server for discord developers?

#

Bots having problems joining servers

opal plank
earnest phoenix
#

ty

prisma oriole
#

why does the screenshot says โ€œBootsโ€ lmao

earnest phoenix
#

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

split hazel
#

exactly and my whole app focuses on interacting with windows ๐Ÿ™‚

earnest phoenix
#

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?

misty sigil
#

How do I specify more than one arg in .findOne({})

#

wait a minute

#

i haven't fully checked everything

#

fuck

solemn latch
#

Okay I'm waiting

misty sigil
#

ok yea

#

the data is correct

#

is it just .findOne({a: "a", b: "b"})?

solemn latch
#

Probably

misty sigil
#

i'll give it a shot

solemn latch
#

Is that it ๐Ÿค”

slender thistle
#

wdym more than one arg

#

You just create an object with keys and values you search for

misty sigil
#

its 1 am give me a break

peak osprey
#

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});
  }
}```
earnest phoenix
#

No one will answer me ? sadcat

peak osprey
#

whats your question

earnest phoenix
#

If it was normal that when I post my widget image link in Discord, it doesn't show up

obtuse wind
#

no; it should show up. Which means its not getting the image currectly.

earnest phoenix
#

(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
jade raptor
#

how do I send an embed message by dm?

earnest phoenix
#

same way

#

user.send(embed)

thin turret
#

Same way you send any other

jade raptor
#

And how do I define user?

thin turret
#

Fetching by id or getting from a mention

sudden geyser
#

isn't the rate limit per posting your stats supposed to be like 15 minutes/an hour

earnest phoenix
#

(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 kappalul

sudden geyser
#

@earnest phoenix

isn't the rate limit per posting your stats supposed to be like 15 minutes/an hour

earnest phoenix
#

Why do you think I know the answer tho

sudden geyser
#

It's in there documentation somewhere.

#

But 60 seconds is probably too short already.

earnest phoenix
#

So can't you look for it?

sudden geyser
#

Of course, do you want me to?

earnest phoenix
#

I mean, if you want the answer, go ahead

sudden geyser
#

are you using dblapi.js

lucid prawn
#

what does this mean unexpected token break

earnest phoenix
#

I just started

#

Oh are you talking about my code? I said its for the first time

lucid prawn
#

what does this mean unexpected token break

earnest phoenix
#

I'm gonna change it to like an hour after

lucid prawn
#

what does this mean unexpected token break

pale vessel
#

your code is shit

#

sorry sorry it was a joke

lucid prawn
#

ok

oak cliff
#

@pale vessel angry

errant perch
#

lmao

#

it means there is a unexpected token break

drifting wedge
#

how can i get a message id as the bot?

#

like message link?

errant perch
pearl trail
#

your code is shit
@pale vessel dblMod

errant perch
#

i suppose

slender thistle
#

isn't the rate limit per posting your stats supposed to be like 15 minutes/an hour
@sudden geyser for top.gg?

lucid prawn
#
 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;
            }

        });
pale vessel
#

it's message.jump_url @drifting wedge

lucid prawn
#

what

drifting wedge
#

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

earnest phoenix
#

(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

lucid prawn
#

my code is shit because i just started coding a week ago

drifting wedge
#

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

pale vessel
#

can you show us your code?

lucid prawn
#

I have bots online

drifting wedge
#

like if u ask how do i print hello world, 99% of the servers will like mute you

lucid prawn
#

ok

drifting wedge
#

like learn basic stuff

#

but @pale vessel "ur code is shit" doesnt help

lucid prawn
earnest phoenix
#

Can you stop? I think he got it

drifting wedge
#

can you show us your code?
@pale vessel ๐Ÿ‘

lucid prawn
earnest phoenix
#

Use pastebin or something, we won't download a file

drifting wedge
#

anti virus 100 now

#

just scanning

pale vessel
#

you have more than one message events

drifting wedge
#

to make sure lmao

sudden geyser
#

for top.gg?
@slender thistle yes

slender thistle
#

It's 60/60s

lucid prawn
drifting wedge
#

you have more than one message events
@pale vessel wuts the issue?

pale vessel
#

i-

#

it's a mess, let me see here

drifting wedge
#

i have more than one, should they all be together

sudden geyser
#

but isn't it different for posting stats

pale vessel
#

@lucid prawn can you post the full error?

#

it's a long file

earnest phoenix
#

@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?

lucid prawn
#

break;
^^^^^

SyntaxError: Unexpected token 'break'

jade raptor
pale vessel
#

and please use only one message event for your commands, it's really important @lucid prawn

jade raptor
#

so I send an embed to md?

earnest phoenix
#

No,

pale vessel
#

because right now, it looks like you're only copy pasting commands from other bots

lucid prawn
#

wym

earnest phoenix
#

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)
pale vessel
#

gotta have breakfast, ask other member for help for now sorry

carmine summit
#

Is that triggered by a command?

#

If yes, Replace client.user.createDM() with message.author

sudden tulip
#

is there a way to update node w/o reinstalling

#

prolly a dumb question

carmine summit
#

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

slender thistle
#

but isn't it different for posting stats
@sudden geyser nope. it's a global ratelimit

sudden geyser
#

hmm

#

also there's node version manager

earnest phoenix
#

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

gilded plankBOT
carmine summit
#

You mean auto-deploy?

earnest phoenix
#

I guess?

#

How can I do it

carmine summit
#

Yeah, you gotta searh it up with the platform you're using

#

Its different for every platform

sudden tulip
#
    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

earnest phoenix
#

which node ver are you on

pale vessel
#

you have v11 and v12 code mixed up

#

and that error came from that find() i'm guessing

#

you didn't provide a function

lucid prawn
#

I'm only having error because I'm trying to add a skip command

pale vessel
#

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

sudden tulip
#
    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

pale vessel
#

ban that guy /s

#

did you upgrade to discord.js v12?

sudden tulip
#

yep

#

djs is latest

pale vessel
#

so you're fixing the command

sudden tulip
#

Yea

#

it worked fine prevouisly

#

Everythings updated