Missing keys, .tesar should now swap roles
This commit is contained in:
parent
e4a62c4d5e
commit
1814936125
@ -170,11 +170,14 @@ namespace NadekoBot.Modules.Administration
|
||||
if (conf.ExclusiveSelfAssignedRoles)
|
||||
{
|
||||
var sameRoleId = guildUser.RoleIds.FirstOrDefault(r => roles.Select(sar => sar.RoleId).Contains(r));
|
||||
var sameRole = Context.Guild.GetRole(sameRoleId);
|
||||
|
||||
if (sameRoleId != default(ulong))
|
||||
{
|
||||
await ReplyErrorLocalized("self_assign_already_excl", Format.Bold(sameRole?.Name)).ConfigureAwait(false);
|
||||
return;
|
||||
var sameRole = Context.Guild.GetRole(sameRoleId);
|
||||
if (sameRole != null)
|
||||
await guildUser.RemoveRolesAsync(sameRole).ConfigureAwait(false);
|
||||
//await ReplyErrorLocalized("self_assign_already_excl", Format.Bold(sameRole?.Name)).ConfigureAwait(false);
|
||||
//return;
|
||||
}
|
||||
}
|
||||
try
|
||||
|
@ -6,7 +6,6 @@ using NadekoBot.Extensions;
|
||||
using NadekoBot.Modules.Searches.Models;
|
||||
using Newtonsoft.Json;
|
||||
using System.Net.Http;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace NadekoBot.Modules.Searches
|
||||
@ -56,7 +55,7 @@ namespace NadekoBot.Modules.Searches
|
||||
.AddField(fb => fb.WithName(GetText("level")).WithValue($"{model.level}").WithIsInline(true))
|
||||
.AddField(fb => fb.WithName(GetText("quick_wins")).WithValue($"{model.Games.Quick.wins}").WithIsInline(true))
|
||||
.AddField(fb => fb.WithName(GetText("compet_wins")).WithValue($"{model.Games.Competitive.wins}").WithIsInline(true))
|
||||
.AddField(fb => fb.WithName(GetText("compet_losses")).WithValue($"{model.Games.Competitive.lost}").WithIsInline(true))
|
||||
.AddField(fb => fb.WithName(GetText("compet_loses")).WithValue($"{model.Games.Competitive.lost}").WithIsInline(true))
|
||||
.AddField(fb => fb.WithName(GetText("compet_played")).WithValue($"{model.Games.Competitive.played}").WithIsInline(true))
|
||||
.AddField(fb => fb.WithName(GetText("compet_rank")).WithValue(rank).WithIsInline(true))
|
||||
.AddField(fb => fb.WithName(GetText("compet_played")).WithValue($"{model.Playtime.competitive}").WithIsInline(true))
|
||||
|
@ -2405,7 +2405,7 @@ namespace NadekoBot.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to No users found..
|
||||
/// Looks up a localized string similar to No user found..
|
||||
/// </summary>
|
||||
public static string gambling_no_users_found {
|
||||
get {
|
||||
|
@ -2225,7 +2225,7 @@ Owner ID: {2}</value>
|
||||
<value>Pick it up by typing `{0}pick`</value>
|
||||
</data>
|
||||
<data name="gambling_no_users_found" xml:space="preserve">
|
||||
<value>No users found.</value>
|
||||
<value>No user found.</value>
|
||||
</data>
|
||||
<data name="gambling_page" xml:space="preserve">
|
||||
<value>page {0}</value>
|
||||
|
Loading…
Reference in New Issue
Block a user