mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 01:38:27 -04:00
Killed history
This commit is contained in:
24
NadekoBot.Core/Services/Impl/StartingGuildsListService.cs
Normal file
24
NadekoBot.Core/Services/Impl/StartingGuildsListService.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using Discord.WebSocket;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Immutable;
|
||||
using System.Linq;
|
||||
using System.Collections;
|
||||
|
||||
namespace NadekoBot.Core.Services.Impl
|
||||
{
|
||||
public class StartingGuildsService : IEnumerable<ulong>, INService
|
||||
{
|
||||
private readonly ImmutableList<ulong> _guilds;
|
||||
|
||||
public StartingGuildsService(DiscordSocketClient client)
|
||||
{
|
||||
this._guilds = client.Guilds.Select(x => x.Id).ToImmutableList();
|
||||
}
|
||||
|
||||
public IEnumerator<ulong> GetEnumerator() =>
|
||||
_guilds.GetEnumerator();
|
||||
|
||||
IEnumerator IEnumerable.GetEnumerator() =>
|
||||
_guilds.GetEnumerator();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user