diff --git a/Geekbot.net/Lib/SimpleConextConverter.cs b/Geekbot.net/Lib/SimpleConextConverter.cs index 2e12e50..3dbc58b 100644 --- a/Geekbot.net/Lib/SimpleConextConverter.cs +++ b/Geekbot.net/Lib/SimpleConextConverter.cs @@ -8,7 +8,33 @@ namespace Geekbot.net.Lib { public static MessageDto ConvertContext(ICommandContext context) { - return ConvertSocketMessage((SocketMessage) context.Message); + return new MessageDto() + { + Message = new MessageDto.MessageContent() + { + Content = context.Message.Content, + Id = context.Message.Id.ToString(), + Attachments = context.Message.Attachments.Count, + ChannelMentions = context.Message.MentionedChannelIds.Count, + UserMentions = context.Message.MentionedUserIds.Count, + RoleMentions = context.Message.MentionedRoleIds.Count + }, + User = new MessageDto.IdAndName() + { + Id = context.User.Id.ToString(), + Name = $"{context.User.Username}#{context.User.Discriminator}" + }, + Guild = new MessageDto.IdAndName() + { + Id = context.Guild.Id.ToString(), + Name = context.Guild.Name + }, + Channel = new MessageDto.IdAndName() + { + Id = context.Channel.Id.ToString(), + Name = context.Channel.Name + } + }; } public static MessageDto ConvertSocketMessage(SocketMessage message) {