Browse Source

lint: use TextChannel to get GuildID

pull/1102/head
Christopher F GitHub 7 years ago
parent
commit
96afbcf7a3
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/Discord.Net.Core/Extensions/MessageExtensions.cs

+ 1
- 1
src/Discord.Net.Core/Extensions/MessageExtensions.cs View File

@@ -5,7 +5,7 @@ namespace Discord
public static string GetJumpUrl(this IMessage msg)
{
var channel = msg.Channel;
return $"https://discordapp.com/channels/{(channel is IDMChannel ? "@me" : $"{(channel as IGuildChannel).GuildId}")}/{channel.Id}/{msg.Id}";
return $"https://discordapp.com/channels/{(channel is IDMChannel ? "@me" : $"{(channel as ITextChannel).GuildId}")}/{channel.Id}/{msg.Id}";
}
}
}

Loading…
Cancel
Save