Fixed nullref in repeaters

This commit is contained in:
Kwoth 2017-03-09 04:28:05 +01:00
parent 42c394f53b
commit b86589c15a

View File

@ -114,11 +114,10 @@ namespace NadekoBot.Modules.Utility
source.Cancel();
}
public override string ToString()
{
return
$"{Channel.Mention} | {(int) Repeater.Interval.TotalHours}:{Repeater.Interval:mm} | {Repeater.Message.TrimTo(33)}";
}
public override string ToString() =>
$"{Channel?.Mention ?? $"<#{Repeater.ChannelId}>" } " +
$"| {(int) Repeater.Interval.TotalHours}:{Repeater.Interval:mm} " +
$"| {Repeater.Message.TrimTo(33)}";
}
static RepeatCommands()