#development
1 messages Β· Page 1783 of 1
that is the "safest" place to delete your data
or no
um.... so i can make it for mod only to use snipe ok?
like js -Applications -Library -opt -Previous System -System -Users -vm i can move all those folders into my hard drive?
or nahhh
You have the executor's consent, but what about the content from the user (that user's consent)?
Not sure why the files aren't there.. new to github and I'm trying to get the files in the github.
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.
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
Oh, how can I remove the master and put it on main instead?
you didn't set master
I just became aware. π
can i delete the folder Previous System thats in my mactonish?
How can I delete the master branch and push the files to the main instead?
main is the new master
GitHub gave it a new name
I know.. I made two branches main and master
I am trying to delete master to consider my main as the master.
and one more thing
You gotta do
git pull before you push
I don't know what that folder is nor what you're really trying to do with it.
im tryna clear space in my mactonish
what should i NOT delete in my mactonish
so i know what to avoid
git branch -d Will delete a branch
IDK if it works for main / master
The rule of thumb is:
- Search on Google for more information
- If you know you can safely delete something, do so. Else, leave it alone.
git pull
git push
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'.
what does it show when you do
git status
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
.. but how can I push my files to that?
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
Now whom should i trust????
okokok
Can anyone give me the code for server webhook if voted it will give role if not it dosent
No
Uhhh
I used killall node, refresh and node index.js
But my bot still replies twice
@spark blade is it only the one command or does everything your bot do happen twice
Discord.js
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?
not light or anything?
No
just regular right
iw as having same issue but fixed it earlier
How
how do u excute commands
Glob Command handling
can u send ya command handler
and do you run ```js
const Discord = require('discord.js');
{'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}}
oop
@quiet pawn can u help pls
ita how much memory is free on its vps
or whatever use
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
anyone can help me
i am not able to figure out how much memory is available for use. from that output
mine worked before also it was kinda random
i used a diferent way tho
ill show u how i excute commands
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
try using statcord
So you using ```js
if (command === "cmd") {}
Right?
yea
Well i use cmds/cmd.js
o wait
there ya go
its really good for tracking usuage
and member and server groith
ill send u one of my commands as example
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: '',
}
}
});
}
}
ty
thats one of my help commands
As i remember it happened one day after making my music cmds
np ofcourse
Thats cmds/cmd.js
And why using embed instead of MessageEmbed?
i like embed more
hey how do I make the server count widget work for my bot?
?
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
It got fixed now
Everything was thanks to that package
anyone?
Anyone Here use DBFD?
ofcourse
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)
@mild agate
nope
Why :(
ask Nekomaki#0001

are you 5yrs old?
Ehhh
Oh
in that case erwin always breaks rule 5.d lmao
Sorry
...Oh ._."
?
δΉ( β’_β’ )γ
why did you ping me, also, move to either #general or #general-int
Oh,it's for the reply sorry-
how to make the server count widget work?
42069% agree
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)
what is time
(time is an input gave from the user ex: 10m)
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
Found the problem
why don't you use a time library that does this for you, why reinvent the wheel
what is it?
so what could i do?
Did you mean time[:-1]
where?
by posting server count and copying the code of the widget
Wherever you use time[0]
python strings have a cool syntax for slicing?
Yeah
pog
You can use one of the Top.GG libraries for that: https://docs.top.gg/libraries/javascript/#posting-bot-stats
i was thinking of using a regexp to match the number part
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.
\d+(?>=[smh])
Regex 
isn't this deprecated ?
what can i do i love regexp too much
blame javascript.info for writing that awesome tutorial
Satan: I'm a huge fan
Latest commit was two weeks ago?
I thought the official docs moved to
https://topggjs.readthedocs.io/en/latest/
what could i do?
Get the number from the string smh
...
Does this not help you
idk what is it .-.
oh ok, ty
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
I see
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
BTW not any error
I'm using repl
const client = new Discord.Client() // Your discord.js or eris client (or djs ShardingManager)
const { AutoPoster } = require('topgg-autoposter')
const ap = AutoPoster('Your Top.gg Token', client)
ap.on('posted', () => {
console.log('Posted stats to Top.gg!')
})```
This is all i need to do?
Yes just read the documentation, its very easy.
So there are a couple of if else statements in that code.
Do you have an error?
What is happening and what should happen?
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
He is using MANAGE_SERVER perms in that code.
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."
it's MANAGE_GUILD
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
That first if statement is not doing anything
there's an useless if statement there
it works but it's not doing anything...
so confidently incorrect
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
those are two if statements, we're talking about the first one
ofc it does
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
the ignorance
lol
> Kick
> member.ban()
the if statement does nothing
ik im lazy
but it works 
because they most likely don't know what they're doing lmao

well it stops people from using the command without the perm so idc
Once you realize what we're talking about you'll feel kinda dumb
if (message.member.guild.me.hasPermission("BAN_MEMBERS", "ADMINISTRATOR")) what do you think this line of code does?
well there you go
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...
tehre
the video
the fact it came from a yt video doesn't mean it's correct, yk
ofc it does
PolyMatter was right
so i could careless
omg
1 sec
it doesn't stop them

Remove all your bot's permissions and then try to use the command and see what happens 
thanks
no problem
@cinder patio https://nuggetbot-xyz.is-fun.xyz/grdXp9kR_
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");
lol
the first if statement is useless you brickhead, it fucking works because the rest of the code works normally without it
The code should error if the bot doesn't have the required permission tho
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
we're talking about kick's code here because that's what you showed us
like with perms
show ban too
the first if statement is useless
wait wait wait don't test the command with your alt which doesn't have any perms, give your alt the needed perms and remove all of the bot's perms
ill just use main its serverowner
bc that if statement does the same as a cockroach in a fucking car dealership
answer this
lel
thats interesting
i've never done that before
taken away the perms
it didnt ban them
btw
you didn't await the method
my guy doesn't know the basics of an if statement
nah it's cause the bot doesn't have the needed permissions
i just dont check things
oh i thought they had a try catch
im lazy
PolyMatter was right
bruh nope it was an if else
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

this whole convo just shows that PolyMatter was right all along
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


you don't need to be so stubborn when someone tells you something you're doing is wrong
yk what imma do it later its 4:20 am and im not doign this
im tired
still
sorry for not letting you explain
lieki said before i dont deal with stuff unless its like
serouise
like crashing bot
lol
i gotta get out that habit
yeah
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]}`);
});
});
}
}
Bro use code blocks π€£
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 wadipls help
Yes?
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
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
ooh
ok
i want too add adminstartion then ?
@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
ooh
It takes 4 or more weeks for bots to be reviewed atm π
uh okay, thank you for answer...
Well ur using client
So change it to client
R u using async or rewrite
Ok nvm i see rewrite
how toowrite ?
You've initialised as client so use client instead of bot
tell like this i will paste
yes
ok
like this
@client.command(Adminstration)
@has_permissions(Adminstration=True)
Who even uses async anymore is my question LMFAO
Administration has to be in a string
What the fuck are you doing there and did you read the docs
Those who follow youtube tutorials π
Doesn't the decorator accept kwargs only
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
Do ppl not know what code blocks are smh
They don't
console.log("this looks better lmfao");
You know what I'm surprised about
You literally use typehints
Yet you can't be bothered to read discord.py docs
@silk wadican i can send you the invite link of my bot code you pls correct my error ?
Oh dear God
No its ok
it's administrator btw
U wouldnt learn otherwise
ok
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
its not working
I've tried also reconlx pscjage
a good embed pages for discord.js?
What the fuck are you doing
Your mother
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
async def xyz special summon
foobarxyz
Use "async def end(ctx, error):"
And async def start
Not "End, Start"
Where do you see that?
And how do you see how many users use your bot?
You have the Early Verified Developer badge 
@wide wharf on my bot's stats page
tons of people use my bot
https://triviabot.co.uk/botstats <- complete stats page is there
^^
how do i see? i record stats to a db
bot.users.cache.size or client.users.cache.size
im not able to count users via cache any more
what do you use then??
the guild member_count value, with a modifier
oh
k thx
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
ahh
what-
:/
imagine hosting on windows π
xD
I have unlimited RAM my server says... 
Only had a windows server
ikr
unlimited what :/
memory
how does that work even :/

he downloaded more ram
or server
DownloadMoreRAM.com - CloudRAM 2.0

;_;
uh what?

"This isn't a scam, there isn't a virus, it's just a joke website. Made in jest, keep smiling"
683 GB :O
I have unlimited 
lol
You host on VPS or Server??
VPS is Server
VPS is Virtuell Private server
No!
Best example is the human stupidity.
Not anything is limited 
xD
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
pillow should work fine
Thanks π I'll give it a go
who can help me :/
no one can help until you ask a question ^_^
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 :/
Bruh
:/ all commands are working properly accept this one :/ i wake whole night to solve this one but still i can
Me trying to understand this
lol
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
are you actually sure that the user is banned? Because that code looks like it should be ok, according to the discord.js docs.
or even better send the wholw file
google offered unlimited storage, but companies abused it and uploaded stupid amount of data, like 1-4 PB worth of data
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
recursive wget
yes that is my business account and still in ban list
see
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
I'm going crazy can someone help me understand what's wrong with my css in vc?
maybe do console.log(bans) to check whether or not it displays a proper collection with 1 entry and whether that entry is the one you expect. Because that really should work.
hash
??
What do you mean?
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
Like, what am I supposed to be hashing?
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
Anyone?
you could instead show pictures and ask the issue on the chat
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
you mean the margin or the distance from the page border?
that's just because of flex
flex-grow: 1 with flex-direction: column will stretch the div vertically
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
not necessarily
it'll stretch to the parent's height
not the page's height
I removed the flex grow and it's still the same
because flex-grow is by default 1
See <number>. Negative values are invalid. Defaults to 0.\
How can i do anti bot system in my bot
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
a thing you could do is using inspect element to try to fix it
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
why, nextjs doesnt support const enum for ts??
Guys is it possible for displaying my bot server count and user count in my website?
yes (MAYBE for the latter)
help.
oh
for that you need to create a connection between your bot and your site
something like an API or websocket
Oh
I said maybe for the latter because unless you're willing to api abuse, getting 100% of all members is nier impossible
Oh ok
anti-bot or anti-selfbot?
Anti bot
just check if user.bot is true
Menas stop adding bot in the server
But inviter name too
So I can punish him/her
for that you'd need to track votes
there're discord.js tutorials for that out there
Votes?
invites*
hi
Any yt link?
I have a question can I fetch it from Logs?
idk, give it a search
Bcz there was bot property in mod logs
Console where I mean before catch or after
console where bans is a defined variable
Ok
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
}
}
}
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.
u mean userID
your code, so whatever you have it currently defined as
this @junior gulch this only :/
this
yes
so your find() can't find it because "@junior gulch" is not identical to "813140000484098048"
(this as thing).someVal
:/ may lemme unban manually and check again
also hi evie
what about just giving the ID in your command and see if it works?
π© Ithink this would be alright
using classes works too
const hi = 'hi';
const object = { hi: hi };
Can I make it only { hi }.. and still works?
should I break the convention of first letter Uppercase for class
it say not a number if i gave numeric id without <@>
Hi @opal plank
plz lemee, I'm just gonna use it like an object
hi weeb
Well clearly something changed that when your arguments were processed/created, so I'd look at your command handler to see what the heck it's doing here.
i'd recommend u dont
but it would hv no instances
ok wait
Where would I save files so that I can access them from code in ts?
still tho, its just good practice to uppercase it, there would be no difference either way
help with this please
it sounds like you didnt even read my repo

you think it compiles config.json n shit?
do you think slappey is distrub the whole code by itself
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
@last tapir , yes you can.
But saving the files there is fine?
should be, yeah
yes bro
probably because a bug in ur code
u hv never told us. How do we know?
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
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
message.member.ban
thx
The author is just a user, I donβt think you can ban through that
Well yeah and that's not what I said
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
Oh nvm then mb
Because the direct message isn't a guild
Fucking autocorrect
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

How can I fix?
You could use the message.author.id or the member object to find the client in the list of guilds your bot is in
There's no other way than searching the client
The direct message channel has nothing to do with guilds at all
client.on("guildMemberAdd", async member => {
if(member.bot) return
const data = await member.guild.fetchAuditLogs()
const log = data.entries.find(l => l.action === "BOT_ADD")
console.log(log.executor.id)
client.users.cache.get(log.executor.id).send("WhyΒΏ")
})```
Bcz of this
Huh? I don't get what u wanna say to me.
When I use this then its giving me that error
I mean if I use this then its giving me
cannot read property type 'id'
Why are you checking the audit log anyways for the entry "BOT_ADD" ? @lavish bramble
Never heard about patience, hmm?
Just log the member obj
It should contain the guild if not (for some reason) try to fetch it
Does anyone know why my style for the p tag isn't getting applied?
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
It is. It's a display: block without margin. Means basically it acts like a normal div
it still has the margin-block-start and end as you can see from the inspector
Just use margin-left: 1em; in that case and it will work
const object = {
bugs: [
{
id: ""
}
]
}
console.log(object.bugs.id)
How can i make property id equal to the length of the array bugs
I don't want margin left
the margin-block-start/end is the orange space you see on top and bottom of the div
I wanna remove that
Why do you need the id property in the first place if it's just gonna be the index in the list
Then define a writing-mode
wha
can i just know how?
I jut wanna overwrite the property but it doesn't work, that's my issue, I don't wanna add anything else
When adding a new bug you just check the array size and you set that as the id in the new bug
Yeah got that. !important should have done that
Did you use an !important on the selector already?
(before)
i know, but is there a way to check the array size from id: here?
But it's just ignoring my style
What do you mean with "from", are you iterating over the array?
Then remove the previous !important for the selector p to test if that works
oh you ment before, no
neverapplied any style to p other than the one in the screenshot
and/or after as well
okay if you never did where's the 1em on the margin coming from?
it's default
"user agent stylesheet" wtf... does your browser overwrite this
Try another browser, please
That's really strange, never saw that before
The external style sheet should overwrite the browser ones
Tried safari, same shit
Open Chrome dev tools.
Click gear icon on bottom right.
In General section, check or uncheck "Show user agent styles".
Clear the cash by using SHIFT + F5 or CTRL + F5
not sure what Chrome uses
do you still know how i can set it as the value of id:
Seems like they removed it?
are you iterating the array?
How are you modifying it?
Well then I can't help you with that. It been overwritten by the user agent stylesheet for any reason
uhmm
I'm making anti-bot system
Then why making it more complicated than needed?
You can use the .bot property of the member object
your grammar is all over the place today
To see if it's a bot or not
Ah, of course, because you're driving, right?
Don't hit a tree while walking
shh.. I'm more worried about street signs
Kekw
walking and texting should be illegal, you could run into something!
I'm too lazy to edit those messages anyway... always got my joker arguing English isn't my main language hehe
If you wanna go on cyber bullying me, I'm gonna call the police - be warned

It makes no sense, I've put the code in my global style.css and it works @boreal iron
Β―_(γ)_/Β―
Hmm... way haven't you done this anyways?
im opposed to this. Im a man who highly encourages removing laws and danger labels. Let Natural Selection take its course
a good embed pages package?
honestly, imo they all kinda are meh.
Is it possible to map only the first three indexes of an array?
slice the first 3, then map
200iq
Let Natural Selection take its course
Yeah since rona isn't successful enough
I can still see tons of retards out there.
(every day)
I should code them from zero π
yep
personally, thats what I did.
what lang?
discord.js
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.
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
okay, then can u give me some clues?
sure I have to create the embeds, get the reaction. but I've looked in docs, in reaction there is delete and fetch, should I use one of them?
This is what I used in an old version of my bot https://hastebin.com/itomumelum.js
const cacheManager = require('../../core/cache/cacheManager')
what is this?
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
π i like it
You can remove the while loop and just set a fixed time
yep I think it's much better
its part of being a developer
ik ik
this code was for your bot changelog?
this code arent multiple embeds, It's just one that updates, right?
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 ||
why are you storing changelogs in the code?
better yet, why are you even storing changelogs?
don't u use git?
nah
just save them in the db
so I can access them from the bot api
you code without git?
I do use git
you can do the same with git smh
except you don't waste db space
it's irrelevant to your porpouse, all you need to understand is the logic of the paginator
It's harder than I thought, I'm not a good copy-paster. Where I put the fields for the 2 page for example
I'm not a good copy-paster
and shouldn't be
message.channel.send(bot.guilds.cache.map(g=> "Name: "+g.name +' ID: '+g.id+" Owner: "+g.owner.user.tag+""))
I have this code to send all guilds, the name id and owner name, h...
It's like a few kbs lol
thats more usefull
- it's faster with a db
oh ho ho it's not
And I don't depend on something external
the .git folder literally has the commit history in it
git is not
i don't want the commits
commits have the comment next to them
it would be like git releases
well, to each its own I guess
I would need to fetch the releases from github
why not having them in the db at that point lol
you still have them locally that way
scalability
it'll reach a time when it'll not be local anymore
and the data will be huge
explain that please
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
π
nah it wont be more than a few MBs lol
it's literally just text
and not much
there is more data in the settings for a guild than the changelogs
the issue is the field being large tbh
like, it's better many small fields than one big fat field
well that depends doesnt it?
field?
having a ton of small fields can increase index sizing dramatically.
what do you mean with field
column
yeah, both have pros and cons
attribute then
what are you referring to
attribute length
there is no large field, or attribute as you wanna call it
there is, the data you store in it defines its length
changelog documents each have a version, title, description. array of changes and date, each in a different field
but it's not all in one field
description in this case, ain't it big data?
and at the end of the day mongodb is basically json
nope
I don't write much
Usually
it's basically patch notes then
even if they were that wouldn't be much of an issue 
are you sure about that in mongodb
and since the data has to be parsed from json to and object, it'd also mean huge per-object sizes
Also, I never fetch a single changelog
bruh, just consider row = entry
I don't know how mongo names stuff




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


