Added Mention.Clean

This commit is contained in:
RogueException
2015-11-29 02:44:14 -04:00
parent 2e6f65b776
commit 639885b26e
2 changed files with 16 additions and 1 deletions

View File

@@ -23,6 +23,7 @@ namespace Discord
protected readonly DiscordClient _client;
private bool _isCached;
internal DiscordClient Client => _client;
internal bool IsCached => _isCached;
internal CachedObject(DiscordClient client)

View File

@@ -64,5 +64,19 @@ namespace Discord
return e.Value;
}));
}*/
}
/// <summary>Resolves all mentions in a provided string to those users, channels or roles' names.</summary>
internal static string Clean(Message msg, string text)
{
var client = msg.Client;
var server = msg.Server;
text = Mention.CleanUserMentions(client, server, text);
if (server != null)
{
text = Mention.CleanChannelMentions(client, server, text);
//text = Mention.CleanRoleMentions(_client, User, channel, text);
}
return text;
}
}
}