Updated a few things in the Marmalade system
This commit is contained in:
parent
64363d2e8b
commit
daa71f812e
24 changed files with 26 additions and 26 deletions
|
@ -1,4 +1,4 @@
|
||||||
namespace Ellie.Canary;
|
namespace Ellie.Marmalade;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Overridden to implement custom checks which commands have to pass in order to be executed.
|
/// Overridden to implement custom checks which commands have to pass in order to be executed.
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
namespace Ellie.Canary;
|
namespace Ellie.Marmalade;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used as a marker class for bot_perm and user_perm Attributes
|
/// Used as a marker class for bot_perm and user_perm Attributes
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
namespace Ellie.Canary;
|
namespace Ellie.Marmalade;
|
||||||
|
|
||||||
[AttributeUsage(AttributeTargets.Method)]
|
[AttributeUsage(AttributeTargets.Method)]
|
||||||
public sealed class bot_owner_onlyAttribute : MarmaladePermAttribute
|
public sealed class bot_owner_onlyAttribute : MarmaladePermAttribute
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
using Discord;
|
using Discord;
|
||||||
|
|
||||||
namespace Ellie.Canary;
|
namespace Ellie.Marmalade;
|
||||||
|
|
||||||
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
|
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
|
||||||
public sealed class bot_permAttribute : MarmaladePermAttribute
|
public sealed class bot_permAttribute : MarmaladePermAttribute
|
||||||
|
@ -13,7 +13,7 @@ public sealed class bot_permAttribute : MarmaladePermAttribute
|
||||||
GuildPerm = perm;
|
GuildPerm = perm;
|
||||||
ChannelPerm = null;
|
ChannelPerm = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bot_permAttribute(ChannelPermission perm)
|
public bot_permAttribute(ChannelPermission perm)
|
||||||
{
|
{
|
||||||
ChannelPerm = perm;
|
ChannelPerm = perm;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
namespace Ellie.Canary;
|
namespace Ellie.Marmalade;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Marks a method as a snek command
|
/// Marks a method as a snek command
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
namespace Ellie.Canary;
|
namespace Ellie.Marmalade;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Marks services in command arguments for injection.
|
/// Marks services in command arguments for injection.
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
namespace Ellie.Canary;
|
namespace Ellie.Marmalade;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Marks the parameter to take
|
/// Marks the parameter to take
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
namespace Ellie.Canary;
|
namespace Ellie.Marmalade;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets the priority of a command in case there are multiple commands with the same name but different parameters.
|
/// Sets the priority of a command in case there are multiple commands with the same name but different parameters.
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
namespace Ellie.Canary;
|
namespace Ellie.Marmalade;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Marks the class as a service which can be used within the same Medusa
|
/// Marks the class as a service which can be used within the same Medusa
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
using Discord;
|
using Discord;
|
||||||
|
|
||||||
namespace Ellie.Canary;
|
namespace Ellie.Marmalade;
|
||||||
|
|
||||||
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
|
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
|
||||||
public sealed class user_permAttribute : MarmaladePermAttribute
|
public sealed class user_permAttribute : MarmaladePermAttribute
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
using Discord;
|
using Discord;
|
||||||
|
|
||||||
namespace Ellie.Canary;
|
namespace Ellie.Marmalade;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The base class which will be loaded as a module into EllieBot
|
/// The base class which will be loaded as a module into EllieBot
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
using Discord;
|
using Discord;
|
||||||
using EllieBot;
|
using EllieBot;
|
||||||
|
|
||||||
namespace Ellie.Canary;
|
namespace Ellie.Marmalade;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Commands which take this class as a first parameter can be executed in both DMs and Servers
|
/// Commands which take this class as a first parameter can be executed in both DMs and Servers
|
||||||
|
@ -29,7 +29,7 @@ public abstract class AnyContext
|
||||||
public abstract ISelfUser Bot { get; }
|
public abstract ISelfUser Bot { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Provides access to strings used by this medusa
|
/// Provides access to strings used by this marmalade
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract IMarmaladeStrings Strings { get; }
|
public abstract IMarmaladeStrings Strings { get; }
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
using Discord;
|
using Discord;
|
||||||
|
|
||||||
namespace Ellie.Canary;
|
namespace Ellie.Marmalade;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Commands which take this type as the first parameter can only be executed in DMs
|
/// Commands which take this type as the first parameter can only be executed in DMs
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
using Discord;
|
using Discord;
|
||||||
|
|
||||||
namespace Ellie.Canary;
|
namespace Ellie.Marmalade;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Commands which take this type as a first parameter can only be executed in a server
|
/// Commands which take this type as a first parameter can only be executed in a server
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<LangVersion>preview</LangVersion>
|
<LangVersion>preview</LangVersion>
|
||||||
<EnablePreviewFeatures>true</EnablePreviewFeatures>
|
<EnablePreviewFeatures>true</EnablePreviewFeatures>
|
||||||
<RootNamespace>Ellie.Canary</RootNamespace>
|
<RootNamespace>Ellie.Marmalade</RootNamespace>
|
||||||
|
|
||||||
<Authors>The EllieBot Devs</Authors>
|
<Authors>The EllieBot Devs</Authors>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
using Discord;
|
using Discord;
|
||||||
using Ellie.Canary;
|
using Ellie.Marmalade;
|
||||||
|
|
||||||
namespace EllieBot;
|
namespace EllieBot;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
namespace Ellie.Canary;
|
namespace Ellie.Marmalade;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Overridden to implement parsers for custom types
|
/// Overridden to implement parsers for custom types
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
namespace Ellie.Canary;
|
namespace Ellie.Marmalade;
|
||||||
|
|
||||||
public readonly struct ParseResult<T>
|
public readonly struct ParseResult<T>
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
using YamlDotNet.Serialization;
|
using YamlDotNet.Serialization;
|
||||||
|
|
||||||
namespace Ellie.Canary;
|
namespace Ellie.Marmalade;
|
||||||
|
|
||||||
public readonly struct CommandStrings
|
public readonly struct CommandStrings
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
|
||||||
namespace Ellie.Canary;
|
namespace Ellie.Marmalade;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defines methods to retrieve and reload marmalade strings
|
/// Defines methods to retrieve and reload marmalade strings
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
namespace Ellie.Canary;
|
namespace Ellie.Marmalade;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Implemented by classes which provide localized strings in their own ways
|
/// Implemented by classes which provide localized strings in their own ways
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
namespace Ellie.Canary;
|
namespace Ellie.Marmalade;
|
||||||
|
|
||||||
public class LocalMarmaladeStringsProvider : IMarmaladeStringsProvider
|
public class LocalMarmaladeStringsProvider : IMarmaladeStringsProvider
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using Serilog;
|
using Serilog;
|
||||||
|
|
||||||
namespace Ellie.Canary;
|
namespace Ellie.Marmalade;
|
||||||
|
|
||||||
public class MarmaladeStrings : IMarmaladeStrings
|
public class MarmaladeStrings : IMarmaladeStrings
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
using Serilog;
|
using Serilog;
|
||||||
using YamlDotNet.Serialization;
|
using YamlDotNet.Serialization;
|
||||||
|
|
||||||
namespace Ellie.Canary;
|
namespace Ellie.Marmalade;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Loads strings from the shortcut or localizable path
|
/// Loads strings from the shortcut or localizable path
|
||||||
|
|
Loading…
Reference in a new issue