-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: enabled editor.inlayHints, added tabulation, updated intents, a…
…dded makeCache and sweepers - Enabled "editor.inlayHints.enabled": "on" - Added tabulation - Added client to the Event handler - Updated intents in new Client, added makeCache and sweepers - Reduced large_threshold from 250 to 100
- Loading branch information
1 parent
98f726c
commit 1cce93a
Showing
39 changed files
with
826 additions
and
853 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,32 @@ | ||
const { SlashCommandBuilder, InteractionContextType } = require("discord.js"); | ||
const { SlashCommandBuilder, InteractionContextType, ApplicationIntegrationType } = require("discord.js"); | ||
const { t } = require("i18next"); | ||
|
||
/** | ||
* @type {import('../../typings').Command} | ||
*/ | ||
module.exports = { | ||
data: new SlashCommandBuilder() | ||
.setName("ping") | ||
.setDescription(t('commands:info.ping.description', { lng: "en" })) | ||
.setDescriptionLocalizations({ | ||
uk: t('commands:info.ping.description', { lng: "uk" }), | ||
ru: t('commands:info.ping.description', { lng: "ru" }) | ||
}) | ||
.setContexts([InteractionContextType.Guild]), | ||
options: { | ||
cooldown: 30, | ||
ownerOnly: false, | ||
devGuildOnly: true, | ||
bot_permissions: [], | ||
}, | ||
data: new SlashCommandBuilder() | ||
.setName("ping") | ||
.setDescription(t('commands:info.ping.description', { lng: "en" })) | ||
.setDescriptionLocalizations({ | ||
uk: t('commands:info.ping.description', { lng: "uk" }) | ||
}) | ||
.setContexts(InteractionContextType.Guild) | ||
.setIntegrationTypes(ApplicationIntegrationType.GuildInstall), | ||
options: { | ||
cooldown: 30, | ||
ownerOnly: false, | ||
devGuildOnly: true, | ||
bot_permissions: [], | ||
}, | ||
|
||
async execute(interaction) { | ||
const { client } = interaction; | ||
async execute(interaction) { | ||
const { client } = interaction; | ||
|
||
await interaction.deferReply() | ||
await interaction.deferReply() | ||
|
||
const reply = await interaction.fetchReply() | ||
await interaction.editReply({ content: t('commands:info.ping.content', { lng: interaction.locale, ping: Math.round(client.ws.ping), latency: Math.round(reply.createdTimestamp - interaction.createdTimestamp) }) }); | ||
}, | ||
const reply = await interaction.fetchReply() | ||
await interaction.editReply({ content: t('commands:info.ping.content', { lng: interaction.locale, ping: Math.round(client.ws.ping), latency: Math.round(reply.createdTimestamp - interaction.createdTimestamp) }) }); | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,30 @@ | ||
const { ContextMenuCommandBuilder, ApplicationCommandType, InteractionContextType } = require("discord.js"); | ||
const { ContextMenuCommandBuilder, ApplicationCommandType, InteractionContextType, ApplicationIntegrationType } = require("discord.js"); | ||
const { t } = require("i18next"); | ||
|
||
/** | ||
* @type {import("../../typings").Command} | ||
*/ | ||
module.exports = { | ||
data: new ContextMenuCommandBuilder() | ||
.setName(t('commands:sample.message_sample.description', { lng: "en" }).slice(0, 32)) | ||
.setNameLocalizations({ | ||
uk: t('commands:sample.message_sample.description', { lng: "uk" }).slice(0, 32), | ||
ru: t('commands:sample.message_sample.description', { lng: "ru" }).slice(0, 32) | ||
}) | ||
.setType(ApplicationCommandType.Message) | ||
.setContexts([InteractionContextType.Guild]), | ||
options: { | ||
cooldown: 10, | ||
ownerOnly: false, | ||
devGuildOnly: true, | ||
bot_permissions: [], | ||
}, | ||
data: new ContextMenuCommandBuilder() | ||
.setName("Message Sample") | ||
.setType(ApplicationCommandType.Message) | ||
.setContexts(InteractionContextType.Guild) | ||
.setIntegrationTypes(ApplicationIntegrationType.GuildInstall), | ||
options: { | ||
cooldown: 10, | ||
ownerOnly: false, | ||
devGuildOnly: true, | ||
bot_permissions: [], | ||
}, | ||
|
||
async execute(interaction) { | ||
if (!interaction.isMessageContextMenuCommand()) return; | ||
async execute(interaction) { | ||
if (!interaction.isMessageContextMenuCommand()) return; | ||
|
||
const { targetId, targetMessage } = interaction; | ||
await interaction.reply({ | ||
content: t('commands:sample.message_sample.content', { lng: interaction.locale, id: targetId, message: targetMessage.content }), | ||
ephemeral: true | ||
}); | ||
}, | ||
const { targetId, targetMessage } = interaction; | ||
await interaction.reply({ | ||
content: t('commands:sample.message_sample.content', { lng: interaction.locale, id: targetId, message: targetMessage.content }), | ||
ephemeral: true | ||
}); | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,30 @@ | ||
const { ContextMenuCommandBuilder, ApplicationCommandType, InteractionContextType } = require("discord.js"); | ||
const { ContextMenuCommandBuilder, ApplicationCommandType, InteractionContextType, ApplicationIntegrationType } = require("discord.js"); | ||
const { t } = require("i18next"); | ||
|
||
/** | ||
* @type {import("../../typings").Command} | ||
*/ | ||
module.exports = { | ||
data: new ContextMenuCommandBuilder() | ||
.setName(t('commands:sample.user_sample.description', { lng: "en" }).slice(0, 32)) | ||
.setNameLocalizations({ | ||
uk: t('commands:sample.user_sample.description', { lng: "uk" }).slice(0, 32), | ||
ru: t('commands:sample.user_sample.description', { lng: "ru" }).slice(0, 32) | ||
}) | ||
.setType(ApplicationCommandType.User) | ||
.setContexts([InteractionContextType.Guild]), | ||
options: { | ||
cooldown: 10, | ||
ownerOnly: false, | ||
devGuildOnly: true, | ||
bot_permissions: [], | ||
}, | ||
|
||
async execute(interaction) { | ||
if (!interaction.isUserContextMenuCommand()) return; | ||
data: new ContextMenuCommandBuilder() | ||
.setName("User Sample") | ||
.setType(ApplicationCommandType.User) | ||
.setContexts(InteractionContextType.Guild) | ||
.setIntegrationTypes(ApplicationIntegrationType.GuildInstall), | ||
options: { | ||
cooldown: 10, | ||
ownerOnly: false, | ||
devGuildOnly: true, | ||
bot_permissions: [], | ||
}, | ||
|
||
async execute(interaction) { | ||
if (!interaction.isUserContextMenuCommand()) return; | ||
|
||
const { targetId, targetMember, targetUser} = interaction; | ||
await interaction.reply({ | ||
content: t('commands:sample.user_sample.content', { lng: interaction.locale, id: targetId, member: targetMember.toString(), user: targetUser.toString() }), | ||
ephemeral: true | ||
}); | ||
}, | ||
const { targetId, targetMember, targetUser} = interaction; | ||
await interaction.reply({ | ||
content: t('commands:sample.user_sample.content', { lng: interaction.locale, id: targetId, member: targetMember.toString(), user: targetUser.toString() }), | ||
ephemeral: true | ||
}); | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.