I hereby claim:
- I am greemdev on github.
- I am greem (https://keybase.io/greem) on keybase.
- I have a public key ASB0OUE1jzoopV9FPkmQp0z2SW9KnwXwtlRnVPnxu7Jxawo
To claim this, I am signing this object:
abstract class Parser<in TInput, TOutput> { | |
protected abstract fun parse(value: TInput): TOutput | |
@Throws(ParsingError::class) | |
infix fun unsafeParse(value: TInput): TOutput = parse(value) | |
infix fun tryParse(value: TInput): ValueError<TOutput> = ValueError { parse(value) } | |
operator fun invoke(value: TInput) = tryParse(value) | |
companion object { |
namespace DiscordTimestamps | |
{ | |
public enum TimestampType : sbyte | |
{ | |
ShortTime = (sbyte)'t', | |
LongTime = (sbyte)'T', | |
ShortDate = (sbyte)'d', | |
LongDate = (sbyte)'D', | |
ShortDateTime = (sbyte)'f', | |
LongDateTime = (sbyte)'F', |
//THIS IS A SHITPOST | |
//made by emzi0767 | |
public static IReadOnlyDictionary<TProp, T> CreateQueryWrapper<T, TProp>( | |
this IReadOnlyDictionary<ulong, T> dict, | |
Expression<Func<T, TProp>> querySubject, | |
IEqualityComparer<TProp> equalityComparer = default) | |
{ | |
if (!(querySubject.Body is MemberExpression member) || !(member.Member is PropertyInfo prop)) | |
throw new ArgumentException("Must be a property expression.", nameof(querySubject)); |
I hereby claim:
To claim this, I am signing this object:
using Discord; | |
using Discord.Commands; | |
using System.Threading.Tasks; | |
namespace Your.Namespace.Here | |
{ | |
public class ExampleCommand : ModuleBase<SocketCommandContext> | |
{ | |
[Command("Example")] | |
public async Task Example() |