Small cleanup - fixed some namespaces and moved files

This commit is contained in:
Kwoth
2021-06-27 17:11:23 +02:00
parent 670b0aca96
commit 1e90d7f7bb
14 changed files with 26 additions and 20 deletions

View File

@@ -1,6 +1,6 @@
{
"profiles": {
"Nadeko.Coordinator": {
"NadekoBot.Coordinator": {
"commandName": "Project",
"dotnetRunMessages": "true",
"launchBrowser": false,

View File

@@ -9,7 +9,7 @@ using NadekoBot.Services;
using NadekoBot.Modules;
using YamlDotNet.Serialization;
namespace Nadeko.Tests
namespace NadekoBot.Tests
{
public class CommandStringsTests
{

View File

@@ -5,7 +5,7 @@ using System.Threading.Tasks;
using NadekoBot.Services;
using NUnit.Framework;
namespace Nadeko.Tests
namespace NadekoBot.Tests
{
public class GroupGreetTests
{

View File

@@ -5,7 +5,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
namespace Nadeko.Tests
namespace NadekoBot.Tests
{
public class IndexedCollectionTests
{

View File

@@ -2,7 +2,7 @@
using NadekoBot.Common;
using NUnit.Framework;
namespace Nadeko.Tests
namespace NadekoBot.Tests
{
public class KwumTests
{

View File

@@ -3,7 +3,7 @@ using NadekoBot.Common;
using NUnit.Framework;
using NUnit.Framework.Internal;
namespace Nadeko.Tests
namespace NadekoBot.Tests
{
public class PubSubTests
{

View File

@@ -3,7 +3,7 @@ using System.Text;
using NadekoBot.Common.Yml;
using NUnit.Framework;
namespace Nadeko.Tests
namespace NadekoBot.Tests
{
public class RandomTests
{

View File

@@ -28,6 +28,8 @@ using Serilog;
namespace NadekoBot
{
// todo remove all migration code from
// todo read prev commit
public class Bot
{
private readonly IBotCredentials _creds;

View File

@@ -1,8 +1,8 @@
using System;
using System.Threading.Tasks;
using Discord.Commands;
using NadekoBot.Services;
using Microsoft.Extensions.DependencyInjection;
using NadekoBot.Extensions;
namespace NadekoBot.Common.Attributes
{

View File

@@ -3,7 +3,7 @@ using NadekoBot.Common.Yml;
using NadekoBot.Services;
using YamlDotNet.Serialization;
namespace Nadeko.Common
namespace NadekoBot.Common
{
public sealed class Creds : IBotCredentials
{

View File

@@ -0,0 +1,11 @@
using Discord;
using NadekoBot.Common;
namespace NadekoBot.Extensions
{
public static class BotCredentialsExtensions
{
public static bool IsOwner(this IBotCredentials creds, IUser user)
=> creds.OwnerIds.Contains(user.Id);
}
}

View File

@@ -2,9 +2,9 @@
using Discord;
using System.Collections.Immutable;
using System.Linq;
using Nadeko.Common;
using NadekoBot.Common;
namespace NadekoBot.Services
namespace NadekoBot
{
public interface IBotCredentials
{
@@ -30,13 +30,6 @@ namespace NadekoBot.Services
string CoordinatorUrl { get; set; }
}
// todo move somewhere else
public static class IBotCredentialsExtensions
{
public static bool IsOwner(this IBotCredentials creds, IUser user)
=> creds.OwnerIds.Contains(user.Id);
}
public class RestartConfig
{
public string Cmd { get; set; }

View File

@@ -6,7 +6,7 @@ using NadekoBot.Services;
using System;
using System.IO;
using Microsoft.Extensions.Logging;
using Nadeko.Common;
using NadekoBot.Common;
using NadekoBot.Db.Models;
namespace NadekoBot.Services.Database

View File

@@ -2,7 +2,7 @@
using Microsoft.Extensions.Configuration;
using System.IO;
using Microsoft.Extensions.Primitives;
using Nadeko.Common;
using NadekoBot.Common;
using NadekoBot.Common;
using NadekoBot.Common.Yml;
using Serilog;