Esempio n. 1
0
def SetTopic(self, newtopic):
    try:
        runAwait(client.edit_channel, self.discord, topic=newtopic)
        log.ok("Channel Edited (SetTopic)", db=True)
        return True
    except discord.Forbidden:
        log.warn("Can't edit channel (SetTopic): Forbidden")
        return False
    except discord.HTTPException:
        log.warn("Can't edit channel (SetTopic): Failed")
        return False
Esempio n. 2
0
 def setName(self, newname):
     try:
         runAwait(client.edit_server, self.discord, name=newname)
         log.ok("Server edited (SetName)", db=True)
         return True
     except discord.Forbidden:
         log.warn("Can't edit Server (SetName): Forbidden")
         return False
     except discord.HTTPException:
         log.warn("Can't edit Server (SetName): Failed")
         return False
Esempio n. 3
0
 def SetLimit(self, newlimit):
     if (newlimit == None):
         newlimit = 0
     try:
         runAwait(client.edit_channel, self.discord, user_limit=newlimit)
         log.ok("Channel Edited (SetLimit)", db=True)
         return True
     except discord.Forbidden:
         log.warn("Can't edit channel (SetLimit): Forbidden")
         return False
     except discord.HTTPException:
         log.warn("Can't edit channel (SetLimit): Failed")
         return False
Esempio n. 4
0
def StartBot():
    log.ok("Bot Starting")
    plg.GetPlugins()
    k.start()
    #l = thd.FuncThread(cns.StartConsole)
    #l.start()
    try:
        while True:
            h = ""
    except KeyboardInterrupt:
        CloseBot()
    except SystemExit:
        CloseBot()
Esempio n. 5
0
 def giveOwner(self, newownerid):
     try:
         runAwait(client.edit_server, self.discord, name=newicon)
         log.ok("Server edited (SetOwner)", db=True)
         return True
     except discord.Forbidden:
         log.warn("Can't edit Server (SetIcon): Forbidden")
         return False
     except discord.HTTPException:
         log.warn("Can't edit Server (SetIcon): Failed")
         return False
     except discord.InvalidArgument:
         log.warn("Can't edit Server (SetIcon): NotOwner")
         return False
Esempio n. 6
0
 def sendMsg(self, txt):
     try:
         runAwait(client.send_messagem, self.discord, txt)
         log.ok("Sent Message", db=True)
     except:
         log.error("Error Sending Message", db=True)
Esempio n. 7
0
 def ok(self, t):
     log.ok("" + self.pname + " ~ " + t)
Esempio n. 8
0
def TestCmd(args):
    log.note("Test")
    log.warn("Test")
    log.error("Test")
    log.info("Test")
    log.ok("Test")