#development

1 messages ยท Page 1351 of 1

earnest phoenix
#

oh kewl

#

probably just linter

misty river
#

anyone know a good example of a multi-lang bot?

#

right now i know roughly what i need to do but im not sure how to like pass through variables

#

(well, i do but my way feels messy to me :1)

restive lily
#

@earnest phoenix it didnt work

trim saddle
#

@misty river it's ez

{
    "GREETING": {"en": "Hello!", "fr": "Bonjour!"}
}
earnest phoenix
#

@restive lily did you pass it to your bot constructor?

restive lily
#

yes

earnest phoenix
#

can you show the full intents code including the bot constructor

restive lily
#
import discord
from discord.ext import commands, tasks
from discord.utils import get
import asyncio
import datetime 
import sys
import traceback
import random
from itertools import cycle
import json
import platform
import os

def get_prefix(client, message):
    with open('prefixes.json', 'r') as f:
        prefixes = json.load(f)

    return prefixes[str(message.guild.id)]

intents = discord.Intents.default()
intents.members = True

bot = commands.Bot(command_prefix = get_prefix, case_insensitive=True, intents=intents)```
earnest phoenix
#

what about your current on_member_join code

restive lily
#
@bot.event
async def on_member_join(member): 
    await member.add_roles(discord.utils.get(member.guild.roles, name="Syndicate Members"))
    await member.add_roles(discord.utils.get(member.guild.roles, name="In Training"))
    channel = discord.utils.get(member.guild.text_channels, name="sydcranklogs")
    await channel.send(f"`Syndicate Members` and `In Training` was given to `{member.name}({member.id})` by `Auto Role`")```
earnest phoenix
#

did you make sure your bot hierarchy is higher than those roles?

restive lily
#

mhm, when ever have a hierarchy issue i get a console error and its the highest role with admin perms

#

and these are checked

earnest phoenix
#

can you put a print in on_member_join to see if its getting triggered?

restive lily
#

its getting triggered

earnest phoenix
#

but it doesn't add roles and not sending any messages?

restive lily
#

nope

#

and the spellings are correct, i triple checked

earnest phoenix
#

do you happen to have a global error handler? on_command_error event

restive lily
#

i do not anymore

fathom nymph
#

hey

#

whats wrong with my command

#
const { MessageEmbed } = require('discord.js')

module.exports = (client) => {
  const channelId1 = '767604190439669801' // Welcome Channel
  const channelId2 = '769792836006051840' // Farewell Channel
  const ruleChannel = '767604190439669801' // Rules Channel

  client.on('guildMemberAdd', (member) => {
    let avatar = member.user.displayAvatarURL({ dynamic: true })
    const greeting = new MessageEmbed()
      .setTitle('New member! Let\'s welcome them!')
      .setDescription(`Warm welcomes to <@${member.id}>! :partying_face: / We hope you enjoy our server!`)
      .setThumbnail(avatar)
      .setColor('#77dd77')
      .addFields(
        { name: 'Essential Info:', value: member.guild.channels.cache.get(ruleChannel).toString(), inline: true }
      )

    const channel1 = member.guild.channels.cache.get(channelId1)
    channel1.send(greeting)
  })

  client.on('guildMemberRemove', (member) => {
    let avatar = member.user.displayAvatarURL({ dynamic: true })
    const farewell = new MessageEmbed()
      .setTitle('A member just left!')
      .setDescription(`<@${member.id}> just left the server... ๐Ÿ˜ง`)
      .setThumbnail(avatar)
      .setColor('#ff6961')

    const channel2 = member.guild.channels.cache.get(channelId2)
    channel2.send(farewell)
  })
}```
#

whats wrong?

#

with command?

trim saddle
#

you gave us no info on what was wrong

pale vessel
#

whats wrong?
@fathom nymph you tell me

fathom nymph
#

Its Umm

#

whenever someone joins

#

My bot crashes

#

and it wont send the inv

#

I mean

#

embed

trim saddle
#

that's not an error message

fathom nymph
#

I know

#

But how i fix that?

trim saddle
#

that's a vague description that eludes everyone

fathom nymph
#

Ohhhh

#

ok

earnest phoenix
#

how about on_error? @restive lily

restive lily
#

no

#

i dont

earnest phoenix
#

hmm, well there isn't a reason for your code to not work, unless it's rate limited

restive lily
#

the bot is in one server lol

#

but ill try try tmrw

#

its 1am

clever rampart
#

can you add to the rich embed if you declare it as a const like that?

restive lily
#

ty for the help

earnest phoenix
#

okie

silver lintel
#
let user = message.guild.member(message.mentions.users.first()) ||
            message.guild.members.cache.get(args[0]);
          if (!user) return message.channel.send("I couldn't find that user");
``` this is not working when i use id
carmine summit
#

did you try to use .toString()???

pale vessel
#

toString() a string 5head

sick fable
#

I made a command that enlarges emojis using a command but it's not working on the default emojis like ๐Ÿ˜ณ or ๐Ÿ˜ฆ Whereas it's working on custom emojis like HeadSlap . I am sending my code too.

ancient nova
#

I want to make a welcoming message for the bot, like dank memer, who messages in the top channel it can type in

delicate shore
#

Can anyone guide me in-depth of how to host my own mailing server on debain os

fathom nymph
#

question

sick fable
#
async def enlarge(ctx, emoji: discord.PartialEmoji = None):
    if not emoji:
        await ctx.send("You need to provide an emoji!")
    else:
        embed = discord.Embed(title = "Enlarged Version of the emoji!" , description = f"Emoji : {emoji.name}")
        embed.set_image(url = f"{emoji.url}")
        await ctx.send(embed=embed)```
#

Please help me

fathom nymph
#
if (msg.content === '!meme') {
    exports.run = async (client, message, args) => {
    try {
        const { body } = await snekfetch
            .get('https://www.reddit.com/r/dankmemes.json?sort=top&t=week')
            .query({ limit: 800 });
        const allowed = message.channel.nsfw ? body.data.children : body.data.children.filter(post => !post.data.over_18);
        if (!allowed.length) return sg.channel.send('It seems we are out of fresh memes!, Try again later.');
        const randomnumber = Math.floor(Math.random() * allowed.length)
        const embed = new Discord.RichEmbed()
        .setColor(0x00A2E8)
        .setTitle(allowed[randomnumber].data.title)
        .setDescription("Posted by: " + allowed[randomnumber].data.author)
        .setImage(allowed[randomnumber].data.url)
        .addField("Other info:", "Up votes: " + allowed[randomnumber].data.ups + " / Comments: " + allowed[randomnumber].data.num_comments)
        .setFooter("Memes provided by r/dankmemes")
        msg.channel.send(embed)
    } catch (err) {
        return console.log(err);
    }
  }
}```
sick fable
#

:c

fathom nymph
#

so i used this meme command i made

#

and it wont work

earnest phoenix
#

Yea more like you copied

fathom nymph
#

no :c

ancient nova
#

I want to make a welcoming message for the bot, like dank memer, who messages in the top channel it can type in

#

how could I make it

earnest phoenix
#

i mean exports.run shouldnt be there or msg.content thing idk what ru tryin to do

#

is ur bot only an a file? @fathom nymph (like bot.js)

fathom nymph
#

yea

#

Vsc i use

earnest phoenix
#

but why is there exports.run

ancient nova
#

I want to make a welcoming message for the bot, like dank memer, who messages in the top channel it can type in, any suggestions

trim saddle
#

@sick fable discord default emojis can't be viewed like custom emoji's

silver lintel
#
let user = message.guild.member(message.mentions.users.first()) ||
            message.guild.members.cache.get(args[0]);
          if (!user) return message.channel.send("I couldn't find that user");
``` this is not working when i use id
trim saddle
#

they're all svgs

sick fable
#

So how should I fix it? @trim saddle

ancient nova
#

I want to make a welcoming message for the bot, like dank memer, who messages in the top channel it can type in, any suggestions

sick fable
#

My friend coded a bot which enlarges default emojis too

trim saddle
#

i mean

#

you could hardcode viewable versions of the emoji

ancient nova
#

I want to make a welcoming message for the bot, like dank memer, who messages in the top channel it can type in, any suggestions

#

I guess none huh

sick fable
#

Lmaoo

ancient nova
#

guess I'll go somewhere else then

tardy hornet
#
if (embedf.fields[3].value.length > 1024) return message.channel.send('you got more roles then i can list. Must be 1024 or fewer in length.')

TypeError: Cannot read property 'value' of undefined

hasty mulch
#

I want to make a welcoming message for the bot, like dank memer, who messages in the top channel it can type in, any suggestions
@ancient nova You didnโ€™t provide your coding language, lol

pale vessel
#

embedf.fields[3] is undefined

ancient nova
#

oh yea

#

I want to make a welcoming message for the bot, like dank memer, who messages in the top channel it can type in, any suggestions? (discord.js)

tardy hornet
#

fixed that ty

#

@pale vessel

trim saddle
#

not my choice but if i wouldn't make it look like it's the users fault if the field is too long

#

make some sort of workaround

ancient nova
#

I want to make a welcoming message for the bot, like dank memer, who messages in the top channel it can type in, any suggestions? (discord.js)

#

@hasty mulch none again

hasty mulch
#

Best to ask in the lib Discord server

ancient nova
#

which is?

tardy hornet
#

bro

#

${message.guild.owner.user.tag}

#

what is wrong there

ancient nova
#

message.guild.owner.tag

pale vessel
#

you tell me

#

no, owner is a member

#

tag is under user

trim saddle
#

when in doubt

tardy hornet
#

TypeError: Cannot read property 'user' of null

#

ah?

ancient nova
#

<client>.users.cache.get(${message.guild.owner.id}).tag

pale vessel
#

owner is null

#

so it couldn't find the owner in the cache

trim saddle
slender thistle
#

Could someone ping cry plz

pale vessel
#

guild has the property ownerID where you can use guild#members#fetch(guild#ownerID) to get the owner

#

@earnest phoenix

trim saddle
#

@slender thistle don't cry bbcakes

slender thistle
#

Yo cry, was it you who had the URL with default Discord unicode emotes JSON?

trim saddle
#

they appear to offline shivvycakes

#

last message here was sent about 4 hours ago

slender thistle
#

Mf cry I know you're lurking in invis mmulu

pale vessel
slender thistle
#

Oh hey

#

Yeah

sick fable
#

I want to make a welcoming message for the bot, like dank memer, who messages in the top channel it can type in, any suggestions? (discord.js)
@ancient nova if you provide us a code, then All those who know JavaScript will come to help you.

#

"We don't spoon-feed" ~ Shivaco

slender thistle
#

Thanks flaze

sick fable
pale vessel
#

for me, i use string.codePointAt() and https://github.com/twitter/twemoji/raw/master/assets/72x72/<unicode>.png

sick fable
#

"We don't spoon-feed" ~ Shivaco
@sick fable @slender thistle I guess you said this quote

slender thistle
#

I was pestering people for spoonfeeding at point, yeah

#

.codePointAt... should be ord() in Python

#

Unless I'm completely and utterly wrong

sick fable
pale vessel
#

it seems to be

ancient nova
#

@sick fable I am asking for the command? why would I mention that I want to make it like dank memer, I don't know how to make it dm the top server

trim saddle
#

sort your servers

ancient nova
#

channel

#

I mean channel

#

jesus I'm too tierd

trim saddle
#

same deal

ancient nova
#

so like

#

you have an guildCreate event right

silver lintel
#

console.log(message.guild.members.cache.get(args[0])); //undefined even tho i put real id

trim saddle
#

you mean the channel at the top of the hierarchy?

ancient nova
#

in there you put a code to tell it

#

to find the id of the

#

top channel in the guild it just joined

#

so after that

pale vessel
#

like channel#position?

ancient nova
#

you take that channel id and cache it with your client

#

and tell it to dm a welcoming message

pale vessel
#

sort by channel#position or just use .find()

ancient nova
#

how

#

do you do taht

trim saddle
#

i wouldn't rely on using the top channel

ancient nova
#

then how else am I supposed to do that

trim saddle
#

rather the first channel you can chat in

ancient nova
#

seems fair

#

how do I

#

make the bot detect that

trim saddle
#

use .find() and make the proper filter

#

i don't use d.js man

ancient nova
#

alright then

#

thanks

#

anyways

trim saddle
#

mhm

neon heart
#

hi, im new in here

trim saddle
#

hi new here

#

i'm skull

neon heart
#

hii

slender thistle
silver lintel
#

when do i use message.guild.members.cache.get(args[0]) or message.guild.members.fetch(args[0])?

sick fable
#

Alrighty, I coded this command too. It adds the emojis automatically to the guild. The code is as follows followed with the error:

Code - @client.command() async def addemoji(ctx, emoji: discord.PartialEmoji, *,name): guild = ctx.guild await ctx.guild.add_emoji(emoji, name=name) await ctx.send("Succesfuly added the emoji!")

Error- discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'Guild' object has no attribute 'add_emoji'

earnest phoenix
sick fable
#

Thanks โค๏ธ

dawn ether
#

@sick fable is your bot open source?

earnest phoenix
#

well, that's not the step still, you need to convert that partial emoji object into bytes for the image kwarg so that it can be created into an emoji

sick fable
#

Kk

carmine summit
#

how do i fech the guild that has the least members

trim saddle
#

@earnest phoenix bruh

earnest phoenix
#

yes?

trim saddle
#

if you talking about kwargs and bytes one more time i'm wrapping you in an envelope and sending it to brazil

sick fable
#

๐Ÿ˜ฆ

earnest phoenix
#

?

sick fable
#

@sick fable is your bot open source?
@dawn ether yes

trim saddle
#

you heard me

earnest phoenix
#

off topic lol

sick fable
#

Don't send me to Brazil

#

๐Ÿ˜ก

#

I'll send you to Mars then

dawn ether
#

@dawn ether yes
@sick fable where is it? in your github?

sick fable
#

@sick fable where is it? in your github?
@dawn ether nah, it's not open source. Sorry, I was watching Interstellar so I was a dumbass at that time

carmine summit
#

How do I send a message to the first channel the bot can send a message in

earnest phoenix
#

which library? @carmine summit

carmine summit
#

js

astral yoke
#

dumb question

#

whats that thing you put into const bot = new Client() that gets all the members

sick fable
#

dumb question
@astral yoke true

pale vessel
astral yoke
#

thank you i just forgot at 12 AM

#

shouldve read docs

tardy hornet
#

to download ffmpeg

#

is npm i ffmpeg

#

?

modern osprey
#

One message removed from a suspended account.

#

One message removed from a suspended account.

neon heart
#

is npm i ffmpeg
@tardy hornet you can open npmjs website and get how to install ffmpeg

modern osprey
#

One message removed from a suspended account.

neon heart
#

?

#

i don't have giveaway code

astral yoke
#

and nor should source code it cat

#

anyone know why this dosent work

#

bot.on('guildMemberAdd', async (member, message) => {
let test = bot.db.get(welcome_${message.guild.id})
bot.channels.cache.get(test).send("welcome test")
})

#

the welcome is set as an id of a channel

carmine summit
#

dumb question
@astral yoke ??

astral yoke
#

was already answered

#

i got a new one

earnest phoenix
#

Can i get giveaway coding
@modern osprey we don't just give code to people

#

Read rule 8a of server rules

modern osprey
#

One message removed from a suspended account.

earnest phoenix
#

it's spoonfeeding

#

Spoonfeeding is bad

#

You won't learn anything if we just give you code

carmine summit
#

I need something that sends a message to a channel that the bot can send a message in once by guild

#

Something like Hello Thanks For Adding Me Into Your Server. Type In ?help To Get Started

pale vessel
#

you can also just get the first channel using .find(), it's probably faster, not sure tbh

#

cause filtering involves the whole collection/array

earnest phoenix
#

yo anyone knows how to use mongoose to find which has a value in a object like this

Model = {
premium: {
valid: true,
code: ''
}
}
#

i want to find every documents which has the valid true

pale vessel
#

oh jeez add some indentation lmao

earnest phoenix
#

.-.

tardy hornet
#

TypeError [ERR_INVALID_ARG_TYPE]: The "url" argument must be of type string. Received undefined

tame kestrel
#

means url doesn't exist, either u passed something that is undefined or didn't pass anything at all

untold ruin
#

There's a bug in Europa bot

#

The user welcome message

tame kestrel
#

Talk to europa's developers

untold ruin
#

Where are they?

tame kestrel
#

In their support server probably

untold ruin
#

Oh, so it's not.... okay

tame kestrel
#

This server is for the top.gg platform itself

tardy hornet
#

means url doesn't exist, either u passed something that is undefined or didn't pass anything at all
@tame kestrel want me to send the command?

tame kestrel
#

I mean if you want, I think you're smart enough to experiment around and find the error yourself

tardy hornet
#

its a long error

#

i just sent the type

#

anyways

#

thats the "command"

tame kestrel
#

ok

#

where do you think it gone wrong homie

tired panther
#

Does anyone has experience with mongoose?
Do you know how to add a Field in a document?

abstract coyote
#

@tardy hornet did u put the url into a string?

earnest phoenix
#

hi

neon heart
#

@tardy hornet from your code, you not use youtube api, on your case you must input youtube url or video id

pale vessel
#

@astral yoke guildMemberAdd doesn't give message (what message would it give anyway?). you can use member.guild.id instead in order to get the guild id

astral yoke
#

what i want it todo is right now im testing it, so im trying to get it to send when my alt joins

astral yoke
#

changing it to member guild id dosent fix anything

pale vessel
#

debug

#
console.log(bot.db.get(`welcome_${member.guild.id}`))
astral yoke
#

it dosent even do anything

sick fable
astral yoke
#

the guildMember add isnt working

sick fable
#

๐Ÿ‘€

#

I really don't know what to do now

pale vessel
#

i might know why @astral yoke

sick fable
#

If I can get some help, lmk

pale vessel
#

is your bot verified?

astral yoke
#

Nope

pale vessel
#

did you add the guild members intent?

astral yoke
#

its a client bot im making it for someones server

pale vessel
#

you need it for member join event

astral yoke
#

in the developers page?

peak venture
#

Discord embeds can not contain tabs can they?

#

im in a description where i want to line things up

#

but \t or \u0009 don't seem to give the result i want with tabbing

pale vessel
#

in the developers page?
@astral yoke try checking there, it's greyed out for some people so i'm not sure what it'll look like for you. after that, add it under your clientoptions too

astral yoke
#

i think your right

pale vessel
#

well, you DO need it

astral yoke
#

because i have it on a team for a client wanting todo it

#

thank you

pale vessel
#

all good

astral yoke
#

trying now

#

It worked, thank you

pale vessel
peak venture
#

๐Ÿ˜„ anyone can help me with these tabs?

dawn ether
#

flaze u'r best ๐Ÿ•ต๐Ÿฝ

earnest phoenix
#

Discord embeds can not contain tabs can they?
@peak venture they can't iirc

#

but you can use a pagination system

#

(not an official thing just a simulation or smth)

peak venture
#

Pagination?

earnest phoenix
#

a system where a user clicks reactions to go through different pages

#

idk how to make that ask tim the saviour

pale vessel
#

they meant tabs as "indent"

peak venture
#

ah yea; but that's not what i'm looking for though ๐Ÿ˜›

earnest phoenix
#

they meant tabs as "indent"
@pale vessel oh ok

peak venture
#

i'm having a description that needs a split of space

pale vessel
#

wouldn't \n suffice?

peak venture
earnest phoenix
#

wouldn't \n suffice?
@pale vessel that would create a new line instead of a little bit of space between two characters

pale vessel
#

i see

peak venture
#

red stripes need to be more tright

pale vessel
#

you can use alternative characters

peak venture
#

i was using blank spaces from the webpage

earnest phoenix
#

wait i think i just found a bug in discord PTB

peak venture
#

though now i got multilangual bot the spaces dont suffice any longer

earnest phoenix
#

time to test and report

pale vessel
#

i used en space

#

โ€‚

peak venture
#

yea flaze ๐Ÿ˜›

#

i've been using the same too

#

but as i said; since i started with multi languages this wont longer suffice

#

so i was hoping to see wether someone had a solution to create the tab

pale vessel
#

you should probably put it inside a codeblock

#

it won't ever look even otherwise

peak venture
#

that'd result into addfields hm

pale vessel
#

what do you mean?

peak venture
#

i'd codeblock the titles then and codeblck the results

#

to get that even effect

#

but that's simply not possible

pale vessel
#

can't you put them all inside a single codeblock?

peak venture
#

would that even straighten it out?

pale vessel
#

yes, since monospace fonts are even

#

that's why you need codeblocks

peak venture
#

might give it a shot

#

thnx flaze

pale vessel
#

no worries

astral yoke
#

how come i keep getting this no matter what i change (node:18592) UnhandledPromiseRejectionWarning: TypeError: (intermediate value).setTitle(...).setDescription(...).setTimeStamp is not a function

bot.on("guildMemberAdd", async (member, message) => {

        let embed = new MessageEmbed()
        .setTitle(`welcome`)
        .setDescription(`desc`)
        .setTimestamp()
        let welcome = db.get(`welcome_${message.guild.id}`)
    bot.channels.cache.get(welcome).send(embed)
    })```
pale vessel
#

setTimestamp

#

hm, your code looks right

#

what happened to the error

astral yoke
#

?

pale vessel
#

the error seems to be coming from here

#

can you like try saving and restart the bot

astral yoke
#

I have auto save on

pale vessel
#

the code isn't saving, probably

#

if you look at the error

#

OR that it came from somewhere else

astral yoke
#

I dont know

#

but when i remove timestamp it dosent error

#

so i wont use timestamp

pale vessel
#

try adding it back

earnest phoenix
#

my botinfo and status has gone down

#

like

#

it was at 1200 members

#

and its dropped too 1

#

but its still in ever server

#

every&

#

and im not sure whats wrong with it

pale vessel
#

guild members intent probably

#

1 is probably the bot itself

neon heart
#

can you give your bot info status code of member ?

earnest phoenix
#

so its only counting the bot?

pale vessel
#

can you give your bot info status code of member ?
@neon heart nah

#

is your bot verified?

earnest phoenix
#

no

pale vessel
#

what intents did you put?

earnest phoenix
#

well to get it verified

#

@pale vessel

#
bot.user.setActivity(`Total Users ${bot.users.cache.size} | Total Guilds ${bot.guilds.cache.size} | /invite /support`, { type: 'WATCHING'})

});```
pale vessel
#

what intents did you put?

earnest phoenix
#

to count the bots guilds and total users?

pale vessel
#

go to your bot application in discord developer portal

#

select bot and see if you turned on the guild members intent or not

earnest phoenix
quartz kindle
#

@quartz kindle Does JS ASM exist?
@earnest phoenix WASM exists, idk if that what you mean

neon heart
#

@earnest phoenix message.guild.members.cache.filter(x=> x.user.bot).size for get bot count

small prairie
#

Guild member intent is required for the guildmemberadd event right?

earnest phoenix
#

yes

small prairie
#

aight

#

thanks

earnest phoenix
#

i think pretty much anything that sends members over gateway needs the intent

pale vessel
#

you can however fetch a member via query without the intent

earnest phoenix
#

are you sure

#

how do i fix this error
'(' expected.
but there is }

#

re check your syntax

#

well.

#

that } is from client.on('message', message => { if(!message.content.startsWith(prefix) || message.author.bot) return;
but the error says expected )

pale vessel
#

show your full code

boreal iron
#

Shouldnโ€™t the arrow function expression be in ( )?

pale vessel
#

it's optional if there's only one parameter

earnest phoenix
#

lol flaze

boreal iron
#

Ahh ok, wasnโ€™t exactly sure

earnest phoenix
#

that's hilarious, bots can still scrape data by sending the gw request in chunks omegaLUL

pale vessel
#

get trolled by discord

earnest phoenix
#

ok

#

This is the full code:

pale vessel
#

at least presences aren't like this

earnest phoenix
pale vessel
#

else if {}
else if {}
else if {}
else if {}

#

brrr

earnest phoenix
#

?

#

are you aware you can just get(command)

quartz kindle
earnest phoenix
#

ohh

#

i forget to add it

#

dumb me

#

that if else defeats the entire purpose of your command handler omegaLUL

pale vessel
#

at least it wasn't bunch of message events dumped together

quartz kindle
#

also wat

earnest phoenix
#

where

#

bruh

quartz kindle
#

ban command

earnest phoenix
#

create a context object that stores your arguments, i.e. the message, the client etc

let cmd = get(some command string)
if(cmd)
  cmd.execute({
      message: message object,
      client: client,
      ...whatever you want here
  })
#

your command handler compressed in just a few lines

#

ok

pale vessel
#

please don't copy paste that

earnest phoenix
#

ik and i dont thing to use that code

#

ok bye then.

quartz kindle
#

i really hate ifs without brackets lmao

boreal iron
pale vessel
#

i can see that in discord.js-light source

quartz kindle
#

xD

earnest phoenix
#

but muh easier to type

boreal iron
#

Means to be a fake statement

pale vessel
#

FakE statement ;)

pulsar bone
#
if(!member.user.bot) 
            {
                member.send(text)
            } ```
hey guys it is saying member not defined ```help me please ```
quartz kindle
#

i really hate that kind of bracket style as well

#

lmao

earnest phoenix
#

okay

#

i like that style

#

c# styling mmLol

quartz kindle
#

yeah no thx :^)

pulsar bone
#

ahh i was asking for help

quartz kindle
#

@pulsar bone member is not defined

boreal iron
#

wtf why

{
   timIsGonnaGetMad();
}
#

Looks nice

quartz kindle
#

ew

pulsar bone
#

@pulsar bone member is not defined
@quartz kindle i typed that as well

#

-_-

pale vessel
#

define member mmulu

quartz kindle
#

thats the answer your question

boreal iron
#

lmao

quartz kindle
#

the error is literally telling you whats wrong

pulsar bone
#

? i am newbie i dont know

quartz kindle
#

you tried to use member where member doesnt exist

#

you need to get the member from somewhere

pulsar bone
#

member is in discordjs

pale vessel
#

member is in discord api

earnest phoenix
#

there's a clear difference between "i dont know" and "i do not want to know"

your case is the latter

pulsar bone
#

yup

quartz kindle
#

for example

pulsar bone
#

there's a clear difference between "i dont know" and "i do not want to know"

your case is the latter
@earnest phoenix if i dont want to know i shouldnt be asking it if u wanna help then help or go away

quartz kindle
#
client.on("message", message => {
  member doesnt exist here, only message exists
  but you can get a member from a message by using message.member
})

client.on("guildMemberAdd", member => {
  member exists here
})
earnest phoenix
#

what you probably want is for someone else to spoonfeed you the solution lol

#

because that error is easily google-able

pulsar bone
#

even on google some one will answere it same happening here whats the diff (only diff we need to block ppl like you this way)

earnest phoenix
quartz kindle
#

lmao

earnest phoenix
#

it's not me who's the problem, it's everybody else!

pulsar bone
#

it's not me who's the problem, it's everybody else!
@earnest phoenix ๐Ÿ‘

earnest phoenix
#

I don't know where sould i put this catch block

#

i was mocking you but alright

#

don't try catch every error you encounter

#

fix it instead

#

?

quartz kindle
boreal iron
#

it's not me who's the problem, it's everybody else!
KEKW

quartz kindle
#

the error is saying that song.url doesnt exist

earnest phoenix
#

whatever song.url returns isn't a url

pulsar bone
#

?
@earnest phoenix just block him(cry) he is not going to help

quartz kindle
#

he helps more than you people think, hes one of the most knowledgeable people on this server

pulsar bone
#

he helps more than you people think, hes one of the most knowledgeable people on this server
@quartz kindle well make a lot of scence with that attitude

earnest phoenix
#

yes i'm harsh get over it

#

@earnest phoenix
@quartz kindle i don't understand

#

.play(ytdl(song.url))

quartz kindle
pulsar bone
#

ok done

#

@earnest phoenix blocked

earnest phoenix
#

i genuinely could not care less

#

you're a whitename

pulsar bone
#

๐Ÿคท

earnest phoenix
#

and how can i fix it?

quartz kindle
#

figure out why song.url doesnt exist

#

check where you create song.url

earnest phoenix
#

Serving at http://48b5189653e5:3000, http://127.0.0.1:3000, http://172.17.0.108:3000

#

this means??

#

huh

quartz kindle
#

it means your server is opened and accessible in those addresses and ports

earnest phoenix
#

port how to use on desk.

#

@earnest phoenix your song doesn't have a url, it's undefined, it's up to you to find out why; console.log the objects, inspect what you pass, find out why it doesn't have a url

#

emm.. i try

willow mirage
quartz kindle
#

@willow mirage the member is not cached

willow mirage
#

then how i can cache ?

quartz kindle
#

fetch it

#

await guild.members.fetch(id)

willow mirage
#

ok

#

@quartz kindle one more question

#

my status is editing vscode

#

but when i do message.member.precense it return nothing

quartz kindle
#

presence, not precense

willow mirage
#

ye but still

#

not working

earnest phoenix
#

Sry, i don't understand. Now i need an other video link? or catch block???

#

Im so idiot

willow mirage
#

im online

#

: /

flat pelican
#

isnt .presence an object

willow mirage
#

yes it is

earnest phoenix
#

anyone know how to use port on chrome

#

what do you mean

#

Sry, i don't understand. Now i need an other video link? or catch block???
so?

#

don't catch it

#

find out why the song doesn't have a url

#

find out what object the song is

#

Serving at http://48b5189653e5:3000, http://127.0.0.1:3000, http://172.17.0.108:3000
how to use this

#

copy the url

#

eh

#

paste it in your browser

#

say This site canโ€™t be reached

boreal iron
#

Where did u copy that log from?
What are even trying to do?

earnest phoenix
#

aaahhhhh i don't know howwwww

#

can you help in other ways?

ionic dawn
earnest phoenix
#

bruh

#

:c

#

how can i invite my bot to my server

#

@earnest phoenix

willow mirage
#

or permission calculator

earnest phoenix
#

ok thanks

pale vessel
#

why

#

discord literally has that built-in in the portal lmao

outer topaz
#

@glass temple

#

Help me here

glass temple
#

Unfortunately I can't help with API

outer topaz
#

Ok

umbral zealot
#

if all you do is flail your arms around and cry for help, we don't know how to help you

#

perhaps you can... ask a question, that would help us help you!

open zodiac
#

ok i am here

blissful coral
#

@open zodiac

#

What is your current code

open zodiac
#

key u mean ?

blissful coral
#

No

#

your code

open zodiac
#

where can i find that ๐Ÿ˜‘

blissful coral
#

const client = new Discord.Client();
const DBL = require("dblapi.js");
const dbl = new DBL('Your top.gg token', client);
#

Basic connection example

#

Obv remove client

open zodiac
#

i see

#

ok i understood ๐Ÿคฃ

#

wait which all libraries are supported in top.gg btw

#

coz i dont see some other bots' server counts too

#

๐Ÿค”

outer topaz
#

const DBL = require('dblapi.js'); const express = require('express'); const http = require('http'); const app = express(); const server = http.createServer(app); const dbl = new DBL(yourDBLTokenHere, { webhookAuth: 'password', webhookServer: server }); dbl.webhook.on('ready', hook => { console.log(`Webhook running with path ${hook.path}`); }); dbl.webhook.on('vote', vote => { console.log(`User with ID ${vote.user} just voted!`); }); app.get('/', (req, res) => { // ... }); server.listen(5000, () => { console.log('Listening'); });

#

How can I use

#

It

umbral zealot
#

What do you mean, "how can I use"

#

you... just put this where it goes in your code

outer topaz
#

How to setup

earnest phoenix
#

@low orbit dms

outer topaz
#

Then

umbral zealot
#

Paste this code in your JS app.

outer topaz
#

After put

#

Then

#

@umbral zealot I have to put something in this code

#

Or not

umbral zealot
#

yes... in your javascript code. in your bot.

outer topaz
#

What

earnest phoenix
#

รน

outer topaz
#

I put this code

earnest phoenix
#

Ctrl + P

outer topaz
#

But I have to add something like my bot api

umbral zealot
#

yes... in your bot's code...

outer topaz
#

Or something

earnest phoenix
#

where it says 'yourDBLtoken' for example

umbral zealot
#

This will create an http server in your bot, which will receive the votes when they're added.

outer topaz
#

@umbral zealot there written your dbl token here

#

There I have to put my dbl token

umbral zealot
#

yes

outer topaz
#

Yea I ask that

umbral zealot
#

Is it English or JavaScript that you have trouble understanding? I'm not sure.

outer topaz
#

@umbral zealot what I have to put in webhook auth : password

#

Webhook server : server

river wing
#

how do i port forward my pi so that my votes can go through with the api

outer topaz
#

What I have to put there

umbral zealot
#

I'm not even sure - the docs don't even say what the heck the password does

#

"The string for Authorization you set on the site for verification."

honest perch
#

@umbral zealot started at the new job yet?

outer topaz
#

And I have to put that code in my main file

honest perch
#

Auth can be set in the edit page

umbral zealot
#

oh there it is.

#

yeah right here

#

so your password here must match the password you set in your bot's dbl webhook

outer topaz
#

@umbral zealot and the servrr

#

Webhook server : server

river wing
#

how do i know if i got firewall block request if im on my pi

umbral zealot
#

that's literally in the example, Adarsh

#

literally defined right above.

#
const DBL = require('dblapi.js');
const express = require('express');
const http = require('http');

const app = express();
const server = http.createServer(app); // <========== THE SERVER
const dbl = new DBL(yourDBLTokenHere, { webhookAuth: 'password', webhookServer: server });

dbl.webhook.on('ready', hook => {
  console.log(`Webhook running with path ${hook.path}`);
});
dbl.webhook.on('vote', vote => {
  console.log(`User with ID ${vote.user} just voted!`);
});

app.get('/', (req, res) => {
  // ...
});

server.listen(5000, () => {
  console.log('Listening');
});
honest perch
#

Why do you need http and express?

outer topaz
#

Where I put that code

river wing
#

whats server for

outer topaz
#

Means main file

#

Or anywhere

#

I whole code

#

@honest perch

umbral zealot
#

In your main file would do fine

river wing
#

just put that code somewhere that gets loaded when u start the bot

umbral zealot
#

like, the index.js file or whatever you named it

outer topaz
#

Index.js

#

Main file

umbral zealot
#

Yes. Put that code, in that file.

earnest phoenix
#

make a blank space and paste it in

umbral zealot
#

You know, copy/pasting, most likely how you made your entire bot, it feels. >.<

earnest phoenix
#

i dont do js

#

but i can still do that

outer topaz
#

@umbral zealot

umbral zealot
#

Great, it's in there.

earnest phoenix
umbral zealot
#

now fix the password

outer topaz
#

Ok

umbral zealot
#

and... make it do what you want it to do.

outer topaz
#

@umbral zealot what in webhook server

#

Server id

umbral zealot
#

... if you don't know what any of this is, why are you trying to use it

#

like, seriously, what are you even doing

outer topaz
#

I doing vote log

#

When anyone vote my bot

#

It show up

umbral zealot
#

Great, that's exactly what this does.

outer topaz
#

But I don't know how to use

umbral zealot
#

That's the webhook server.

earnest phoenix
#

legend

outer topaz
#

So what I have to put

umbral zealot
#

what do you have to put where

outer topaz
#

Server id ???????

umbral zealot
#

What server ID?

#

a server ID for what?

outer topaz
#

Webhook server : server

#

There

umbral zealot
#

no, that's a variable

#

that's defined on the line before

earnest phoenix
#

@outer topaz you should try going for very simple stuff

#

as a newbie I can say I started coding my bot with the basics and understodd them after

#

but you have to know the LANGUAGE

umbral zealot
#

Which, clearly... you don't

outer topaz
#

But I code

#

My bot

umbral zealot
#

It's clearly you wrote your bot by just following a tutorial. You don't understand the language you're using

outer topaz
#

I only need to setup votelog

umbral zealot
#

otherwise you'd know what a variable was.

earnest phoenix
#

it's ok to copy paste something you dont quite understand yet, but you have to know how it works at some point

#

you've gone too far

#

dont have a grasp on what you're doing

#

go back a few steps

sudden geyser
#

it's ok to copy paste something you dont quite understand yet, but you have to know how it works at some point
@earnest phoenix I'd say the opposite of the first part. If you're copy and pasting without knowing what it does, you won't know how to improve your code in that area if something ever goes wrong (errors). Copy and pasting teaches newcomers to write in only one style, which is the issue with being new and picking a project not suitable yet.

earnest phoenix
#

@sudden geyser oh, well that was how i started learning tbh

#

of course I learned what the basic elements of python were

#

i later learned to develop my own style

#

but im still a noob

sudden geyser
#

I started learning that way too, but I'm basing it off how I see a lot of new programmers start with a Discord bot and immediately start struggling and falling into the same pit falls thinking they won't.

#

I think learning to program by making a bot is a good way of learning, but to learn only through making a Discord bot and not trying out other things to test your skills is the hard part.

earnest phoenix
#

yos I agree

faint prism
#

Haven't done a webhook before, but isn't it just making post requests to discord when your program finds something exciting?

umbral zealot
#

For Discord webhooks sure

#

but webhooks are just literally a web server listening on a port with a key, it's not a Discord-exclusive concept.

faint prism
#

Right, sounds like just an API endpoint

uncut river
#

my bot suddenly went from 10s restart time to 2 min restart time, i don't think i did anything to cause that but what are some things i should look at?

sudden geyser
#

debug logs

faint prism
#

oh a reverse api. Got it

sudden geyser
#

if it's some process that's taking a very long time for some reason (db connection)

uncut river
#

probs sound dumb but how do i setup debug logs

#

i don't have a button for that on my panel

#

if that's what you mean

sudden geyser
#

wdym button

faint prism
#

are we talking about a logger?

sudden geyser
#

and what library are you using

#

yes

#

like how discordjs has a debug event

uncut river
#

discord.js yes

#

how can i setup

faint prism
#

I mode one here a while ago.
You could probably do a similar thing, but have it dump to a file at some interval
#development message

jagged spruce
#

My bot works when I type from dm, but it doesn't work when I use commands on servers and I can't solve it. What should I do?

faint prism
#

You find and change the logic error in your code

sudden geyser
#

Just wondering, but why bother making ILogger an interface? Are you implementing it somewhere else as well?

uncut river
#

i just want to get information of whatever processes are taking forever

sudden geyser
#

Listen for the debug event in Discord.js: js <Client>.on("debug", console.log);

faint prism
#

Just wondering, but why bother making ILogger an interface? Are you implementing it somewhere else as well?
@sudden geyser In this instance it's a console logger. With this design approach, I could have it logging to a webhook, or some webservice

sudden geyser
#

See if anything meaningful is there.

uncut river
#

thanks!

sudden geyser
#

Auger so you're implementing ILogger elsewhere as well?

faint prism
#

Auger so you're implementing ILogger elsewhere as well?
@sudden geyser I could be. This is just how I write code

#

I try to adhere to at least some design pattern that is maintainable

#

Specifically that link is just something i wrote from scratch in Discord. It isn't in any project, but similar to what I usually write

sudden geyser
#

eh that's fine. I think it adds extra boilerplate if it's just added without any actual plan on using the interface elsewhere, but it's a design pattern after all.

faint prism
#

Instead of just doing Console.WriteLine everywhere? lol

#

or new Logger() I suppose

sudden geyser
#

ILogger in general being an interface

faint prism
#

Well, if it wasn't an interface I might as well be writing new Logger() whenever I wanted an instance

#

Even the factory design won't save me from that, unless I used var I suppose

#

but to your point, this is blantant overengineering of a logger lol

#

It's mostly for practicing SOLID design principles I learned during my co-op

sudden geyser
#

Correct me if I'm wrong, since I don't write C# but the OO design approach is very similar to Java. Why would you need to create a new logger every time? The ILogger interface only sets two requirements: void Log(string msg) and void Log(Exception e). This doesn't have anything to do with factories. In languages like Swift, making a value compute lazily would be the solution to only having one instance (sort of), but it wasn't thread safe (as a note).

faint prism
#

Right, lazy approach also works. Or having a static instance even

#

The benefit of using an interface is so that I won't have to refactor everywhere I reference Logger as the concrete datatype when I change logger contexts

#

So imagine I want to completely change where my logger logs to

#

Instead of refactoring everywhere it's referenced, I can just inherit the interface that guarantees it will have the same methods and parameters

#

so they are essentially interchangeable

uncut river
#

@sudden geyser can i send you my debug?

faint prism
#

So for instance the refactor would just become the new implementation and changing the factory like so:

#
static class Factory
{
  //ILogger GetLogger() => new Logger();
  //ILogger GetLogger(Type type) => new Logger(type);
  ILogger GetLogger() => new BetterLogger();
  ILogger GetLogger(Type type) => new BetterLogger(type);
}
...
interface ILogger
{
  void Log(string msg);
  void Log(Exception e);
}
...
class BetterLogger: ILogger
{
  string name = "NA";

  BetterLogger() {}
  BetterLogger(Type type) { _type = type.Name; }

  void Log(string msg) => Pushbullet.SendMessageAsync($"[{DateTime.Now}] ({name}) - {msg}").Wait();

  void Log(Exception e) => Log($"Error! Exception: {e.Message}");
}
#

And because my code references the interface like ILogger _logger = Factory.GetLogger() No refactor is needed

uncut river
#
[WS => Manager] Failed to fetch all members before ready! Error [GUILD_MEMBERS_TIMEOUT]: Members didn't arrive in time.```
sudden geyser
#

If the plan is to have more than one logger and it needs to implement some base requirements, then by all means, ILogger is a perfect use case. I already considered that when I first saw your approach. I just think if you're doing it for the sole purpose of "there's the chance I need more than one logger with the same requirements", it can add some boilerplate code filling in requirements then there's no actual plan on requiring multiple classes implement an interface.

And if you do want to refactor your code but don't need more than one class that implements said interface, then refactoring the old class you have is probably suitable.

uncut river
#

i have fetchAllMembers true and got 46 users cached in 548 guilds

sudden geyser
#

hmm

uncut river
#

can i send you my full debug?

#

or in here

faint prism
#

@sudden geyser Well I typically have a logger similar to that in a .NET Standard Class Library

pure lion
#

use a bin

fluid basin
#

you must have the guild members intent enabled on the bot settings page @uncut river

uncut river
#

it's in over 100 servers i cant do that

#

i never whitelisted

fluid basin
#

then you cant fetch members

sudden geyser
#

Then you can't try getting members from gateway

pale vessel
#

contact support and request for it then

uncut river
#

why? i don't need it

pale vessel
#

bruh

uncut river
#

i haven't needed it

sudden geyser
#

But you're asking for it?

uncut river
#

i never asked for it what?

fluid basin
#

then you get 46 users

#

simple as that

uncut river
#

i didnt get 46 users last time

#

last restart i had 140,000

fluid basin
#

because the setting wasnt applied

uncut river
#

it was never applied at any point

fluid basin
#

intents are slowly being rolled out

#

bruh

uncut river
#

i'm quite confused because i didn't think i needed it

pale vessel
#

well, you do

pure lion
#

ah, caching

uncut river
#

i don't track members though

#

that's why im confused

pure lion
#

do you want to fix the issue or not

uncut river
#

everything used to work

#

i do

#

here is my debug

pure lion
#

then do the intent fucker thing

pale vessel
#

then remove fetchAllMembers and keep your 46 users

#

you need the intent to fetch the guild member list

uncut river
#

do all large bots have server members intent?

pale vessel
#

of course

pure lion
#

dude all bots period

pale vessel
#

unless they don't need it

uncut river
#

i didn't realize i needed it my bad

pale vessel
#

most original bots don't mmLol

pure lion
#

cough non caching lib cough

uncut river
#

i thought fetchAllMembers was good enough

pale vessel
#

it was

uncut river
#

so now my bot dead until they respond right?

#

cuz it just spam

#

Failed to fetch all members: Error [GUILD_MEMBERS_TIMEOUT]: Members didn't arrive in time.
Error [GUILD_MEMBERS_TIMEOUT]: Members didn't arrive in time.

pale vessel
#

disable fetchAllMembers for now

#

since that requires the intent

uncut river
#

then fetch member in message.js?

pure lion
#

what lib are you using

pale vessel
#

discord.js lmao

pure lion
#

fucking

#

use light

#

please

#

god

earnest phoenix
#

Hello i have a question in js, can i pos tit here ?

pure lion
#

asdasdasdasdasdasdasdasdasdasdasdasdasdasd

uncut river
#

i am

#

lmao

#

i am using light

pure lion
#

Hello i have a question in js, can i pos tit here ?
ask away

#

ok good

#

then uh

#

turn off caching

uncut river
#

for?

pure lion
#

everything

uncut river
#

even guilds?

pure lion
#

except

earnest phoenix
#

So my guild.owner is working on one sevrer but on another it return null

sick fable
#

discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'NoneType' object has no attribute 'name'***

#

Wtf

#

Wait

#

Sending code too

#
async def userinfo(ctx, member: discord.Member = None):
	member = ctx.author if not member else member
	roles = [role for role in member.roles]
	
	embed = discord.Embed(title = f"{member.name}'s Userinfo!" , colour = member.colour , timestamp = ctx.message.created_at)
	
	embed.set_thumbnail(url = member.avatar_url)
	embed.set_footer(text = f"Requested by {ctx.author.name}" , icon_url = ctx.author.avatar_url)
	embed.add_field(name = f"**Name**" , value = f"{member.name}#{member.discriminator}" , inline = True)
	embed.add_field(name = "Id" , value = f"{member.id}")
	embed.add_field(name = f"**Nickname**" , value = f" {member.display_name}")
	embed.add_field(name = "**Status**" , value = f"{member.status}")
	embed.add_field(name = "**Rich Presence**" , value = f"{member.activity.name}")
	embed.add_field(name = "**Account Created On**" , value = member.created_at.strftime("%a, %d %B %Y , %I %M %p UTC"))
	embed.add_field(name = '**Joined This Server On**' , value = member.joined_at.strftime("%a, %d %B %Y , %I %M %p UTC"))
	embed.add_field(name = "**Roles**" , value = f" ".join([role.mention for role in roles]))
	embed.add_field(name = "Bot?" , value = member.bot)
	await ctx.send(embed=embed)```
quartz kindle
#

@earnest phoenix owners are not guaranteed to be cached

sick fable
#

Btw what's the meaning of that error?

quartz kindle
#

You need to fetch them

#

@sick fable your member is not defined correctly

sick fable
#

@quartz kindle ol

#

Ok*

feral aspen
#

Hey, my bot used to moderate over 170k members and suddenly got errors making it moderate 20 members only, but the server count stayed the same. Any reasons due to this?

pure lion
#

intents

feral aspen
#

I asked the hosting support, they got nothing to do with it and it may be from discord

#

intents
@pure lion Ahh I see, server member intents are ON for me?

pure lion
#

its meant to be an array of strings according to the docs

zinc condor
#

KM_Dorime so i have created a cloudflare worker type thing in C++ with V8, what do you guys think about making a discord bot that is entirely created with a panel so people can create tiny little scripts and enable them to run as commands on your discord server

#

you just invite it and write some small JS code to do some discord things

pure lion
#

that could be heavily exploited

zinc condor
#

well, userscripting is basically fixed now

#

each V8 is in its own process in a pool to avoid OOM and it communicates seperate from main program

pure lion
#

what if someone does if (process) client.destroy()

zinc condor
#

doesnt do shit because its not node.js

#

its V8, as in the thing in the browser

pure lion
#

ah

zinc condor
#

it has no system access, cannot call require()

#

process is nonexistant

pure lion
#

imPoRt

zinc condor
#

PepeLaugh not a thing either

pale vessel
#

can we fork bomb it

zinc condor
#

i rewrote require as a psuedorequire to include pre-generated js object binds from native code

#

its native-code to prevent people from per-se. Changing the access a command has and doing stuff to another guild id

faint prism
#

Sounds like you need a pentester to check that security tbh

zinc condor
#

i have a few from switchblade team 5_bugcatstare

#

one weird thing that i someone dislike is that V8 uses globals and its kinda designed to just kill the process whenever one V8 isolate goes OOM

#

so each isolate needs to spawn up a new process and do some IPC stuff

#

which is not too much of an issue on linux and its just a few milliseconds, doesnt really matter since the thing will be in docker anyway

umbral field
zinc condor
#

KM_Dorime hello world saves and runs in 5ms after you press the exec button still

#

i also rewrote fetch in C++ for v8 binds for some reason

willow mirage
#

why my css is not reloading

#

smh

pure lion
#

purge cache

#

if youre using cf

earnest phoenix
#

.

pure lion
#

no thank you

#

-dotpost

pale vessel
#

selfbot, ban this guy

pure lion
#

:o selfbot

indigo flax
#

is it easy to switch from .json to mongodb

pure lion
#

not just easy

#

but yes i can help you

sudden geyser
#

It depends on how you've set up your bot.

#

Are you directly writing to the database/file, or do you have it backed by some class/API.

pure lion
#

if youve set it up with json

indigo flax
#

OK

#

tysm

#

ok so

#

what do i do lol

pure lion
#

well

#

js or py?

indigo flax
#

discord.js

#

im using .json rn

#

every 3 days

#

the .json

#

turns from like 57 GB

#

to

pure lion
#

corrupts

indigo flax
#

0 bytes

pure lion
#

holy fuck

indigo flax
#

?

pure lion
#

holy fucking shittt

indigo flax
#

its fine

pure lion
#

thats a big fucking file

indigo flax
#

it wont be 57 GB anymore

pure lion
#

you are going to switch

indigo flax
#

but

#

@pure lion

pure lion
#

okay so

indigo flax
#

theres multiple

#

theres

pure lion
#

no buts

indigo flax
#

disabled.json

#

slowmode.json

#

storage.json

#

prefix.json

quartz kindle
#

What the fuxk

pure lion
#

lmfao

quartz kindle
#

How the hell did you manage to create 57gb json

indigo flax
#

but u can have multiple in mongodb too, right?

#

@pure lion

#

i can make disabled.json go in a disabled database

#

etc

pure lion
#

yes

#

but

#

gOD

quartz kindle
#

Mongodb is a full database system, it doesnt store in files directly

pure lion
#

tim can i do this one

quartz kindle
#

Sure gi ahead

pure lion
#

yay

quartz kindle
#

I dknt even want to

#

Lmao

pure lion
#

lmfao

#

austin

#

where do you host

#

@indigo flax

#

oh hes offlne

#

tell me where you host when youre back ajjjjjjjjjjjjjjjjjjjjjjj

fluid basin
#

:KM_Dorime: so i have created a cloudflare worker type thing in C++ with V8, what do you guys think about making a discord bot that is entirely created with a panel so people can create tiny little scripts and enable them to run as commands on your discord server
@zinc condor so whats the point of it?

pure lion
#

something somwthiwjgdsgjbsd

fluid basin
#

bot prototyping is pretty easy for discord

zinc condor
#

people just invite it to their server to write simple scripts to do stuff like check channels or whatever. I can make a scratch like interface for it too for people who dont know about it

indigo flax
#

i host it on my own hosting company

zinc condor
#

it basically means

pure lion
#

Okay

zinc condor
#

you dont need to host the bot

pure lion
#

What OS?

zinc condor
#

you just invite it and it just does shit for you

indigo flax
#

linux

fluid basin
#

pretty sure such bots already exist though

pure lion
#

Which distro?

zinc condor
#

which run JS?

#

and are public?

indigo flax
#

uh wait

#

let me check

pure lion
#

Deb or Ubuntu

fluid basin
#

i mean scratch like

indigo flax
#

i think deb

fluid basin
#

not a complete copy

#

but similar ones

pure lion
#

Is it a vps that you ssh into?

fluid basin
#

well where else would you host a bot

pure lion
#

Pterodactyl

indigo flax
#

yes

fluid basin
#

a bot hosting service is shady af

indigo flax
#

pterodactyl

#

its that

pure lion
#

Oh god

indigo flax
#

what

#

it doesnt matter

pure lion
#

Hmph

#

Fine.

#

Okay go to the mongo website

indigo flax
#

yea

pure lion
#

And create an acc and then a new cluster thingy

indigo flax
#

ik

pure lion
#

The free one is more than enough

indigo flax
#

ive used mongodb before

#

for ModMail

pure lion
#

Okay so you have the connection string?

#

Also have you written schemas before

indigo flax
#

i signed up

fluid basin
#

schemas are quite dumb for mongo imo

pure lion
#

Mongoose uwu

fluid basin
#

its meant to be flexible

indigo flax
#

cluster is being made

pure lion
#

Okay epic

indigo flax
#

should i whitelist IP

pure lion
#

Get the connection string and whitelist 0.0.0.0

indigo flax
#

i create a database user?

pure lion
#

Yeah

indigo flax
#

done

hollow sedge
#

Has anyone used motor for async mongodb in Python?

pure lion
#

@slender thistle ๐Ÿ‘€

#

@indigo flax grab a connection string, you'll need it for later

indigo flax
#

where

slender thistle
#

I never used Motor

indigo flax
#

oh

#

ok

hollow sedge
#

:(

indigo flax
#

cluster is still being created

pure lion
#

Okay just waut

indigo flax
#

bro

#

tysm

#

do u also know another problem?

fluid basin
#

just raw mongodb is good enough for python? @hollow sedge

indigo flax
#

if it adds another data to my storage.json

#

my bot goes offline

#

it says like

#

JS: File too big to handle

#

idk

hollow sedge
#

just raw mongodb is good enough for python? @hollow sedge
@fluid basin ? what does that mean?

indigo flax
#

omething like that

faint prism
#

wait that wasn't a meme

slender thistle
#

pymongo was always enough for me tbh

#

Even in Discord bots

fluid basin
#

why use motor and not pymongo

hollow sedge
#

alright thanks

faint prism
#

storage.json is actually what you're using for a database?

indigo flax
#

yes..

faint prism
#

That's you're issue

indigo flax
#

dont bully me, i made this bad like 3 months ago

hollow sedge
#

why use motor and not pymongo
@fluid basin idk i was just wondering if it would be worth switching to motor