Merge pull request #23 from Kwoth/dev

More updates to stream notifications
This commit is contained in:
samvaio 2016-12-04 01:45:22 +05:30 committed by GitHub
commit 97510b94dd
2 changed files with 8 additions and 4 deletions

View File

@ -13,7 +13,9 @@
} }
public override int GetHashCode() => public override int GetHashCode() =>
ChannelId.GetHashCode() ^ Username.GetHashCode(); ChannelId.GetHashCode() ^
Username.GetHashCode() ^
Type.GetHashCode();
public override bool Equals(object obj) public override bool Equals(object obj)
{ {
@ -21,7 +23,9 @@
if (fs == null) if (fs == null)
return false; return false;
return fs.ChannelId == ChannelId && fs.Username.ToLowerInvariant().Trim() == Username.ToLowerInvariant().Trim(); return fs.ChannelId == ChannelId &&
fs.Username.ToLowerInvariant().Trim() == Username.ToLowerInvariant().Trim() &&
fs.Type == Type;
} }
} }
} }

View File

@ -156,8 +156,8 @@ namespace NadekoBot.Extensions
return list.ToArray(); return list.ToArray();
} }
public static Task<IUserMessage> EmbedAsync(this IMessageChannel ch, Discord.API.Embed embed) public static Task<IUserMessage> EmbedAsync(this IMessageChannel ch, Discord.API.Embed embed, string msg = "")
=> ch.SendMessageAsync("", embed: embed); => ch.SendMessageAsync(msg, embed: embed);
public static Task<IUserMessage> SendErrorAsync(this IMessageChannel ch, string error, string title = null, string url = null) public static Task<IUserMessage> SendErrorAsync(this IMessageChannel ch, string error, string title = null, string url = null)
=> ch.SendMessageAsync("", embed: new Embed() { Description = error, Title = title, Url = url, Color = NadekoBot.ErrorColor }); => ch.SendMessageAsync("", embed: new Embed() { Description = error, Title = title, Url = url, Color = NadekoBot.ErrorColor });