Browse Source

Apply suggestions from code review

Co-authored-by: Quin Lynch <49576606+quinchs@users.noreply.github.com>
pull/2510/head
Cenk Ergen GitHub 2 years ago
parent
commit
fe16a58db7
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 21 additions and 7 deletions
  1. +4
    -0
      src/Discord.Net.Core/Entities/Guilds/WelcomeScreenChannelProperties.cs
  2. +17
    -4
      src/Discord.Net.Core/Entities/Invites/InviteGuild.cs
  3. +0
    -1
      src/Discord.Net.Rest/API/Common/InviteGuild.cs
  4. +0
    -1
      src/Discord.Net.Rest/API/Rest/ModifyGuildWelcomeScreenParams.cs
  5. +0
    -1
      src/Discord.Net.Rest/Entities/Guilds/GuildHelper.cs

+ 4
- 0
src/Discord.Net.Core/Entities/Guilds/WelcomeScreenChannelProperties.cs View File

@@ -40,6 +40,10 @@ public class WelcomeScreenChannelProperties : ISnowflakeEntity
Emoji = emoji;
}

/// <summary>
/// Initializes a new instance of <see cref="WelcomeScreenChannelProperties"/>.
/// </summary>
public WelcomeScreenChannelProperties() { }
/// <summary>
/// Initializes a new instance of <see cref="WelcomeScreenChannelProperties"/>.
/// </summary>


+ 17
- 4
src/Discord.Net.Core/Entities/Invites/InviteGuild.cs View File

@@ -80,8 +80,10 @@ public class InviteGuild : ISnowflakeEntity
/// <returns>
/// A URL pointing to the guild's icon; <see langword="null" /> if none is set.
/// </returns>
public string IconUrl => CDN.GetGuildIconUrl(Id, IconId);/// <summary>
///
public string IconUrl => CDN.GetGuildIconUrl(Id, IconId);
/// <summary>
///
/// Gets the level of requirements a user must fulfill before being allowed to post messages in this guild.
/// </summary>
/// <returns>
@@ -121,11 +123,22 @@ public class InviteGuild : ISnowflakeEntity
/// </summary>
/// <returns>
/// The welcome screen of this guild. <see langword="null" /> if none is set.
/// The welcome screen of this guild. <see langword="null" /> if none is set.
/// </returns>
public WelcomeScreen WelcomeScreen { get; private set; }

internal InviteGuild(ulong id, string name, string description, string splashId, string bannerId, GuildFeatures features, string iconId, VerificationLevel verificationLevel, string vanityURLCode, int premiumSubscriptionCount, NsfwLevel nsfwLevel, WelcomeScreen welcomeScreen)
internal InviteGuild(
ulong id,
string name,
string description,
string splashId,
string bannerId,
GuildFeatures features,
string iconId,
VerificationLevel verificationLevel,
string vanityURLCode,
int premiumSubscriptionCount,
NsfwLevel nsfwLevel,
WelcomeScreen welcomeScreen)
{
Id = id;
Name = name;


+ 0
- 1
src/Discord.Net.Rest/API/Common/InviteGuild.cs View File

@@ -1,5 +1,4 @@
using Newtonsoft.Json;
using System.Collections.Generic;

namespace Discord.API
{


+ 0
- 1
src/Discord.Net.Rest/API/Rest/ModifyGuildWelcomeScreenParams.cs View File

@@ -2,7 +2,6 @@ using Newtonsoft.Json;

namespace Discord.API.Rest;

[JsonObject(MemberSerialization = MemberSerialization.OptIn)]
internal class ModifyGuildWelcomeScreenParams
{
[JsonProperty("enabled")]


+ 0
- 1
src/Discord.Net.Rest/Entities/Guilds/GuildHelper.cs View File

@@ -2,7 +2,6 @@ using Discord.API.Rest;
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using WidgetModel = Discord.API.GuildWidget;


Loading…
Cancel
Save