Fixed errors caused by #321
This commit is contained in:
@@ -60,6 +60,8 @@ namespace Discord.Rest
|
|||||||
var model = await Discord.ApiClient.GetChannelMessageAsync(Channel.Id, Id, options).ConfigureAwait(false);
|
var model = await Discord.ApiClient.GetChannelMessageAsync(Channel.Id, Id, options).ConfigureAwait(false);
|
||||||
Update(model);
|
Update(model);
|
||||||
}
|
}
|
||||||
|
public Task DeleteAsync(RequestOptions options)
|
||||||
|
=> MessageHelper.DeleteAsync(this, Discord, options);
|
||||||
|
|
||||||
public override string ToString() => Content;
|
public override string ToString() => Content;
|
||||||
|
|
||||||
|
|||||||
@@ -116,8 +116,6 @@ namespace Discord.Rest
|
|||||||
var model = await MessageHelper.ModifyAsync(this, Discord, func, options).ConfigureAwait(false);
|
var model = await MessageHelper.ModifyAsync(this, Discord, func, options).ConfigureAwait(false);
|
||||||
Update(model);
|
Update(model);
|
||||||
}
|
}
|
||||||
public Task DeleteAsync(RequestOptions options)
|
|
||||||
=> MessageHelper.DeleteAsync(this, Discord, options);
|
|
||||||
|
|
||||||
public Task PinAsync(RequestOptions options)
|
public Task PinAsync(RequestOptions options)
|
||||||
=> MessageHelper.PinAsync(this, Discord, options);
|
=> MessageHelper.PinAsync(this, Discord, options);
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
using System;
|
using Discord.Rest;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Immutable;
|
using System.Collections.Immutable;
|
||||||
|
using System.Threading.Tasks;
|
||||||
using Model = Discord.API.Rpc.Message;
|
using Model = Discord.API.Rpc.Message;
|
||||||
|
|
||||||
namespace Discord.Rpc
|
namespace Discord.Rpc
|
||||||
@@ -56,6 +58,9 @@ namespace Discord.Rpc
|
|||||||
AuthorColor = new Color(Convert.ToUInt32(model.AuthorColor.Value.Substring(1), 16));
|
AuthorColor = new Color(Convert.ToUInt32(model.AuthorColor.Value.Substring(1), 16));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Task DeleteAsync(RequestOptions options)
|
||||||
|
=> MessageHelper.DeleteAsync(this, Discord, options);
|
||||||
|
|
||||||
public override string ToString() => Content;
|
public override string ToString() => Content;
|
||||||
|
|
||||||
MessageType IMessage.Type => MessageType.Default;
|
MessageType IMessage.Type => MessageType.Default;
|
||||||
|
|||||||
@@ -100,8 +100,6 @@ namespace Discord.Rpc
|
|||||||
|
|
||||||
public Task ModifyAsync(Action<ModifyMessageParams> func, RequestOptions options)
|
public Task ModifyAsync(Action<ModifyMessageParams> func, RequestOptions options)
|
||||||
=> MessageHelper.ModifyAsync(this, Discord, func, options);
|
=> MessageHelper.ModifyAsync(this, Discord, func, options);
|
||||||
public Task DeleteAsync(RequestOptions options)
|
|
||||||
=> MessageHelper.DeleteAsync(this, Discord, options);
|
|
||||||
|
|
||||||
public Task PinAsync(RequestOptions options)
|
public Task PinAsync(RequestOptions options)
|
||||||
=> MessageHelper.PinAsync(this, Discord, options);
|
=> MessageHelper.PinAsync(this, Discord, options);
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
using System;
|
using Discord.Rest;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Immutable;
|
using System.Collections.Immutable;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
using Model = Discord.API.Message;
|
using Model = Discord.API.Message;
|
||||||
|
|
||||||
namespace Discord.WebSocket
|
namespace Discord.WebSocket
|
||||||
@@ -52,6 +54,9 @@ namespace Discord.WebSocket
|
|||||||
Content = model.Content.Value;
|
Content = model.Content.Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Task DeleteAsync(RequestOptions options)
|
||||||
|
=> MessageHelper.DeleteAsync(this, Discord, options);
|
||||||
|
|
||||||
public override string ToString() => Content;
|
public override string ToString() => Content;
|
||||||
internal SocketMessage Clone() => MemberwiseClone() as SocketMessage;
|
internal SocketMessage Clone() => MemberwiseClone() as SocketMessage;
|
||||||
|
|
||||||
|
|||||||
@@ -112,8 +112,6 @@ namespace Discord.WebSocket
|
|||||||
|
|
||||||
public Task ModifyAsync(Action<ModifyMessageParams> func, RequestOptions options = null)
|
public Task ModifyAsync(Action<ModifyMessageParams> func, RequestOptions options = null)
|
||||||
=> MessageHelper.ModifyAsync(this, Discord, func, options);
|
=> MessageHelper.ModifyAsync(this, Discord, func, options);
|
||||||
public Task DeleteAsync(RequestOptions options = null)
|
|
||||||
=> MessageHelper.DeleteAsync(this, Discord, options);
|
|
||||||
|
|
||||||
public Task PinAsync(RequestOptions options = null)
|
public Task PinAsync(RequestOptions options = null)
|
||||||
=> MessageHelper.PinAsync(this, Discord, options);
|
=> MessageHelper.PinAsync(this, Discord, options);
|
||||||
|
|||||||
Reference in New Issue
Block a user