コード例 #1
0
ファイル: Command.cs プロジェクト: aSunnyWillow/DiscordCraft
        public static async Task Send(SocketUserMessage msg)
        {
            var content = msg.Content.Remove(0, 6);

            if (content.StartsWith("say ", StringComparison.Ordinal))
            {
                return;
            }

            await WebHook.SendHook($"executed command: **{content}**");
        }
コード例 #2
0
ファイル: Death.cs プロジェクト: aSunnyWillow/DiscordCraft
        public static async Task Send(SocketUserMessage msg)
        {
            var username = msg.Author.Username;

            if (username.Contains("§"))
            {
                username = username.Split('§').LastOrDefault()?.Remove(0, 1);
            }

            await WebHook.SendHook(
                "https://orig00.deviantart.net/3437/f/2010/320/d/5/chibi_grim_reaper_by_xdoodlezx-d330n8z.png",
                "Grim Reaper", $"*took the soul of:* **{username}** ({msg.Content.Remove(0, 8)})");
        }
コード例 #3
0
ファイル: SrvCrash.cs プロジェクト: aSunnyWillow/DiscordCraft
 public static async Task Send() => await WebHook.SendHook("Server Crashed!");
コード例 #4
0
ファイル: Message.cs プロジェクト: aSunnyWillow/DiscordCraft
 public static async Task Send(SocketUserMessage msg) =>
 await WebHook.SendHook(msg.Author.GetAvatarUrl(), msg.Author.Username, msg.Content.Remove(0, 6));