#Xd chat commands are just more messy
1 messages · Page 1 of 1 (latest)
You see we humans kind of expect people not to be stupid and don't really test too many things lol
Ah then it's me that was just a psycho
so far
And insanely precisely wanted things to be done the way I want them xd
all my commands have a very good parameter
if(!message.member.permissions.has(Permissions.FLAGS.ADMINISTRATOR))return message.reply ('❌You do not have the permissions to perform this command!')
And perms are much easier to set
that is from my v13 bots
slash commands is gonna be one of those things that someone shows me exactly how to do it and I will just be able to do anything with it
Yea
I could
If I was home
Although I don't use the buklders
I use json formatted
like i have a friend who is familiar with discord.js
Which is not very intuitive for most
i was a little familiar with js in general
but i know most things are a google search
Yeas
@noble grove hey i made the command yeah finally, 2 things even if i have a check for the data it tries to create the command every time i run the bot
and it doesnt trigger my event
async function commands() {
const guild = george.guilds.cache.get(config.guild);
const checked = george.application.commands.fetch()
const commands = ({
name: 'status',
description: 'Display Server Status',})
if(checked != commands) {
george.application.commands.create(commands)
console.log("f")}
}```
the code
Hmm I wouldn't use the event they were talking about
I just push when I know there's a change
But I'm the only dev
And I hate having shit like that automated
by the event i mean interactionCreate
Oh xd
it doesnt trigger my command in there
You can type the command in the server?
yess
i am good to go with creating etc
but my command doesnt run
george.on('interactionCreate', async interaction =>{
const guild = george.guilds.cache.get(config.guild);
if(interaction.isCommand()) {
if(interaction.customid === 'status') {```
is this v13 cuz i kinda didnt study the changes lmao
retry moment
switch case?
switch
The switch statement evaluates an expression, matching the expression's value against a series of case clauses, and executes statements after the first case clause with a matching value, until a break statement is encountered. The default clause of a switch statement will be jumped to if no case matches the expression's value.
-interaction.isCommand();
+interaction.type === InteractionType.ApplicationCommand;
it was changed true
Yey
Nope
Settimeout
Is what you can use
Add userid to an array, settimeout for x seconds then remove userid from array
If the command is executed see if the userid is in the array, if yes then tell them to go fuck themselves
hmh
it still didnt respond
george.on('interactionCreate', async interaction =>{
const guild = george.guilds.cache.get(config.guild);
if(interaction.type === InteractionType.ApplicationCommand) {
if(interaction.name === 'status') {```
Log immediately at the top of interactioncreate
truering
it stops at the interaction.name
anything after the name doesnt run
george.on('interactionCreate', async interaction =>{
console.log("yes1")
const guild = george.guilds.cache.get(config.guild)
if(interaction.type === InteractionType.ApplicationCommand) {
console.log("yes2")
if(interaction.name === 'status') {
console.log("yes3")```
i usually use the word gay but i think people in here wouldn't appreciate that so it has to be yes this time
Is the name status
yeah
Log interaction.name
what the hell
ChatInputCommandInteraction {
type: 2,
id: '1009392116629245982',
applicationId: '1007949647991550032',
channelId: '1009022231906631690',
guildId: '1006535868858781706',
user: User {
id: '177083022305263616',
bot: false,
system: false,
flags: UserFlagsBitField { bitfield: 256 },
username: 'George',
discriminator: '6242',
avatar: '4ee1d5f278a36a61aa9164b9263c8722',
banner: undefined,
accentColor: undefined
},
member: GuildMember {
guild: Guild {
id: '1006535868858781706',
name: 'George Roleplay Template',
icon: null,
features: [],
commands: [GuildApplicationCommandManager],
members: [GuildMemberManager],
channels: [GuildChannelManager],
bans: [GuildBanManager],
roles: [RoleManager],
presences: PresenceManager {},
voiceStates: [VoiceStateManager],
stageInstances: [StageInstanceManager],
invites: [GuildInviteManager],
scheduledEvents: [GuildScheduledEventManager],
available: true,
shardId: 0,
splash: null,
banner: null,
description: null,
verificationLevel: 0,
vanityURLCode: null,
nsfwLevel: 0,
premiumSubscriptionCount: 0,
discoverySplash: null,
memberCount: 2,
large: false,
premiumProgressBarEnabled: false,
applicationId: null,
afkTimeout: 300,
afkChannelId: null,
systemChannelId: null,
premiumTier: 0,
explicitContentFilter: 0,
mfaLevel: 0,
joinedTimestamp: 1660385434429,
defaultMessageNotifications: 0,
systemChannelFlags: [SystemChannelFlagsBitField],
maximumMembers: 500000,
maximumPresences: null,
maxVideoChannelUsers: 25,
approximateMemberCount: null,
approximatePresenceCount: null,
vanityURLUses: null,
rulesChannelId: null,
publicUpdatesChannelId: null,
preferredLocale: 'en-US',
ownerId: '177083022305263616',
emojis: [GuildEmojiManager],
stickers: [GuildStickerManager]
},
joinedTimestamp: 1660047251678,
premiumSinceTimestamp: null,
nickname: null,
pending: false,
communicationDisabledUntilTimestamp: null,
_roles: [],
user: User {
id: '177083022305263616',
bot: false,
system: false,
flags: [UserFlagsBitField],
username: 'George',
discriminator: '6242',
avatar: '4ee1d5f278a36a61aa9164b9263c8722',
banner: undefined,
accentColor: undefined
},
avatar: null
},
version: 1,
appPermissions: PermissionsBitField { bitfield: 4398046511103n },
memberPermissions: PermissionsBitField { bitfield: 4398046511103n },
locale: 'en-GB',
guildLocale: 'en-US',
commandId: '1009387579545751632',
commandName: 'status',
commandType: 1,
commandGuildId: null,
deferred: false,
replied: false,
ephemeral: null,
webhook: InteractionWebhook { id: '1007949647991550032' },
options: CommandInteractionOptionResolver {
_group: null,
_subcommand: null,
_hoistedOptions: []
}
}```
noice.
chatinputcommandinteraction
Hm