mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 09:18:27 -04:00
Small cleanup - fixed some namespaces and moved files
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"profiles": {
|
||||
"Nadeko.Coordinator": {
|
||||
"NadekoBot.Coordinator": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": "true",
|
||||
"launchBrowser": false,
|
||||
|
@@ -9,7 +9,7 @@ using NadekoBot.Services;
|
||||
using NadekoBot.Modules;
|
||||
using YamlDotNet.Serialization;
|
||||
|
||||
namespace Nadeko.Tests
|
||||
namespace NadekoBot.Tests
|
||||
{
|
||||
public class CommandStringsTests
|
||||
{
|
||||
|
@@ -5,7 +5,7 @@ using System.Threading.Tasks;
|
||||
using NadekoBot.Services;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace Nadeko.Tests
|
||||
namespace NadekoBot.Tests
|
||||
{
|
||||
public class GroupGreetTests
|
||||
{
|
||||
|
@@ -5,7 +5,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Nadeko.Tests
|
||||
namespace NadekoBot.Tests
|
||||
{
|
||||
public class IndexedCollectionTests
|
||||
{
|
||||
|
@@ -2,7 +2,7 @@
|
||||
using NadekoBot.Common;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace Nadeko.Tests
|
||||
namespace NadekoBot.Tests
|
||||
{
|
||||
public class KwumTests
|
||||
{
|
||||
|
@@ -3,7 +3,7 @@ using NadekoBot.Common;
|
||||
using NUnit.Framework;
|
||||
using NUnit.Framework.Internal;
|
||||
|
||||
namespace Nadeko.Tests
|
||||
namespace NadekoBot.Tests
|
||||
{
|
||||
public class PubSubTests
|
||||
{
|
||||
|
@@ -3,7 +3,7 @@ using System.Text;
|
||||
using NadekoBot.Common.Yml;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace Nadeko.Tests
|
||||
namespace NadekoBot.Tests
|
||||
{
|
||||
public class RandomTests
|
||||
{
|
||||
|
@@ -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;
|
||||
|
@@ -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
|
||||
{
|
||||
|
@@ -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
|
||||
{
|
||||
|
11
src/NadekoBot/Common/Extensions/IBotCredentialsExtensions.cs
Normal file
11
src/NadekoBot/Common/Extensions/IBotCredentialsExtensions.cs
Normal 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);
|
||||
}
|
||||
}
|
@@ -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; }
|
@@ -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
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user