fix: Fixed .greettest byetest greetdmtest and boosttest command if you didn't have them enabled. Also fixed greetdmtest sending messages twice.

This commit is contained in:
Kwoth
2024-09-21 19:05:59 +00:00
parent ecc192c6a9
commit 2c3e5fe507
2 changed files with 38 additions and 11 deletions

View File

@@ -457,7 +457,17 @@ public class GreetService : INService, IReadyExecutor
{
var conf = await GetGreetSettingsAsync(guildId, type);
if (conf is null)
return false;
{
conf = new GreetSettings()
{
ChannelId = channel.Id,
GreetType = type,
IsEnabled = false,
GuildId = guildId,
AutoDeleteTimer = 30,
MessageText = GetDefaultGreet(type)
};
}
await SendMessage(conf, channel, user);
return true;
@@ -467,7 +477,6 @@ public class GreetService : INService, IReadyExecutor
{
if (conf.GreetType == GreetType.GreetDm)
{
await _greetQueue.Writer.WriteAsync((conf, user, channel as ITextChannel));
return await GreetDmUser(conf, user);
}