Add WelcomeMessagesChannel setting (#269)

Closes #232

Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
This commit is contained in:
Macintxsh 2024-03-18 11:42:37 +03:00 committed by GitHub
parent 62709d927b
commit 5105b43eff
Signed by: GitHub
GPG key ID: B5690EEEBB952194
8 changed files with 25 additions and 2 deletions

View file

@ -51,7 +51,7 @@ public class GuildMemberJoinedResponder : IResponder<IGuildMemberAdd>
return Result.FromError(returnRolesResult.Error);
}
if (GuildSettings.PublicFeedbackChannel.Get(cfg).Empty()
if (GuildSettings.WelcomeMessagesChannel.Get(cfg).Empty()
|| GuildSettings.WelcomeMessage.Get(cfg) is "off" or "disable" or "disabled")
{
return Result.FromSuccess();
@ -76,7 +76,7 @@ public class GuildMemberJoinedResponder : IResponder<IGuildMemberAdd>
.Build();
return await _channelApi.CreateMessageWithEmbedResultAsync(
GuildSettings.PublicFeedbackChannel.Get(cfg), embedResult: embed,
GuildSettings.WelcomeMessagesChannel.Get(cfg), embedResult: embed,
allowedMentions: Octobot.NoMentions, ct: ct);
}