1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-04-29 18:49:53 +03:00

Make sure every member has the starter role when ticking guilds

Closes #20

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This commit is contained in:
Octol1ttle 2023-01-23 21:06:04 +05:00
parent c1e3abce57
commit 9d5bafbbf5
Signed by: Octol1ttle
GPG key ID: B77C34313AEE1FFF
5 changed files with 102 additions and 57 deletions

View file

@ -99,19 +99,20 @@ public record GuildData {
get {
if (Preferences["MuteRole"] is "0") return null;
return _cachedMuteRole ??= Boyfriend.Client.GetGuild(_id).Roles
.Single(x => x.Id == ulong.Parse(Preferences["MuteRole"]));
.Single(x => x.Id == ulong.Parse(Preferences["MuteRole"]));
}
set => _cachedMuteRole = value;
}
public SocketTextChannel? PublicFeedbackChannel => Boyfriend.Client.GetGuild(_id)
.GetTextChannel(
ulong.Parse(Preferences["PublicFeedbackChannel"]));
public SocketTextChannel? PublicFeedbackChannel
=> Boyfriend.Client.GetGuild(_id)
.GetTextChannel(
ulong.Parse(Preferences["PublicFeedbackChannel"]));
public SocketTextChannel? PrivateFeedbackChannel => Boyfriend.Client.GetGuild(_id)
.GetTextChannel(
ulong.Parse(
Preferences["PrivateFeedbackChannel"]));
.GetTextChannel(
ulong.Parse(
Preferences["PrivateFeedbackChannel"]));
public static GuildData Get(SocketGuild guild) {
if (GuildDataDictionary.TryGetValue(guild.Id, out var stored)) return stored;