Skip to content

Commit

Permalink
register slash command in every guilds
Browse files Browse the repository at this point in the history
  • Loading branch information
Behzad-rabiei committed May 2, 2024
1 parent fbee6df commit 6468f05
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/commands/info/question.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ export default {

async execute(interaction: ChatInputCommandInteraction_broker) {
try {
// TogetherCrew-Leads: 983364577096003604 TogetherCrew-Contributors: 983364691692748832
// RnDAO:915914985140531240 TogetherCrew-Leads: 983364577096003604 TogetherCrew-Contributors: 983364691692748832
if (
interaction.guildId === '915914985140531240' &&
!(
interaction.member?.roles.cache.has('983364577096003604') ||
interaction.member?.roles.cache.has('983364691692748832')
Expand Down
3 changes: 2 additions & 1 deletion src/services/command.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ async function registerCommand(): Promise<void> {
const commandData = [...client.commands.values()].map((command) => command.data.toJSON());
await rest.put(
// RnDAO: 915914985140531240
Routes.applicationGuildCommands(config.discord.clientId, '980858613587382322'),
// Routes.applicationGuildCommands(config.discord.clientId, '915914985140531240'),
Routes.applicationCommands(config.discord.clientId),
{ body: commandData },
);
logger.info('Commands Registerd');
Expand Down

0 comments on commit 6468f05

Please sign in to comment.