Skip to content

Commit

Permalink
previous commit implementation added
Browse files Browse the repository at this point in the history
  • Loading branch information
GreemDev committed Aug 16, 2019
1 parent 272b21a commit ce04a8b
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions src/Commands/Modules/Utility/TagCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,25 @@ public Task<ActionResult> TagAsync([Remainder] Tag tag)
.Replace("{UserName}", Context.User.Username)
.Replace("{UserMention}", Context.User.Mention)
.Replace("{OwnerMention}", Context.Guild.Owner.Mention)
.Replace("{UserTag}", Context.User.Discriminator), null, false);
.Replace("{UserTag}", Context.User.Discriminator), async _ =>
{
if (Context.GuildData.Configuration.DeleteMessageOnTagCommandInvocation)
{
try
{
await Context.Message.DeleteAsync();
}
catch
{ }
}
}, false);
}

[Command("TagStats")]
[Priority(1)]
[Description("Shows stats for a tag.")]
[Remarks("Usage: |prefix|tagstats {name}")]
public async Task<ActionResult> TagStatsAsync([Remainder]Tag tag)
public async Task<ActionResult> TagStatsAsync([Remainder] Tag tag)
{
var u = await Context.Client.GetShardFor(Context.Guild).Rest.GetUserAsync(tag.CreatorId);

Expand All @@ -44,7 +55,7 @@ public async Task<ActionResult> TagStatsAsync([Remainder]Tag tag)
[Command("Tags")]
[Description("Lists all available tags in the current guild.")]
[Remarks("Usage: |prefix|tags")]
public Task<ActionResult> TagsAsync()
public Task<ActionResult> TagsAsync()
=> Ok(Context.CreateEmbedBuilder(
Context.GuildData.Extras.Tags.Count == 0
? "None"
Expand Down

0 comments on commit ce04a8b

Please sign in to comment.