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

View File

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

View File

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