Reputation: 17
I am trying to make an application app with C# in Visual Studio. I need some help with this, I want to submit a template like this:
<discord tag>
Link: <link>
Description: <desc>
Any help is useful! Thanks!
Upvotes: 0
Views: 465
Reputation: 10460
Say you want to message a link to an article:
public class Article
{
public string Link { get; set; }
public string Description { get; set; }
}
Then try:
// implement your required logic for getting the tag
string tag = GetTag();
// implement your required logic for getting the reference
Article article = GetLinkWithDescription();
// Prepare the message
string message = string.Join(
"\n",
$"<@{tag}>",
$"Link: {article.Link}",
$"Description: {article.Description}"
);
// send the message
await Context.Channel.SendMessageAsync(message);
Upvotes: 1