Format the project with 'dotnet format' (#2551)

* Sync and Re-Format

* Fix Title string.

* Fix indentation.
This commit is contained in:
NaN
2023-02-13 14:45:59 -03:00
committed by GitHub
parent 71e9ecb21e
commit 257f246d1d
401 changed files with 3178 additions and 2671 deletions

View File

@@ -1,8 +1,8 @@
using Discord;
using Discord.WebSocket;
using System; using System;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Discord;
using Discord.WebSocket;
namespace BasicBot namespace BasicBot
{ {
@@ -112,7 +112,8 @@ namespace BasicBot
if (component.Data.CustomId == "unique-id") if (component.Data.CustomId == "unique-id")
await interaction.RespondAsync("Thank you for clicking my button!"); await interaction.RespondAsync("Thank you for clicking my button!");
else Console.WriteLine("An ID has been received that has no handler!"); else
Console.WriteLine("An ID has been received that has no handler!");
} }
} }
} }

View File

@@ -30,7 +30,8 @@ namespace InteractionFramework.Attributes
? Task.FromResult(PreconditionResult.FromSuccess()) ? Task.FromResult(PreconditionResult.FromSuccess())
: Task.FromResult(PreconditionResult.FromError("User ID does not match component ID!")); : Task.FromResult(PreconditionResult.FromError("User ID does not match component ID!"));
else return Task.FromResult(PreconditionResult.FromError("Parse cannot be done if no userID exists.")); else
return Task.FromResult(PreconditionResult.FromError("Parse cannot be done if no userID exists."));
} }
} }
} }

View File

@@ -1,11 +1,11 @@
using System; using Discord.Commands;
using System.Collections.Immutable;
using System.Linq;
using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.Diagnostics; using Microsoft.CodeAnalysis.Diagnostics;
using Discord.Commands; using System;
using System.Collections.Immutable;
using System.Linq;
namespace Discord.Analyzers namespace Discord.Analyzers
{ {

View File

@@ -1,6 +1,6 @@
using System;
using Microsoft.CodeAnalysis;
using Discord.Commands; using Discord.Commands;
using Microsoft.CodeAnalysis;
using System;
namespace Discord.Analyzers namespace Discord.Analyzers
{ {

View File

@@ -1,7 +1,7 @@
using System; using System;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Collections.Generic;
namespace Discord.Commands.Builders namespace Discord.Commands.Builders
{ {

View File

@@ -20,7 +20,9 @@ namespace Discord.Commands.Builders
public string Name { get; set; } public string Name { get; set; }
public string Summary { get; set; } public string Summary { get; set; }
public string Remarks { get; set; } public string Remarks { get; set; }
public string Group { get => _group; public string Group
{
get => _group;
set set
{ {
_aliases.Remove(_group); _aliases.Remove(_group);

View File

@@ -1,11 +1,10 @@
using Discord.Commands.Builders;
using System; using System;
using System.Linq;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Reflection; using System.Reflection;
using System.Threading.Tasks; using System.Threading.Tasks;
using Discord.Commands.Builders;
namespace Discord.Commands namespace Discord.Commands
{ {
internal static class ModuleClassBuilder internal static class ModuleClassBuilder

View File

@@ -1,9 +1,8 @@
using System; using System;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
using System.Collections.Generic;
namespace Discord.Commands.Builders namespace Discord.Commands.Builders
{ {
public class ParameterBuilder public class ParameterBuilder

View File

@@ -1,3 +1,5 @@
using Discord.Commands.Builders;
using Discord.Logging;
using System; using System;
using System.Collections.Concurrent; using System.Collections.Concurrent;
using System.Collections.Generic; using System.Collections.Generic;
@@ -6,8 +8,6 @@ using System.Linq;
using System.Reflection; using System.Reflection;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Discord.Commands.Builders;
using Discord.Logging;
namespace Discord.Commands namespace Discord.Commands
{ {

View File

@@ -45,13 +45,17 @@ namespace Discord.Commands
public static bool HasMentionPrefix(this IUserMessage msg, IUser user, ref int argPos) public static bool HasMentionPrefix(this IUserMessage msg, IUser user, ref int argPos)
{ {
var text = msg.Content; var text = msg.Content;
if (string.IsNullOrEmpty(text) || text.Length <= 3 || text[0] != '<' || text[1] != '@') return false; if (string.IsNullOrEmpty(text) || text.Length <= 3 || text[0] != '<' || text[1] != '@')
return false;
int endPos = text.IndexOf('>'); int endPos = text.IndexOf('>');
if (endPos == -1) return false; if (endPos == -1)
if (text.Length < endPos + 2 || text[endPos + 1] != ' ') return false; //Must end in "> " return false;
if (text.Length < endPos + 2 || text[endPos + 1] != ' ')
return false; //Must end in "> "
if (!MentionUtils.TryParseUser(text.Substring(0, endPos + 1), out ulong userId)) return false; if (!MentionUtils.TryParseUser(text.Substring(0, endPos + 1), out ulong userId))
return false;
if (userId == user.Id) if (userId == user.Id)
{ {
argPos = endPos + 2; argPos = endPos + 2;

View File

@@ -1,8 +1,8 @@
using Discord.Commands.Builders; using Discord.Commands.Builders;
using System; using System;
using System.Collections.Concurrent;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.Immutable; using System.Collections.Immutable;
using System.Collections.Concurrent;
using System.Diagnostics; using System.Diagnostics;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;

View File

@@ -1,8 +1,8 @@
using Discord.Commands.Builders;
using System; using System;
using System.Linq;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.Immutable; using System.Collections.Immutable;
using Discord.Commands.Builders; using System.Linq;
namespace Discord.Commands namespace Discord.Commands
{ {

View File

@@ -1,6 +1,6 @@
using Discord.Commands.Builders;
using System; using System;
using System.Threading.Tasks; using System.Threading.Tasks;
using Discord.Commands.Builders;
namespace Discord.Commands namespace Discord.Commands
{ {

View File

@@ -1,4 +1,4 @@
using System; using System;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;

View File

@@ -1,5 +1,5 @@
using System.Collections.Generic;
using System; using System;
using System.Collections.Generic;
using System.Collections.Immutable; using System.Collections.Immutable;
namespace Discord; namespace Discord;

View File

@@ -1,4 +1,4 @@
namespace Discord namespace Discord
{ {
/// <summary> /// <summary>
/// Provides properties that are used to modify an <see cref="IAudioChannel" /> with the specified changes. /// Provides properties that are used to modify an <see cref="IAudioChannel" /> with the specified changes.

View File

@@ -1,6 +1,6 @@
using System; using System;
using System.Globalization;
using System.Diagnostics; using System.Diagnostics;
using System.Globalization;
namespace Discord namespace Discord
{ {
@@ -44,11 +44,14 @@ namespace Discord
/// <param name="other">The object to compare with the current object.</param> /// <param name="other">The object to compare with the current object.</param>
public override bool Equals(object other) public override bool Equals(object other)
{ {
if (other == null) return false; if (other == null)
if (other == this) return true; return false;
if (other == this)
return true;
var otherEmote = other as Emote; var otherEmote = other as Emote;
if (otherEmote == null) return false; if (otherEmote == null)
return false;
return Id == otherEmote.Id; return Id == otherEmote.Id;
} }

View File

@@ -1,4 +1,4 @@
namespace Discord namespace Discord
{ {
public enum TextInputStyle public enum TextInputStyle
{ {

View File

@@ -1,9 +1,9 @@
using Discord.Utils;
using Newtonsoft.Json;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.Immutable; using System.Collections.Immutable;
using System.Linq; using System.Linq;
using Discord.Utils;
using Newtonsoft.Json;
namespace Discord namespace Discord
{ {
@@ -50,7 +50,8 @@ namespace Discord
get => _title; get => _title;
set set
{ {
if (value?.Length > MaxTitleLength) throw new ArgumentException(message: $"Title length must be less than or equal to {MaxTitleLength}.", paramName: nameof(Title)); if (value?.Length > MaxTitleLength)
throw new ArgumentException(message: $"Title length must be less than or equal to {MaxTitleLength}.", paramName: nameof(Title));
_title = value; _title = value;
} }
} }
@@ -63,7 +64,8 @@ namespace Discord
get => _description; get => _description;
set set
{ {
if (value?.Length > MaxDescriptionLength) throw new ArgumentException(message: $"Description length must be less than or equal to {MaxDescriptionLength}.", paramName: nameof(Description)); if (value?.Length > MaxDescriptionLength)
throw new ArgumentException(message: $"Description length must be less than or equal to {MaxDescriptionLength}.", paramName: nameof(Description));
_description = value; _description = value;
} }
} }
@@ -100,8 +102,10 @@ namespace Discord
get => _fields; get => _fields;
set set
{ {
if (value == null) throw new ArgumentNullException(paramName: nameof(Fields), message: "Cannot set an embed builder's fields collection to null."); if (value == null)
if (value.Count > MaxFieldCount) throw new ArgumentException(message: $"Field count must be less than or equal to {MaxFieldCount}.", paramName: nameof(Fields)); throw new ArgumentNullException(paramName: nameof(Fields), message: "Cannot set an embed builder's fields collection to null.");
if (value.Count > MaxFieldCount)
throw new ArgumentException(message: $"Field count must be less than or equal to {MaxFieldCount}.", paramName: nameof(Fields));
_fields = value; _fields = value;
} }
} }
@@ -564,8 +568,10 @@ namespace Discord
get => _name; get => _name;
set set
{ {
if (string.IsNullOrWhiteSpace(value)) throw new ArgumentException(message: "Field name must not be null, empty or entirely whitespace.", paramName: nameof(Name)); if (string.IsNullOrWhiteSpace(value))
if (value.Length > MaxFieldNameLength) throw new ArgumentException(message: $"Field name length must be less than or equal to {MaxFieldNameLength}.", paramName: nameof(Name)); throw new ArgumentException(message: "Field name must not be null, empty or entirely whitespace.", paramName: nameof(Name));
if (value.Length > MaxFieldNameLength)
throw new ArgumentException(message: $"Field name length must be less than or equal to {MaxFieldNameLength}.", paramName: nameof(Name));
_name = value; _name = value;
} }
} }
@@ -587,8 +593,10 @@ namespace Discord
set set
{ {
var stringValue = value?.ToString(); var stringValue = value?.ToString();
if (string.IsNullOrWhiteSpace(stringValue)) throw new ArgumentException(message: "Field value must not be null or empty.", paramName: nameof(Value)); if (string.IsNullOrWhiteSpace(stringValue))
if (stringValue.Length > MaxFieldValueLength) throw new ArgumentException(message: $"Field value length must be less than or equal to {MaxFieldValueLength}.", paramName: nameof(Value)); throw new ArgumentException(message: "Field value must not be null or empty.", paramName: nameof(Value));
if (stringValue.Length > MaxFieldValueLength)
throw new ArgumentException(message: $"Field value length must be less than or equal to {MaxFieldValueLength}.", paramName: nameof(Value));
_value = stringValue; _value = stringValue;
} }
} }
@@ -704,7 +712,8 @@ namespace Discord
get => _name; get => _name;
set set
{ {
if (value?.Length > MaxAuthorNameLength) throw new ArgumentException(message: $"Author name length must be less than or equal to {MaxAuthorNameLength}.", paramName: nameof(Name)); if (value?.Length > MaxAuthorNameLength)
throw new ArgumentException(message: $"Author name length must be less than or equal to {MaxAuthorNameLength}.", paramName: nameof(Name));
_name = value; _name = value;
} }
} }
@@ -836,7 +845,8 @@ namespace Discord
get => _text; get => _text;
set set
{ {
if (value?.Length > MaxFooterTextLength) throw new ArgumentException(message: $"Footer text length must be less than or equal to {MaxFooterTextLength}.", paramName: nameof(Text)); if (value?.Length > MaxFooterTextLength)
throw new ArgumentException(message: $"Footer text length must be less than or equal to {MaxFooterTextLength}.", paramName: nameof(Text));
_text = value; _text = value;
} }
} }

View File

@@ -1,4 +1,4 @@
namespace Discord namespace Discord
{ {
public interface ITag public interface ITag
{ {

View File

@@ -1,4 +1,4 @@
using System.Diagnostics; using System.Diagnostics;
namespace Discord namespace Discord
{ {

View File

@@ -225,7 +225,8 @@ namespace Discord
embedLinks, attachFiles, readMessageHistory, mentionEveryone, useExternalEmojis, connect, speak, muteMembers, deafenMembers, embedLinks, attachFiles, readMessageHistory, mentionEveryone, useExternalEmojis, connect, speak, muteMembers, deafenMembers,
moveMembers, useVoiceActivation, manageRoles, manageWebhooks, prioritySpeaker, stream, useSlashCommands, useApplicationCommands, moveMembers, useVoiceActivation, manageRoles, manageWebhooks, prioritySpeaker, stream, useSlashCommands, useApplicationCommands,
requestToSpeak, manageThreads, createPublicThreads, createPrivateThreads, usePublicThreads, usePrivateThreads, useExternalStickers, requestToSpeak, manageThreads, createPublicThreads, createPrivateThreads, usePublicThreads, usePrivateThreads, useExternalStickers,
sendMessagesInThreads, startEmbeddedActivities) { } sendMessagesInThreads, startEmbeddedActivities)
{ }
/// <summary> /// <summary>
/// Initializes a new <see cref="OverwritePermissions" /> from the current one, changing the provided /// Initializes a new <see cref="OverwritePermissions" /> from the current one, changing the provided

View File

@@ -1,4 +1,4 @@
using System; using System;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace Discord namespace Discord

View File

@@ -1,7 +1,7 @@
using System; using System;
using System.Threading.Tasks;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Threading.Tasks;
namespace Discord namespace Discord
{ {

View File

@@ -1,4 +1,4 @@
namespace Discord.Net.Rest namespace Discord.Net.Rest
{ {
public delegate IRestClient RestClientProvider(string baseUrl); public delegate IRestClient RestClientProvider(string baseUrl);
} }

View File

@@ -1,4 +1,4 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Net; using System.Net;

View File

@@ -1,4 +1,4 @@
using System; using System;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;

View File

@@ -1,4 +1,4 @@
namespace Discord.Net.Udp namespace Discord.Net.Udp
{ {
public delegate IUdpSocket UdpSocketProvider(); public delegate IUdpSocket UdpSocketProvider();
} }

View File

@@ -1,4 +1,4 @@
using System; using System;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;

View File

@@ -1,4 +1,4 @@
namespace Discord.Net.WebSockets namespace Discord.Net.WebSockets
{ {
public delegate IWebSocketClient WebSocketProvider(); public delegate IWebSocketClient WebSocketProvider();
} }

View File

@@ -1,4 +1,4 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.Immutable; using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;

View File

@@ -161,7 +161,8 @@ namespace Discord
public ConcurrentHashSet(IEnumerable<T> collection, IEqualityComparer<T> comparer) public ConcurrentHashSet(IEnumerable<T> collection, IEqualityComparer<T> comparer)
: this(comparer) : this(comparer)
{ {
if (collection == null) throw new ArgumentNullException(paramName: nameof(collection)); if (collection == null)
throw new ArgumentNullException(paramName: nameof(collection));
InitializeFromCollection(collection); InitializeFromCollection(collection);
} }
/// <exception cref="ArgumentNullException"> /// <exception cref="ArgumentNullException">
@@ -170,17 +171,22 @@ namespace Discord
public ConcurrentHashSet(int concurrencyLevel, IEnumerable<T> collection, IEqualityComparer<T> comparer) public ConcurrentHashSet(int concurrencyLevel, IEnumerable<T> collection, IEqualityComparer<T> comparer)
: this(concurrencyLevel, DefaultCapacity, false, comparer) : this(concurrencyLevel, DefaultCapacity, false, comparer)
{ {
if (collection == null) throw new ArgumentNullException(paramName: nameof(collection)); if (collection == null)
if (comparer == null) throw new ArgumentNullException(paramName: nameof(comparer)); throw new ArgumentNullException(paramName: nameof(collection));
if (comparer == null)
throw new ArgumentNullException(paramName: nameof(comparer));
InitializeFromCollection(collection); InitializeFromCollection(collection);
} }
public ConcurrentHashSet(int concurrencyLevel, int capacity, IEqualityComparer<T> comparer) public ConcurrentHashSet(int concurrencyLevel, int capacity, IEqualityComparer<T> comparer)
: this(concurrencyLevel, capacity, false, comparer) { } : this(concurrencyLevel, capacity, false, comparer) { }
internal ConcurrentHashSet(int concurrencyLevel, int capacity, bool growLockArray, IEqualityComparer<T> comparer) internal ConcurrentHashSet(int concurrencyLevel, int capacity, bool growLockArray, IEqualityComparer<T> comparer)
{ {
if (concurrencyLevel < 1) throw new ArgumentOutOfRangeException(paramName: nameof(concurrencyLevel)); if (concurrencyLevel < 1)
if (capacity < 0) throw new ArgumentOutOfRangeException(paramName: nameof(capacity)); throw new ArgumentOutOfRangeException(paramName: nameof(concurrencyLevel));
if (comparer == null) throw new ArgumentNullException(paramName: nameof(comparer)); if (capacity < 0)
throw new ArgumentOutOfRangeException(paramName: nameof(capacity));
if (comparer == null)
throw new ArgumentNullException(paramName: nameof(comparer));
if (capacity < concurrencyLevel) if (capacity < concurrencyLevel)
capacity = concurrencyLevel; capacity = concurrencyLevel;
@@ -201,7 +207,8 @@ namespace Discord
{ {
foreach (var value in collection) foreach (var value in collection)
{ {
if (value == null) throw new ArgumentNullException(paramName: "key"); if (value == null)
throw new ArgumentNullException(paramName: "key");
if (!TryAddInternal(value, _comparer.GetHashCode(value), false)) if (!TryAddInternal(value, _comparer.GetHashCode(value), false))
throw new ArgumentException(); throw new ArgumentException();
@@ -213,7 +220,8 @@ namespace Discord
/// <exception cref="ArgumentNullException"><paramref name="value"/> is <c>null</c></exception> /// <exception cref="ArgumentNullException"><paramref name="value"/> is <c>null</c></exception>
public bool ContainsKey(T value) public bool ContainsKey(T value)
{ {
if (value == null) throw new ArgumentNullException(paramName: "key"); if (value == null)
throw new ArgumentNullException(paramName: "key");
return ContainsKeyInternal(value, _comparer.GetHashCode(value)); return ContainsKeyInternal(value, _comparer.GetHashCode(value));
} }
private bool ContainsKeyInternal(T value, int hashcode) private bool ContainsKeyInternal(T value, int hashcode)
@@ -237,7 +245,8 @@ namespace Discord
/// <exception cref="ArgumentNullException"><paramref name="value"/> is <c>null</c></exception> /// <exception cref="ArgumentNullException"><paramref name="value"/> is <c>null</c></exception>
public bool TryAdd(T value) public bool TryAdd(T value)
{ {
if (value == null) throw new ArgumentNullException(paramName: "key"); if (value == null)
throw new ArgumentNullException(paramName: "key");
return TryAddInternal(value, _comparer.GetHashCode(value), true); return TryAddInternal(value, _comparer.GetHashCode(value), true);
} }
private bool TryAddInternal(T value, int hashcode, bool acquireLock) private bool TryAddInternal(T value, int hashcode, bool acquireLock)
@@ -266,7 +275,8 @@ namespace Discord
} }
Volatile.Write(ref tables._buckets[bucketNo], new Node(value, hashcode, tables._buckets[bucketNo])); Volatile.Write(ref tables._buckets[bucketNo], new Node(value, hashcode, tables._buckets[bucketNo]));
checked { tables._countPerLock[lockNo]++; } checked
{ tables._countPerLock[lockNo]++; }
if (tables._countPerLock[lockNo] > _budget) if (tables._countPerLock[lockNo] > _budget)
resizeDesired = true; resizeDesired = true;
@@ -287,7 +297,8 @@ namespace Discord
/// <exception cref="ArgumentNullException"><paramref name="value"/> is <c>null</c></exception> /// <exception cref="ArgumentNullException"><paramref name="value"/> is <c>null</c></exception>
public bool TryRemove(T value) public bool TryRemove(T value)
{ {
if (value == null) throw new ArgumentNullException(paramName: "key"); if (value == null)
throw new ArgumentNullException(paramName: "key");
return TryRemoveInternal(value); return TryRemoveInternal(value);
} }
private bool TryRemoveInternal(T value) private bool TryRemoveInternal(T value)
@@ -432,7 +443,8 @@ namespace Discord
newBuckets[newBucketNo] = new Node(current._value, current._hashcode, newBuckets[newBucketNo]); newBuckets[newBucketNo] = new Node(current._value, current._hashcode, newBuckets[newBucketNo]);
checked { newCountPerLock[newLockNo]++; } checked
{ newCountPerLock[newLockNo]++; }
current = next; current = next;
} }

View File

@@ -136,27 +136,33 @@ namespace Discord
switch (tag.Type) switch (tag.Type)
{ {
case TagType.UserMention: case TagType.UserMention:
if (userHandling == TagHandling.Ignore) continue; if (userHandling == TagHandling.Ignore)
continue;
newText = ResolveUserMention(tag, userHandling); newText = ResolveUserMention(tag, userHandling);
break; break;
case TagType.ChannelMention: case TagType.ChannelMention:
if (channelHandling == TagHandling.Ignore) continue; if (channelHandling == TagHandling.Ignore)
continue;
newText = ResolveChannelMention(tag, channelHandling); newText = ResolveChannelMention(tag, channelHandling);
break; break;
case TagType.RoleMention: case TagType.RoleMention:
if (roleHandling == TagHandling.Ignore) continue; if (roleHandling == TagHandling.Ignore)
continue;
newText = ResolveRoleMention(tag, roleHandling); newText = ResolveRoleMention(tag, roleHandling);
break; break;
case TagType.EveryoneMention: case TagType.EveryoneMention:
if (everyoneHandling == TagHandling.Ignore) continue; if (everyoneHandling == TagHandling.Ignore)
continue;
newText = ResolveEveryoneMention(tag, everyoneHandling); newText = ResolveEveryoneMention(tag, everyoneHandling);
break; break;
case TagType.HereMention: case TagType.HereMention:
if (everyoneHandling == TagHandling.Ignore) continue; if (everyoneHandling == TagHandling.Ignore)
continue;
newText = ResolveHereMention(tag, everyoneHandling); newText = ResolveHereMention(tag, everyoneHandling);
break; break;
case TagType.Emoji: case TagType.Emoji:
if (emojiHandling == TagHandling.Ignore) continue; if (emojiHandling == TagHandling.Ignore)
continue;
newText = ResolveEmoji(tag, emojiHandling); newText = ResolveEmoji(tag, emojiHandling);
break; break;
} }

View File

@@ -36,8 +36,10 @@ namespace Discord
public override bool Equals(object other) public override bool Equals(object other)
{ {
if (!IsSpecified) return other == null; if (!IsSpecified)
if (other == null) return false; return other == null;
if (other == null)
return false;
return _value.Equals(other); return _value.Equals(other);
} }
public override int GetHashCode() => IsSpecified ? _value.GetHashCode() : 0; public override int GetHashCode() => IsSpecified ? _value.GetHashCode() : 0;

View File

@@ -1,4 +1,4 @@
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.Immutable; using System.Collections.Immutable;

View File

@@ -1,4 +1,4 @@
namespace Discord namespace Discord
{ {
internal class PageInfo internal class PageInfo
{ {

View File

@@ -12,8 +12,10 @@ namespace Discord
private static ArgumentNullException CreateNotNullException(string name, string msg) private static ArgumentNullException CreateNotNullException(string name, string msg)
{ {
if (msg == null) return new ArgumentNullException(paramName: name); if (msg == null)
else return new ArgumentNullException(paramName: name, message: msg); return new ArgumentNullException(paramName: name);
else
return new ArgumentNullException(paramName: name, message: msg);
} }
#endregion #endregion
@@ -26,8 +28,10 @@ namespace Discord
/// <exception cref="ArgumentNullException"><paramref name="obj"/> must not be <see langword="null"/>.</exception> /// <exception cref="ArgumentNullException"><paramref name="obj"/> must not be <see langword="null"/>.</exception>
public static void NotNullOrEmpty(string obj, string name, string msg = null) public static void NotNullOrEmpty(string obj, string name, string msg = null)
{ {
if (obj == null) throw CreateNotNullException(name, msg); if (obj == null)
if (obj.Length == 0) throw CreateNotEmptyException(name, msg); throw CreateNotNullException(name, msg);
if (obj.Length == 0)
throw CreateNotEmptyException(name, msg);
} }
/// <exception cref="ArgumentException"><paramref name="obj"/> cannot be blank.</exception> /// <exception cref="ArgumentException"><paramref name="obj"/> cannot be blank.</exception>
/// <exception cref="ArgumentNullException"><paramref name="obj"/> must not be <see langword="null"/>.</exception> /// <exception cref="ArgumentNullException"><paramref name="obj"/> must not be <see langword="null"/>.</exception>
@@ -35,16 +39,20 @@ namespace Discord
{ {
if (obj.IsSpecified) if (obj.IsSpecified)
{ {
if (obj.Value == null) throw CreateNotNullException(name, msg); if (obj.Value == null)
if (obj.Value.Length == 0) throw CreateNotEmptyException(name, msg); throw CreateNotNullException(name, msg);
if (obj.Value.Length == 0)
throw CreateNotEmptyException(name, msg);
} }
} }
/// <exception cref="ArgumentException"><paramref name="obj"/> cannot be blank.</exception> /// <exception cref="ArgumentException"><paramref name="obj"/> cannot be blank.</exception>
/// <exception cref="ArgumentNullException"><paramref name="obj"/> must not be <see langword="null"/>.</exception> /// <exception cref="ArgumentNullException"><paramref name="obj"/> must not be <see langword="null"/>.</exception>
public static void NotNullOrWhitespace(string obj, string name, string msg = null) public static void NotNullOrWhitespace(string obj, string name, string msg = null)
{ {
if (obj == null) throw CreateNotNullException(name, msg); if (obj == null)
if (obj.Trim().Length == 0) throw CreateNotEmptyException(name, msg); throw CreateNotNullException(name, msg);
if (obj.Trim().Length == 0)
throw CreateNotEmptyException(name, msg);
} }
/// <exception cref="ArgumentException"><paramref name="obj"/> cannot be blank.</exception> /// <exception cref="ArgumentException"><paramref name="obj"/> cannot be blank.</exception>
/// <exception cref="ArgumentNullException"><paramref name="obj"/> must not be <see langword="null"/>.</exception> /// <exception cref="ArgumentNullException"><paramref name="obj"/> must not be <see langword="null"/>.</exception>
@@ -52,8 +60,10 @@ namespace Discord
{ {
if (obj.IsSpecified) if (obj.IsSpecified)
{ {
if (obj.Value == null) throw CreateNotNullException(name, msg); if (obj.Value == null)
if (obj.Value.Trim().Length == 0) throw CreateNotEmptyException(name, msg); throw CreateNotNullException(name, msg);
if (obj.Value.Trim().Length == 0)
throw CreateNotEmptyException(name, msg);
} }
} }
@@ -282,7 +292,8 @@ namespace Discord
var minimum = SnowflakeUtils.ToSnowflake(DateTimeOffset.UtcNow.Subtract(TimeSpan.FromDays(14))); var minimum = SnowflakeUtils.ToSnowflake(DateTimeOffset.UtcNow.Subtract(TimeSpan.FromDays(14)));
for (var i = 0; i < collection.Length; i++) for (var i = 0; i < collection.Length; i++)
{ {
if (collection[i] == 0) continue; if (collection[i] == 0)
continue;
if (collection[i] <= minimum) if (collection[i] <= minimum)
throw new ArgumentOutOfRangeException(name, "Messages must be younger than two weeks old."); throw new ArgumentOutOfRangeException(name, "Messages must be younger than two weeks old.");
} }

View File

@@ -1,4 +1,4 @@
using Newtonsoft.Json; using Newtonsoft.Json;
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;
namespace Discord.API namespace Discord.API

View File

@@ -1,4 +1,4 @@
using Newtonsoft.Json; using Newtonsoft.Json;
namespace Discord.API namespace Discord.API
{ {

View File

@@ -1,6 +1,6 @@
using System;
using Newtonsoft.Json;
using Discord.Net.Converters; using Discord.Net.Converters;
using Newtonsoft.Json;
using System;
namespace Discord.API namespace Discord.API
{ {

View File

@@ -1,4 +1,4 @@
using Newtonsoft.Json; using Newtonsoft.Json;
namespace Discord.API namespace Discord.API
{ {

View File

@@ -1,4 +1,4 @@
using Newtonsoft.Json; using Newtonsoft.Json;
namespace Discord.API namespace Discord.API
{ {

View File

@@ -1,5 +1,5 @@
using System;
using Newtonsoft.Json; using Newtonsoft.Json;
using System;
namespace Discord.API namespace Discord.API
{ {

View File

@@ -1,4 +1,4 @@
using Newtonsoft.Json; using Newtonsoft.Json;
namespace Discord.API namespace Discord.API
{ {

View File

@@ -1,4 +1,4 @@
namespace Discord.API namespace Discord.API
{ {
internal struct EntityOrId<T> internal struct EntityOrId<T>
{ {

View File

@@ -1,4 +1,4 @@
using System.IO; using System.IO;
namespace Discord.API namespace Discord.API
{ {

View File

@@ -1,9 +1,9 @@
using System.Collections.Generic;
using System.IO;
using System.Text;
using Discord.Net.Converters; using Discord.Net.Converters;
using Discord.Net.Rest; using Discord.Net.Rest;
using Newtonsoft.Json; using Newtonsoft.Json;
using System.Collections.Generic;
using System.IO;
using System.Text;
namespace Discord.API.Rest namespace Discord.API.Rest
{ {

View File

@@ -1,4 +1,4 @@
using System; using System;
namespace Discord.API namespace Discord.API
{ {

View File

@@ -126,7 +126,8 @@ namespace Discord.Rest
} }
internal virtual async Task LogoutInternalAsync() internal virtual async Task LogoutInternalAsync()
{ {
if (LoginState == LoginState.LoggedOut) return; if (LoginState == LoginState.LoggedOut)
return;
LoginState = LoginState.LoggingOut; LoginState = LoginState.LoggingOut;
await ApiClient.LogoutAsync().ConfigureAwait(false); await ApiClient.LogoutAsync().ConfigureAwait(false);

View File

@@ -1,5 +1,5 @@
using System;
using Discord.API.Rest; using Discord.API.Rest;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.Immutable; using System.Collections.Immutable;
using System.IO; using System.IO;

View File

@@ -1,8 +1,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using Model = Discord.API.AuditLog;
using EntryModel = Discord.API.AuditLogEntry; using EntryModel = Discord.API.AuditLogEntry;
using Model = Discord.API.AuditLog;
namespace Discord.Rest namespace Discord.Rest
{ {

View File

@@ -1,7 +1,6 @@
using System.Linq; using System.Linq;
using Model = Discord.API.AuditLog;
using EntryModel = Discord.API.AuditLogEntry; using EntryModel = Discord.API.AuditLogEntry;
using Model = Discord.API.AuditLog;
namespace Discord.Rest namespace Discord.Rest
{ {

View File

@@ -1,7 +1,6 @@
using System.Linq; using System.Linq;
using Model = Discord.API.AuditLog;
using EntryModel = Discord.API.AuditLogEntry; using EntryModel = Discord.API.AuditLogEntry;
using Model = Discord.API.AuditLog;
namespace Discord.Rest namespace Discord.Rest
{ {

View File

@@ -1,8 +1,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using Model = Discord.API.AuditLog;
using EntryModel = Discord.API.AuditLogEntry; using EntryModel = Discord.API.AuditLogEntry;
using Model = Discord.API.AuditLog;
namespace Discord.Rest namespace Discord.Rest
{ {

View File

@@ -1,8 +1,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using Model = Discord.API.AuditLog;
using EntryModel = Discord.API.AuditLogEntry; using EntryModel = Discord.API.AuditLogEntry;
using Model = Discord.API.AuditLog;
namespace Discord.Rest namespace Discord.Rest
{ {

View File

@@ -1,7 +1,6 @@
using System.Linq; using System.Linq;
using Model = Discord.API.AuditLog;
using EntryModel = Discord.API.AuditLogEntry; using EntryModel = Discord.API.AuditLogEntry;
using Model = Discord.API.AuditLog;
namespace Discord.Rest namespace Discord.Rest
{ {

View File

@@ -1,7 +1,6 @@
using System.Linq; using System.Linq;
using Model = Discord.API.AuditLog;
using EntryModel = Discord.API.AuditLogEntry; using EntryModel = Discord.API.AuditLogEntry;
using Model = Discord.API.AuditLog;
namespace Discord.Rest namespace Discord.Rest
{ {

View File

@@ -1,7 +1,6 @@
using System.Linq; using System.Linq;
using Model = Discord.API.AuditLog;
using EntryModel = Discord.API.AuditLogEntry; using EntryModel = Discord.API.AuditLogEntry;
using Model = Discord.API.AuditLog;
namespace Discord.Rest namespace Discord.Rest
{ {

View File

@@ -1,7 +1,6 @@
using System.Linq; using System.Linq;
using Model = Discord.API.AuditLog;
using EntryModel = Discord.API.AuditLogEntry; using EntryModel = Discord.API.AuditLogEntry;
using Model = Discord.API.AuditLog;
namespace Discord.Rest namespace Discord.Rest
{ {

View File

@@ -1,7 +1,6 @@
using System.Linq; using System.Linq;
using Model = Discord.API.AuditLog;
using EntryModel = Discord.API.AuditLogEntry; using EntryModel = Discord.API.AuditLogEntry;
using Model = Discord.API.AuditLog;
namespace Discord.Rest namespace Discord.Rest
{ {

View File

@@ -1,7 +1,6 @@
using System.Linq; using System.Linq;
using Model = Discord.API.AuditLog;
using EntryModel = Discord.API.AuditLogEntry; using EntryModel = Discord.API.AuditLogEntry;
using Model = Discord.API.AuditLog;
namespace Discord.Rest namespace Discord.Rest
{ {

View File

@@ -1,7 +1,6 @@
using System.Linq; using System.Linq;
using Model = Discord.API.AuditLog;
using EntryModel = Discord.API.AuditLogEntry; using EntryModel = Discord.API.AuditLogEntry;
using Model = Discord.API.AuditLog;
namespace Discord.Rest namespace Discord.Rest
{ {

View File

@@ -1,7 +1,6 @@
using System.Linq; using System.Linq;
using Model = Discord.API.AuditLog;
using EntryModel = Discord.API.AuditLogEntry; using EntryModel = Discord.API.AuditLogEntry;
using Model = Discord.API.AuditLog;
namespace Discord.Rest namespace Discord.Rest
{ {

View File

@@ -1,7 +1,6 @@
using System.Linq; using System.Linq;
using Model = Discord.API.AuditLog;
using EntryModel = Discord.API.AuditLogEntry; using EntryModel = Discord.API.AuditLogEntry;
using Model = Discord.API.AuditLog;
namespace Discord.Rest namespace Discord.Rest
{ {

View File

@@ -1,5 +1,5 @@
using Model = Discord.API.AuditLog;
using EntryModel = Discord.API.AuditLogEntry; using EntryModel = Discord.API.AuditLogEntry;
using Model = Discord.API.AuditLog;
namespace Discord.Rest namespace Discord.Rest
{ {

View File

@@ -1,5 +1,5 @@
using Model = Discord.API.AuditLog;
using EntryModel = Discord.API.AuditLogEntry; using EntryModel = Discord.API.AuditLogEntry;
using Model = Discord.API.AuditLog;
namespace Discord.Rest namespace Discord.Rest
{ {

View File

@@ -1,8 +1,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using Model = Discord.API.AuditLog;
using EntryModel = Discord.API.AuditLogEntry; using EntryModel = Discord.API.AuditLogEntry;
using Model = Discord.API.AuditLog;
namespace Discord.Rest namespace Discord.Rest
{ {

View File

@@ -1,7 +1,6 @@
using System.Linq; using System.Linq;
using Model = Discord.API.AuditLog;
using EntryModel = Discord.API.AuditLogEntry; using EntryModel = Discord.API.AuditLogEntry;
using Model = Discord.API.AuditLog;
namespace Discord.Rest namespace Discord.Rest
{ {

View File

@@ -1,5 +1,5 @@
using Model = Discord.API.AuditLog;
using EntryModel = Discord.API.AuditLogEntry; using EntryModel = Discord.API.AuditLogEntry;
using Model = Discord.API.AuditLog;
namespace Discord.Rest namespace Discord.Rest
{ {

View File

@@ -1,8 +1,7 @@
using System.Linq;
using Model = Discord.API.AuditLog;
using EntryModel = Discord.API.AuditLogEntry;
using System; using System;
using System.Linq;
using EntryModel = Discord.API.AuditLogEntry;
using Model = Discord.API.AuditLog;
namespace Discord.Rest namespace Discord.Rest
{ {

View File

@@ -1,7 +1,6 @@
using System.Linq; using System.Linq;
using Model = Discord.API.AuditLog;
using EntryModel = Discord.API.AuditLogEntry; using EntryModel = Discord.API.AuditLogEntry;
using Model = Discord.API.AuditLog;
namespace Discord.Rest namespace Discord.Rest
{ {

View File

@@ -1,7 +1,6 @@
using System.Linq; using System.Linq;
using Model = Discord.API.AuditLog;
using EntryModel = Discord.API.AuditLogEntry; using EntryModel = Discord.API.AuditLogEntry;
using Model = Discord.API.AuditLog;
namespace Discord.Rest namespace Discord.Rest
{ {

View File

@@ -1,7 +1,6 @@
using System.Linq; using System.Linq;
using Model = Discord.API.AuditLog;
using EntryModel = Discord.API.AuditLogEntry; using EntryModel = Discord.API.AuditLogEntry;
using Model = Discord.API.AuditLog;
namespace Discord.Rest namespace Discord.Rest
{ {

View File

@@ -1,7 +1,6 @@
using System.Linq; using System.Linq;
using Model = Discord.API.AuditLog;
using EntryModel = Discord.API.AuditLogEntry; using EntryModel = Discord.API.AuditLogEntry;
using Model = Discord.API.AuditLog;
namespace Discord.Rest namespace Discord.Rest
{ {

View File

@@ -1,7 +1,6 @@
using System.Linq; using System.Linq;
using Model = Discord.API.AuditLog;
using EntryModel = Discord.API.AuditLogEntry; using EntryModel = Discord.API.AuditLogEntry;
using Model = Discord.API.AuditLog;
namespace Discord.Rest namespace Discord.Rest
{ {

View File

@@ -1,5 +1,5 @@
using Model = Discord.API.AuditLog;
using EntryModel = Discord.API.AuditLogEntry; using EntryModel = Discord.API.AuditLogEntry;
using Model = Discord.API.AuditLog;
namespace Discord.Rest namespace Discord.Rest
{ {

View File

@@ -1,7 +1,6 @@
using System.Linq; using System.Linq;
using Model = Discord.API.AuditLog;
using EntryModel = Discord.API.AuditLogEntry; using EntryModel = Discord.API.AuditLogEntry;
using Model = Discord.API.AuditLog;
namespace Discord.Rest namespace Discord.Rest
{ {

View File

@@ -1,7 +1,6 @@
using System.Linq; using System.Linq;
using Model = Discord.API.AuditLog;
using EntryModel = Discord.API.AuditLogEntry; using EntryModel = Discord.API.AuditLogEntry;
using Model = Discord.API.AuditLog;
namespace Discord.Rest namespace Discord.Rest
{ {

View File

@@ -1,7 +1,6 @@
using System.Linq; using System.Linq;
using Model = Discord.API.AuditLog;
using EntryModel = Discord.API.AuditLogEntry; using EntryModel = Discord.API.AuditLogEntry;
using Model = Discord.API.AuditLog;
namespace Discord.Rest namespace Discord.Rest
{ {

View File

@@ -1,9 +1,8 @@
using Discord.API;
using System; using System;
using System.Linq; using System.Linq;
using Discord.API;
using Model = Discord.API.AuditLog;
using EntryModel = Discord.API.AuditLogEntry; using EntryModel = Discord.API.AuditLogEntry;
using Model = Discord.API.AuditLog;
namespace Discord.Rest namespace Discord.Rest
{ {

View File

@@ -1,9 +1,8 @@
using Discord.API;
using System; using System;
using System.Linq; using System.Linq;
using Discord.API;
using Model = Discord.API.AuditLog;
using EntryModel = Discord.API.AuditLogEntry; using EntryModel = Discord.API.AuditLogEntry;
using Model = Discord.API.AuditLog;
namespace Discord.Rest namespace Discord.Rest
{ {

View File

@@ -1,8 +1,7 @@
using System; using System;
using System.Linq; using System.Linq;
using Model = Discord.API.AuditLog;
using EntryModel = Discord.API.AuditLogEntry; using EntryModel = Discord.API.AuditLogEntry;
using Model = Discord.API.AuditLog;
namespace Discord.Rest namespace Discord.Rest
{ {

View File

@@ -1,6 +1,6 @@
using System.Linq; using System.Linq;
using Model = Discord.API.AuditLog;
using EntryModel = Discord.API.AuditLogEntry; using EntryModel = Discord.API.AuditLogEntry;
using Model = Discord.API.AuditLog;
namespace Discord.Rest namespace Discord.Rest
{ {

View File

@@ -1,6 +1,6 @@
using System.Linq; using System.Linq;
using Model = Discord.API.AuditLog;
using EntryModel = Discord.API.AuditLogEntry; using EntryModel = Discord.API.AuditLogEntry;
using Model = Discord.API.AuditLog;
namespace Discord.Rest namespace Discord.Rest
{ {

View File

@@ -1,6 +1,6 @@
using System.Linq; using System.Linq;
using Model = Discord.API.AuditLog;
using EntryModel = Discord.API.AuditLogEntry; using EntryModel = Discord.API.AuditLogEntry;
using Model = Discord.API.AuditLog;
namespace Discord.Rest namespace Discord.Rest
{ {

View File

@@ -1,7 +1,6 @@
using System.Linq; using System.Linq;
using Model = Discord.API.AuditLog;
using EntryModel = Discord.API.AuditLogEntry; using EntryModel = Discord.API.AuditLogEntry;
using Model = Discord.API.AuditLog;
namespace Discord.Rest namespace Discord.Rest
{ {

View File

@@ -1,7 +1,6 @@
using System.Linq; using System.Linq;
using Model = Discord.API.AuditLog;
using EntryModel = Discord.API.AuditLogEntry; using EntryModel = Discord.API.AuditLogEntry;
using Model = Discord.API.AuditLog;
namespace Discord.Rest namespace Discord.Rest
{ {

View File

@@ -1,7 +1,6 @@
using System.Linq; using System.Linq;
using Model = Discord.API.AuditLog;
using EntryModel = Discord.API.AuditLogEntry; using EntryModel = Discord.API.AuditLogEntry;
using Model = Discord.API.AuditLog;
namespace Discord.Rest namespace Discord.Rest
{ {

View File

@@ -1,7 +1,6 @@
using System.Linq; using System.Linq;
using Model = Discord.API.AuditLog;
using EntryModel = Discord.API.AuditLogEntry; using EntryModel = Discord.API.AuditLogEntry;
using Model = Discord.API.AuditLog;
namespace Discord.Rest namespace Discord.Rest
{ {

View File

@@ -1,7 +1,6 @@
using System.Linq; using System.Linq;
using Model = Discord.API.AuditLog;
using EntryModel = Discord.API.AuditLogEntry; using EntryModel = Discord.API.AuditLogEntry;
using Model = Discord.API.AuditLog;
namespace Discord.Rest namespace Discord.Rest
{ {

View File

@@ -1,7 +1,6 @@
using System.Linq; using System.Linq;
using Model = Discord.API.AuditLog;
using EntryModel = Discord.API.AuditLogEntry; using EntryModel = Discord.API.AuditLogEntry;
using Model = Discord.API.AuditLog;
namespace Discord.Rest namespace Discord.Rest
{ {

View File

@@ -1,7 +1,6 @@
using System.Linq; using System.Linq;
using Model = Discord.API.AuditLog;
using EntryModel = Discord.API.AuditLogEntry; using EntryModel = Discord.API.AuditLogEntry;
using Model = Discord.API.AuditLog;
namespace Discord.Rest namespace Discord.Rest
{ {

View File

@@ -1,8 +1,7 @@
using System; using System;
using System.Linq; using System.Linq;
using Model = Discord.API.AuditLog;
using EntryModel = Discord.API.AuditLogEntry; using EntryModel = Discord.API.AuditLogEntry;
using Model = Discord.API.AuditLog;
namespace Discord.Rest namespace Discord.Rest
{ {

View File

@@ -1,4 +1,4 @@
namespace Discord.Rest namespace Discord.Rest
{ {
public interface IRestAudioChannel : IAudioChannel public interface IRestAudioChannel : IAudioChannel
{ {

View File

@@ -3,13 +3,13 @@ using Discord.API.Rest;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.Immutable; using System.Collections.Immutable;
using System.IO;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using WidgetModel = Discord.API.GuildWidget; using ImageModel = Discord.API.Image;
using Model = Discord.API.Guild; using Model = Discord.API.Guild;
using RoleModel = Discord.API.Role; using RoleModel = Discord.API.Role;
using ImageModel = Discord.API.Image; using WidgetModel = Discord.API.GuildWidget;
using System.IO;
namespace Discord.Rest namespace Discord.Rest
{ {

View File

@@ -4,11 +4,11 @@ using System.Collections.Generic;
using System.Collections.Immutable; using System.Collections.Immutable;
using System.Diagnostics; using System.Diagnostics;
using System.Globalization; using System.Globalization;
using System.IO;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using WidgetModel = Discord.API.GuildWidget;
using Model = Discord.API.Guild; using Model = Discord.API.Guild;
using System.IO; using WidgetModel = Discord.API.GuildWidget;
namespace Discord.Rest namespace Discord.Rest
{ {

View File

@@ -1,12 +1,12 @@
using Discord.Net.Rest;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Model = Discord.API.Interaction;
using DataModel = Discord.API.MessageComponentInteractionData; using DataModel = Discord.API.MessageComponentInteractionData;
using System.IO; using Model = Discord.API.Interaction;
using Discord.Net.Rest;
namespace Discord.Rest namespace Discord.Rest
{ {

View File

@@ -1,9 +1,9 @@
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System;
using Model = Discord.API.ModalInteractionData;
using InterationModel = Discord.API.Interaction;
using DataModel = Discord.API.MessageComponentInteractionData; using DataModel = Discord.API.MessageComponentInteractionData;
using InterationModel = Discord.API.Interaction;
using Model = Discord.API.ModalInteractionData;
namespace Discord.Rest namespace Discord.Rest
{ {

View File

@@ -1,12 +1,12 @@
using Discord.Net;
using Newtonsoft.Json;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Model = Discord.API.Interaction;
using DataModel = Discord.API.ApplicationCommandInteractionData; using DataModel = Discord.API.ApplicationCommandInteractionData;
using Newtonsoft.Json; using Model = Discord.API.Interaction;
using Discord.Net;
namespace Discord.Rest namespace Discord.Rest
{ {

View File

@@ -1,11 +1,11 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Model = Discord.API.Interaction;
using DataModel = Discord.API.AutocompleteInteractionData; using DataModel = Discord.API.AutocompleteInteractionData;
using System.IO; using Model = Discord.API.Interaction;
namespace Discord.Rest namespace Discord.Rest
{ {

Some files were not shown because too many files have changed in this diff Show More