Fail-safe the type on the LevelUp:MentionUser tag
This commit is contained in:
parent
23d8db2a4d
commit
79ff643a2e
@ -70,7 +70,7 @@ namespace ChaosBot.Discord.Services
|
|||||||
ConfigurationRepository.GetValue<string>("LevelUp:Channel", context.Guild.Id, "false");
|
ConfigurationRepository.GetValue<string>("LevelUp:Channel", context.Guild.Id, "false");
|
||||||
|
|
||||||
string mentionString = $"<@{context.User.Id}>";
|
string mentionString = $"<@{context.User.Id}>";
|
||||||
if (!ConfigurationRepository.GetValue<bool>("LevelUp:MentionUser", context.Guild.Id, true))
|
if (!Convert.ToBoolean(ConfigurationRepository.GetValue<string>("LevelUp:MentionUser", context.Guild.Id, "true")))
|
||||||
{
|
{
|
||||||
mentionString = context.User.Username;
|
mentionString = context.User.Username;
|
||||||
if (context.User is IGuildUser guildUser)
|
if (context.User is IGuildUser guildUser)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user