message: Need to get a member first
diff: @@ -506,14 +506,6 @@ export class DiscordBot {
  public async HandleMatrixKickBan(
  roomId: string, kickeeUserId: string, kicker: string, kickban: "kick"|"ban", reason?: string,
  ) {
  - const kickeeUser = (await this.GetDiscordUserOrMember(
  - new MatrixUser(kickeeUserId.replace("@", "")).localpart.substring("_discord".length),
  - ))!;
  - if (!kickeeUser || kickeeUser instanceof Discord.User) {
  - log.error("Could not find discord user for", kicker);
  - return;
  - }
  - const kickee = kickeeUser as Discord.GuildMember;
  const client = await this.clientFactory.getClient(kicker);
  let channel: Discord.Channel;
  try {
  @@ -527,6 +519,15 @@ export class DiscordBot {
  return;
  }
  const tchan = (channel as Discord.TextChannel);
  + const kickeeUser = (await this.GetDiscordUserOrMember(
  + new MatrixUser(kickeeUserId.replace("@", "")).localpart.substring("_discord".length),
  + ), tchan.guild.id)!;
  + if (!kickeeUser) {
  + log.error("Could not find discord user for", kickeeUserId);
  + return;
  + }
  + const kickee = kickeeUser as Discord.GuildMember;
  +
  const existingPerms = tchan.memberPermissions(kickee);
  if (existingPerms && existingPerms.has(Discord.Permissions.FLAGS.VIEW_CHANNEL as number) === false ) {
  log.warn("User isn't allowed to read anyway.");
  