#development

1 messages Β· Page 1783 of 1

swift cloak
#

yes but i dont wanna accidently delete somethn i need

#

wai- can i move my entire mactonish stuff into my hard drive?

sudden geyser
#

that is the "safest" place to delete your data

lethal trout
#

um.... so i can make it for mod only to use snipe ok?

swift cloak
#

like js -Applications -Library -opt -Previous System -System -Users -vm i can move all those folders into my hard drive?

sudden geyser
#

You have the executor's consent, but what about the content from the user (that user's consent)?

feral aspen
#

Not sure why the files aren't there.. new to github and I'm trying to get the files in the github.

sudden geyser
#

GitHub likes the name main instead of master

#

Press on the main button and press on master. It should transfer you to the master branch, which is probably where your commits (changes) are.

feral aspen
#
git init
git add .
git status
I did some global configuration
git commit -m "First Commit"
git remote add origin <my link here>
git push -u origin master
feral aspen
feral aspen
near stratus
#

git branch -M main

#

or

#

git branch -M master

#

idk

#

why I do this

swift cloak
feral aspen
near stratus
#

GitHub gave it a new name

feral aspen
#

I am trying to delete master to consider my main as the master.

near stratus
sudden geyser
swift cloak
#

what should i NOT delete in my mactonish

#

so i know what to avoid

near stratus
sudden geyser
#

The rule of thumb is:

  1. Search on Google for more information
  2. If you know you can safely delete something, do so. Else, leave it alone.
feral aspen
#

Alright, I deleted it.

#

.. now how can I again push the files to my main branch?

near stratus
feral aspen
#
PS C:\Users\name\Desktop\website> git push
fatal: The upstream branch of your current branch does not match
the name of your current branch.  To push to the upstream branch
on the remote, use

    git push origin HEAD:master

To push to the branch of the same name on the remote, use

    git push origin HEAD

To choose either option permanently, see push.default in 'git help config'.
near stratus
feral aspen
#
On branch main
Your branch is based on 'origin/master', but the upstream is gone.
  (use "git branch --unset-upstream" to fixup)

nothing to commit, working tree clean
near stratus
#

there it is

#

git branch --unset-upstream

feral aspen
#

.. but how can I push my files to that?

near stratus
#

do that

#

then push

#

If it doesn't work try
git config push.default upstream

opal plank
#

its not

#

snipe commands are not against tos as long as you list them in ur commands

#

otherwise shit like dyno or carl loggers would be against tos too

#

as long as its CACHED, not STORED in a database, it should be fair game

#

@lethal trout you should read this too, what krabby said was misinformed

lethal trout
#

Now whom should i trust????

opal plank
#

the fucking dev staff that said it

#

not some random saying "i think"

lethal trout
#

okokok

terse lynx
#

Can anyone give me the code for server webhook if voted it will give role if not it dosent

spark blade
#

Uhhh
I used killall node, refresh and node index.js
But my bot still replies twice

earnest phoenix
#

@spark blade is it only the one command or does everything your bot do happen twice

spark blade
#

Everything

#

The mention for prefix too

quiet pawn
#

what are you using?

#

lib

spark blade
#

Discord.js

fossil vault
#
              total        used        free      shared  buff/cache   available
Mem:          981Mi       356Mi        93Mi       0.0Ki       531Mi       463Mi
Swap:            0B          0B          0B

how much actual memory is left in this?

quiet pawn
spark blade
#

No

quiet pawn
#

just regular right

spark blade
#

.js

quiet pawn
#

iw as having same issue but fixed it earlier

spark blade
#

How

quiet pawn
#

how do u excute commands

spark blade
#

Glob Command handling

quiet pawn
#

can u send ya command handler

#

and do you run ```js
const Discord = require('discord.js');

lean bobcat
#
{'question': {'textEnc': 'v9bqzTHQBax++H2N2TGWMw==$VAxgy7vA4D8BoX4dg9QeaADrMrKlRcuGOb9IYsO1/dBed19fc50VChZDJSxOsPe3RleYTzbKTbdTTEaIXa+5WA==', ' 26373}, UI9Zn5iR0OKwkeUuswQVx5MGQBuqDZc=', 'id': 26374}, {'textEnc': 'pkTUrgW48dhkRHbbPaF+ew==$pObuufcWv/wAsnCWjYlkxw==', 'idSigned': '26375$106618403$7350141631252cc46fbd11811cb2fb785907a21a', 'textEnc2': 'D1S7H/uGtTL7CClGrYiPzw==$ooA536+3leslUd7FT+brog==', 'id': 26375}], 'id': 8790}}
quiet pawn
#

oop

fossil vault
quiet pawn
#

or whatever use

spark blade
#
glob("./cmds/**/*", (err, files) => {
  if (err) console.log(`${chalk.bgRed("Error")}: ${err}`);
  let jsfiles = files.filter(f => f.split(".").pop() === "js");
  if (jsfiles.length <= 0)
    console.log(`${chalk.bgRed("Error")}: No command found`);
  else
    console.log(
      `${chalk.bgGreen("Info")}: ${jsfiles.length} commands founded!`
    );
  jsfiles.forEach((f, i) => {
    let props = require(f);
    let commandName = f.replace("./cmds/", "").replace(".js", "");
    console.log(
      `${chalk.bgGreen("Log")}: Loading '${commandName.toLowerCase()}'`
    );
    client.commands.set(commandName.toLowerCase(), props);
  });
});

Its weird cuz it worked before

quiet pawn
#

code block please

#

ty

fossil vault
quiet pawn
#

i used a diferent way tho

#

ill show u how i excute commands

spark blade
#

Lemme guess

#

Fs

quiet pawn
#
const config = require('../config.json'); 
const Discord = require('discord.js');
//const profileModel = require("../models/profileSchema");

module.exports = async (client, message) => {

    //--------------------------------------------------------------------

    if (message.author.bot) return;
    if (message.content.indexOf(config.prefix) !== 0) return;
   //--------------------------------------------------------------------

    const args = message.content.slice(config.prefix.length).split(/ +/);
    const command = args.shift().toLowerCase();

       //--------------------------------------------------------------------
    const cmd = client.commands.get(command) || client.commands.find(a => a.aliases && a.aliases.includes(command));


    if(cmd) cmd.execute(client, message, args, command, Discord);
};
#

i just have a file called message.js that excutes all my commands

#

lol

spark blade
#

So you using ```js
if (command === "cmd") {}

Right?
quiet pawn
#

yea

spark blade
#

Well i use cmds/cmd.js

quiet pawn
#

o wait

fossil vault
#

ty

quiet pawn
#

there ya go

#

its really good for tracking usuage

#

and member and server groith

quiet pawn
#


module.exports = {
    name: 'util Commands List',
    description: 'util Commands List',
    async execute(client, message, args, command, Discord) {

      return message.channel.send({
          embed:{
              title: 'util Commands List',
              color: '#FFE082', 
              fields:[
                  {
                    name: '`n.steal-emoji`',
                    value: ''
                },
                {
                    name: '`n.emoji`',
                    value: ''
                },
                {
                    name: 'User/Server Related Below',
                    value: ''
                },
                {
                    name: 'Bot Related Below',
                    value: '',
                },
                
              ],
              image: {
                url: '',
            },
            timestamp: new Date(),
              footer: {
                  text: 'Thank you to everyone that Adds .Nugget Bot~ β™‘ to there server',
                  icon_url: '',
              }
          }
        });
    }
  }
fossil vault
quiet pawn
#

thats one of my help commands

spark blade
#

As i remember it happened one day after making my music cmds

quiet pawn
fossil vault
#

but i also wanted to know for my whole system as well

#

that what that meant

quiet pawn
#

yea

#

i just excute with a different handler

#

the way i fixed it

spark blade
#

And why using embed instead of MessageEmbed?

quiet pawn
vagrant sorrel
#

hey how do I make the server count widget work for my bot?

spark blade
#

Wait nvm

#

Fuck

quiet pawn
#

?

spark blade
#

I just noticed

#

One of the commands had installed discord.js-light

quiet pawn
#

o

#

well also

#

if it happens

#

instead of running discord.js in every command

#

just run it in your handler

#

thats how i fixed it

spark blade
#

It got fixed now

quiet pawn
#

pog

#

wdym also

spark blade
#

Everything was thanks to that package

quiet pawn
#

damn

#

yea discord.js-light is annoying

quiet pawn
#

o i just deleted it so can look easier

#

since they were long asf

#

all good dw

chrome crest
#

Anyone Here use DBFD?

mild agate
#

no

#

Discord scratch for kids is better than DBFD

chrome crest
#

Oh

#

:(

#

We Can Add Bot Here? @mild agate

mild agate
#

ofcourse

chrome crest
#

@mild agate Really?

#

I Can add My Bot Here? @mild agate

mild agate
chrome crest
#

@mild agate i Done Do It

#

But I Ask

#

Can I Add My Bot To This Server?

lofty cedar
#
        time_convert = {"s":1, "m":60,"h":3600,"d":86400}
        gawtime = int(time[0]) * time_convert[time[-1]]

does anyone can help me? gawtime always give 1 (time is an input gave from the user ex: 10m)

chrome crest
#

@mild agate

mild agate
chrome crest
#

Oh @mild agate

#

Ok

mild agate
#

I'm not a mod btw....

#

no

chrome crest
#

Why :(

mild agate
#

ask Nekomaki#0001

mild agate
copper cradle
#

are you 5yrs old?

simple tulip
chrome crest
#

Oh

copper cradle
#

in that case erwin always breaks rule 5.d lmao

chrome crest
#

Sorry

simple tulip
copper cradle
#

?

simple tulip
copper cradle
simple tulip
#

Oh,it's for the reply sorry-

vagrant sorrel
#

how to make the server count widget work?

earnest phoenix
lofty cedar
#
        gawtime = int(time[0]) * time_convert[time[-1]]```

does anyone can help me? gawtime always give 1 (time is an input gave from the user ex: 10m)
earnest phoenix
#

what is time

lofty cedar
earnest phoenix
#

bruh

#

there is no key in the time convert object named 10m

lofty cedar
#

yes there is

#

I mean

#

time -1 is equal to m or s

#

and with m it works but with s it always give 1

earnest phoenix
#

Found the problem

copper cradle
#

why don't you use a time library that does this for you, why reinvent the wheel

lofty cedar
slender thistle
#

if time = "10m"

#

then time[0] will be "1"

lofty cedar
#

so what could i do?

slender thistle
#

Did you mean time[:-1]

lofty cedar
#

where?

near stratus
slender thistle
#

Wherever you use time[0]

earnest phoenix
slender thistle
#

Yeah

earnest phoenix
#

pog

spare badger
earnest phoenix
#

i was thinking of using a regexp to match the number part

spare badger
#

You can just slice that last one of and parse it as a number

#

If thats not a valid number, then the parameter is invalid and you return an error.

earnest phoenix
#

\d+(?>=[smh])

spare badger
#

Regex notlikethis

earnest phoenix
#

what can i do i love regexp too much

near stratus
spare badger
near stratus
earnest phoenix
#

Get the number from the string smh

slender thistle
#

...

slender thistle
lofty cedar
#

idk what is it .-.

slender thistle
#

Read more on Python string slicing

#

You get all characters except the last one

lofty cedar
#

oh ok, ty

slender thistle
#

Basically what happens is you get a string from index 0 to index len(string) - 1 - 1

#

len(string) - 1 being last available index, and another - 1 signifying pre-last character

pale vessel
#

I see

lavish bramble
#
		if (command === 'start') {
			const game = [];
			const data = await Schema.find({ Guild: message.guild.id });
			if (!Data) return message.channel.send('**Game is not setup yet**');
			if (data.length < 2)
				return message.channel.send(
					"**You can't play alone\nMaximum player is 2! **"
				);
			data.forEach(g => {
				game.push(g.Id);
			});
			const gamer = Math.floor(Math.random() * game.length);
			const embed = new MessageEmbed()
				.setDescription(
					'Now its your turn \nWhat would you like to choose\nTruth/Dare or t/d'
				)
				.setColor('RANDOM')
				.setFooter(
					'Others members will give you task according to your choice!'
				);
			message.channel.send(`<@!${game[gamer]}>`, embed);

			const filter = m => m.author.id === `${game[gamer]}`;

			message.channel
				.awaitMessages(filter, {
					max: 1,
					time: 30000,
					errors: ['time']
				})
				.then(collected => {
					if (
						collected.first().content === 'Truth' ||
						collected.first().content === 't'
					) {
						const truth = Math.floor(Math.random() * truths.length);
						message.channel.send({
							embed: {
								title: 'Truth',
								description: truths[truth],
								color: 'RANDOM'
							}
						});
					} else if (
						collected.first().content === 'Dare' ||
						collected.first().content === 'd'
					) {
						const dare = Math.floor(Math.random() * dares.length);
						message.channel.send({
							embed: {
								title: 'Dare',
								description: dares[dare],
								color: 'RANDOM'
							}
						});
					}
				})
				.catch(() => {
					message.channel.send('**Times Up**!');
				});
		}```
#

This is my start command

#

I want it if I type start

#

Then its restart the command

#

when I type start and mention person doesn't message and then I type start but still its giving times up

#

Any clue

opal plank
lavish bramble
#

BTW not any error

opal plank
#

im aware

#

use breakpoints to debug ur code

lavish bramble
#

I'm using repl

vagrant sorrel
spare badger
#

Yes just read the documentation, its very easy.

spare badger
#

So there are a couple of if else statements in that code.

#

Do you have an error?

#

What is happening and what should happen?

quiet pawn
#

tehres a different way u can do that

#

ill send it

#

with the code

#

what perm

#

admin or?

#

@earnest phoenix

#

rip

#

cant ask for help then disapear

spare badger
#

He is using MANAGE_SERVER perms in that code.

quiet pawn
#

o

#
const Discord = require('discord.js');
module.exports = {
    name: 'prefix',
    description: 'change the prefix',
    execute(client, message, args, database) {

        if (message.member.guild.me.hasPermission("MANAGE_GUILD"));
        if (!message.member.hasPermission("MANAGE_GUILD")) return message.channel.send("You need `MANAGE_SERVER` perms to use this command.");
            database.ref(`/Server-Info/${message.guild.id}/Prefix`).once('value')
            .then((snapshot) => {
                var prefix;
                if (snapshot.val() == null) {
                    prefix = process.env.PREFIX;
                } else {
                    prefix = snapshot.val();
                }
                var newPrefixFirst = message.content.slice(prefix.length)
                var newPrefix = newPrefixFirst.slice(7)
        newPrefix = newPrefix.concat(' ')
                console.log(`${prefix}\n${newPrefixFirst}\n${newPrefix}`)
            
                database.ref(`/Server-Info/${message.guild.id}/Prefix`).set(newPrefix)
                message.channel.send(`New prefix for **${message.guild.name}** has been set to **${newPrefix}**`)
            });
    }
    }
#

try that

#

?

#

i just edit'd ya code

#

did it work?

#

yea

#

it will send "You need MANAGE_SERVER perms to use this command."

pale vessel
#

it's MANAGE_GUILD

quiet pawn
#

o

#

1 sec

#
const Discord = require('discord.js');
module.exports = {
    name: 'prefix',
    description: 'change the prefix',
    execute(client, message, args, database) {

        if (message.member.guild.me.hasPermission("MANAGE_GUILD"));
        if (!message.member.hasPermission("MANAGE_GUILD")) return message.channel.send("You need `MANAGE_SERVER` perms to use this command.");
            database.ref(`/Server-Info/${message.guild.id}/Prefix`).once('value')
            .then((snapshot) => {
                var prefix;
                if (snapshot.val() == null) {
                    prefix = process.env.PREFIX;
                } else {
                    prefix = snapshot.val();
                }
                var newPrefixFirst = message.content.slice(prefix.length)
                var newPrefix = newPrefixFirst.slice(7)
        newPrefix = newPrefix.concat(' ')
                console.log(`${prefix}\n${newPrefixFirst}\n${newPrefix}`)
            
                database.ref(`/Server-Info/${message.guild.id}/Prefix`).set(newPrefix)
                message.channel.send(`New prefix for **${message.guild.name}** has been set to **${newPrefix}**`)
            });
    }
    }
``` @earnest phoenix
cinder patio
#

That first if statement is not doing anything

quiet pawn
#

?

#

it works for me

#

with a ban command i have

copper cradle
#

there's an useless if statement there

cinder patio
#

it works but it's not doing anything...

quiet pawn
#

well it stops people with out the perm

#

so idc

copper cradle
#

no

#

lmao

quiet pawn
#

it does

#

for mme

#

lol

copper cradle
#

this mf

#

does literally nothing

cinder patio
#

so confidently incorrect

quiet pawn
#
        if (message.member.guild.me.hasPermission("MANAGE_GUILD"));
        if (!message.member.hasPermission("MANAGE_GUILD")) return message.channel.send("You need `MANAGE_SERVER` perms to use this command.");
#

works for me

cinder patio
#

those are two if statements, we're talking about the first one

copper cradle
#

ofc it does

cinder patio
#

it has no body

#

doesn't do anything

quiet pawn
#
module.exports = {
    name: 'kick',
    description: "This command kicks a member!",
    async execute(client, message, args, command){
        if (message.member.guild.me.hasPermission("BAN_MEMBERS", "ADMINISTRATOR"))
        if (!message.member.hasPermission("BAN_MEMBERS", "ADMINISTRATOR")) return message.channel.send("You need `ADMINISTRATOR` or `BAN_MEMBERS` perms to use this command.");

        const target = message.mentions.users.first();
        if(target){
            const memberTarget = message.guild.members.cache.get(target.id);
            memberTarget.ban();
            message.channel.send(`**<@${target.id}> has been banned**`);    
        }else{
            message.channel.send(`**You either didn't mention someone or that user cannot be banned!**`);
        }
    }
}
#

thats the command

#

i use it in

#

i told ya

#

lmao

cinder patio
#

the ignorance

quiet pawn
#

lol

copper cradle
#

oh god

#

it does work, but it does nothing

pale vessel
#

> Kick
> member.ban()

copper cradle
#

the if statement does nothing

quiet pawn
copper cradle
#

how can you not see it

#

ffs

quiet pawn
cinder patio
#

because they most likely don't know what they're doing lmao

prime mist
quiet pawn
#

well it stops people from using the command without the perm so idc

copper cradle
#

this is the yt video dev lvl

#

I see

quiet pawn
#

well it stops people from using the command without the perm so idc

#

lol

copper cradle
#

Once you realize what we're talking about you'll feel kinda dumb

quiet pawn
#

well i been doing it

#

and its worked fine stopping user's withot the perm

cinder patio
#

if (message.member.guild.me.hasPermission("BAN_MEMBERS", "ADMINISTRATOR")) what do you think this line of code does?

quiet pawn
#

no idea

#

those commands are from yk video

cinder patio
#

well there you go

copper cradle
#

let's get outta here

#

PolyMatter was right

quiet pawn
#

Kick and Ban commands are very important to any admin discord bot. In this video, you will learn the easiest and safest way to implement kick and ban commands to your own discord bot. Make sure to add permissions and create an admin text channel for the best experience for your discord server members. Make sure to subscribe to this channel for m...

β–Ά Play video
#

tehre

#

the video

copper cradle
#

the fact it came from a yt video doesn't mean it's correct, yk

quiet pawn
#

well it works

#

lmao

#

does it really matter

copper cradle
#

ofc it does

quiet pawn
#

it works

#

it stopped people fomr using the command

copper cradle
#

PolyMatter was right

quiet pawn
#

so i could careless

copper cradle
#

omg

quiet pawn
#

1 sec

copper cradle
#

it doesn't stop them

quiet pawn
#

ill run it without that top line

#

and see what happens

copper cradle
#

the first if statement doesn't do anything

#

it has no body

quiet pawn
#

lmao

copper cradle
cinder patio
quiet pawn
#

oki 1 sec

#

i gotta load alt up

vagrant sorrel
quiet pawn
#

no problem

cinder patio
#

doubt you either didn't remove the permissions or you're lying

#

no

quiet pawn
copper cradle
#

if statements work like this

let admin = true;

if (admin) {
   console.log("admin is true");
}

now, what do you think will happen here


let admin = false;

if (!admin);

console.log("something");
quiet pawn
#

lol

cinder patio
#

not yours

#

the bot's permissions

quiet pawn
#

i did

#

it give same thing either way

#

lol

copper cradle
#

the first if statement is useless you brickhead, it fucking works because the rest of the code works normally without it

cinder patio
#

thonkku The code should error if the bot doesn't have the required permission tho

quiet pawn
#

all it has is send emssage

cinder patio
#

wait

#

you used .ban

#

not .kick\

quiet pawn
#

well there same thing

#

like

copper cradle
#

they're not

#

oh god

#

everyday we stray further from god

quiet pawn
#

omfg

#
module.exports = {
    name: 'kick',
    description: "This command kicks a member!",
    async execute(client, message, args, command){
        if (message.member.guild.me.hasPermission("BAN_MEMBERS", "ADMINISTRATOR"))
        if (!message.member.hasPermission("BAN_MEMBERS", "ADMINISTRATOR")) return message.channel.send("You need `ADMINISTRATOR` or `BAN_MEMBERS` perms to use this command.");

        const target = message.mentions.users.first();
        if(target){
            const memberTarget = message.guild.members.cache.get(target.id);
            memberTarget.ban();
            message.channel.send(`**<@${target.id}> has been banned**`);    
        }else{
            message.channel.send(`**You either didn't mention someone or that user cannot be banned!**`);
        }
    }
}
#

same thing

cinder patio
#

we're talking about kick's code here because that's what you showed us

quiet pawn
#

like with perms

cinder patio
#

show ban too

quiet pawn
#

all them say kick

#

because i copyed the top part

#

because i was l;azy

copper cradle
#

the first if statement is useless

quiet pawn
#

well

#

it seems to do something

copper cradle
#

it does nothing

#

you can remove it and it'll work

cinder patio
quiet pawn
#

ill just use main its serverowner

copper cradle
#

bc that if statement does the same as a cockroach in a fucking car dealership

quiet pawn
#

lel

#

thats interesting

#

i've never done that before

#

taken away the perms

#

it didnt ban them

#

btw

cinder patio
#

well here you go

#

you should have an error in your console too

pale vessel
#

you didn't await the method

quiet pawn
copper cradle
#

my guy doesn't know the basics of an if statement

cinder patio
quiet pawn
pale vessel
#

oh i thought they had a try catch

quiet pawn
#

im lazy

copper cradle
#

PolyMatter was right

pale vessel
#

bruh nope it was an if else

quiet pawn
#

i had to redo my bot today because it was crashing non stop

#

lol

#

im lazy i just do things as lazy as i can if it fucks up in long run ill deal with it then

copper cradle
#

this whole convo just shows that PolyMatter was right all along

cinder patio
#

to fix this you have to actually understand what the condition in the first if statement is checking and just return with an error that the bot doesn't have perms

quiet pawn
#

ill fix it 1 sec

#

now that ig its effected me

#

ill fix it

#

lol

copper cradle
#

I wish samuel was here

#

or tim

quiet pawn
#

i would be killed

#

by sam

copper cradle
quiet pawn
copper cradle
#

you don't need to be so stubborn when someone tells you something you're doing is wrong

quiet pawn
#

yk what imma do it later its 4:20 am and im not doign this

copper cradle
#

still

quiet pawn
#

sorry for not letting you explain

copper cradle
#

it's ok

#

this kind of stuff happens all the time

quiet pawn
#

lieki said before i dont deal with stuff unless its like

#

serouise

#

like crashing bot

#

lol

#

i gotta get out that habit

copper cradle
#

yeah

smoky kestrel
#

facing an issue here

#

const BaseCommand = require('../../utils/structures/BaseCommand');
const Discord = require('discord.js');
module.exports = class UnbanCommand extends BaseCommand {
constructor() {
super('unban', 'moderation', []);
}

run(client, message, args) {
//permission checking
if(!message.member.hasPermission('BAN_MEMBERS')) return message.channel.send('You donot have permission to ban someone');
if(!message.guild.me.hasPermission('BAN_MEMBERS')) return message.channel.send('I donot have permission to ban someone');

//variables
let reason = args.slice(1).join(" ");
let userID = args[0];

//variable checking
if(!reason) reason = "No Reason is Given";
if(!args[0]) return message.channel.send("You Need To Mention a user to unban. `-unban ID reason`");
if(!isNaN(args[0])) return message.channel.send('The Id Given is not a number `-unban ID reason`')

//executing
message.guild.fetchBans().then(async bans => {
if(bans.size == 0) return message.channel.send('This server does not banned anyone yet')
let bUser = bans.find(b => b.user.id == userID);
if(!bUser) return message.channel.send('The user id you stated is not banned')
await message.guild.members.unban(bUser.user, reason).catch(err =>{

  console.log(err);
  return message.channel.send("Something went wrong unbanning this id");
}).then(()=>{
  message.channel.send(`Successfully unbanned ${args[0]}`);
});

});
}
}

silk wadi
#

Bro use code blocks 🀣

smoky kestrel
#

can you tell me how to solve

#

i mean when i use -unban @short wraith reason

#

it say the id you menton is not banned

shadow cipher
#

@silk wadipls help

silk wadi
#

Yes?

shadow cipher
#

i maded a bot with python but my commands all can use why like normal mem can also doing ban with my command @silk wadi

silk wadi
#

Use

#

@has_permissions

#

Erm import it from

#

Wait a sec

#

From discord.ext.commands

#

You can import has_permissions and use it as a decorator on your function

shadow cipher
#

ooh

silk wadi
#
@bot.command(name="ban")
@has_permissions(ban_members=True)
#

Somehing like that

shadow cipher
#

ok

shadow cipher
copper cradle
#

then do that

#

administrator=True

#

duh

carmine shuttle
#

@silk wadi Hello, I added my bot to site yesterday , but I forgot to join server, so I was able to join today. I may have missed my bot review. How many days can you review?

#

I'm sorry if I've bothered you

shadow cipher
#

ooh

silk wadi
carmine shuttle
shadow cipher
# copper cradle then do that

ξΊ§ python3 main.py
Traceback (most recent call last):
File "main.py", line 28, in <module>
@bot.command(name="Adminstration")
NameError: name 'bot' is not defined
exit status 1
ξΊ§

#

getting this error

#

@silk wadi

#

see i added this

silk wadi
#

Well ur using client

#

So change it to client

#

R u using async or rewrite

#

Ok nvm i see rewrite

shadow cipher
#

how toowrite ?

silk wadi
#

You've initialised as client so use client instead of bot

shadow cipher
silk wadi
#

Just change bot to client lmfao

#

Even uve already got client.command()

shadow cipher
#

yes

silk wadi
#

So u can even remove that bot.command

#

Line entirely

shadow cipher
#

ok

shadow cipher
slender thistle
silk wadi
slender thistle
#

What the fuck are you doing there and did you read the docs

silk wadi
slender thistle
#

Doesn't the decorator accept kwargs only

smoky kestrel
#

facing an issue here
const BaseCommand = require('../../utils/structures/BaseCommand');
const Discord = require('discord.js');
module.exports = class UnbanCommand extends BaseCommand {
constructor() {
super('unban', 'moderation', []);
}

run(client, message, args) {
//permission checking
if(!message.member.hasPermission('BAN_MEMBERS')) return message.channel.send('You donot have permission to ban someone');
if(!message.guild.me.hasPermission('BAN_MEMBERS')) return message.channel.send('I donot have permission to ban someone');

//variables
let reason = args.slice(1).join(" ");
let userID = args[0];

//variable checking
if(!reason) reason = "No Reason is Given";
if(!args[0]) return message.channel.send("You Need To Mention a user to unban. -unban ID reason");
if(!isNaN(args[0])) return message.channel.send('The Id Given is not a number -unban ID reason')

//executing
message.guild.fetchBans().then(async bans => {
if(bans.size == 0) return message.channel.send('This server does not banned anyone yet')
let bUser = bans.find(b => b.user.id == userID);
if(!bUser) return message.channel.send('The user id you stated is not banned')
await message.guild.members.unban(bUser.user, reason).catch(err =>{

  console.log(err);
  return message.channel.send("Something went wrong unbanning this id");
}).then(()=>{
  message.channel.send(Successfully unbanned ${args[0]});
});

});
}
}
can you tell me how to solve
i mean when i use -unban @short wraith reason
it say the id you menton is not banned

silk wadi
#

Do ppl not know what code blocks are smh

slender thistle
#

They don't

silk wadi
#
console.log("this looks better lmfao");
shadow cipher
slender thistle
#

You know what I'm surprised about

#

You literally use typehints

shadow cipher
#

@silk wadican i can send you the invite link of my bot code you pls correct my error ?

silk wadi
#

Use control f to find

#

Has_permissions

slender thistle
#

Oh dear God

slender thistle
#

it's administrator btw

silk wadi
#

U wouldnt learn otherwise

shadow cipher
#

ok

shadow cipher
#

client.command()
@commands.has_permissions(administrator=True)
async def Start(ctx, member:discord.Member = None):
async def End(ctx, error):
if isinstance(error, commands.CheckFailure):
await ctx.send("You are not allowed to start lms")

#

@silk wadidid this correct

silk wadi
#

Sure

#

Try it out and see if it works

shadow cipher
#

its not working

shadow cipher
#

@silk wadi

silk wadi
#

...

#

Read the error

stiff lynx
#

I've tried also reconlx pscjage

stiff lynx
#

a good embed pages for discord.js?

slender thistle
pale vessel
#

Your mother

slender thistle
#
async def x():
async def y():
    ...
#

I think you are pointing fingers, flaze. I believe it's "my mother" that should come from your keyboard fingers

quartz kindle
#

async def xyz special summon

slender thistle
#

foobarxyz

violet sandal
#

And async def start

#

Not "End, Start"

green kestrel
#

yayyy managed to halve my memory use πŸ˜„

wide wharf
#

And how do you see how many users use your bot?

#

You have the Early Verified Developer badge pleadcry

green kestrel
#

@wide wharf on my bot's stats page

#

tons of people use my bot

green kestrel
#

how do i see? i record stats to a db

terse steppe
green kestrel
#

im not able to count users via cache any more

terse steppe
#

what do you use then??

green kestrel
#

the guild member_count value, with a modifier

terse steppe
#

oh

green kestrel
#

because ive changed to 'lazy caching' where it only caches people who message the bot

#

it cut my ram down from 8gb to 3.4gb

terse steppe
#

ahh

terse steppe
#

i mean i have 64 GB of ram

#

on my Server

#

were i host my bot

green kestrel
terse steppe
green kestrel
#

imagine hosting on windows πŸ˜›

terse steppe
#

xD

wide wharf
terse steppe
#

Only had a windows server

wide wharf
terse steppe
#

unlimited what :/

wide wharf
terse steppe
#

how does that work even :/

wide wharf
#

idk

#

lol

terse steppe
#

Oh wow

#

lol

#

what do you host with??

#

VPS?

wide wharf
green kestrel
terse steppe
#

or server

green kestrel
terse steppe
#

Lol

#

imagine downloading more Ram :/

wide wharf
terse steppe
#

;_;

wide wharf
terse steppe
#

what the

#

Do you have unlimited on all??

wide wharf
terse steppe
#

Lol

#

what the

#

πŸ™‚

wide wharf
wide wharf
terse steppe
#

Yep

#

πŸ˜‰

wide wharf
#

I have unlimited kekw_giggle

terse steppe
#

breh moment

#

lol

wide wharf
#

lol

terse steppe
#

You host on VPS or Server??

quartz kindle
#

its not unlimited lol

#

nothing is unlimited

#

there are always limits

near stratus
terse steppe
#

VPS is Virtuell Private server

boreal iron
quartz kindle
#

xD

lyric mountain
keen sable
#

Plz help me

earnest phoenix
# keen sable

The optional chaining operator (?.) is only available in Node.js v14 and higher, repl.it only supports Node.js v12 by default

#

Does anyone know if there is a module for discord python to create custom profile cards, similar to the tatsu bot? Or would it be just the case of using pillow?

Link to bot for reference: https://top.gg/bot/172002275412279296

wide wharf
#

And how

earnest phoenix
#

Thanks πŸ™‚ I'll give it a go

smoky kestrel
#

who can help me :/

umbral zealot
#

no one can help until you ask a question ^_^

smoky kestrel
#

const BaseCommand = require('../../utils/structures/BaseCommand');
const Discord = require('discord.js');
module.exports = class UnbanCommand extends BaseCommand {
constructor() {
super('unban', 'moderation', []);
}

run(client, message, args) {
//permission checking
if(!message.member.hasPermission('BAN_MEMBERS')) return message.channel.send('You donot have permission to ban someone');
if(!message.guild.me.hasPermission('BAN_MEMBERS')) return message.channel.send('I donot have permission to ban someone');

//variables
let reason = args.slice(1).join(" ");
let userID = args[0];

//variable checking
if(!reason) reason = "No Reason is Given";
if(!args[0]) return message.channel.send("You Need To Mention a user to unban. -unban ID reason");
if(!isNaN(args[0])) return message.channel.send('The Id Given is not a number -unban ID reason')

//executing
message.guild.fetchBans().then(async bans => {
if(bans.size == 0) return message.channel.send('This server does not banned anyone yet')
let bUser = bans.find(b => b.user.id == userID);
if(!bUser) return message.channel.send('The user id you stated is not banned')
await message.guild.members.unban(bUser.user, reason).catch(err =>{

  console.log(err);
  return message.channel.send("Something went wrong unbanning this id");
}).then(()=>{
  message.channel.send(Successfully unbanned ${args[0]});
});

});
}
}
when i use -unban @short wraith reason
it says The user id you stated is not banned

#

why :/

zenith sorrel
#

Bruh

smoky kestrel
#

what

#

now

zenith sorrel
#

Idk man I can’t dev for shit aye

smoky kestrel
#

:/ all commands are working properly accept this one :/ i wake whole night to solve this one but still i can

zenith sorrel
smoky kestrel
#

lol

cinder patio
#

Fetching all bans just to see if the user is banned sounds inconvinient, I'd use a try/catch, also the formatting is terrible pls use codeblocks

umbral zealot
cinder patio
#

or even better send the wholw file

lusty quest
prime glacier
#

how can i do like if there is a link in args bot use those args in setimage and use rest of args in description of embed

lyric mountain
smoky kestrel
#

see

feral aspen
#

I'm doing a premium system whereas you can do something like !redeem <code>, now how can I get codes that can be something like j3Uh423y5RTfj

opaque seal
#

I'm going crazy can someone help me understand what's wrong with my css in vc?

umbral zealot
wide wharf
feral aspen
lyric mountain
#

literally, use hashing for that

#

something like MD5 or SHA-1 will generate a code from a seed

#

that code is pretty much unique for each seed so you can use for redeem codes

feral aspen
#

Like, what am I supposed to be hashing?

lyric mountain
#

that's something you need to figure out yourself

#

as long as it's a unique seed you'll get a unique hash

#

it can be anything really

#

just remember that same seed = same hash

feral aspen
#

Hm.

#

Alright!

lyric mountain
#

you could instead show pictures and ask the issue on the chat

opaque seal
#

There is this big ass space and I'm using nuxtjs, dropping code in a second

#
<template>
  <div class="changelog">
    <Particles />
    <ProgressBar />
    <NavBar />
    <div class="content">
      <PageTitle title="Changelog" />
      <ChangelogCard v-if="changelog !== undefined" id="c-card" :changelog="changelog" />
      <div id="buttons">
        <Parallelogram-btn btnText="PREVIOUS" :activation="false" @click.native="loadChangelog(true)" />
        <Parallelogram-btn btnText="NEXT" :activation="false" @click.native="loadChangelog(false)" />
      </div>
    </div>
    <Footer />
  </div>
</template>

<script>
import Particles from '@/components/Particles'
import NavBar from '@/components/pageLayout/NavBar'
import Footer from '@/components/pageLayout/Footer'
import ProgressBar from '@/components/pageLayout/ProgressBar'
import PageTitle from '@/components/pageLayout/PageTitle'
import ParallelogramBtn from '@/components/buttons/ParallelogramBtn.vue'
import ChangelogCard from '@/components/cards/ChangelogCard.vue'

export default {
  name: 'changelog',
  components: {
    Particles,
    NavBar,
    Footer,
    ProgressBar,
    PageTitle,
    ParallelogramBtn,
    ChangelogCard
  },
  data () {
    return {
      currentIndex: 0,
      changelogs: [],
      changelog: undefined
    }
  },
  head: {
    ...
  },
  // Some methods
}
</script>

<style scoped>
.changelog {
  height: 100vh;
  display: flex;
  flex-direction: column;
}
.content {
  flex-grow: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}
.title {
  margin-top: 1.5em;
  margin-bottom: 1.5em;
}
#c-card {
  margin: 0 4em;
}
#buttons {
  width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2em;
}
.parallelogram-btn {
  width: 8em;
}
</style>
#

And it's the same structure for every page of the website, but in this page the "content" div is much bigger

lyric mountain
#

you mean the margin or the distance from the page border?

opaque seal
#

The blueish space

#

the empty space that there is under the text

lyric mountain
#

that's just because of flex

#

flex-grow: 1 with flex-direction: column will stretch the div vertically

opaque seal
#

But that's just for the content class, what's getting bigger is the c-card div that's inside it

#

Also flex grow: 1 should only enlarge it to the 100vh remained space

#

not more than that

lyric mountain
#

it'll stretch to the parent's height

#

not the page's height

opaque seal
#

I removed the flex grow and it's still the same

lyric mountain
#

because flex-grow is by default 1

opaque seal
#

See <number>. Negative values are invalid. Defaults to 0.\

lavish bramble
#

How can i do anti bot system in my bot

opaque seal
lyric mountain
#

i see

#

well, I don't see any other issue if it wasn't flex issue, you might need to wait for someone who has more css knowledge

opaque seal
#

So weird

#

I'm sure it's something stupid

#

but can't find it

lyric mountain
#

a thing you could do is using inspect element to try to fix it

opaque seal
#

I tried

#

but there is nothing there neither

#

uh

#

one sec

#

Oh the changelog card component was inheriting the height from the .changelog class of the page

rocky hearth
#

why, nextjs doesnt support const enum for ts??

earnest phoenix
#

Guys is it possible for displaying my bot server count and user count in my website?

lyric mountain
#

yes (MAYBE for the latter)

lavish bramble
earnest phoenix
#

oh

lyric mountain
#

for that you need to create a connection between your bot and your site

#

something like an API or websocket

earnest phoenix
#

Oh

lyric mountain
#

I said maybe for the latter because unless you're willing to api abuse, getting 100% of all members is nier impossible

lyric mountain
lavish bramble
lyric mountain
#

just check if user.bot is true

lavish bramble
#

Menas stop adding bot in the server

lavish bramble
#

So I can punish him/her

lyric mountain
#

for that you'd need to track votes

#

there're discord.js tutorials for that out there

lavish bramble
lyric mountain
#

invites*

earnest phoenix
#

hi

lavish bramble
#

Any yt link?

lyric mountain
#

no

#

search for it yourself

lavish bramble
#

Ok

#

Np

#

Thnx

lyric mountain
#

and dont go for youtube

#

youtube sucks for coding stuff

lavish bramble
#

I have a question can I fetch it from Logs?

lyric mountain
#

idk, give it a search

lavish bramble
#

Bcz there was bot property in mod logs

smoky kestrel
umbral zealot
#

console where bans is a defined variable

smoky kestrel
#

Ok

smoky kestrel
# umbral zealot console where bans is a defined variable

Collection(1) [Map] {
'813140000484098048' => {
reason: 'dumb',
user: User {
id: '813140000484098048',
system: null,
locale: null,
flags: [UserFlags],
username: 'TahirIslam',
bot: false,
discriminator: '0001',
avatar: 'a_37d8019db1307fc9d146106f223d150f',
lastMessageID: null,
lastMessageChannelID: null
}
}
}

umbral zealot
#

well then log banID because it's pretty clear you're providing the wrong ID or your args aren't built the way you think they are.

smoky kestrel
#

u mean userID

latent heron
#

your code, so whatever you have it currently defined as

rocky hearth
#

how do I typecast this this??

#

in ts, y this isnt obj?

smoky kestrel
#

this @junior gulch this only :/

umbral zealot
#

oh look that`s a full mention

#

not just an ID

smoky kestrel
#

yes

umbral zealot
#

so your find() can't find it because "@junior gulch" is not identical to "813140000484098048"

opal plank
smoky kestrel
#

:/ may lemme unban manually and check again

opal plank
#

also hi evie

umbral zealot
#

what about just giving the ID in your command and see if it works?

rocky hearth
opal plank
#

using classes works too

last tapir
#
const hi = 'hi';

const object = { hi: hi };

Can I make it only { hi }.. and still works?

rocky hearth
#

should I break the convention of first letter Uppercase for class

smoky kestrel
opal plank
#

no

#

always use uppercase for classes

crimson vapor
#

Hi @opal plank

rocky hearth
#

plz lemee, I'm just gonna use it like an object

opal plank
#

hi weeb

umbral zealot
opal plank
#

i'd recommend u dont

rocky hearth
#

but it would hv no instances

smoky kestrel
#

ok wait

crimson vapor
#

Where would I save files so that I can access them from code in ts?

opal plank
#

still tho, its just good practice to uppercase it, there would be no difference either way

opal plank
crimson vapor
#

What

#

huh

opal plank
#

you think it compiles config.json n shit?

crimson vapor
#

image.png

#

do I do ./images outside of src?

smoky kestrel
#

do you think slappey is distrub the whole code by itself

opal plank
#

same way you would with a fs.read

#

just remember fs is workspace bound

#

not file bound

#

or whatever package u using to read it

feral aspen
crimson vapor
#

But saving the files there is fine?

feral aspen
opal plank
#

should be, yeah

crimson vapor
#

outside of src?

#

Pog

opal plank
#

probably because a bug in ur code

rocky hearth
#

u hv never told us. How do we know?

opal plank
#

as much as i'd like, i only unlock Foresight and Eye of Mind Reading at level 57, im only lvl 32 yet, so i cant read ur code

earnest phoenix
#
  client.on("message", message => {
    var content = message.content;
    var stringToCheck = content.replace(/\s+/g, '').toLowerCase();

    
    for (var i = 0; i < BannedWords.length; i++) {
        if (content.includes(BannedWords[i])){  
          message.delete();
          
            break
        }
    }
  })

how do I ban the guy again? lol

#

im so lost

crimson vapor
#

message.member.ban

earnest phoenix
#

thx

boreal iron
#

The message object contains an author property

#

or that one above

crimson vapor
#

The author is just a user, I don’t think you can ban through that

earnest phoenix
#

pog it works

#

thx

#

so much

boreal iron
lavish bramble
#

I have a problem
I'm using message.guild.id
So whenever bot dm me it says cannot read property type 'id'
How can I fix this

crimson vapor
boreal iron
#

Because the direct message isn't a guild

crimson vapor
#

Fucking autocorrect

boreal iron
#

for real!

#

I'm always trying to "bring" people to use their own head with my tips instead of just posting the code they need

lavish bramble
boreal iron
#

There's no other way than searching the client

#

The direct message channel has nothing to do with guilds at all

lavish bramble
boreal iron
#

Huh? I don't get what u wanna say to me.

lavish bramble
#

When I use this then its giving me that error

boreal iron
#

please log data

#

as well as member

#

that's weird

lavish bramble
#

I mean if I use this then its giving me
cannot read property type 'id'

boreal iron
#

Why are you checking the audit log anyways for the entry "BOT_ADD" ? @lavish bramble

#

Never heard about patience, hmm?

boreal iron
#

It should contain the guild if not (for some reason) try to fetch it

opaque seal
#

Does anyone know why my style for the p tag isn't getting applied?

pearl plaza
#

 An error has occurred while validating your input:
Detected possible spam in your detailed description. This might be because:
- Your description has too many repeated characters
- Your description has excessively long words.
If you believe this is a mistake please contact moderators. Trying to circumvent this check will still get your bot declined by moderators.
The "Servers this bot is in" section is formatted incorrectly.

Whats this

boreal iron
opaque seal
boreal iron
#

Just use margin-left: 1em; in that case and it will work

last tapir
#
const object = {
    bugs: [
        {
            id: ""
        }
    ]
}

console.log(object.bugs.id)

How can i make property id equal to the length of the array bugs

opaque seal
#

the margin-block-start/end is the orange space you see on top and bottom of the div

earnest phoenix
opaque seal
#

I wanna remove that

opaque seal
boreal iron
#

Then define a writing-mode

opaque seal
boreal iron
#

Oh nvm I missunderstood you

opaque seal
opaque seal
boreal iron
#

Did you use an !important on the selector already?

#

(before)

opaque seal
#

yes

#

I even tried putting dislpay: flex

last tapir
opaque seal
#

But it's just ignoring my style

opaque seal
boreal iron
# opaque seal yes

Then remove the previous !important for the selector p to test if that works

opaque seal
#

neverapplied any style to p other than the one in the screenshot

boreal iron
#

and/or after as well

#

okay if you never did where's the 1em on the margin coming from?

opaque seal
#

it's default

boreal iron
#

"user agent stylesheet" wtf... does your browser overwrite this

opaque seal
#

uh

#

I think so

#

Idk

#

I'm using chrome

boreal iron
#

Try another browser, please

#

That's really strange, never saw that before

#

The external style sheet should overwrite the browser ones

opaque seal
#

Tried safari, same shit

boreal iron
#

Clear the cash by using SHIFT + F5 or CTRL + F5

#

not sure what Chrome uses

last tapir
opaque seal
#

Seems like they removed it?

opaque seal
#

How are you modifying it?

boreal iron
opaque seal
#

uhmm

boreal iron
#

Then why making it more complicated than needed?

#

You can use the .bot property of the member object

pale vessel
#

your grammar is all over the place today

boreal iron
#

To see if it's a bot or not

pale vessel
#

Ah, of course, because you're driving, right?

boreal iron
#

huh nope, not right now#

#

it's hot, just too hot

slender thistle
#

Don't hit a tree while walking

boreal iron
#

shh.. I'm more worried about street signs

slender thistle
#

Kekw

solemn latch
#

walking and texting should be illegal, you could run into something!

boreal iron
#

If you wanna go on cyber bullying me, I'm gonna call the police - be warned

opaque seal
#

It makes no sense, I've put the code in my global style.css and it works @boreal iron

#

Β―_(ツ)_/Β―

boreal iron
#

Hmm... way haven't you done this anyways?

opaque seal
#

Cause it has never been needed

#

And it still shouldn't be needed

boreal iron
#

shouldn't yeah, it's weird as I said

#

never saw that one before

opal plank
stiff lynx
#

a good embed pages package?

solemn latch
#

honestly, imo they all kinda are meh.

feral aspen
#

Is it possible to map only the first three indexes of an array?

solemn latch
#

slice the first 3, then map

opaque seal
opaque seal
boreal iron
#

(every day)

stiff lynx
opaque seal
#

yep

solemn latch
#

personally, thats what I did.

opaque seal
stiff lynx
solemn latch
#

a lot of the libraries refuse to work without manage messages, which can be against our rules(especially for help commands).
or they are not really designed for bots in many servers, or are just inefficient in their programming.

lavish bramble
#
const client = require("../index")

client.on('ready', () => {
	console.log("I'm ready To GO!");
	console.log(
		`Logged in as ${client.user.username}. Ready on ${
			client.guilds.cache.size
		} servers, for a total of ${client.users.cache.size} users`
	);
	const activities = [
		`with ${client.guilds.cache.size} servers!`,
		`Coded by Dreams!`,
		'I m ready To Play with you.',
		`with ${client.users.cache.size} users!`
	];

	let i = 0;
	setInterval(
		() =>
			client.user.setActivity(
				`$help | ${activities[i++ % activities.length]}`,
				{ type: 'PLAYING' }
			),
		5000
	)
})```
#

This is not working

stiff lynx
opaque seal
stiff lynx
opaque seal
#

There is a bunch of stuff that you should ignore, just look at the reaction listener

#

You can close that reaction listener after a specified amount of time via the { time: 600000 } argument but I've set that to 10 minutes and then I have this while loop

let keepAlive = true
      while (keepAlive) {
        if (!lastUpdate)
          keepAlive = false

        await sleep(30000)

        if (Date.now() - lastUpdate >= 120000) {
          keepAlive = false
          rListener.stop()
        }
      }

which checks every 2 minutes if the embed paginator has been used, if it hasn't it stops the listener

solemn latch
#

πŸ‘€ i like it

opaque seal
#

You can remove the while loop and just set a fixed time

opaque seal
stiff lynx
#

looking at the code made by someone else, is so hard πŸ‘Ό

#

but, thank you so much

solemn latch
#

its part of being a developer

stiff lynx
stiff lynx
opaque seal
#

yeah an old version

#

I rewrote it in kotlin a few months ago

#

much better now hehe

stiff lynx
opaque seal
#

yes

#

just one

stiff lynx
#

I dont know where to put my test, is ||maybe|| the last thing, because I see u have and array of 'changelogs', what is inside that array?

#

|| @opaque seal ||

lyric mountain
#

why are you storing changelogs in the code?

#

better yet, why are you even storing changelogs?

#

don't u use git?

opaque seal
#

just save them in the db

#

so I can access them from the bot api

lyric mountain
#

you code without git?

opaque seal
lyric mountain
#

except you don't waste db space

opaque seal
stiff lynx
lyric mountain
#

I'm not a good copy-paster
and shouldn't be

opaque seal
opaque seal
opaque seal
lyric mountain
#

oh ho ho it's not

opaque seal
#

And I don't depend on something external

opaque seal
#

the db is localhost

lyric mountain
#

the .git folder literally has the commit history in it

opaque seal
#

git is not

lyric mountain
#

it is

#

github is not

#

git is local

opaque seal
lyric mountain
#

commits have the comment next to them

opaque seal
#

it would be like git releases

lyric mountain
#

well, to each its own I guess

opaque seal
#

I would need to fetch the releases from github

lyric mountain
#

fetch once and store in an array

#

only 1 op

opaque seal
#

whart?

#

fetch 1?

#

why

#

I need them all

lyric mountain
#

sigh

#

fetch ONCE not ONE

opaque seal
#

why not having them in the db at that point lol

#

you still have them locally that way

lyric mountain
#

scalability

#

it'll reach a time when it'll not be local anymore

#

and the data will be huge

opaque seal
lyric mountain
#

like, for each release you'll have more and more data to store, which will be in a quite big field since changelogs get lengthy sometimes

solemn latch
#

πŸ‘€

opaque seal
#

it's literally just text

#

and not much

#

there is more data in the settings for a guild than the changelogs

lyric mountain
#

the issue is the field being large tbh

#

like, it's better many small fields than one big fat field

solemn latch
#

well that depends doesnt it?

opaque seal
solemn latch
#

having a ton of small fields can increase index sizing dramatically.

opaque seal
#

what do you mean with field

lyric mountain
#

column

opaque seal
#

I'm using mongodb

#

I just have a collection with a document x changelog

lyric mountain
lyric mountain
opaque seal
#

what are you referring to

lyric mountain
#

attribute length

opaque seal
lyric mountain
#

there is, the data you store in it defines its length

opaque seal
#

changelog documents each have a version, title, description. array of changes and date, each in a different field

opaque seal
lyric mountain
#

description in this case, ain't it big data?

opaque seal
#

and at the end of the day mongodb is basically json

opaque seal
#

I don't write much

#

Usually

lyric mountain
#

it's basically patch notes then

opaque seal
#

idk

#

it's "new features"

#

and bug fixes

#

kinda everything

lyric mountain
#

ah, they aren't too detailed

#

that's fine then

opaque seal
#

even if they were that wouldn't be much of an issue weirdsip

lyric mountain
#

they would due to per-row size

#

fetch times would hugely increase

opaque seal
#

are you sure about that in mongodb

lyric mountain
#

and since the data has to be parsed from json to and object, it'd also mean huge per-object sizes

opaque seal
#

Also, I never fetch a single changelog

lyric mountain
#

I don't know how mongo names stuff

opaque seal
#

but does mongo have that same issue

#

as sql

#

?

lyric mountain
#

yes

#

that's a data-related issue