Skip to content

Commit

Permalink
added bot typing status for Player/Teamcards
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoPstr committed Mar 8, 2021
1 parent 436993d commit 343c04b
Show file tree
Hide file tree
Showing 11 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Modules/PlayerCard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,9 @@ public async Task Player([Remainder]string playername = "")
.WithDescription("This may take up to 30 seconds")
.WithCurrentTimestamp();
var msg = await Context.Channel.SendMessageAsync(embed: builder.Build());
IDisposable typingState = Context.Channel.EnterTypingState();
var req = await GetPlayerCard(playername);
typingState.Dispose();
await msg.DeleteAsync();
await ReplyAsync(embed: req);
}
Expand Down
2 changes: 2 additions & 0 deletions Modules/TeamCard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ public async Task SendTeamCard([Remainder]string name = "")
.WithDescription("This may take up to 30 seconds")
.WithCurrentTimestamp();
var msg = await Context.Channel.SendMessageAsync(embed: builder.Build());
IDisposable typingState = Context.Channel.EnterTypingState();
var req = await GetTeamCard(name);
typingState.Dispose();
await msg.DeleteAsync();
if (req.Item2 == "") { await Context.Channel.SendMessageAsync(embed: req.Item1); }
await Context.Channel.SendFileAsync(req.Item2, embed: req.Item1);
Expand Down
2 changes: 1 addition & 1 deletion Properties/PublishProfiles/FolderProfile.pubxml.user
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<History>True|2021-03-08T13:02:06.5909333Z;True|2021-03-08T13:55:49.5609645+01:00;</History>
<History>True|2021-03-08T13:16:39.0525865Z;True|2021-03-08T14:02:06.5909333+01:00;True|2021-03-08T13:55:49.5609645+01:00;</History>
</PropertyGroup>
</Project>
Binary file modified bin/Release/net5.0/HLTVDiscordBridge.dll
Binary file not shown.
Binary file modified bin/Release/net5.0/HLTVDiscordBridge.pdb
Binary file not shown.
Binary file modified bin/Release/net5.0/ref/HLTVDiscordBridge.dll
Binary file not shown.
Binary file modified bin/Release/publish/HLTVDiscordBridge.dll
Binary file not shown.
Binary file modified bin/Release/publish/HLTVDiscordBridge.pdb
Binary file not shown.
Binary file modified obj/Release/net5.0/HLTVDiscordBridge.dll
Binary file not shown.
Binary file modified obj/Release/net5.0/HLTVDiscordBridge.pdb
Binary file not shown.
Binary file modified obj/Release/net5.0/ref/HLTVDiscordBridge.dll
Binary file not shown.

0 comments on commit 343c04b

Please sign in to comment.