Missing DebuggerDisplay attribute or property (#2630)

This commit is contained in:
Ge
2023-03-31 19:19:09 +08:00
committed by GitHub
parent 6265dd5bf6
commit 8ccc163fcd
3 changed files with 6 additions and 0 deletions

View File

@@ -1,7 +1,9 @@
using System;
using System.Diagnostics;
namespace Discord.Commands
{
[DebuggerDisplay(@"{DebuggerDisplay,nq}")]
public class MatchResult : IResult
{
/// <summary>

View File

@@ -27,6 +27,8 @@ namespace Discord.Rest
}
public override int SlowModeInterval => throw new NotSupportedException("News channels do not support Slow Mode.");
private string DebuggerDisplay => $"{Name} ({Id}, News)";
/// <inheritdoc />
public Task<ulong> FollowAnnouncementChannelAsync(ulong channelId, RequestOptions options = null)
=> ChannelHelper.FollowAnnouncementChannelAsync(this, channelId, Discord, options);

View File

@@ -37,6 +37,8 @@ namespace Discord.WebSocket
public override int SlowModeInterval
=> throw new NotSupportedException("News channels do not support Slow Mode.");
private string DebuggerDisplay => $"{Name} ({Id}, News)";
/// <inheritdoc cref="INewsChannel.FollowAnnouncementChannelAsync"/>
public Task<ulong> FollowAnnouncementChannelAsync(ITextChannel channel, RequestOptions options = null)
=> FollowAnnouncementChannelAsync(channel.Id, options);