Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve help command #89

Closed
4 tasks
Marchand-Nicolas opened this issue Feb 13, 2025 · 7 comments · Fixed by #105
Closed
4 tasks

Improve help command #89

Marchand-Nicolas opened this issue Feb 13, 2025 · 7 comments · Fixed by #105
Assignees
Labels
good first issue Good for newcomers OD Boost Issue reserved for the OD Boost open for contribution An issue that is available for an Only Dust contribution

Comments

@Marchand-Nicolas
Copy link
Collaborator

Description 📹

Improve discord/interactions/helpCommand.ts by listing all available commands and adding a link to the Telegram group for support: [Telegram Group](https://t.me/+Mi34Im1Uafc1Y2Q8). Also, remove the console.log statement.

Proposed Actions 🛠️

Here’s a checklist of actions to follow for resolving this issue:

  1. Fork and Create Branch:
    Fork the repository and create a new branch using the issue number:

    git checkout -b fix-[issue-number]
  2. Implement Changes:

    • Fetch and list all available commands dynamically.
    • Remove the console.log({ interaction }); statement.
    • Modify the response message to include:
      • A list of available commands.
      • The Telegram support group link.
    • Update the interaction.reply() method to display this information properly.

    Example Updated Code:

    import { REST } from "@discordjs/rest";
    import { ChatInputCommandInteraction, Client } from "discord.js";
    
    export const handleHelpCommand = async (
      interaction: ChatInputCommandInteraction,
      client: Client,
      restClient: REST
    ) => {
      try {
        const userId = interaction.member?.user?.id;
        const guildId = interaction.guildId;
        
        if (!userId || !guildId) return;
    
        // Fetch all registered commands
        const commands = client.application?.commands.cache.map(cmd => `• \`/${cmd.name}\` - ${cmd.description}`).join("\n") || "No commands available.";
    
        await interaction.reply({
          content: `**Available Commands:**\n${commands}\n\nFor support, join our [Telegram Group](https://t.me/+Mi34Im1Uafc1Y2Q8).\nFor more information, visit [Starky](https://starky.wtf/).`,
          ephemeral: true,
        });
      } catch (error) {
        console.error("Error handling /help command:", error);
      }
    };
  3. Run Tests and Commit Changes:
    Make sure your changes don't break existing functionality and commit with a clear message:

    git commit -m "Fix: List all available commands and add Telegram support link in /help"

Required 📋

To keep our workflow smooth, please make sure you follow these guidelines:

  • Assignment: Don't create a pull request if you weren’t assigned to this issue.
  • Timeframe: Complete the task within 3 business days.
  • Closing the Issue: In your PR description, close the issue by writing Close #[issue_id].
  • Review Process:
    • Once you've submitted your PR, change the label to "ready for review".
    • If changes are requested, address them and then update the label back to "ready for review" once done.
  • Testing: Test your PR locally before pushing, and verify that tests and build are working after pushing.

Thank you for your contribution 🙏

⚠️ WARNING: Failure to follow the requirements above may result in being added to the OnlyDust blacklist, affecting your ability to receive future rewards.

@Marchand-Nicolas Marchand-Nicolas added good first issue Good for newcomers OD Boost Issue reserved for the OD Boost open for contribution An issue that is available for an Only Dust contribution labels Feb 13, 2025
@SudiptaPaul-31
Copy link
Contributor

Can I work on this issue?

@jaiminRaiyani
Copy link

I'd be happy to do this.

@Verifieddanny
Copy link
Contributor

I’d love to work on this task.

@Benjtalkshow
Copy link
Contributor

@Marchand-Nicolas May i handle this?

@chiscookeke11
Copy link
Contributor

Can I try solving this issue?

@Elite-tch
Copy link
Contributor

Could I try solving this?

@chiscookeke11
Copy link
Contributor

Thank you
ETA: 24HRS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers OD Boost Issue reserved for the OD Boost open for contribution An issue that is available for an Only Dust contribution
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants