#development

1 messages Β· Page 1009 of 1

spare mirage
#

ahh

coarse hearth
#

and i dont understand

#

liek

#

embed pages

#

or

#

discord pagination embed

#

its been hard ;x

spare mirage
#

Emojis have "codes"

#

🍌 this emoji has the code :banana:

#

U can see the codes here

coarse hearth
#

u

#

mhm

spare mirage
#

if U want to add the emoji to the embed you do
(" :emojiname: ")

coarse hearth
#

nonno

#

its like

#

like

#

emoji to the next page

#

ima show u

sinful belfry
#

you need a handler which keeps track of the page it is currently on

restive pebble
#

hey

#

i suggest while loop

#
let page = 1
while(page <max){
//logic
}```
#

inside reaction collector

earnest phoenix
#

how to overwrite permissions? v12 discord js
help
i have overwritePermissions
but itsa qrong apparently

hushed jungle
#

@earnest phoenix Can you give me the secret to obtaining ram usage you would say tomorrow and it's tomorrow so pls smug_10

blazing ravine
restive pebble
#

bot.shards.ids

blazing ravine
#

thanks

restive pebble
#

no

#

its worng

coarse hearth
#

hi boeing

blazing ravine
restive pebble
#

hi

#

oh u are v11

hushed jungle
#

RIP I will never know the secret to ram usage 😦

blazing ravine
#

no

#

v12.18

earnest phoenix
#

like they can still talk

#

but they have role

#

😦

finite bough
#

the problem is with the role

#

not the code then

earnest phoenix
#

uhh

#

what

jovial nexus
#

Does someone know a tutorial for server whitelist

earnest phoenix
#

the problem is with the role
@finite bough tell me then of whats wrong

finite bough
#

u have to remove the send messages perm on ur muted role

earnest phoenix
#

i have

#

smh read my code

#

in dbly, on_db_vote, the data is in json format right?

#

bruh

#

someone he;[

#

help me

twilit rapids
#

@earnest phoenix regenerate you bot's token

#

You just posted it in a server with 111,000+ members

#

With...?

#

I don't even understand what you want

#

Errors?

#

But what is being logged on the console?

#

What does it say

placid iron
spare mirage
#

@earnest phoenix thescript is impossible to read

pale vessel
#

svgs don't work for embeds

#

change it to .png

placid iron
#

i thought that would be the case;-;

#

ok thank you

blazing ravine
#

how to fix

lusty quest
#

?

spare mirage
#

;uhh

blazing ravine
pale vessel
#

(only if the process was spawned from a ShardingManager)

#

did you?

blazing ravine
#

im using for

#

guild count

#

but showing this

pale vessel
#

you showed it already

blazing ravine
#

idk what is sharding

earnest phoenix
#

Hey

lusty quest
#

did you have the internal shading Manger running?

pale vessel
#

well then

lusty quest
#

then remove it

earnest phoenix
#

Anyone knows python here

blazing ravine
#

im using this for discord bot

pale vessel
#

just ask

earnest phoenix
#

Ping me

#

Here

pale vessel
#

just ask here mate

lusty quest
#

you cant use it when you dont have the internal Sharding Manager running

blazing ravine
#

k

#

how t ouse

#

shard manager

lusty quest
#

you dont need one. its only needed when you aproach 2500 guilds

blazing ravine
lusty quest
#

i dont get what you want to point to?

blazing ravine
#

nvm

earnest phoenix
#

In wwebsocket client

blazing ravine
#

deleted

#

shard

earnest phoenix
#

On_message I am getting str

#

I want to convert in json

#

Any one can help me

#

@pale vessel

pale vessel
#

make the ffmpeg found

earnest phoenix
#
import dbl
import discord
from discord.ext import commands


class TopGG(commands.Cog):
    """Handles interactions with the top.gg API"""

    def __init__(self, bot):
        self.bot = bot
        self.token = '' # set this to your DBL token
        self.dblpy = dbl.DBLClient(self.bot, self.token, autopost=True, webhook_path='http://bothook.herokuapp.com/webhook', webhook_auth="") # Autopost will post your guild count every 30 minutes

    async def on_guild_post(self):
        print("Server count posted successfully")

    async def on_dbl_vote(self, data):
        print(data)
        user = data["user"]
        mem = self.bot.get_user(user)
        await mem.send("Test")

def setup(bot):
    bot.add_cog(TopGG(bot))
    print("Topgg loaded")
#

why its not sending

#

dm?

wheat valve
#

I get a TypeError: Cannot read property 'me' of null error with this line const bot_mentioned = message.mentions.has(message.guild.me); but most of time it has no issues when its pinged, but I've had this twice so far. i use discord.js

pale vessel
#

message.guild is null

#

are you sure you're not on a dm?

royal tree
pale vessel
#

provide a string instead of an object

#

aka read the error

wheat valve
#

@pale vessel my entire code:


    if (message.author.bot) return;
    if (message.content.includes("@everyone")) return;
    if (message.content.includes("@here")) return;


    const bot_mentioned = message.mentions.has(message.guild.me);

    if (bot_mentioned) {

        const mention = new Discord.MessageEmbed()
            .setColor("BLACK")
            .setTitle('Roleplay Helper')
            .setDescription('Roleplay Helper was mentioned')
            .addField('Prefix:', 'RH-')
            .addField('Help command:', 'RH-help')

        message.channel.send(mention)
    }
})```
pale vessel
#

that should work

#

try console.log(message.guild)

balmy knoll
#

Why do i get this error with MySQL: Error: connect ENETUNREACH and Error: connect ETIMEDOUT?

pale vessel
#

your network is unreachable

wheat valve
#

Okay so I know why its causing the issue, whenever you DM the bot it sends that error

pale vessel
#

that's not caching issue

#

DMs don't have the guild property

#

because, well, it's not in a guild

wheat valve
#

it only sends the error when its dmed though

pale vessel
#

DMs don't have the guild property

#

so you can't access .me

#

just use client.user

wheat valve
#

Thanks

balmy knoll
#

@pale vessel The thing is quite strange: the database is correctly accessible from my PC and from any service (for example Glitch). If I try to connect from a private host, where my bot is, I get these errors.

restive pebble
#

what error

slender thistle
#

@earnest phoenix You forgot listener decorators

lofty lagoon
#

when I run the code it's say UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'send' of undefined and idk why ```java
const fs = require('fs');
const Discord = require('discord.js');
const client = new Discord.Client();
const {token} = require("./config.json");

client.commands = new Discord.Collection();
const commandFiles = fs.readdirSync('./commands').filter(file => file.endsWith('.js'));

for (const file of commandFiles) {
const command = require(./commands/${file});
client.commands.set(command.name, command);
}

client.on("ready", async => {
console.log(${client.user.tag} is ready)
client.user.setStatus("dnd")
client.channels.cache.get("name", "chat-universel") .send("test..s")
});
client.login(token)```

balmy knoll
#

@restive pebble Error: connect ENETUNREACH and Error: connect ETIMEDOUT

restive pebble
#

glitch?

balmy knoll
#

No

restive pebble
#

heroku

balmy knoll
#

If I use Glitch with the same database, everything works correctly

#

Not even heroku

restive pebble
#

what db

balmy knoll
#

MySQL

restive pebble
#

Error: connect ETIMEDOUT

#

this error occurs in http requests

earnest phoenix
#

restart it ur server

balmy knoll
#

Bot host or database host?

restive pebble
#

oh u using ftp?

earnest phoenix
#

try both

restive pebble
#

ftp?

balmy knoll
#

No

restive pebble
#

ok

balmy knoll
#

I can't restart the db host, the bot host is already restarted

jovial nexus
#

How can i do to my bot to send a message to the person that added the bot to a server

balmy knoll
#

The problem with this error is that it appeared out of nowhere, the bot had been working with that host and that database for months now, but yesterday decided to start giving errors

earnest phoenix
#

How can i do to my bot to send a message to the person that added the bot to a server
@jovial nexus whats ur lib

balmy knoll
#

Without changing any part of the code

jovial nexus
#

discord.js

earnest phoenix
#

use guildCreate event

restive pebble
#

How can i do to my bot to send a message to the person that added the bot to a server
@jovial nexus i dont think there is way

#

u can send to guild tho

#

use guildCreate event

balmy knoll
#

@restive pebble @earnest phoenix Any solution?

earnest phoenix
#

idk

restive pebble
#

how are u accessing ur db

#

request?

delicate shore
#

guys

balmy knoll
#

I use pool connection

restive pebble
#

ohhh

#

it works on glitch?

balmy knoll
#

Yes

restive pebble
#

try contacting ur host then

balmy knoll
#

But not on my private host

delicate shore
#

@restive pebble bruh what the fuck happes to youtube API

#

it's been 24 hour

#

my quota resteted

#

but

restive pebble
delicate shore
#

it's fucking bullshit again

#

and @restive pebble the link which u sent me

restive pebble
#

u can come for ytdl issues

delicate shore
#

this is error i get

balmy knoll
#

Okay, then I'll contact the host to see if I can fix it

restive pebble
#

uh

#

i told u

#

u have to use direct link

#

try direct link @delicate shore

delicate shore
#

wot

#

how ?

restive pebble
#

video url

delicate shore
#

ok see this happens

#

no video id found

#

ahhh

restive pebble
#

i told u

#

u have to use services like yt search

delicate shore
#

But there is no tutotrial

#

lol

#

😦

restive pebble
#

const yts = require( 'yt-search' )

yts( songname, function ( err, r ) {
if(err) throw err;
let videos = r.videos
let url = videos[0].url
})

delicate shore
#

wait

#

what

#

@restive pebble this is start up right?

#

and after that same code will be there?

restive pebble
#

u can video link

delicate shore
#

wait

#

like

delicate shore
spare mirage
#

@delicate shore ggs!

#

Im happy with 2 servers :D

misty sigil
#

im coming for 75

arctic juniper
#

try { var playingMessage = new MessageEmbed() .addField("**:emoji_1: Now Playing**", ${song.title}) .setThumbnail("https://cdn.discordapp.com/attachments/716372313141936280/727338064526966784/99f34b2b899f9f4275080a9e6ea56b9d.gif") .setFooter('Lark!|Developed By Atanu AD!#6566', 'https://cdn.discordapp.com/attachments/716226531868934194/726264086567845888/320d94e973b73de5f232c2cf5403d75d.webp') .setTimestamp(Date.now()); queue.textChannel.send({embed: playingMessage}).then(embedMessage => { embedMessage.react("⏭"); embedMessage.react("⏯"); embedMessage.react("πŸ”"); embedMessage.react("⏹"); }); } catch (error) { console.error(error); } const filter = (reaction, user) => user.id !== message.client.user.id; var collector = playingMessage.createReactionCollector(filter, { time: song.duration > 0 ? song.duration * 1000 : 600000 }); collector.on("collect", (reaction, user) => { if (!queue) return; const member = message.guild.member(user);

#

Help me

#

In this code

#

Showing playingMessage.createReaction is not a function

#

This is a reaction control music code

#

Help me

misty sigil
#

Library?

arctic juniper
#

discord.js

misty sigil
#

it’s react, not create reaction

arctic juniper
#

So now what can i do

#

To fix this

misty sigil
#

literally, I gave you everything you need

#

It’s react, not createReaction

arctic juniper
#

So now If i Replace createReaction with react

#

This error will be solved?

misty sigil
#

Yes

#

should be

arctic juniper
#

should be
@misty sigil ok trying

#

Thanks for your response

misty sigil
#

That’s fine

visual wave
arctic juniper
#

Sorry by mistake i tell you createReaction

#

Its createReactionCollecotr

#

`const filter = (reaction, user) => user.id !== message.client.user.id;
var collector = playingMessage.createReactionCollector(filter, {
time: song.duration > 0 ? song.duration * 1000 : 600000
});

collector.on("collect", (reaction, user) => {
  if (!queue) return;
  const member = message.guild.member(user);`
#

See here the whole formation

#

This is the error section

#

If anyone here plz help me

earnest phoenix
#

@slender thistle , ya have added event decorators, but now also its not dming

#

So when you make functions and use them without () it shows you [function] how can i make it show

[function: <function name>]```?
plucky harness
#

i am having problems with ubuntu postgresql setup

lyric mountain
#

i am having problems with ubuntu postgresql setup
@plucky harness what's the issue

plucky harness
#

i followed this tutorial

#

and basically i am getting forbidden error. you dont hav perms to access this file

#

i did it using root? is that the problem

lusty quest
#

did you gave the file execution permissions? or the folder?

#

or choose easymode and start a docker container

brisk anvil
#

Sa

plucky harness
#

execution perms?

lusty quest
#

had issues with 3 MongoDB installations. after a day i was just fuck it i use docker

plucky harness
#

docker?

lyric mountain
#

just as a side note, pgAdmin 4 will give u a LOT of headache about "missing" CSRF token

plucky harness
#

oof

lyric mountain
#

I gave up after 2 weeks trying to fix it

plucky harness
#

then what do i do with my psycopg2 database

lusty quest
plucky harness
#

yes

#

but

#

in next line

#

it says

#

root@host

lyric mountain
#

lul

plucky harness
#

instead of sammy@host

#

i created sammy and even accesses it

lyric mountain
#

you gotta give perms to postgres:postgres

plucky harness
#

but it shows $

#

not $sammy@host

lyric mountain
#

sammy is an example

weary ridge
#

umm

digital ibex
#

hi, i have this: js app.get('/chat', async (req, res) => { res.render('chat'); }); but it says that I says in the console i went to the 404 page... but it shows the content of /chat's endpoint.. can anyone help? my code:

lusty quest
#

what os did you use @plucky harness

plucky harness
#

ubuntu

weary ridge
#

hmmm

lusty quest
#

20?

plucky harness
#

idk 18

#

i think

#

its a vps

lusty quest
#

Digital Ocean?

plucky harness
#

i have been trying for likr almost 5 hours now

#

yea

distant bramble
#

gusy can you help me with this i have made this code if(message.author.id === "645592347475836949") return;
i want it to check if the id match
if not return it
what it does rn is if id match it will return it

lusty quest
digital ibex
#

(edited url)

lusty quest
#

if you are to lazy you can get a VPS that got already Postgres installed. Digitalocean as example offers it

digital ibex
#

anyone got any ideas?

earnest phoenix
#

is there a db that does reset to github state for heroku?

lyric mountain
#

non-embedded dbs

earnest phoenix
#

?

lyric mountain
#

like mysql, postgresql, etc

earnest phoenix
#

uhh

lusty quest
#

sqlite dbs if you got the sql file in the repo

distant bramble
#

pls help

spare mirage
#

whats wrong typical

lyric mountain
#

you were using json as db, weren't u?

earnest phoenix
#

sqlite dbs if you got the sql file in the repo
@lusty quest ok but like doesnt it reset?

#

you were using json as db, weren't u?
@lyric mountain ye

lusty quest
#

you want one that reset?

lyric mountain
#

json ain't a db, stop using it plz

#

and sqlite will reset

distant bramble
#

i stated up but here

earnest phoenix
#

you want one that reset?
@lusty quest no not reset

spare mirage
#

?

earnest phoenix
#

json ain't a db, stop using it plz
@lyric mountain ok

distant bramble
#

if(message.author.id === "645592347475836949") return message.channel.send(you need to be the bot owner to use the cmd)
i want it to check if the id match
if not return it
what it does rn is if id match it will return it

lusty quest
#

then get a externally hosted one like Postgres, Mysql or MongoDB

spare mirage
#

it has to be

#

<@! ID here >

lusty quest
#

mongodb i know you can get a free hosted DB

earnest phoenix
#

then get a externally hosted one like Postgres, Mysql or MongoDB
@lusty quest ok i have porstgres i just dont know how to use it

lusty quest
#

i guess google is your friend

distant bramble
#

ok

lyric mountain
#

mysql also has "free" hosts, but....well.....I'd not trust "free" services

earnest phoenix
#

i guess google is your friend
@lusty quest oof

lusty quest
#

@lyric mountain same here

#

free has usually some downside

#

either its laggy AF or they delete it bcs you used more power than they expected

distant bramble
#

@spare mirage thanks soo much

spare mirage
#

np I had that problem too

lyric mountain
#

if you know how to fetch things, you could periodically backup the sqlite database to some file hosting service like drive

#

then get the database back on boot up

lusty quest
#

i guess this is at the same level complex than learning sql

lyric mountain
#

sqlite is sql, so.....

lusty quest
#

if you get it running it should be fine

#

yea but there is no reason to add a extra point of failure if you can make it proper

earnest phoenix
#

so how can i make a db? mongo

lyric mountain
#

mongo, sqlite, mysql, postgres, json (DON'T), just choose one

earnest phoenix
#

im doing mongo

#

because i heard thats best

#

or smth

lyric mountain
#

there ain't a "best" db

#

it depend on what kind of data you'll store

slender thistle
#

In terms of performance, there technically is

earnest phoenix
#

well im storing server ids

#

tbh

#

and stuff

#

i might make a coin system and xp system soon

spare mirage
#

people say mee6 is the best

lyric mountain
#

mongo is slower than sql-based dbs when it comes to heavy relationship

spare mirage
#

mee6 is garbage

slender thistle
#

Mee6 is not a database

earnest phoenix
#

mongo is slower than sql-based dbs when it comes to heavy relationship
@lyric mountain heavy relationship?

slender thistle
#

Lots of stored data?

#

or like scalability?

earnest phoenix
#

well what do you recommend? @slender thistle

lyric mountain
#

no, I mean relationship between tables

spare mirage
#

the features are garbage

earnest phoenix
#

like i want to store user ids and server ids

#

for a xp/coin system and set prefix cmd

spare mirage
#

the features are garbage
its just overrated

slender thistle
#

I don't see how Mee6 is related to the current conversation

lyric mountain
#

it ain't

slender thistle
#

Also this is a channel for... well, coding stuff

spare mirage
#

there ain't a "best" db

earnest phoenix
#

bruh

slender thistle
#

db

#

Mee6 is not a database

spare mirage
#

Db discord bot

#

lmaoo

earnest phoenix
#

smh

slender thistle
#

Not in this context

lyric mountain
#

omfg

earnest phoenix
#

Data Base

vale garden
#

helloo

spare mirage
#

xD

#

hi!

vale garden
#
const Discord = require('discord.js')

module.exports = {
    name: "dumb-o-meter",
    description: "Checks your dumbness lol",
    async execute(message, args) {

      let d = Math.floor(Math.random() * 100 + 0.1)

      message.channel.send("Alright, Let me check how dumb you are. Hmmmmm...").then((message)=>{
        if (d <= 45){
        const embed = new Discord.MessageEmbed()
        .setColor("GREEN")
        .setTitle("Your Dumbness Analysis, Provided by the One & Only **Dumb-O-Meter**")
        .setDescription(`You are ${d}% Dumb`)
        .setFooter(`Requested by ${message.author.username}`)
        .setTimestamp()
        message.edit(embed)
        }
                if (d > 45 && d < 70){
        const embed = new Discord.MessageEmbed()
        .setColor("YELLOW")
        .setTitle("Your Dumbness Analysis, Provided by the One & Only **Dumb-O-Meter**")
        .setDescription(`You are ${d}% Dumb`)
        .setFooter(`Requested by ${message.author.username}`)
        .setTimestamp()
        message.edit(embed)
        }
                if (d > 75){
        const embed = new Discord.MessageEmbed()
        .setColor("RED")
        .setTitle("Your Dumbness Analysis, Provided by the One & Only **Dumb-O-Meter**")
        .setDescription(`You are ${d}% Dumb`)
        .setFooter(`Requested by ${message.author.username}`)
        .setTimestamp()
        message.edit(embed)
        }
      })
    }
    }

#

this is my code

slender thistle
#

also almost no one uses that abbreviation in this server, Jesus Christ

vale garden
#

how do i

earnest phoenix
vale garden
#

delete the first message

#

after the edit takes place

spare mirage
#

.then message.delete

#

thats what I would use

lyric mountain
#

.then(() => message.delete())

vale garden
#

that deletes

#

the authors message

#

right

earnest phoenix
#

well what do you recommend?
like i want to store user ids and server ids
for a xp/coin system and set prefix cmd
@slender thistle

spare mirage
#

yes

slender thistle
#

For medium-sized bots, mongo is good, but it doesn't have a built-in caching system

earnest phoenix
#

caching like what?

slender thistle
#

Saving stuff in memory

#

for faster access

lyric mountain
#

and less database accesses

vale garden
#

yea it didnt work

#

it deleted my message

#

not the bot's

hasty sparrow
#

Where did you add the delete call?

lyric mountain
#

show your changes

earnest phoenix
#

Saving stuff in memory
@slender thistle hmm im not sure well my bot is in 250 servers so would i need a better db?

vale garden
#
const Discord = require('discord.js')

module.exports = {
    name: "dumb-o-meter",
    description: "Checks your dumbness lol",
    async execute(message, args) {

      let d = Math.floor(Math.random() * 100 + 0.1)

      message.channel.send("Alright, Let me check how dumb you are. Hmmmmm...").then(() => message.delete()).then((message)=>{
        if (d <= 45){
        const embed = new Discord.MessageEmbed()
        .setColor("GREEN")
        .setTitle("Your Dumbness Analysis, Provided by the One & Only **Dumb-O-Meter**")
        .setDescription(`You are ${d}% Dumb`)
        .setFooter(`Requested by ${message.author.username}`)
        .setTimestamp()
        message.edit(embed)
        }
                if (d > 45 && d < 70){
        const embed = new Discord.MessageEmbed()
        .setColor("YELLOW")
        .setTitle("Your Dumbness Analysis, Provided by the One & Only **Dumb-O-Meter**")
        .setDescription(`You are ${d}% Dumb`)
        .setFooter(`Requested by ${message.author.username}`)
        .setTimestamp()
        message.edit(embed)
        }
                if (d > 75){
        const embed = new Discord.MessageEmbed()
        .setColor("RED")
        .setTitle("Your Dumbness Analysis, Provided by the One & Only **Dumb-O-Meter**")
        .setDescription(`You are ${d}% Dumb`)
        .setFooter(`Requested by ${message.author.username}`)
        .setTimestamp()
        message.edit(embed)
        }
      })
    }
    }

#

might look dumb

earnest phoenix
#

use a bin

lyric mountain
#

omg

vale garden
#

cuz i think its wrong

hasty sparrow
#

Can't edit a deleted message

weary ridge
lyric mountain
slender thistle
#

It depends on the amount of resources your bot uses. However, I think it's safe to use mongo in your case

lyric mountain
#

put the .then there

vale garden
#

wait no

earnest phoenix
#

ok so how do i setup mongo?

vale garden
#

i dont want to

#

delete the embed

slender thistle
#

@weary ridge did you read the explanation on the last line?

#

OR the documentation for praw?

lyric mountain
weary ridge
#

i tried but im dumb

#

😭

vale garden
#

that doesnt delete the embed?

#

ok

lyric mountain
#

well, actually yes

earnest phoenix
slender thistle
#

"as a keyword argument to the Reddit class constructor"

vale garden
#

didnt work

#

my message got deleted

#

this happened

lyric mountain
#

that doesnt delete the embed?
@vale garden to delete the user's message all you need to do is use .delete() on the received message

lyric mountain
#

not on the bot's message

spare mirage
#

why would you want to delete it

slender thistle
#

there's an example

weary ridge
#

k

vale garden
#

@vale garden to delete the user's message all you need to do is use .delete() on the received message
@lyric mountain wdym

earnest phoenix
hasty sparrow
#

Hang on, the documentation provides examples and helps you fix your own issues? Who would've thought /s

lyric mountain
slender thistle
#

Is that Compass?

lyric mountain
#

you're defining "message" twice

#

so you can't get the user's message object anymore inside the arrow function

torn ravine
#

is ytsr even a working module anymore

lyric mountain
#

change the name of the former and use .delete() on it

vale garden
#

oh ok

earnest phoenix
#

@slender thistle so what do i do now?

#

im on this page

slender thistle
#

Is that Compass?

earnest phoenix
#

wdym

ebon kelp
#

That's not Compass

torn ravine
#

he’s asking if thats mongodb compass

earnest phoenix
#

im confused

#

i never used mongo

slender thistle
#

k it's not

ebon kelp
#

Compass is the desktop viewer for MongoDB

vale garden
#

this happened now

ebon kelp
#

Atlas is the online version

vale garden
#
const Discord = require('discord.js')

module.exports = {
    name: "dumb-o-meter",
    description: "Checks your dumbness lol",
    async execute(message, args) {

      let d = Math.floor(Math.random() * 100 + 0.1)

      message.channel.send("Alright, Let me check how dumb you are. Hmmmmm...").then((m)=>{
        if (d <= 45){
        const embed = new Discord.MessageEmbed()
        .setColor("GREEN")
        .setTitle("Your Dumbness Analysis, Provided by the One & Only **Dumb-O-Meter**")
        .setDescription(`You are ${d}% Dumb`)
        .setFooter(`Requested by ${message.author.username}`)
        .setTimestamp()
        m.edit(embed)
        }
                if (d > 45 && d < 70){
        const embed = new Discord.MessageEmbed()
        .setColor("YELLOW")
        .setTitle("Your Dumbness Analysis, Provided by the One & Only **Dumb-O-Meter**")
        .setDescription(`You are ${d}% Dumb`)
        .setFooter(`Requested by ${message.author.username}`)
        .setTimestamp()
        m.edit(embed)
        }
                if (d > 75){
        const embed = new Discord.MessageEmbed()
        .setColor("RED")
        .setTitle("Your Dumbness Analysis, Provided by the One & Only **Dumb-O-Meter**")
        .setDescription(`You are ${d}% Dumb`)
        .setFooter(`Requested by ${message.author.username}`)
        .setTimestamp()
        m.edit(embed)
        }
      }).then(() => message.delete())
    }
    }

slender thistle
#

Are you using MongoDB Atlas or are you hosting a MongoDB server locally?

vale garden
#

wait

#

wth did i do

earnest phoenix
#

Are you using MongoDB Atlas or are you hosting a MongoDB server locally?
@slender thistle wdym

lyric mountain
#

dot dot dot

hasty sparrow
#

You deleted the wrong message again

vale garden
#

yea i realised

#

that

#

now

earnest phoenix
#

its my first time using mongo

vale garden
#

lol

slender thistle
#

Let's try again
How did you get go that page

lusty quest
#

@slender thistle if you want higher performance with mongo a replica set can archive higher speeds if you set it to prefer secondary nodes for read. or Shard it if the data is across the shards you read of mutiple shards at once

weary ridge
earnest phoenix
#

i searched mongo db on google and clicked first link

slender thistle
#

So scalability, essentially

lusty quest
#

yes

lyric mountain
earnest phoenix
#

So scalability, essentially
@slender thistle what?

slender thistle
#

I was responding to the mention I got just above

earnest phoenix
#

which?
@lyric mountain second one i think

#

I was responding to the mention I got just above
@slender thistle k

lusty quest
#

@lyric mountain atlas for free mongodb instance

earnest phoenix
lusty quest
#

yes

ebon kelp
#

its my first time using mongo
@earnest phoenix MongoDB hosting explained:
MongoDB can be hosted in local or with Atlas (Online hosting with clusters)
Compass is a GUI for the database both online or local

lusty quest
#

its for accesing the DB

vale garden
#

now im getting m is not defined

#

what do i do

hasty sparrow
#

Hmm, maybe define it?

ebon kelp
#

m is not defined

#

what it says

lyric mountain
earnest phoenix
#

@earnest phoenix MongoDB hosting explained:
MongoDB can be hosted in local or with Atlas (Online hosting with clusters)
Compass is a GUI for the database both online or local
@ebon kelp ok so uhh should i do local im not sure what it is

#

:/

lusty quest
#

2 instances running

ebon kelp
#

@earnest phoenix no, you can do both

vale garden
#

wat

earnest phoenix
#

@earnest phoenix no, you can do both
@ebon kelp im confused how

lyric mountain
#

like, what's the expected outcome?

weary ridge
vale garden
#

that was cuz i forgot to do m.delete

#

oh

slender thistle
#

Why did you put my mention in codeblock

ebon kelp
#

@ebon kelp im confused how
@earnest phoenix What is the problem in the first place? Wasn't there since the beginning

vale garden
#

im supposed to get this

lyric mountain
#

@shivaco#0542 umm im confused on this part
super ultra master plus stonks

earnest phoenix
#

@earnest phoenix What is the problem in the first place?
@ebon kelp i dont know how to use

vale garden
#

except the first line

weary ridge
#

so it didn't @ u

vale garden
#

needs to be deleted

hasty sparrow
#

I don't think your current approach will work, as you will always end up either deleting the user's message or the message with the embed

vale garden
#

then what can i do

slender thistle
#

Just mention me properly next time if you want me to actually see your message

earnest phoenix
#

im installing compus

hasty sparrow
#

Either remove the message's text and only add the embed or remove the message and send a new one

earnest phoenix
#

compass

lyric mountain
#

the first message was deleted

ebon kelp
#

@ebon kelp i dont know how to use
@earnest phoenix A MongoDB atlas cluster can accessed with a link

lyric mountain
#

the message.delete() did it

weary ridge
#

k ?

slender thistle
#

@weary ridge What does your client.run thing look

#

login, run, whatever

vale garden
#

in my test command

#
const api = require('novelcovid');
const Discord = require('discord.js')
const client = new Discord.Client()

module.exports = {
    name: "test",
    description: "Checks a weather forecast",
    async execute(message, args) {

      message.channel.send("lolll ok okkirjwe;34eb2ve4revryvhrvrvloooooloolo ll l lo o o o o o lol").then((message)=>{
        message.edit("Gone.. Reduced to Atoms.")
      })
    }
    }

#

it worked normally

earnest phoenix
#

@earnest phoenix A MongoDB atlas cluster can accessed with a link
@ebon kelp uhhh.. im not sure how can we take to dms or smth

regal raven
#
In embed.fields.0.value: Must be 1024 or fewer in length.```
#

Embeds value must be less than 1024?

slender thistle
#

yes

hasty sparrow
#

1024, yes

regal raven
#

Oooh

slender thistle
#

it must be less than 1025 characters

regal raven
#

So I need to check?

slender thistle
#

Yes

regal raven
#

If it has more

#

Then do what?

earnest phoenix
#

How's Possible to get a random number between specific numbers? Like get a random number between
50 to 10000

hasty sparrow
#

That's up to you

vale garden
#

yea it is

slender thistle
#

if len(mystring) <= 1024: send my message

vale garden
#

do

slender thistle
#

How's Possible to get a random number between specific numbers? Like get a random number between
50 to 10000
@earnest phoenix which language

lyric mountain
#

Then do what?
@regal raven either truncate the string or show an error to the user

earnest phoenix
#

Js

weary ridge
#

@slender thistle thx for the help i fixed it πŸ™‚

vale garden
#
Math.floor(Math.random() * 10000 + 500)
#

do this

slender thistle
#

I literally did nothing helpful but you are welcome

weary ridge
#

πŸ™‚

lyric mountain
#

@earnest phoenix which language
@slender thistle 50 + (Math.random() * 9950)

vale garden
#

@earnest phoenix

slender thistle
#

oh rather an unnecessary one

vale garden
#

oh

lyric mountain
#

lul

vale garden
#

wait

#

nvm

#

lol

#

wait no

#

oh

#

ok

#

anyways the answer is up there

#

lol

earnest phoenix
#

Oh... So to make sense...
That adds 50 to a random number that's it got from Math.random()

lyric mountain
#

yep

earnest phoenix
#

But what if the random number is 940 or something?

lyric mountain
#

then it'll be 990

earnest phoenix
#

Yea

lyric mountain
#

to get 940 you'd need to roll 890

earnest phoenix
#

Is there anyway to get it exact?

lyric mountain
#

define "exact"

earnest phoenix
#

Like you can't get more than the specific number? <From number> + <random number to get from>
like the number can't be more than the random number to get from

torn ravine
#

what’s a good recommended amount of ram for a lavaserver

lyric mountain
#

what’s a good recommended amount of ram for a lavaserver
@torn ravine all of it

torn ravine
#

BRuH

#

i guess we’re going 625GB of ram

lyric mountain
#

Like you can't get more than the specific number? <From number> + <random number to get from>
like the number can't be more than the random number to get from
@earnest phoenix 50 + (Math.random() * 9950) will max at 10000

#

just change the value after the *

earnest phoenix
#

Ik... But i mean like you can't get more than 9950

lyric mountain
#

yep

earnest phoenix
#

Hmm lemme try

vale garden
#

lol

lyric mountain
#

9950 is the max for the rng in this case

#

while 50 is the padding

#

if you want the rng to max at 100, just use Math.random() * 100

#

if you want to max at 99999 just use Math.random() * 99999

earnest phoenix
#

How to make like thay

#

That*

#

Auto update after 1mins

lusty quest
#

hmm smart the server is always up if the bot is online

regal raven
#

How do I add command specefic help commands manually in discord.py using discord.ext's command handler? Like help ping

lusty quest
#

or did you use a webhook?

lyric mountain
#

Auto update after 1mins
@earnest phoenix setInterval(() => stuff, 60000)

earnest phoenix
#

O

#

Ok

#

@lyric mountain i made this function for it, good enough?

if(!Number1){
throw new EvalError("No start number was provided");
}

if(!Number2){
throw new EvalError("No destination number was provided");
}

if(typeof(Number1) !== "number"){
throw new TypeError("Start number is not a number");
}

if(typeof(Number2) !== "number"){
throw new TypeError("Destination number is not a number");
}

let numberToReturn = Math.floor(Math.random() * parseInt(Number2)) + parseInt(Number1);
if(numberToReturn > parseInt(Number2)){
return parseInt(numberToReturn - parseInt(Number2)) - numberToReturn;
} else {
return parseInt(numberToReturn);
}
}```
lyric mountain
#

yep I guess

#

but you should do parseInt(Number2) - parseInt(Number1)

#

let's say I set 50 as starting value and 100 as final value

#

your code would max at 150

#

instead of 100

#

the right equation would be Math.floor(Math.random() * (parseInt(Number2) - parseInt(Number1))) + parseInt(Number1)

earnest phoenix
#

Hmm yea

regal raven
#

What is the function for?

#

I have nothing to do with it, just asking

lyric mountain
#

generate a random value between X and Y

earnest phoenix
#

Getting a random number between specific provided numbers

regal raven
#

Ooooh

lyric mountain
#

no need to check if value is bigger than max

regal raven
#

In python I do

Randomnumber = random.randint(0, 100)
#

πŸ™‚

#

In one line

lavish storm
#

same here

#

with numpy

earnest phoenix
#

Js is different lol

regal raven
#

I know

slender thistle
#

What do you mean "with numpy"

#

Do you mean numpy.random.randint

pure saddle
#

how reload spesific folder or file?

lyric mountain
#

js?

pure saddle
#

yes js

lavish storm
#

@slender thistle yes that's what I would use in python indeed

slender thistle
#

... you import numpy to use random module?

placid iron
#

if you need to use other numpy things Β―\_(ツ)_/Β―

slender thistle
#

I mean if you need the random module, why not import it instead of importing a larger module that utilizes it

placid iron
#

I use random.sys_random() because it gives better random numbers tho

lavish storm
#

in both cases the module is fully loaded

slender thistle
#

Yes but if you are limited in resources, why not just import random itself

lavish storm
#

good idea

spare mirage
#

what are good/fun games to make in discord

#

lmao

lyric mountain
#

there ain't "better random" at all, all there is are pseudo random and true random

#

the latter being impossible to get without external measurement

slender thistle
#

Probably meaning a significant margin between numbers

lyric mountain
#

that sounds like a biased rng

digital ibex
#

hi, does anyone know why ```js
const io = require('socket.io')(7000);

#

it doesn't redirect me to the 404 page, just says in the console i went to the 404 page

#

my express server is running on port 8000, and socket.io 7000 btw

weary ridge
#

@slender thistle am i doing something wrong? im trying to make this into an embed

slender thistle
#

Yeah I'm totally going to count the lines myself

weary ridge
#

which is the embed.add_field(name="{submission.subreddit}", value=f'ello', inline=True)

slender thistle
#

ah

#

I see

#

Well

#

Do you see where your if stuff is indented

#

That looks like 8 spaces

#

I won't even start questioning why you have a MyClient class that you're not using

weary ridge
#

ummmmm

#

yeh

#

now i see

slender thistle
#

Make it 4 spaces

#

yes

weary ridge
#

Thx

slender thistle
#

well what a surprise

#

Discord cache is a thing

#

That image is cached in your client so adding a random query parameter is a solution

weary ridge
#

ooohhh true, but it will always change the image right?

slender thistle
#

in browser without query params yes
on Discord without query params no

weary ridge
#

oh k so thats why everyone sticks to reddit hmm

spare mirage
#

what games should I add to my discord bot

brisk anvil
#

slm

lyric mountain
#

card games are quite popular

spare mirage
#

sIm?

lyric mountain
#

might be something turk

dense patio
#

does anyone know why this doesn't work (discord.js v11):

if(client.channels.get(`653285446738116608`)) {
  console.log(`THIS IS THE CORRECT SHARD`);
}
lyric mountain
#

tsc tsc, using v11

dense patio
#

i know i know

slender thistle
#

-notr @brisk anvil

gilded plankBOT
#

@brisk anvil

İngilizceden başka dillerde konuşmak için #memes-and-media kanalını, top.gg hakkında destek almak için #support kanalını kullanın.
BU KANALDA TÜRKΓ‡E KONUŞMAYIN.

dense patio
#

do you know why though

spare mirage
#

if(client.channel === ``) would work

slender thistle
#

how would it

#

Comparing an empty string against... a channel object.

#
  • client.channel doesn't even exist, does it?
topaz fjord
#

it's just a redirect tho @slender thistle

#

so you could just send the link after the redirect to fix the caching issue

vernal vapor
#

Trying to transfer the database but contabo is showing forbidden access files denied

#

Is there anyway to fix this?

brisk anvil
#

@slender thistle aga türk müsün her şeyime notr yazıosn bi cevap ver

slender thistle
#

Alright hold it there

brisk anvil
#

Are you turkish?

slender thistle
#

Do I look like I speak Turkish

spare mirage
#

yes

brisk anvil
#

O zaman türkçe konuş

vernal vapor
#

Lel

brisk anvil
#

dellendirme

brisk anvil
#

-notr

spare mirage
#

staff only

dense patio
#

does no one know the answer to my problem

lyric mountain
#

update to v12, I don't even know if v11 still work properly

spare mirage
#

do u use v11 still?

#

ouch

dense patio
#

v11 will work till october

slender thistle
#

Why only October? Anything happening to Discord API that will make v11 obsolete?

static garden
#

j

dense patio
#

i'm pretty sure it has to do with their whole new bot thing

#

didn't really look into it though

spare mirage
#

oof

slender thistle
#

Well unless some breaking change happens, v11 is fine

lunar mason
#

how do i move a postgresql database?

dense patio
#

regardless, client.channels.get() works later in the code when sending a message, but not in the if statement

spare mirage
#

whats the error

dense patio
#

none

spare mirage
#

update to v12 :P

dense patio
#

i'm not switching to v12 yet

#

that wouldn't be the problem

spare mirage
#

ik but it works better

#

and easier

dense patio
#

that's cool but i don't need that right now

coarse hearth
#

is there any bots which can save transcripts in a channel?

#

me

#

@eager citrus

slender thistle
#

rule 4

spare mirage
#

@coarse hearth I think carl does

coarse hearth
#

carl?

eager citrus
#

Okay

coarse hearth
#

aight

spare mirage
#

@dense patio what are u trying to do?

eager citrus
#

@spare mirage you still using my bot

dense patio
#

inside that if statement is all the dbl stuff, because it sends a message to a specific channel in the support server whenever someone votes

#

so i want the dbl events to run on that shard only

spare mirage
#

@eager citrus yes its in my test server

eager citrus
#

Wow

#

Is it working

#

Correctly

spare mirage
#

yes

eager citrus
#

Okay greet

#

If there’s any errors contact me

spare mirage
#

@dense patio I think in v11 u would use this

if (client.channels.get('CHANNEL ID')) COMMAND HERE```
dense patio
#

that's what it is

spare mirage
#

huh

#

does it give an error if u use the command

dense patio
#

it's in index

#

it contains events

spare mirage
#

can I get more code

dense patio
#

nothing logs in the console

spare mirage
#

try sending a message with it

tulip ledge
spare mirage
#

nope

dense patio
#
if(client.channels.get(`653285446738116608`)) {
  console.log(`THIS IS THE CORRECT SHARD`);
}

this part is pretty much all that's important, being that it doesn't even get to that first log

spare mirage
#

is the channelid wrong?

#

does the bot have permissions

dense patio
#

the channel id is correct and the bot has permissions

lusty quest
#

@slender thistle

#

i guess with V11 you get issues with the intends

#

so it will be a breaking issue

slender thistle
#

intents you mean

lusty quest
#

yes

slender thistle
#

Does v11 not support intents?

spare mirage
#

is ur command correct @dense patio

lusty quest
#

im not sure

dense patio
#

there's no command

#

it's in the index

slender thistle
#

Oh I see where you're getting at

lusty quest
#

its possible that they changed something on the API that prevents V11 to work then

spare mirage
#

then how do u run it?

dense patio
#

...it's in the index

slender thistle
#

Yeah if intents become required, v11 very well might stop working

spare mirage
#

u can still have commands in the index

dense patio
#

who does that

spare mirage
#

ppl

pure saddle
#

how can i reboot spesific folder or command ._.

lyric mountain
#

v11 will prob ddos itself without member_presence intent

spare mirage
#

wdym reload

pure saddle
#

reboot*

spare mirage
#

I guess u execute it again

tulip ledge
lusty quest
#

would funny if this would happen. like a few people flooding the chat here that theyΒ΄re pcs are getting Super slow and laggy

spare mirage
#

yes

#

crash their pcs

lyric mountain
#

lol you don't even need to flood the chat

lusty quest
#

no they flood the chat here with why is this so

#

why does my bot crash

lyric mountain
#

just having ur bot join this server without that intent is a massive payload of presences

lusty quest
#

why did i get a 402 error

heavy anchor
#

So how do I get a bot avatar from the dbl api?

lyric mountain
#

you get that error?

lusty quest
#

yes

spare mirage
#

no u dont

#

I would love the cat

lusty quest
#

i actually have a command in my bot for cat pics and facts

spare mirage
#

I have a command in my bot to seaerch images of cats

#

oof

lyric mountain
#

I mostly use httpcat to figure out what the statuses mean

lusty quest
#

is possible it will be a 401 or 403

#

or 404

lyric mountain
#

maybe

sudden geyser
#

Anyone knows why mine isn't getting triggered? I also tried to put it in index.js with a client.on but that doesn't trigger either https://hastebin.com/legerucige.js
@tulip ledge does your bot actually join/emit a guild create event? Are you sure client is referencing the client you used to connect your bot to Discord? It looks fine to me.

#

Http cat 401 is the best one.

lusty quest
#

the event looks fine

#

the event handler also

lusty quest
#

but default channel is deprecated

sudden geyser
#

Lynes what language

pure saddle
#

discordjs

sudden geyser
#

So JavaScript/Node.js

pure saddle
#

yep

sudden geyser
#

You'd need to use the fs module for folders and possibly commands (though require is what you're looking for). You'd need to unload the command(s) from whatever collection you keep it stored in and remove the require cache from the file (require.cache[require.resolve(filepath)]). Then load it like normal.

lusty quest
spare mirage
#

superbrain people hate it when they get riderected to this :{

lusty quest
#

better than just yelling read the docs

spare mirage
#

True

pale vessel
#

it literally explains everything

spare mirage
#

not really

pale vessel
#

it does

#

read it

spare mirage
#

I did

#

then why do you ask questions here?

lusty quest
#

there is stuff that is not explained

#

also some stuff is easyer to solved with the collective knowledge in here

spare mirage
#

exactly if it did explain everything why would people ask questions?

sudden geyser
#

Justii that link explains exactly what you want.

spare mirage
#

I dont want anything

#

:P

sudden geyser
#

what

lusty quest
#

it was someone else

sudden geyser
#

oh

lusty quest
#

but it is easyer to link someone a page that explains stuff instead of trying to explain it

spare mirage
#

ur right

#

some stuff is explained bad thoguh

lusty quest
#

sometimes there is a language barrier and you can translate sites easyer

slender thistle
#

Docs aren't supposed to explain "everything"

pure saddle
pale vessel
#

don't copy it flat out

pure saddle
#

ok

cloud nacelle
#

e wassup peps?

earnest phoenix
#

@pure saddle lol glitch

cloud nacelle
#

um hello?

earnest phoenix
pure saddle
#

i will buy vps later

cloud nacelle
earnest phoenix
cloud nacelle
#

minigun ☝️

earnest phoenix
cloud nacelle
pale vessel
#

fucking kill me

digital ibex
#

this isn't the channel to do send random emotes

cloud nacelle
#

sorry

slender thistle
#

Why in the living hell did you think sending random emotes in a channel named "development" was anywhere near a good idea

cloud nacelle
#

i thought this was general lol sorry

#

im a hop away now

slender thistle
digital ibex
#

does anyone know why ```js
const io = require('socket.io')(7000);

coarse hearth
#

can anyone help me with this

#

(node:59556) UnhandledPromiseRejectionWarning: Error: FFmpeg/avconv not found!

#
(node:59556) UnhandledPromiseRejectionWarning: Error: FFmpeg/avconv not found!
pale vessel
#

install ffmpeg

coarse hearth
#

i did

digital ibex
pale vessel
#

it's not finding the path

digital ibex
#

my express server is running on port 8000, socket.io 7000

coarse hearth
#
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno ENOENT
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://git@github.com/derhuerst/http-basic.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!     C:\Users\LXPC\AppData\Roaming\npm-cache\_logs\2020-07-01T14_59_51_030Z-debug.log
#

look :9

paper phoenix
#

Install git

spare mirage
#

^

coarse hearth
#

o

spare mirage
#

npm i --save git

coarse hearth
#

so

tulip ledge
#

@sudden geyser I already fixed it, I had 2 versions of the bot, Alpha and the normal one and I invited the normal one while the code was in the Alpha version, yikes thanks tho

pale vessel
#

@coarse hearth how did you install ffmpeg?

paper phoenix
#
coarse hearth
#
PS C:\Users\LXPC\Documents\GitHub\brutalbotgit> npm i ffmpeg-static
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno ENOENT
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://git@github.com/derhuerst/http-basic.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!     C:\Users\LXPC\AppData\Roaming\npm-cache\_logs\2020-07-01T14_56_17_885Z-debug.log
PS C:\Users\LXPC\Documents\GitHub\brutalbotgit> npm install ffmpeg-static --save
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno ENOENT
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://git@github.com/derhuerst/http-basic.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!     C:\Users\LXPC\AppData\Roaming\npm-cache\_logs\2020-07-01T14_59_51_030Z-debug.log

@pale vessel

median siren
#

Has anyone setup sharding using discord.js?

#

im having some issues

spare mirage
#

install git

pale vessel
#

does ffmpeg-static installs ffmpeg like apt install ffmpeg or similar? not sure it downloads it so yes

paper phoenix
#

Has anyone setup sharding using discord.js?
@median siren - Yessir. What's up

pale vessel
paper phoenix
#

Oh gotcha. Just getting on. πŸ˜›

median siren
#

But each guild is returning null

#

it appears that the shards arnt starting correctly

cloud nacelle
#
(node:59556) UnhandledPromiseRejectionWarning: Error: FFmpeg/avconv not found!

why is it not found wtf?

coarse hearth
#

not working zzz

#

same πŸ˜‚

#

npm i ffmpeg-static

cloud nacelle
#

yeah

spare mirage
#

--save

#

nom i --save ffmpeg-static

paper phoenix
#

it appears that the shards arnt starting correctly
@median siren - Use the shardCreate event to log the following:

//Or whatever you named your manager...
shardingManager.on( 'shardCreate', shard => console.log( `Launched shard ${ shard.id }` ) );

What do you see?

median siren
#

Nothing at all

paper phoenix
#

Have you called shardingManager.spawn( )?

tulip ledge
#

How do I see how many guilds my bot is in, again? client.guilds.size is undefined

median siren
#
const { ShardingManager } = require('discord.js');
const manager = new ShardingManager('./app/bot.js', { token: process.env.BOT_TOKEN });

manager.spawn();
manager.on('shardCreate', shard => console.log(`Launched shard ${shard.id}`));
#

that is the entry point @paper phoenix

paper phoenix
#

How do I see how many guilds my bot is in, again? client.guilds.size is undefined
@tulip ledge - client.guilds.cache.size

digital ibex
coarse hearth
#
PS C:\Users\LXPC\Documents\GitHub\brutalbotgit> npm i --save ffmpeg-static
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno ENOENT
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://git@github.com/derhuerst/http-basic.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\LXPC\AppData\Roaming\npm-cache\_logs\2020-07-01T15_23_32_127Z-debug.log
cloud nacelle
#

bruh

#

wait go to http-basic and find that error hmmmm

spare mirage
#

@coarse hearth install git :P

paper phoenix
#

@median siren - Does manager.spawn( ) ever resolve?

manager.spawn( ).then( console.log ).catch( console.error );
coarse hearth
#

@spare mirage

#

as in this?>

paper phoenix
#

Also, do you mind showing where you create your client in ./app/bot.js?

spare mirage
#

no

#

just run this in terminal npm i --save git

median siren
#

@median siren - Does manager.spawn( ) ever resolve?

manager.spawn( ).then( console.log ).catch( console.error );

@paper phoenix Yes i get a massive object log

coarse hearth
#

@spare mirage already did

median siren
#

@paper phoenix

spare mirage
#

weird

coarse hearth
#

zzz

spare mirage
#

kpal its messageEmbed

median siren
#

wdym

paper phoenix
#

Your first line

#

That still wouldn't prevent it from creating the shard though

median siren
#

As in

#

the bot starts

paper phoenix
#

const { Client, MessageEmbed } = require( 'discord.js' );

spare mirage
#

^

#

richembed doesnt exist in v12

paper phoenix
#

Also, I doubt it matters, but you don't need to pass your token to client.login( ) when using external sharding

median siren
#

hmmm

paper phoenix
#

Also doubt this matters, as I don't see it mentioned anywhere, but does ./app/bot.js export client?

cloud nacelle
#

then what is the context in client then?

spare mirage
#

why do people even use client

#

bot is way shiorter

median siren
#

no it doesnt

pure saddle
#

MessageEmbed

paper phoenix
#

@median siren - Mine isn't far off from yours, and I create my shards with:

//~ Load configuration
import 'dotenv/config';

import Discord from 'discord.js';

const { ShardingManager } = Discord;

const shardingManager = new ShardingManager(
    './bot/index.mjs',
    {
        execArgv: [ '--es-module-specifier-resolution=node' ],
        token:    process.env.DISCORD_TOKEN
    }
);

shardingManager.spawn( );

export default shardingManager
import Discord from 'discord.js';

//...

const bot = new Discord.Client( CLIENT_OPTIONS );

//...

process.nextTick( ( ) => bot.login( ) );

export default bot
spare mirage
#

code feeding

#

:/

median siren
#

i see

paper phoenix
#

@spare mirage - He's already provided damn near identical showing that he's made an effort - relax

spare mirage
#

Imma copy paste that

#

and add it to my bot

#

:D

median siren
#

Yooo i found the issue bruh

#

npm didnt update discord js ffs

paper phoenix
#

@median siren - How many servers are you in ATM? Can you get away with internal sharding, or does it do resource intensive stuff like image rendering etc?

median siren
#

around 2500 servers with image rendering yes

paper phoenix
#

Ah, understandable why you'd want external then

solemn latch
#

@spare mirage because message.client

Most the discord collections call the object client
Its just more consistent

paper phoenix
#

npm didnt update discord js ffs
@median siren - Did this fix it?

spare mirage
#

how do I make a command work like this
B!cOdE
b!code
b!Code
B!cOde
etc.

solemn latch
#

Lowercase the input

#

.toLowerCase()

slender thistle
#

if LowercaseMessageContent startswith something

spare mirage
#

thanks!

median siren
#

@paper phoenix the shard id is being logged so i think so im just testing guild logging now

paper phoenix
#

@median siren - Add me for a minute if you don't mind

median siren
#

send req

#

*sent

cobalt spruce
#

can any one help me

#

i want to make a create channel log

#

but it wont work

plucky harness
#

help

#

which utf should i use

#

encoding

cobalt spruce
solemn latch
#

On create channel message?

cobalt spruce
#

idk

#

@solemn latch am new

#

what i do man

solemn latch
#

The channelcreate event returns a channel

#

Not a message

pure lion
#

^^^

wheat jolt
#

what's the alternative for dispatcher end event in v12?

#

d.js

cobalt spruce
#

@pure lion brug

#

bruh

#

am new

#

i dont understand all of that

pale vessel
#

@wheat jolt finish

wheat jolt
#

ah

pale vessel
earnest phoenix
#
let prefix; // define balnk variable with any name you want
  let prefixes = await client.db.fetch(`prefix_${message.guild.id}`);
  if (prefixes == null) {
    prefix = "d-"; // default prefix if no prefix set for this guild
  } else {
    prefix = prefixes;
  }
  if(message.content == "@void zenith") 
{
  message.channel.send(`My prefix is \`\`` + prefix + `\`\` for this guild!`)
};

i still need help with this thingy
how to make it work with my mongo db?

pure lion
#

@cobalt spruce change
', message =>
to
', channel =>

#

@earnest phoenix use quick dB if you want help from me lma9

earnest phoenix
#

no

#

im using heroku

#

dbs dont work

#

apart from like mysql and mongo

pure lion
#

Oh

#

Can you just put the .sql file into your GitHub repo?

earnest phoenix
#

no files wont work