示例#1
0
        internal static Task Status(ICoreHandler handler, Message Message)
        {
            CoreHandler core = handler as CoreHandler;

            core.Respond(Message.ChannelId, core.ToString());
            return(Task.CompletedTask);
        }
示例#2
0
 internal Task Broadcast(ICoreHandler handler, string broadcast)
 {
     try {
         CoreHandler core = handler as CoreHandler;
         foreach (DiscordGuild guild in core.Guilds)
         {
             if (guild.SystemChannelId.HasValue)
             {
                 core.Respond(guild.SystemChannelId.Value, broadcast);
             }
             else
             {
                 core.Respond(guild.Id, broadcast);
             }
         }
     } catch (Exception ex) {
         log.Error(ex.ToString());
         throw;
     }
     return(Task.CompletedTask);
 }