mirror of
https://github.com/RPCS3/discord-bot.git
synced 2026-01-31 01:25:22 +01:00
implemented psn crawling for ps3 game metadata (mostly for thumbnails) implemented game thumbnails for game embeds fixed usage of dbcontext some other bugfixes
22 lines
708 B
C#
22 lines
708 B
C#
using System;
|
|
using System.Threading.Tasks;
|
|
using DSharpPlus.CommandsNext;
|
|
using DSharpPlus.CommandsNext.Attributes;
|
|
|
|
namespace CompatBot.Commands.Attributes
|
|
{
|
|
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class, Inherited = false)]
|
|
internal class LimitedToHelpChannel: CheckBaseAttribute
|
|
{
|
|
public override Task<bool> ExecuteCheckAsync(CommandContext ctx, bool help)
|
|
{
|
|
if (ctx.Channel.IsPrivate || help)
|
|
return Task.FromResult(true);
|
|
|
|
if (ctx.Channel.Name.Equals("help", StringComparison.InvariantCultureIgnoreCase))
|
|
return Task.FromResult(true);
|
|
|
|
return Task.FromResult(false);
|
|
}
|
|
}
|
|
} |