mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-15 18:20:11 +00:00
use Shard.GetGuild instead of Rest.GetGuild
This commit is contained in:
parent
fbfba52227
commit
c20c4dab42
1 changed files with 1 additions and 2 deletions
|
|
@ -105,8 +105,7 @@ namespace PluralKit.Bot {
|
||||||
if (!ulong.TryParse(guildIdStr, out var guildId))
|
if (!ulong.TryParse(guildIdStr, out var guildId))
|
||||||
throw new PKSyntaxError($"Could not parse `{guildIdStr}` as an ID.");
|
throw new PKSyntaxError($"Could not parse `{guildIdStr}` as an ID.");
|
||||||
|
|
||||||
// TODO: will this call break for sharding if you try to request a guild on a different bot instance?
|
guild = ctx.Client.GetGuild(guildId);
|
||||||
guild = await ctx.Rest.GetGuild(guildId);
|
|
||||||
if (guild == null)
|
if (guild == null)
|
||||||
throw Errors.GuildNotFound(guildId);
|
throw Errors.GuildNotFound(guildId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue