mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 01:38:27 -04:00
Small cleanup - fixed some namespaces and moved files
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
38
src/NadekoBot/Common/IBotCredentials.cs
Normal file
38
src/NadekoBot/Common/IBotCredentials.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using System.Collections.Generic;
|
||||
using Discord;
|
||||
using System.Collections.Immutable;
|
||||
using System.Linq;
|
||||
using NadekoBot.Common;
|
||||
|
||||
namespace NadekoBot
|
||||
{
|
||||
public interface IBotCredentials
|
||||
{
|
||||
string Token { get; }
|
||||
string GoogleApiKey { get; }
|
||||
ICollection<ulong> OwnerIds { get; }
|
||||
string RapidApiKey { get; }
|
||||
string PatreonAccessToken { get; }
|
||||
|
||||
Creds.DbOptions Db { get; }
|
||||
string OsuApiKey { get; }
|
||||
int TotalShards { get; }
|
||||
string PatreonCampaignId { get; }
|
||||
string CleverbotApiKey { get; }
|
||||
RestartConfig RestartCommand { get; }
|
||||
string VotesUrl { get; }
|
||||
string VotesToken { get; }
|
||||
string BotListToken { get; }
|
||||
string RedisOptions { get; }
|
||||
string LocationIqApiKey { get; }
|
||||
string TimezoneDbApiKey { get; }
|
||||
string CoinmarketcapApiKey { get; }
|
||||
string CoordinatorUrl { get; set; }
|
||||
}
|
||||
|
||||
public class RestartConfig
|
||||
{
|
||||
public string Cmd { get; set; }
|
||||
public string Args { get; set; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user