mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
refactor: only pass shard ID to event handlers instead of full shard object
This commit is contained in:
parent
bf80dd0988
commit
50a24f03a7
13 changed files with 74 additions and 70 deletions
|
|
@ -28,11 +28,11 @@ public class Context
|
|||
|
||||
private Command? _currentCommand;
|
||||
|
||||
public Context(ILifetimeScope provider, Shard shard, Guild? guild, Channel channel, MessageCreateEvent message, int commandParseOffset,
|
||||
public Context(ILifetimeScope provider, int shardId, Guild? guild, Channel channel, MessageCreateEvent message, int commandParseOffset,
|
||||
PKSystem senderSystem, SystemConfig config, MessageContext messageContext)
|
||||
{
|
||||
Message = (Message)message;
|
||||
Shard = shard;
|
||||
ShardId = shardId;
|
||||
Guild = guild;
|
||||
Channel = channel;
|
||||
System = senderSystem;
|
||||
|
|
@ -58,7 +58,7 @@ public class Context
|
|||
|
||||
public readonly Message Message;
|
||||
public readonly Guild Guild;
|
||||
public readonly Shard Shard;
|
||||
public readonly int ShardId;
|
||||
public readonly Cluster Cluster;
|
||||
public readonly MessageContext MessageContext;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue