question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature Update : Codeblocks for usage in errorembedd

See original GitHub issue

Description of issue:

Catagory: Feature request/bug

Brief Description: Eddiebot’s Command Error message embeds, suggest a Usage case of the particular command telling the user about how to use the command when things like bad arguments or missing arguments are passed. This Usage field is plain text, and it would be of much more utility if it was emphasized via code-blocks.

Additional Context:

  • Screenshot:

The current usage text in command error embeds- Screenshot 2020-12-12 at 12 07 11 AM

Better usage text format- Screenshot 2020-12-12 at 12 05 35 AM

  • How to reproduce: type any command with wrong arguments(like- ^standup .)

  • Information regarding resolution of this: (this might be useful, if provided in the opened issue) There are two ways to this(there may be more ways, but these are from the top of my head):

    1. the longer way: Edit the usage string in each file in src/commandHandlers folder, to format the usage string with code-blocks, by adding backticks around the commands text. Example: the current usage strings are like this-> Screenshot 2020-12-11 at 11 43 13 PM this could be altered, to format with code-blocks on discord by slight modifications-> Screenshot 2020-12-11 at 11 50 11 PM

    2. Slightly quicker way: Run a format function on the usage variable, before adding that to the BuildErrorEmbed function: Here, the usage string gets split into a list of different ways of using the command, by the usageTextOptions variable, then the formatted variable calls the mapToCodeBlock arrow function, to format the obtained list of usage into code-block formatted strings(with backticks), and then these usage cases get joined with an or in b/w and stored in formatted variable, which holds the string with the code-block formatting, ready to be passed into the buildErrorEmbed function: Screenshot 2020-12-11 at 11 57 29 PM

_Originally posted by @Vyvy-vi in https://github.com/EddieJaoudeCommunity/support/discussions/547_

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:11 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
ChinmayMhatrecommented, Dec 14, 2020

For the time being , I’ll just create a pr for one command in a bit . could you test it out?

0reactions
eddiejaoudecommented, Mar 12, 2021

PR #382 merged 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

1 Code::Blocks Project Management
Code::Blocks offers a very flexible and comprehensive project management. The following text will address only some of the features of the project ...
Read more >
How to Update Code::Blocks for Windows???
Hello, Community, I'm an aspiring programmer and have dusted off my copy of Code::Blocks from years ago but for some reason, it's stuck...
Read more >
Debugging with Code::Blocks
Build debug version of your project. Make sure that the project is compiled with the -g (debugging symbols) compiler option on, and the...
Read more >
Version 20.03 - Code::Blocks
Update images for ThreadSearch; Use the new updated tree icons; Add missing rc-file* images to the main resources; New 16x16 images for infopane...
Read more >
Code::Blocks
Code::Blocks is a free C/C++ and Fortran IDE built to meet the most demanding needs of its users. It is designed to be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found