This website works better with JavaScript.
Home
Issues
Pull Requests
Milestones
AI流水线
Repositories
Datasets
Forum
实训
竞赛
大数据
Register
Sign In
youys
/
Discord.Net
Not watched
Unwatch
Watch all
Watch but not notify
1
Star
0
Fork
0
Code
Releases
34
Wiki
Activity
Issues
0
Pull Requests
0
Datasets
Model
Cloudbrain
Browse Source
Moved the namespace from Discord.Commands to Discord
pull/1102/head
Casino Boyale
7 years ago
parent
73e960f6d9
commit
2bafbf9496
2 changed files
with
11 additions
and
5 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+0
-5
src/Discord.Net.Commands/Extensions/MessageExtensions.cs
+11
-0
src/Discord.Net.Core/Extensions/MessageExtensions.cs
+ 0
- 5
src/Discord.Net.Commands/Extensions/MessageExtensions.cs
View File
@@ -42,10 +42,5 @@ namespace Discord.Commands
}
return false;
}
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}";
}
}
}
+ 11
- 0
src/Discord.Net.Core/Extensions/MessageExtensions.cs
View File
@@ -0,0 +1,11 @@
namespace Discord
{
public static class MessageExtensions
{
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}";
}
}
}
Write
Preview
Loading…
Cancel
Save