Updating for :wot: emoji, and also to permit the status joni / welcome to ONLY send to system status channel
This commit is contained in:
parent
0fdcbd0968
commit
44df5790c6
@ -98,18 +98,8 @@ namespace ChaosBot.Discord.Services
|
|||||||
.On(x => new {x.DiscordGuildId, x.DiscordUserId}).RunAsync();
|
.On(x => new {x.DiscordGuildId, x.DiscordUserId}).RunAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
string ConfigSet = ConfigurationRepository.GetValue<string>("LevelUp:Channel", user.Guild.Id, "false");
|
await user.Guild.SystemChannel.SendMessageAsync($"{user.Username} has joined the server.");
|
||||||
if (ConfigSet != "false")
|
|
||||||
{
|
|
||||||
ulong channelId = Convert.ToUInt64(ConfigSet.Substring(2, ConfigSet.Length - 3));
|
|
||||||
|
|
||||||
await user.Guild.GetTextChannel(channelId).SendMessageAsync(
|
|
||||||
$"Welcome {user.Mention}!");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
await user.Guild.SystemChannel.SendMessageAsync($"Welcome {user.Mention}!");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -172,20 +162,7 @@ namespace ChaosBot.Discord.Services
|
|||||||
.On(x => new { x.DiscordGuildId, x.DiscordUserId}).RunAsync();
|
.On(x => new { x.DiscordGuildId, x.DiscordUserId}).RunAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
string ConfigSet = ConfigurationRepository.GetValue<string>("LevelUp:Channel", user.Guild.Id, "false");
|
await user.Guild.SystemChannel.SendMessageAsync($"{user.Username} has left the server.");
|
||||||
if (ConfigSet != "false")
|
|
||||||
{
|
|
||||||
ulong channelId = Convert.ToUInt64(ConfigSet.Substring(2, ConfigSet.Length - 3));
|
|
||||||
|
|
||||||
await user.Guild.GetTextChannel(channelId).SendMessageAsync(
|
|
||||||
$"Goodbye {user.Mention}!");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
await user.Guild.SystemChannel.SendMessageAsync($"Goodbye {user.Mention}!");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -69,10 +69,10 @@ namespace ChaosBot.Discord.Services
|
|||||||
{
|
{
|
||||||
ulong channelId = Convert.ToUInt64(ConfigSet.Substring(2, ConfigSet.Length - 3));
|
ulong channelId = Convert.ToUInt64(ConfigSet.Substring(2, ConfigSet.Length - 3));
|
||||||
await context.Guild.GetTextChannel(channelId).SendMessageAsync(
|
await context.Guild.GetTextChannel(channelId).SendMessageAsync(
|
||||||
$"Grats <@{context.User.Id}>! You have reached level 1 :wot:");
|
$"Grats <@{context.User.Id}>! You have reached level 1 <:wot:740387232514572310>");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
await context.Channel.SendMessageAsync($"Grats <@{context.User.Id}>! You have reached level 1 :wot:");
|
await context.Channel.SendMessageAsync($"Grats <@{context.User.Id}>! You have reached level 1! <:wot:740387232514572310>");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -102,10 +102,10 @@ namespace ChaosBot.Discord.Services
|
|||||||
{
|
{
|
||||||
ulong channelId = Convert.ToUInt64(ConfigSet.Substring(2, ConfigSet.Length - 3));
|
ulong channelId = Convert.ToUInt64(ConfigSet.Substring(2, ConfigSet.Length - 3));
|
||||||
await context.Guild.GetTextChannel(channelId).SendMessageAsync(
|
await context.Guild.GetTextChannel(channelId).SendMessageAsync(
|
||||||
$"Grats <@{usrExperience.DiscordUserId}>! You have reached level {curLevel} :wot:");
|
$"Grats <@{usrExperience.DiscordUserId}>! You have reached level {curLevel} <:wot:740387232514572310>");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
await context.Channel.SendMessageAsync($"Grats <@{usrExperience.DiscordUserId}>! You have reached level {curLevel} :wot:");
|
await context.Channel.SendMessageAsync($"Grats <@{usrExperience.DiscordUserId}>! You have reached level {curLevel} <:wot:740387232514572310>");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user