Return the messages from ImportMessages
This commit is contained in:
@@ -260,7 +260,7 @@ namespace Discord
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary> Deserializes messages from JSON format and imports them into the message cache.</summary>
|
/// <summary> Deserializes messages from JSON format and imports them into the message cache.</summary>
|
||||||
public void ImportMessages(string json)
|
public IEnumerable<Message> ImportMessages(string json)
|
||||||
{
|
{
|
||||||
if (json == null) throw new ArgumentNullException(nameof(json));
|
if (json == null) throw new ArgumentNullException(nameof(json));
|
||||||
|
|
||||||
@@ -278,6 +278,7 @@ namespace Discord
|
|||||||
})
|
})
|
||||||
.ToDictionary(x => x.Id);
|
.ToDictionary(x => x.Id);
|
||||||
_messages.Import(dic);
|
_messages.Import(dic);
|
||||||
|
return dic.Values;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary> Serializes the message cache for a given channel to JSON.</summary>
|
/// <summary> Serializes the message cache for a given channel to JSON.</summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user