public void raid_kick(Context ctx, uint id, ulong userID) { //Get a handle to the raid var handle = RaidManager.GetRaidFromID((int)id); //Make sure it exists Precondition.Assert(handle.HasValue, $"No raid with that id ({id})."); //Find the raider that matches the ID var player = RaidManager.FindRaider(handle.Value, userID); //Check that the raider exists in the roster Precondition.Assert(player.HasValue, "That raider is not in the roster."); //Pass on to the implementation this.raid_kick_impl(ctx, handle.Value, player.Value); }
public void raid_leave(Context ctx, uint id) { //Get a handle to the raid var handle = RaidManager.GetRaidFromID((int)id); //Make sure it exists Precondition.Assert(handle.HasValue, $"No raid with that id ({id})."); //Find the raider in the roster var player = RaidManager.FindRaider(handle.Value, ctx.message.Author.Id); //Check that the raider exists in the roster Precondition.Assert(player.HasValue, "You are not in the roster."); //Pass on to the implementation this.raid_leave_impl(ctx, handle.Value, player.Value); }