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
Added GetJumpUrl() as an IMessage extension method
pull/1102/head
Casino Boyale
7 years ago
parent
322d46e47b
commit
e054cf4eec
1 changed files
with
8 additions
and
2 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+8
-2
src/Discord.Net.Commands/Extensions/MessageExtensions.cs
+ 8
- 2
src/Discord.Net.Commands/Extensions/MessageExtensions.cs
View File
@@ -1,4 +1,4 @@
using System;
using System;
namespace Discord.Commands
{
@@ -42,5 +42,11 @@ 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}";
}
}
}
}
Write
Preview
Loading…
Cancel
Save