Completed welcome message functionality. Need to add notes and descriptions. Redid the SLAP command. Reformatted most of the general Commands output to be embeded instead. Moved a few class level fields to Program. Changed affected code accordingly.

This commit is contained in:
Christopher Darnell committed 2021-04-29 03:18:25 -07:00
1 parent 08091e7456
commit 0479d443b8
7 files changed
+344 -209

No files matched your search

+5 -8
View File
@@ -246,7 +246,7 @@ namespace StarsiegeBot
}
public Task GuildMemberAdded(DiscordClient d, GuildMemberAddEventArgs e)
{
d.Logger.LogDebug(BotEventId, $"GuildMemberAdded.{e.Guild.Name}");
d.Logger.LogDebug(BotEventId, $"GuildMemberAdded.");
if (e.Member.IsBot)
{
return Task.CompletedTask;
@@ -255,15 +255,12 @@ namespace StarsiegeBot
string gId = e.Guild.Id.ToString();
if (BotSettings.GuildSettings[gId].UseWelcome)
{
if (BotSettings.GuildSettings[gId].WelcomeChannel is null)
{ }
else
if (!(BotSettings.GuildSettings[gId].WelcomeChannel is null))
{
if (BotSettings.GuildSettings[gId].WelcomeMessage is null)
{ }
else
if (!(BotSettings.GuildSettings[gId].WelcomeMessage is null))
{
BotSettings.GuildSettings[gId].WelcomeChannel.SendMessageAsync(BotSettings.GuildSettings[gId].WelcomeMessage);
string msg = WelcomeMessage.WelcomeMessageProcessing(BotSettings.GuildSettings[gId].WelcomeMessage, e.Member, e.Guild);
BotSettings.GuildSettings[gId].WelcomeChannel.SendMessageAsync(msg);
}
}
}