Ejemplo n.º 1
0
        public async Task <RuntimeResult> ContactUser(IGuildUser user)
        {
            if (CommandHandler.FeatureFlagDisabled(FeatureFlag.MODMAIL))
            {
                return(CustomResult.FromIgnored());
            }
            var existing = ModMailManager.GetOpenModmailForUser(user);

            if (existing != null)
            {
                await Context.Channel.SendMessageAsync(embed : ModMailEmbedHandler.GetThreadAlreadyExistsEmbed(existing));
            }
            else
            {
                await ModMailManager.ContactUser(user, Context.Channel, true);
            }
            return(CustomResult.FromSuccess());
        }