#development
1 messages · Page 1156 of 1
how's discord any better?
-needdev @earnest phoenix
I’ve watched so many YouTube videos on people getting scammed
@earnest phoenix
DBL is not a place to find developers for jobs. You can try and put a request on Fiverr or Freelancer. Please do not post the request again. Doing so may result in punishment.
dont ask here please
Hm
Fiverr/freelancer has systems in place to protect buyers and sellers
👀 yeah listen to these kind people here, they know what they're on about lol
discord doesnt even support that
@sinful belfry Fivver is full of scammers
doesnt mean you should come here
I’ve watched so many YouTube videos on it
probs faked
Fiverr/freelancer has systems in place to protect buyers and sellers

there are scammers everywhere, asking people on discord to do it for you wont make anything better
bruh
Verified bot dev has nothing to do with anything...
So I shall n if u don’t like ist don’t pay attention
there are legit people who copy paste pre-made bots and get verified roles
do you have the smallest hint of idea how little coding knownledge you need to get the role?
It doesnt mean someone is a good source for a bot, especially if you pay them
Yes it is
Because I can use these people as a middle man because they can add the bot here n they can test commands 😂
N shit
the badge is what's worth more than the role
not even the badge
discord showed interest already into having a bot marketplace

nah the role sucks
a. You can get into a Team and do absolutely no work whatsoever for that badge
b. Copied bots, discord doesnt check your source code, only ask you general questions.
lol
you could prob fake growth till you hit 75 servers and simply submit verification if the servers its in arent empty with 3 or 4 people in it
badges dont mean shit
¯_(ツ)_/¯
Me: is anyone looking for commissions
You people: ur not allowed to do that here blah blah
Mods: 
should probably ask for a portifolio or work recommendations/history if you properly need that
wait, I think they actually trying to do against people who make sloppy bots only to get the badged. At least they said that, so I am sure that they are doing more then just reading the comments.
they cant do anything about it tho pang
they dont check the source code
they only check metrics and ask general questions about what you store as far as data goes
@sinful belfry I know for a fact @misty sigil Takes commissions from people here
@earnest phoenix maybe... don't cause drama here
you already know that this isn't a place to hire devs
if you have a problem with fiver, then consider looking for other sites
Uh yes
LOL
lol
yikes
@earnest phoenix seriously???
This kid lol
Matt, you up for script for money?
nah
here we go again....
not anymore
Its a serious thing not this kids stuff
I think i will soon after you stop me
rip channel topic
lel i got more money so i dont need even more 
Whats the "script" supposed to do, lmao
gib mi môney
Fun is over guys, continue back to your normal conversations 
Tim does commissions confirmed 
Imagine not doing commissions (Apart from just helping with a code snippet)
Exactly
imagine working
Well, I have a dc community and a few weeks ago we make a Nitro giveaway, the thing is that we make the people invite my bot to "ad" the bot, but people just build like 20 fake servers so... I need something to kick my bot out of there
So i can fix the verify issue
just get the ID's of them
Check for guild membercount and owner ID I guess
wait
Im reading about something a support member send yet
is this discord.js?
y
If you have like 10 servers with 2 members all owned by X user
check the guild's creation date as well
Easy leave
Yeah, im taking all the guilds my bot is in
do you know the IDs of the servers?
and now im trying to filter if the owner is the same
Just wanted to pay cause im working on something, sadly
Do I smell ads
i don't have that on this acc
ey! im proud of my free nitro, its the ultimate meme
Just have Nitro lol
clearly any bot that does that is trustworthy
bold to assume i have money for that
specially with currency exchange prices rn
Well, any1 can hook me up?
fair
ok brb
Kick my bot from the servers with the same owner, if it finds 5 or more servers with the same owner leave them
its djs yes
for (g of cache) {
if(owner) g.leave()
}

no more big emojis
Interesting
indeed, ty bro
thats a general gist of what i mean
idk why i gifted
@ionic dawn that isn't really that hard, just filter through <Guild>.ownerID
Not really enough to ask money for imo
But we're not gonna spoonfeed either 
(message.guild.member(guild.owner) )? bot.guilds.cache.get('guildID').leave() : null
not quite
How much then 

buy thy spoon
Well, imma drink something and try it this night, i'll let you know if I need something
Well
aaee
I'll be going to bed in like now so that would be tomorrow then™️

its prob 8 or 9 lines max
Yeah
really?
yeah
I was thnking about something complicated
like TImo said, i wont spoonfeed, but this is the gist
don't spoonfeed
for (g of cache) {
if(owner) g.leave()
}
with teorical info its enough, I appreciate the info
support also give me stuff to read about guilds
idk which lib you on tho
djs
A simple line like this already gives all the guild IDs X user owns
<Client>.guilds.cache.filter(guild => guild.ownerID === "the user ID you want to check");
(message.guild.member(arrayWithOwners.includes(guild.owner.toSrging()) ? bot.guilds.cache.get('guildID').leave(): console.log("legit");
@opal plank I dont have my ide open, but what is missing if you say not quite? It kinda looks ok to me.
oh
ok
I mean if you're leaving the guilds, no need to filter it then loop it again
you can do it in one loop
reduce() or a for() prob work better in this case
@midnight blaze that'd only run per message
if you have 20 servers and they all inactive(spam server) i doubt you'll get messages in them
bad idea to run it that way
I am just using message, because most people are used to that event
its better to loop the guilds cache
works? yes? good? no
like i said, if they are inactive spam server they might not even be sending messages there
so that command wont work and you'll still end up being in those 'empty' servers
Anyways I'm off to bed so have fun with this vo1d
@midnight blaze also that snippet up there prob wouldnt work.
guild.member() isnt a function afaik.
if you want member, access message.member
if you want the owner, the person sending the message isnt always that, so also not goo idea
if you want the owner you can access it via guild.ownerID
guild.member() is a function that resolves users to a member
Anyone have an array of Japanese/Korean words? Working on a typing test website
Otherwise I'll probably have to scrape a language learning website
that's a lot
Found the perfect site
hello euhm
how do I extract the string in this?
{ url: 'https://cdn.nekos.life/feed/feed_013.gif' }
Nekos.life returns a json response, just parse it
Google "how to parse json in X language"
@sweet ruin
How do I kick a specific user using eval with eval message.member.kick ? I've tried many different ways and have only managed to get it to kick me and me only lmao
cuz message.member brings the member who is the author of the message @earnest phoenix
you'd need to get the user you want from your users cache
or fetch em
when i list all my commands with help why does it put two commas on the first item
https://cdn.discordapp.com/attachments/272764566411149314/744328837759762573/unknown.png
^
ill paste
we dont read minds
Args-info? I have that command, and it has a loophole
module.exports = {
name: 'help',
description: 'List all of my commands or info about a specific command.',
aliases: ['commands'],
usage: '[command name]',
execute(message, args) {
const data = [];
const { commands } = message.client;
if (!args.length) {
data.push('Here\'s a list of all my commands:');
data.push(commands.map(command => command.name).join(', '));
data.push(`\nYou can send \`${prefix}help [command name]\` to get info on a specific command!`);
return message.author.send(data, { split: true })
.then(() => {
if (message.channel.type === 'dm') return;
message.reply('I\'ve sent you a DM with all my commands!');
})
.catch(error => {
console.error(`Could not send help DM to ${message.author.tag}.\n`, error);
message.reply('it seems like I can\'t DM you!');
});
}
const name = args[0].toLowerCase();
const command = commands.get(name) || commands.find(c => c.aliases && c.aliases.includes(name));
if (!command) {
return message.reply('that\'s not a valid command!');
}
data.push(`**Name:** ${command.name}`);
if (command.aliases) data.push(`**Aliases:** ${command.aliases.join(', ')}`);
if (command.description) data.push(`**Description:** ${command.description}`);
if (command.usage) data.push(`**Usage:** ${prefix}${command.name} ${command.usage}`);
data.push(`**Cooldown:** ${command.cooldown || 3} second(s)`);
message.channel.send(data, { split: true });
},
};`
Use hatebin if its big or proper formatting if you do @worthy glacier
wtf
use PASTEBIN
Use hatebin please
oh sorry
Not pastebin
why
why :(
https://hastebin.com/about.md
@worthy glacier
cuz it doesnt format
So anyways, how do I fetch them?
i like it :)
so use hastebin
m.m
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Users? No
Also r u like using discordjs.guied's template?
bc they ex[;ain the errrprs
if u r
yes i am following the discord.js guide
so you disabled cache? @earnest phoenix
ok
well discordjs.guide look at their github
you are joining your commands by comma, that bit is fine
shouldn't <Guild>.iconURL() give the specified guild icon?
yea but i dont understand why the first output has 2 commas after it
like attachment
like i were to put a gif
it would send a link of it
then show image
only thing i can think of is that args-info has comma in it @worthy glacier
i checked and it doesnt
check that command and see if you didnt accidently put comma in it
hmmm

im not sure actually, the code syntax seems fine
mind logging the commands and checking that?
oh my... i was with the "Test Bot", and the guild i was trying to get the icon from has no icon
imagine being that stupid

when i make a good cmd then realize i forgot to inv the bot
:(
im likce
WHY DOESNT BOT RESPOND
It still wont parse
pff imagine being me, having 2 bots and then trying to figure out why command isnt working till i eventually notice the beta branch isnt there
var testt = await JSON.parse(nekooo.sfw.feed())```
mind logging the commands and checking that?
@opal plank wym
@worthy glacier do console.log(commands) in the begginging
It still wont parse
@sweet ruin Is there an 'o' in ur file?
show me the json file
img
dont you need to await that nekooo?
oh. euhhh
or is that promise already resolved?
im assuming feed() is a fetch function
so you'd need to await that promise to resolve first
its like hug

{ url: 'https://cdn.nekos.life/feed/feed_013.gif' }
it is supposed to return this
but only the string
so I can use it as an image
you didnt
oh
there
do this then
let a = await nekooo.sfw.feed();
console.log(a)
var testt = JSON.parse(a)```
breakpoints would probably be best but that'll do for now
tell me the logged value
(node:38072) UnhandledPromiseRejectionWarning: SyntaxError: Unexpected token o in JSON at position 1
at JSON.parse (<anonymous>)
at Object.execute (C:\Users\CREEPA\Desktop\DukeBot\commands\actions\feed.js:23:23)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:38072) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:38072) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
you're trying to parse an object
oh
its already returned objectified
you already have the url and stuff so you probably can use it like that
no need to parse it
okay
then uehh
how do I get just the url and not the object part of it
cause it wont work as an image to an embed right now
howcome?
use it like you normally would. a.url would theoretically return the url
its either proxy fucked or you diong something wrong
@opal plank
you dont know how object works then
@worthy glacier hmmm 
yeah that bit is fine
i cant think of why it'd be doing those 2 commands tbh
actualy
yes i do
@worthy glacier
look at your second value
its undefined
ohh
trace where thats coming from
why is it throwing that
its joining undefined too
yea
well, now you gotta trace where that undefined is coming from
likely where you have your commands mapped
theyre mapping over the commands collection
well yeah that bit i know
but you need to see which command is turning into undefined
im willing to bet you probably including some file other than .js or some .js in the commands folder that isnt a module.export
likely that it doesnt have a name property in it
@worthy glacier
the fact that its undefined, {} (empty), leads me to believe it isnt even a module.export and something else entirely. if only name was missing it'd still put the whole export in the value field
oh wait i got it
i guess because i made a empty .js file at some point without any code in it
so that was wat was undefined
tysm @opal plank
how do you guys track how many servers your bot is in
in which library
cheers
if (command === 'test') {
client.commands.get('test').execute(message, args);
}
if (command === 'check') {
client.commands.get('check').execute(message, args);
}
This command handler works for the command test, but it does not work for check. test and check both are files, but test only works. It says that execute is not defined for the second one, but for the first the execute is a valid function. My terminal says this : TypeError: Cannot read property 'execute' of undefined
what's the point of having a command handler lookup if all you're doing is if checks in the end
anyways
get(...) returned undefined
It does not work
that seems like a you problem
COMe on
I am just trying to get some code
pay for it
So if I get the webhook like the following example, how would I check the ID of the guild in which the webhook is.
const webhook = new Discord.WebhookClient(ID, Token);
@earnest phoenix i can't help you more other than tell you that get(...) returned undefined, like the error says so, make sure you added the commands properly to your collection and get rid of that ugly if
you can get guild id too
can you?
yes but is that from a webhook client
guildID is a nullable field meaning it's only available to other entities (bots/users)
if you fetch the info about the webhook from the webhook itself it will not return the guild id
nevermind
it's returned
don't know why it's nullable??
🤔
Thanks
you did not fetch the info
Ohh yeah that would make sense
https://discord.js.org/#/docs/main/stable/class/Client?scrollTo=fetchWebhook
Ohh perfect 🙂 Thank you
so you disabled cache? @Floof
@opal plank
I don't even know how that works, or what it is. So I'm assuming no.
Shouldn't this return the username? or the user have to be in the guild?
<Client>.users.fetch('THE USER ID').username
resolve the promise first
use await
await (<Client>.users.fetch('THE USER ID')).username
How do I kick a specific user using eval with
eval message.member.kick? I've tried many different ways and have only managed to get it to kick me and me only lmao
you'd need to get the user you want from your users cache
or fetch em
So anyways, how do I fetch them?
Uh
assuming the member is in cache, you can do guild.members.cache.get("id").kick()
if you don't have the id, use find(), cache.find(x => x.user.username == "something") e.g.
So I replace id with their userid?
yeah
Thank
How do I make a bot
You need to use a programming language in order to do so @viral igloo
@pale vessel
ReferenceError: guild is not defined
at eval (eval at execute (/root/bot/commands/eval.js:11:37), <anonymous>👍1)
at Object.execute (/root/bot/commands/eval.js:11:37)
at Client.client.on (/root/bot/index.js:28:38)
at Client.emit (events.js:198:13)
at MessageCreateAction.handle (/root/bot/node_modules/discord.js/src/client/actions/MessageCreate.js:31:14)
at Object.module.exports [as MESSAGE_CREATE] (/root/bot/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (/root/bot/node_modules/discord.js/src/client/websocket/WebSocketManager.js:386:31)
at WebSocketShard.onPacket (/root/bot/node_modules/discord.js/src/client/websocket/WebSocketShard.js:436:22)
at WebSocketShard.onMessage (/root/bot/node_modules/discord.js/src/client/websocket/WebSocketShard.js:293:10)
at WebSocket.onMessage (/root/bot/node_modules/ws/lib/event-target.js:120:16)

Different languages are used for different things, but most common ones can be made to create a Discord bot, I'd suggest researching the differences in each language, in case you decide to use them to make a website for the bot in the future, or other projects @viral igloo
Yea I know
define guild if it's not defined 
Lol how
What I evaluated
a what
what guild?
Uhh i will check it out
if you want to get the current guild, use <message>.guild
Where do I go to create
guild by itself isn't useful
O
so i have a problem with ejs
Where do I go to create one
so yeah, pseudo code
so Im looping through the user's guilds and im checking if they have permission for the guild or not
const permsOnGuild = new perms(guild.permissions);
if(!permsOnGuild.has("MANAGE_GUILD")) return;```
but perms isnt a constructor
I believe it was in v11
with ejs
what's perms
Where do I go to create one
@viral igloo #502193464054644737
@pale vessel ReferenceError: members is not defined
at eval (eval at execute (/root/bot/commands/eval.js:11:37), <anonymous>👍1)
at Object.execute (/root/bot/commands/eval.js:11:37)
at Client.client.on (/root/bot/index.js:28:38)
at Client.emit (events.js:198:13)
at MessageCreateAction.handle (/root/bot/node_modules/discord.js/src/client/actions/MessageCreate.js:31:14)
at Object.module.exports [as MESSAGE_CREATE] (/root/bot/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (/root/bot/node_modules/discord.js/src/client/websocket/WebSocketManager.js:386:31)
at WebSocketShard.onPacket (/root/bot/node_modules/discord.js/src/client/websocket/WebSocketShard.js:436:22)
at WebSocketShard.onMessage (/root/bot/node_modules/discord.js/src/client/websocket/WebSocketShard.js:293:10)
at WebSocket.onMessage (/root/bot/node_modules/ws/lib/event-target.js:120:16)
\eval members.cache.get("606986514509070423").kick()
<Guild>.members
you need guild
Shit, my ass be overlooking shit
@pale vessel wdym whats perms
im trying to loop for every guild to see if the user has manage guild or not
what did you define it as?
let me check
@pale vessel 
async function gUser(){
let uName = await client.users.fetch('USERID').username
return uName
}
@ionic dawn (await client.users.fetch()).username
but how can i check
if user
has perms in server or not
by looping through all the guilds
your code should work though
also tried but still returning undefined/[object Promise]
guild.permissions is a bitfield right?
let me check
<Guild>.member()
@ionic dawn what's your code
yeah its a bitfield
i read about it on stackoverflow and im doing the right thing but is not showin anythin
literally the code i send
so js const {Permissions} = require("discord.js"); const perms = new Permissions (bitfield); perms.has(); should work
kk
<Guild>.member()
kk
um
why are u catching members
from client
wouldnt you want to catch it from the guild
ye
okay and now by some reason is printin on console but returns [object Promise] at embed, do I have to send the embed inside the async?
or you can just do client.guilds.cache.get().member()
using the user object but it's whatever
@ionic dawn can u send ur whole code
it's the same thing
do you not have that guild cached?
is this code in an event ?
its ejs
oh
i was assuming its d.js
ic
ejs not my area, though they are similar
yeah thats why i thought it would work
yea i thought it was discord.js too sorry
i mean it is
ejs for dashboard
ERIS .js or DISCORD.js?
d.js for client
eris ?
ejs, embedded JavaScript
ohhhhhhh
ejs is a language
yeah ejs is not a discord lib
i though you meant ejs as ERIS
lmao
^
eris is another js library for discord
if its d.js
then log guild.id
im assume its undefined
cache.get(undefined)...
funny how neither give you complete REST interaction, eris is more open with REST though
like #development message ?
idk how you running that code r how you defining guild.id
k
yeah flazepe, but that's a thing that both libraries allow
some endpoints are just straight up not exposed
so it gives me a list
just fetch with bot token
thats why
not a problem
no its defined
you cant use a list on a get()
it uses a string
and i'm pretty sure you have to be logged in to the gateway in both eris and djs to use REST which is dumb lol
Reee
cry you don't
my english
oh?
its logging per then?
fetch(endpoint, { headers: { Authorization: "Bot TOKEN" } }); should do
dont even bother, its definetly string
it is
fetch(endpoint, { headers: { Authorization: "Bot TOKEN" } });should do
@pale vessel keep in mind this is not ratelimit safe
user.guilds.forEach(guild => {
let a = client.guilds.cache.get(guild.id)
console.log(a)
try that
bot.guilds.cache.get
not sure i'm not fluent in either of the libraries, what i know is just straight up from the docs
but ok
show the full log on the right side
??
you wont have access to the user guilds you are not in, so you SHOULD have the guild
OH
you fetching it with auth arent you?
you mentioned ejs
;-;
but he can still use client
you likely getting those guilds from an auth, thats why some guilds arent cached
WHERE is your user guilds coming from?
no
oh
if you getting the user guilds frmo client, it should only return shared guilds, which you HAVE cache
from oauth
what
they must be getting from auth like i said flaz
how did you resolve those to a guild-
thats only way you can access non-shared guilds
then yes, since its not coming from cache, check with if(a) like you doing @glossy elk
since it might return a guild that you arent in
from auth you get the user guild ids flaz
depending on your scope
OH
the user.guilds isnt coming from client/message, its returning from oauth
if it was from client,yeah, you must have the guild cached
which we are
its supposed to return
if(!a.member(user.id).permissions.has('MANAGE_GUILD')) return;
but its still showing the guilds
yeah but he used the client to get the guilds, which the user could potentially not be in it, right? am i understanding this correctly
did you check userid aswell @glossy elk ?
ok wait
so i made it check if they do have manage_guild
and if they do it will return
which worked
but if i check if they dont
bruh
well you still logging the guilds
its definetly not that snippet up there thats producing the console logs
also
is your user.id definetly defined?
i mean, it should
ok look
uwot
if they do have manage_guild
it supposed to show their guilds
if THEY DONT
it returns
so that didnt work
so i tried to check if THEY DO HAVE MANAGE_GUILD
and if they did
it returns and it doesnt show the guilds that they can manage
you need to loop the guilds first
is this oauth
so that worked
it is
so i tried to check if THEY DO HAVE MANAGE_GUILD
and if they did
it returns and it doesnt show the guilds that they can manage```
that worked
why are you going through so much effort
then why not just use rest
it doesnt show the guilds they can manage
filter
omg
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
just return the guilds they can
see that link
user.guilds.forEach(guild => {
let a = bot.guilds.cache.get(guild.id)
if(a) {
if(a.member(user.id).permissions.has('MANAGE_GUILD')) return;
}
this worked
THIS WORKED
this made it so that they cant see the guilds that they can manage
working on something, trying to figure out how to do a config.json file with "guildWelcome":"enabled" as a thing, but it says it is undefined. can anyone help?
user.guilds.forEach(guild => {
let a = bot.guilds.cache.get(guild.id)
if(a) {
if(!a.member(user.id).permissions.has('MANAGE_GUILD')) return;
}
this didnt work
that's a dumb solution
all i did was add a !
you're wasting processing power and the member needs to be cached/you need to fetch the member for it to succeed
see the url i sent
why you not checking instead?
an endpoint to get partial user guilds exists and it returns their permissions in the guild
user.guilds.forEach(guild => {
let a = bot.guilds.cache.get(guild.id)
if(a) {
if(a.member(user.id).permissions.has('MANAGE_GUILD')) return a;
}
an endpoint to get partial user guilds exists and it returns their permissions in the guild
@earnest phoenix
stop ignoring me
what you're doing right now is really bad lol
try what cry is saying
that they can manage
thats not how return works
but it did
how many times do i have to tell you to abandon the approach you're trying to do
okay go on
hit this endpoint https://discord.com/developers/docs/resources/user#get-current-user-guilds
it returns an array of partial guilds
partial guilds contain the user permissions in the guild
using bitwise operations (on the permissions field) you can check if the user has the permission
take note of this Requires the guilds OAuth2 scope.
guys i try to commit my files to github but this happen, anyone knows how fix it?
can anyone help? getting a syntax error but i don't know why
it seems to be with the :
why tf are you using strings
just use booleans which already represent on/off state
what are booleans
||ik what they are||
a bolean
true/false
true/false
aka true and false
if you didnt know
#development message well so?
you didn't pull changes @dire obsidian
let me
@karmic compass show code
stash your current changes
so you don't lose them when pulling
or fetch and do a merge
this gonna look weird out of context
guildwellcome: true,
welcome*
@dire obsidian cough cough
const misterConfig = require('misterSettings.json')
register("chat", function(guildMember) {
if(misterConfig.guildWelcomeOn == true) {
const guildMembers = guildMember.replace(/&./g, '')
const guildMsgs = [
`Welcome back ${guildMembers}!`,
`Oh hey ${guildMembers}, how are you?`,
`Doin good ${guildMembers}?`
]
const theActMsg = guildMsgs[Math.floor(Math.random()*guildMsgs.length)]
ChatLib.command(`gc ${theActMsg}`)
} else {
return
}
})
``` for the main file
while we're at it, avoid using json as a database altogether
omg
^ this
MisterConfig
STOP
@opal plank what
if(somethin == true)
and in the json file i have ```json
{
"guildWelcomeOn":true
}
NO
Nice variable name
if(thing) //do stuff
lel
not if(this == true) //do stuff
yw
LOL

but why
he was matching against a string before
still bothers the fuck out of me to do that
lmaooooooo
you don't have to check if a boolean variable is true or false, it IS either true or false
ye

when it gets interpreted it literally gets interpreted as if(bool === true) anyways 
and !variable == false
bad
if (someTrueBool) is the same as if(soemTrueBool == true), just slower since there is an extra comparison
okay sdo i still have the error
post the new error
its the same as before
there is an unnecessary conditional comparison
"guildWelcomeOn":true
/
|
if(bool) gets interpreted as if(bool == state) regardless of what approach you use
just return if its not on
hm
if (!condition) return;
are you sure misterConfig has that property in it?
and how you attaching it?
actually
just log it
how about you don't use json as a database
{
"guildWelcomeOn":true
}
easy solution, i know
well so?
that looks like config not dataase
making a mc mod type thing
ye
its a config file
eventually im going to upgrade to a different one but for not
o
i want to test out using json
log that before that command
log what?
console.log(misterconfig)
kk
see what the property guildWelcomeOn is
const permsOnGuild = new perms(guild.permissions);
if(!permsOnGuild.has("MANAGE_GUILD")) return;
perms is not a constructor
indeed
what did you define perms as
its likely a function
its not a function
constructors usually starts with UpperCase
you can define those
just what is perms
what the fuck
check

ok so
that's that i suspected
are making your code slower
but i'm not so sure
i tried to log it
you don't need to do that
just use 1 << 5 or something
const perms = Discord.EvaluatedPermissions;
1 << 5 is manage guild iirc
can't you just perms & 1 << 5?
did it on seperate file (one wouldn't let me run properly)
no error there
wait i need to see the one for manage guild
0x00000020
that ^
so i logged it above i cant find anything wrong
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
all perms listed here fyi
git merge
gotta pull and merge before pushing
^
0x00000020 is 1 << 5
yeah i got confused on which field the manage guild perm was
hey uh
i refer here since it's easier to read
anyone there?
did it on seperate file (one wouldn't let me run properly)
@karmic compass
if you dont show code we can a=only assume
I'm not there
how you importing it?
the settings?
how you reading the file
either post the code or the snippet for us to see
also the error
saying its error'ing doesnt hlep us at all
const misterConfig = require('./misterSettings.json')
also the error is the exact same, with the colon.
post it here pls
what do you mean you cant?? just use your electric boogaloo magic to see whats on my screen!
js: "file:/C:/Users/email/AppData/Roaming/.minecraft/config/ChatTriggers/modules/mistermod/misterSettings.json", line 2: syntax error
js: "guildWelcomeOn":true
js: ....................^
line two is the setting
WHOLE error pls
oh its displayed there
dont cut it
that is
you more than likely have an extra invis char there
just use & @glossy elk
hmm
A module that makes logs worse?

Where can I get it
its a minecraft mod
i think they're scripting for a mod
ik so bad
lol
Ah
using javascript with java loader
its with the JSON not the one that actually does things
bold
can yall help me
i wonder
html









