-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
It now accepts alias and discord user mention
- Loading branch information
1 parent
c362d7f
commit 3dacdb6
Showing
7 changed files
with
115 additions
and
23 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 |
---|---|---|
|
@@ -8,6 +8,8 @@ Hyperstellar.db | |
Hyperstellar | ||
hyperstellar-token.txt | ||
|
||
.idea | ||
|
||
# User-specific files | ||
*.rsuser | ||
*.suo | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using Discord.Interactions; | ||
|
||
namespace Hyperstellar.Discord; | ||
|
||
// Util class for other type converters in this package | ||
internal static class TypeConverters | ||
{ | ||
// Shorthand for generating an error response | ||
internal static Task<TypeConverterResult> Error(string reason) => Task.FromResult(TypeConverterResult.FromError(InteractionCommandError.ConvertFailed, reason)); | ||
|
||
// Shorthand for generating a successful conversion | ||
internal static Task<TypeConverterResult> Success(object value) => Task.FromResult(TypeConverterResult.FromSuccess(value)); | ||
} |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
using System.Text.RegularExpressions; | ||
|
||
namespace Hyperstellar; | ||
|
||
internal static partial class Regexes | ||
{ | ||
[GeneratedRegex("^<@\\d{1,20}>$")] | ||
internal static partial Regex DiscordUserMention(); | ||
} |
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