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:
parent
c1e3abce57
commit
9d5bafbbf5
5 changed files with 102 additions and 57 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue