File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 1
1
using Newtonsoft . Json ;
2
2
using Newtonsoft . Json . Converters ;
3
+ using System . Runtime . Serialization ;
3
4
4
5
namespace OsuFriendsApi . Entities
5
6
{
6
7
[ JsonConverter ( typeof ( StringEnumConverter ) ) ]
7
8
public enum Playstyle
8
9
{
10
+ [ EnumMember ( Value = "touch" ) ]
9
11
Touchscreen ,
10
12
Tablet ,
11
13
Mouse ,
Original file line number Diff line number Diff line change 1
1
using Discord ;
2
+ using Discord . Net ;
2
3
using Discord . WebSocket ;
3
4
using Microsoft . Extensions . Logging ;
4
5
using OsuFriendsApi ;
@@ -125,7 +126,14 @@ public async Task VerifyAsync(SocketGuildUser user)
125
126
List < SocketRole > roles = FindUserRoles ( guildRoles , osuUserDetails ) ;
126
127
await user . RemoveRolesAsync ( FindAllRoles ( guildRoles ) . Where ( role => user . Roles . Contains ( role ) && ! roles . Contains ( role ) ) ) ;
127
128
await user . AddRolesAsync ( roles . Where ( role => ! user . Roles . Contains ( role ) ) ) ;
128
- await user . ModifyAsync ( properties => properties . Nickname = osuUserDetails . Username ) ;
129
+ try
130
+ {
131
+ await user . ModifyAsync ( properties => properties . Nickname = osuUserDetails . Username ) ;
132
+ }
133
+ catch ( HttpException )
134
+ {
135
+
136
+ }
129
137
130
138
embedBuilder = new EmbedBuilder ( ) ;
131
139
embedBuilder
You can’t perform that action at this time.
0 commit comments