| @@ -225,7 +225,7 @@ namespace Discord.Commands | |||||
| return false; | return false; | ||||
| } | } | ||||
| public SearchResult Search(IMessage message, int argPos) => Search(message, message.Text.Substring(argPos)); | |||||
| public SearchResult Search(IMessage message, int argPos) => Search(message, message.Content.Substring(argPos)); | |||||
| public SearchResult Search(IMessage message, string input) | public SearchResult Search(IMessage message, string input) | ||||
| { | { | ||||
| string lowerInput = input.ToLowerInvariant(); | string lowerInput = input.ToLowerInvariant(); | ||||
| @@ -237,7 +237,7 @@ namespace Discord.Commands | |||||
| return SearchResult.FromError(CommandError.UnknownCommand, "Unknown command."); | return SearchResult.FromError(CommandError.UnknownCommand, "Unknown command."); | ||||
| } | } | ||||
| public Task<IResult> Execute(IMessage message, int argPos) => Execute(message, message.Text.Substring(argPos)); | |||||
| public Task<IResult> Execute(IMessage message, int argPos) => Execute(message, message.Content.Substring(argPos)); | |||||
| public async Task<IResult> Execute(IMessage message, string input) | public async Task<IResult> Execute(IMessage message, string input) | ||||
| { | { | ||||
| var searchResult = Search(message, input); | var searchResult = Search(message, input); | ||||
| @@ -4,7 +4,7 @@ | |||||
| { | { | ||||
| public static bool HasCharPrefix(this IMessage msg, char c, ref int argPos) | public static bool HasCharPrefix(this IMessage msg, char c, ref int argPos) | ||||
| { | { | ||||
| var text = msg.Text; | |||||
| var text = msg.Content; | |||||
| if (text.Length > 0 && text[0] == c) | if (text.Length > 0 && text[0] == c) | ||||
| { | { | ||||
| argPos = 1; | argPos = 1; | ||||
| @@ -14,7 +14,7 @@ | |||||
| } | } | ||||
| public static bool HasStringPrefix(this IMessage msg, string str, ref int argPos) | public static bool HasStringPrefix(this IMessage msg, string str, ref int argPos) | ||||
| { | { | ||||
| var text = msg.Text; | |||||
| var text = msg.Content; | |||||
| //str = str + ' '; | //str = str + ' '; | ||||
| if (text.StartsWith(str)) | if (text.StartsWith(str)) | ||||
| { | { | ||||
| @@ -25,7 +25,7 @@ | |||||
| } | } | ||||
| public static bool HasMentionPrefix(this IMessage msg, IUser user, ref int argPos) | public static bool HasMentionPrefix(this IMessage msg, IUser user, ref int argPos) | ||||
| { | { | ||||
| var text = msg.Text; | |||||
| var text = msg.Content; | |||||
| string mention = user.Mention + ' '; | string mention = user.Mention + ' '; | ||||
| if (text.StartsWith(mention)) | if (text.StartsWith(mention)) | ||||
| { | { | ||||
| @@ -13,8 +13,8 @@ namespace Discord | |||||
| bool IsTTS { get; } | bool IsTTS { get; } | ||||
| /// <summary> Returns true if this message was added to its channel's pinned messages. </summary> | /// <summary> Returns true if this message was added to its channel's pinned messages. </summary> | ||||
| bool IsPinned { get; } | bool IsPinned { get; } | ||||
| /// <summary> Returns the text for this message. </summary> | |||||
| string Text { get; } | |||||
| /// <summary> Returns the content for this message. </summary> | |||||
| string Content { get; } | |||||
| /// <summary> Gets the time this message was sent. </summary> | /// <summary> Gets the time this message was sent. </summary> | ||||
| DateTimeOffset Timestamp { get; } | DateTimeOffset Timestamp { get; } | ||||
| @@ -20,7 +20,7 @@ namespace Discord | |||||
| public IUser Author { get; } | public IUser Author { get; } | ||||
| public bool IsTTS { get; private set; } | public bool IsTTS { get; private set; } | ||||
| public string Text { get; private set; } | |||||
| public string Content { get; private set; } | |||||
| public bool IsPinned { get; private set; } | public bool IsPinned { get; private set; } | ||||
| public IReadOnlyCollection<IAttachment> Attachments { get; private set; } | public IReadOnlyCollection<IAttachment> Attachments { get; private set; } | ||||
| @@ -120,7 +120,7 @@ namespace Discord | |||||
| MentionedChannelIds = MentionUtils.GetChannelMentions(text, guildChannel.Guild); | MentionedChannelIds = MentionUtils.GetChannelMentions(text, guildChannel.Guild); | ||||
| MentionedRoles = MentionUtils.GetRoleMentions(text, guildChannel.Guild); | MentionedRoles = MentionUtils.GetRoleMentions(text, guildChannel.Guild); | ||||
| } | } | ||||
| Text = text; | |||||
| Content = text; | |||||
| } | } | ||||
| } | } | ||||
| @@ -165,9 +165,9 @@ namespace Discord | |||||
| } | } | ||||
| public string Resolve(int startIndex, int length, UserResolveMode userMode = UserResolveMode.NameOnly) | public string Resolve(int startIndex, int length, UserResolveMode userMode = UserResolveMode.NameOnly) | ||||
| => Resolve(Text.Substring(startIndex, length), userMode); | |||||
| => Resolve(Content.Substring(startIndex, length), userMode); | |||||
| public string Resolve(UserResolveMode userMode = UserResolveMode.NameOnly) | public string Resolve(UserResolveMode userMode = UserResolveMode.NameOnly) | ||||
| => Resolve(Text, userMode); | |||||
| => Resolve(Content, userMode); | |||||
| private string Resolve(string text, UserResolveMode userMode = UserResolveMode.NameOnly) | private string Resolve(string text, UserResolveMode userMode = UserResolveMode.NameOnly) | ||||
| { | { | ||||
| @@ -181,7 +181,7 @@ namespace Discord | |||||
| return text; | return text; | ||||
| } | } | ||||
| public override string ToString() => Text; | |||||
| private string DebuggerDisplay => $"{Author}: {Text}{(Attachments.Count > 0 ? $" [{Attachments.Count} Attachments]" : "")}"; | |||||
| public override string ToString() => Content; | |||||
| private string DebuggerDisplay => $"{Author}: {Content}{(Attachments.Count > 0 ? $" [{Attachments.Count} Attachments]" : "")}"; | |||||
| } | } | ||||
| } | } | ||||