mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-05-13 17:26:08 +03:00
Resolve conversations pt.2
Signed-off-by: Macintosh II <mctaylxrs@outlook.com>
This commit is contained in:
parent
867084c077
commit
87800a56c1
2 changed files with 3 additions and 3 deletions
|
@ -27,8 +27,8 @@ public class GuildUnloadedResponder : IResponder<IGuildDelete>
|
||||||
public Task<Result> RespondAsync(IGuildDelete gatewayEvent, CancellationToken ct = default)
|
public Task<Result> RespondAsync(IGuildDelete gatewayEvent, CancellationToken ct = default)
|
||||||
{
|
{
|
||||||
var guildId = gatewayEvent.ID;
|
var guildId = gatewayEvent.ID;
|
||||||
var removeGuildSucceed = _guildData.RemoveGuildId(guildId);
|
var isDataRemoved = _guildData.UnloadGuildData(guildId);
|
||||||
if (removeGuildSucceed)
|
if (isDataRemoved)
|
||||||
{
|
{
|
||||||
_logger.LogInformation("Left guild {GuildId}", guildId);
|
_logger.LogInformation("Left guild {GuildId}", guildId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -143,7 +143,7 @@ public sealed class GuildDataService : IHostedService
|
||||||
return _datas.Keys;
|
return _datas.Keys;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool RemoveGuildId(Snowflake id)
|
public bool UnloadGuildData(Snowflake id)
|
||||||
{
|
{
|
||||||
return _datas.TryRemove(id, out _);
|
return _datas.TryRemove(id, out _);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue