mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-04-19 16:33:36 +03:00
Merge branch 'master' into gitinfo
Signed-off-by: Macintxsh <95250141+mctaylors@users.noreply.github.com>
This commit is contained in:
commit
87ee533b04
8 changed files with 24 additions and 2 deletions
|
@ -660,4 +660,7 @@
|
||||||
<data name="Version" xml:space="preserve">
|
<data name="Version" xml:space="preserve">
|
||||||
<value>Version: {0}</value>
|
<value>Version: {0}</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsWelcomeMessagesChannel" xml:space="preserve">
|
||||||
|
<value>Welcome messages channel</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
|
|
|
@ -660,4 +660,7 @@
|
||||||
<data name="Version" xml:space="preserve">
|
<data name="Version" xml:space="preserve">
|
||||||
<value>Версия: {0}</value>
|
<value>Версия: {0}</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsWelcomeMessagesChannel" xml:space="preserve">
|
||||||
|
<value>Канал для приветствий</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
|
|
|
@ -660,4 +660,7 @@
|
||||||
<data name="Version" xml:space="preserve">
|
<data name="Version" xml:space="preserve">
|
||||||
<value>{0}</value>
|
<value>{0}</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SettingsWelcomeMessagesChannel" xml:space="preserve">
|
||||||
|
<value>канал куда говорить здравствуйте</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
|
|
|
@ -46,6 +46,7 @@ public class SettingsCommandGroup : CommandGroup
|
||||||
GuildSettings.RenameHoistedUsers,
|
GuildSettings.RenameHoistedUsers,
|
||||||
GuildSettings.PublicFeedbackChannel,
|
GuildSettings.PublicFeedbackChannel,
|
||||||
GuildSettings.PrivateFeedbackChannel,
|
GuildSettings.PrivateFeedbackChannel,
|
||||||
|
GuildSettings.WelcomeMessagesChannel,
|
||||||
GuildSettings.EventNotificationChannel,
|
GuildSettings.EventNotificationChannel,
|
||||||
GuildSettings.DefaultRole,
|
GuildSettings.DefaultRole,
|
||||||
GuildSettings.MuteRole,
|
GuildSettings.MuteRole,
|
||||||
|
|
|
@ -56,6 +56,11 @@ public static class GuildSettings
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static readonly SnowflakeOption PrivateFeedbackChannel = new("PrivateFeedbackChannel");
|
public static readonly SnowflakeOption PrivateFeedbackChannel = new("PrivateFeedbackChannel");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Controls what channel should welcome messages be sent to.
|
||||||
|
/// </summary>
|
||||||
|
public static readonly SnowflakeOption WelcomeMessagesChannel = new("WelcomeMessagesChannel");
|
||||||
|
|
||||||
public static readonly SnowflakeOption EventNotificationChannel = new("EventNotificationChannel");
|
public static readonly SnowflakeOption EventNotificationChannel = new("EventNotificationChannel");
|
||||||
public static readonly SnowflakeOption DefaultRole = new("DefaultRole");
|
public static readonly SnowflakeOption DefaultRole = new("DefaultRole");
|
||||||
public static readonly SnowflakeOption MuteRole = new("MuteRole");
|
public static readonly SnowflakeOption MuteRole = new("MuteRole");
|
||||||
|
|
|
@ -21,6 +21,7 @@ public enum AllOptionsEnum
|
||||||
[UsedImplicitly] RenameHoistedUsers,
|
[UsedImplicitly] RenameHoistedUsers,
|
||||||
[UsedImplicitly] PublicFeedbackChannel,
|
[UsedImplicitly] PublicFeedbackChannel,
|
||||||
[UsedImplicitly] PrivateFeedbackChannel,
|
[UsedImplicitly] PrivateFeedbackChannel,
|
||||||
|
[UsedImplicitly] WelcomeMessagesChannel,
|
||||||
[UsedImplicitly] EventNotificationChannel,
|
[UsedImplicitly] EventNotificationChannel,
|
||||||
[UsedImplicitly] DefaultRole,
|
[UsedImplicitly] DefaultRole,
|
||||||
[UsedImplicitly] MuteRole,
|
[UsedImplicitly] MuteRole,
|
||||||
|
|
6
src/Messages.Designer.cs
generated
6
src/Messages.Designer.cs
generated
|
@ -1190,5 +1190,11 @@ namespace Octobot {
|
||||||
return ResourceManager.GetString("Version", resourceCulture);
|
return ResourceManager.GetString("Version", resourceCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal static string SettingsWelcomeMessagesChannel {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("SettingsWelcomeMessagesChannel", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ public class GuildMemberJoinedResponder : IResponder<IGuildMemberAdd>
|
||||||
return Result.FromError(returnRolesResult.Error);
|
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")
|
|| GuildSettings.WelcomeMessage.Get(cfg) is "off" or "disable" or "disabled")
|
||||||
{
|
{
|
||||||
return Result.FromSuccess();
|
return Result.FromSuccess();
|
||||||
|
@ -76,7 +76,7 @@ public class GuildMemberJoinedResponder : IResponder<IGuildMemberAdd>
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
return await _channelApi.CreateMessageWithEmbedResultAsync(
|
return await _channelApi.CreateMessageWithEmbedResultAsync(
|
||||||
GuildSettings.PublicFeedbackChannel.Get(cfg), embedResult: embed,
|
GuildSettings.WelcomeMessagesChannel.Get(cfg), embedResult: embed,
|
||||||
allowedMentions: Octobot.NoMentions, ct: ct);
|
allowedMentions: Octobot.NoMentions, ct: ct);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue