mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
refactor: don't use 'out' in IDiscordCache methods
this change is required for async cache (.NET doesn't support async ref/out params)
This commit is contained in:
parent
3ba46ff456
commit
0efaab6d95
11 changed files with 48 additions and 52 deletions
|
|
@ -18,11 +18,11 @@ namespace Myriad.Cache
|
|||
public ValueTask RemoveUser(ulong userId);
|
||||
public ValueTask RemoveRole(ulong guildId, ulong roleId);
|
||||
|
||||
public Task<bool> TryGetGuild(ulong guildId, out Guild guild);
|
||||
public Task<bool> TryGetChannel(ulong channelId, out Channel channel);
|
||||
public Task<bool> TryGetDmChannel(ulong userId, out Channel channel);
|
||||
public Task<bool> TryGetUser(ulong userId, out User user);
|
||||
public Task<bool> TryGetRole(ulong roleId, out Role role);
|
||||
public Task<Guild?> TryGetGuild(ulong guildId);
|
||||
public Task<Channel?> TryGetChannel(ulong channelId);
|
||||
public Task<Channel?> TryGetDmChannel(ulong userId);
|
||||
public Task<User?> TryGetUser(ulong userId);
|
||||
public Task<Role?> TryGetRole(ulong roleId);
|
||||
|
||||
public IAsyncEnumerable<Guild> GetAllGuilds();
|
||||
public Task<IEnumerable<Channel>> GetGuildChannels(ulong guildId);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue