Showing posts with label Bot. Show all posts
Showing posts with label Bot. Show all posts

Legendary Studios Bot Commands

Legendary Studios Bot Commands

    Bot Commands
    http://deepbot.deep.sg/wiki/Bot+Commands
     
    Custom Commands
    !gameinsight, !joingame, !ign, !gold, !g2a, !youtube, !vipbenefits, !uptime, !links, !topic, !ranks, !giveusthetank, !topstreamers, !store, !worldid, !teamspeak, !nomad, !hype, !legenduminati, !legodairystewdoritos, !seanpai, !rigged, !bootyslap, !bobby, !shutupsean, !legendaryteaparty, !smashing, !kratos, !facepalm, !dragonmod, !crash, !arkhype

Chatango bot commands

Chatango bot commands


    ############################################################################
    ############################################################################
    ####    Getting Started Bot                                     ############
    ####    File            = ExampleBot.py                         ############    
    ####    Originaly by    = clonerxyz                             ############
    ####    Edited by       = Thelorgorenk                          ############
    ####    you can PM for info about making a chatango             ############
    ####    bot in http://thelorgorenk.chatango.com, and you can    ############
    ####    and you can also chat in :                              ############
    ####            http://khususme.chatango.com                    ############
    ####    Last update:                                            ############
    ####            3.21 AM August, 1 2015 by Thelorgorenk          ############
    ############################################################################
    ############################################################################
    ##Importing Random Crap xD
    #here you can see that you're importing ch library
     
    import ch
    import random
    import sys
    import json
    import time
    import re
    if sys.version_info[0] > 2:
      import urllib.request as urlreq
    else:
      import urllib2 as urlreq
    from time import localtime, strftime
    wordtodaytime = dict()
    ##Dance moves!
    #kinda useless
     
    dancemoves = [
      "(>^.^)>",
      "(v^.^)v",
    ]
    song = [
      "Dirimu, dirimulah! Orang yang beriku senyum ini",
    "Jika kita bisa membuat air mata yang bersinar, itu 'kan 'jadi bintang jatuh",
    "Tanganmu t'lah terluka, tapi jangan pernah lepaskannya lagi",
    "Dari langit yang terpenuhi keinginan, hari esok 'kan segera datang",
     
    "Cahya yang membimbingku adalah dirimu",
    "Dan aku pun ditarik karenanya",
    "Sebelum kusadarim kita mulai sebrangi jalan itu",
    "Sekaranglah saatnya! Jikalau kita hanya bisa bersinar di sini",
    ]
     
    bete = [
    "kunci",
    ]
    pagi = [
    "ohayou oni-chan",
    ]
     
    # implied command?     
    # call bot name with command after
    # call bot name with command after
    #Setting Pretty Colors
    #Font setting for your bot
     
    class TestBot(ch.RoomManager):
      def onInit(self):
        self.setNameColor("F9F")
        self.setFontColor("F33")
        self.setFontFace("1")
        self.setFontSize(13)
        self.enableBg()
        self.enableRecording()
    ##### Pars Def
      def pars(args):
              args=args.lower()
              userlist = roomUsers()
              for name in userlist:
                if args in name:return name  
    ##Connecting Crap
    #This is what will be printed on your python console when event called
     
      def onConnect(self, room):
        print("Connected")
     
      def onReconnect(self, room):
        print("Reconnected")
     
      def onDisconnect(self, room):
        print("Disconnected")
     
     
    ##Ignore this, you dont need to worry about this
    #Well, you can actually take a little time to look at it and learn something
      def onMessage(self, room, user, message):
      #### Comenzi fara prefix
       if message.body.startswith("test"):
         room.message("Test request granted :v")
       if message.body.startswith("woi"):
         room.message("Apa njay? :v :)")
       if message.body.startswith("sepi"):
         room.message("I'am here. :)")
       if message.body.startswith("siang"):
         room.message("Hello, siang :)")
       if message.body.startswith("malam"):
         room.message("Hello, malam :)")
       if message.body.startswith("konbanwa"):
         room.message("Hello, konbanwa")
       if message.body.startswith("oyasumi"):
         room.message("Hello, oyasumi :v")
       if message.body.startswith("konichiwa"):
         room.message("Hello, konichiwa :)")
       if message.body.startswith("jam"):
          room.message(strftime("%H:%M:%S", localtime()))      
       if message.body.startswith("tanggal"):
         room.message(strftime ("HARI: %a,%d-%b-%Y ", localtime()))
       if message.body.startswith("siapa yang "):
         room.message(random.choice(room.usernames))
       if message.body.startswith("lol"):
         room.message("Yea lol  @"+user.name+".")
         room.message(random.choice(jawab)+" @"+user.name)
    ##COMMANDS!
    #Setting up commands for yer bot
     #commands section
    #### Invite
          if cmd == "invite" or cmd == "Invite":
            if len (args) > 0:
                self.pm.message(ch.RoomManager(args),"%s You have a group invite by ! http://%s.chatango.com ." %(owners[0],room.name))
                room.message("Invite on progress %s in Access group. :)" % args)
            else:
                room.message("Sry have problem. :3")
    ##You may want/need to evaluate something about your bot.
          if cmd == "ev" or cmd == "eval" or cmd == "e":
              ret = eval(args)
              if ret == None:
                room.message("Done.")
                return
              room.message(str(ret))
         
            ##Say
            #Make your bot say what you want
     
          elif cmd == "afk":
            jawab = ["See u"]
            room.message(random.choice(jawab)+" @"+user.name)
          elif cmd == "crunch":
            jawab = ["https://31.media.tumblr.com/50dcec4f797eb86ea483558695c874f1/tumblr_nqru66BNYc1u8lwqgo1_500.gif"]
            room.message(random.choice(jawab)+" @"+user.name)
          elif cmd == "nja":
            jawab = ["Njaa ne ^^"]
            room.message(random.choice(jawab)+" @"+user.name)
          elif cmd == "coeghd":
            jawab = ["anda kenapa?"]
            room.message(random.choice(jawab)+" @"+user.name)
          elif cmd == ":v":
            jawab = ["emoticon dewa"]
            room.message(random.choice(jawab)+" @"+user.name)
          elif cmd == "lebaran":
            jawab = ["minal aidzin wal faizin kk"]
            room.message(random.choice(jawab)+" @"+user.name)
          elif cmd == "gue tamvan gak ?":
            jawab = ["kaga","tamvan","jelek","biasa aja"]
            room.message(random.choice(jawab)+" @"+user.name)
          elif cmd == "hmm":
            jawab = ["maho detcted"]
            room.message(random.choice(jawab)+" @"+user.name)
          elif cmd == "konbanwa":
            jawab = ["tidur sana jangan ngalong :v"]
            room.message(random.choice(jawab)+" @"+user.name)
          elif cmd == "naruto":
            jawab = ["adalah anime yang selalu flash back"]
            room.message(random.choice(jawab)+" @"+user.name)
          elif cmd == "bnp":
            jawab = ["erorr forbidden access denied"]
            room.message(random.choice(jawab)+" @"+user.name)
            ##Random User
            #What's this for ? this one cmd will make your boy say the name of a random user in a room
          if cmd == "randomuser":
            room.message(random.choice(room.usernames))
     
            ##Check Level
            #This one cmd is tho make your bot say your mod level in the current room you're in
          elif cmd == "mylvl":
            room.message("Your mod level: %i" %(room.getLevel(user)))
     
            ##List Mods
            #List of Mods and Owner name in the current room you're in
          elif cmd == "mods":
            room.message(", ".join(room.modnames + [room.ownername]))
            #### Seen
          elif cmd == "invitegroup" or cmd == "ig":
            if len (args) > 0:
             self.pm.message(ch.RoomManager(args),"%s You have group invite! check this Chatango Group http://%s.chatango.com ." %(room.ownername[0],room.name))
             room.message("Youre invite %s now is in Accest Group. :)" % args)
            else:
              room.message("gak mau ah nginvite dia")
            ##DANCE!!!!
            #Dance ? Of Course !!! ^_^
          elif cmd == "dance":
            for i, msg in enumerate(dancemoves):
              self.setTimeout(i / 2, room.message, msg)
                   #### Pm
          elif cmd == "pm" or cmd == "Pm" or cmd == "PM" or cmd == "Private Message":
            data = args.split(" ", 1)
            if len(data) > 1:
              name , args = data[0], data[1]
              self.pm.message(ch.User(name), "[Private.Message] By - "+user.name+" : "+args+" ")
              room.message("Has been sent to "+name+"")
            #### Invite
          elif cmd == "invite" or cmd == "Invite":
            if len (args) > 0:
                self.pm.message(ch.RoomManager(args),"%s You have a group invite by ! http://%s.chatango.com ." %(owners[0],room.name))
                room.message("Invite on progress %s in Access group. :)" % args)
            else:
                room.message("Sry have problem. :3")
            #### Profile
          elif cmd == "prof" or cmd == "profile" or cmd == "Prof" or cmd == "Profile":
            try:
              args=args.lower()
              stuff=str(urlreq.urlopen("http://"+args+".chatango.com").read().decode("utf-8"))
              crap, age = stuff.split('<span class="profile_text"><strong>Age:</strong></span></td><td><span class="profile_text">', 1)
              age, crap = age.split('<br /></span>', 1)
              crap, gender = stuff.split('<span class="profile_text"><strong>Gender:</strong></span></td><td><span class="profile_text">', 1)
              gender, crap = gender.split(' <br /></span>', 1)
              if gender == 'M':
                  gender = 'Male'
              elif gender == 'F':
                  gender = 'Female'
              else:
                  gender = '?'
              crap, location = stuff.split('<span class="profile_text"><strong>Location:</strong></span></td><td><span class="profile_text">', 1)
              location, crap = location.split(' <br /></span>', 1)
              crap,mini=stuff.split("<span class=\"profile_text\"><!-- google_ad_section_start -->",1)
              mini,crap=mini.split("<!-- google_ad_section_end --></span>",1)
              mini=mini.replace("<img","<!")
              picture = '<a href="http://fp.chatango.com/profileimg/' + args[0] + '/' + args[1] + '/' + args + '/full.jpg" style="z-index:59" target="_blank">http://fp.chatango.com/profileimg/' + args[0] + '/' + args[1] + '/' + args + '/full.jpg</a>'
              prodata = '<br/> <a href="http://chatango.com/fullpix?' + args + '" target="_blank">' + picture + '<br/><br/> Age: '+ age + ' <br/> Gender: ' + gender +  ' <br/> Location: ' +  location + '' '<br/> <a href="http://' + args + '.chatango.com" target="_blank"><u>Chat With User</u></a> ' "<br/><br/> "+ mini
              room.message(prodata,True)
            except:
              room.message(""+args+" doesn't exist o.o ")
            #
            if cmd =="wordtoday" or cmd=="wt":
                if user.name in owners:
                  if user.name in wordtodaytime:
                    w = json.loads(wordtodaytime[user.name])
                    if time.time() < w:
                      w = int(w) - int(time.time())
                      minute = 60
                      hour = minute * 60
                      day = hour * 24
                      days =  int(w / day)
                      hours = int((w % day) / hour)
                      minutes = int((w % hour) / minute)
                      seconds = int(w % minute)
                      string = ""
                      if days > 0:
                        string += str(days) + " " + (days == 1 and "day" or "days" ) + ", "
                      if len(string) > 0 or hours > 0:
                        string += str(hours) + " " + (hours == 1 and "hour

Commands list of my Xat Bots.

    Commands list of my Xat Bots.

     
    /* Normal cmd */
    - Say
    - Latest
    - Delistcheck : !delistcheck [chatname]
    - Roominfo : !roominfo [chatname]
    - Chatid : !chatid [chatname]
    - Chatname : !chatname [chatid]
    - Userinfo : !userinfo [users]
    - LS : !ls [power]
    - Price : !price [power]
    - Store : !store [power]
    - Shortname : !shortname [name]
    - Twitter : !twitter [name]
    - Youtube : !youtube [search]
    - Google : !google [search]
    - Isup : !isup [website]
    - Regname : !regname [id]
    - ID : !id [regname]
    - Rcheck : !rcheck [room]
    - Twitch : !twitch [user]
     
    /* Admin CMD */
     
    - Dev : !dev [restart/memory]
    - Editbot : !editbot [name/avatar/home/cmdcode/getmain] [value]
    - Automessage : !automessage [on/off]
    - Autogames : !autogames [on/off]
    - Acclist : !acclist [add/remove/check/reset] [user]
    - Blocklist : !blocklist [add/remove/check/reset] [user]
     
    That's all for now.

Draft Bot Commands

Draft Bot Commands


    Draft Bot Commands
     
    **Commands:**
     
     draft
        -- init (starts a new draft)
        -- reset (resets draft data in that room)
        -- team/addteam [name], [captain] (adds a new team)
        -- post (posts the data)
        -- export (exports results to hastebin)
        -- import/load [hastebin csv] (imports players)
            [to use this, simply export a csv file to hastebin and the bot will read it]
        -- guide/help (displays this guide)
        -- setnominate [name] (manually decide who will nominate)
        -- nom/nominate [name] (nominates the player to be drafted)
        -- playerlist (displays the list of players)
        -- override (an arbitrary command to fix the draft data)
                 -- money
                       -- give/add [team - no spaces] [amount]
                       -- take/remove [team - no spaces] [amount]
                 -- coach/captain [team - no spaces] [captain's name]
                 -- players
                         -- add [team - no spaces] [player name]
                         -- remove [team - no spaces] [player name]
                         -- list
                              -- add [player name]
                              -- remove [player name]
                 -- team
                      -- add [name], [captain]
                      -- remove [name]
     bid [amount] (amounts less than 100 will be multiplied by 1000)
     
    **END of commands**
     
    NOTE: Only spaces are needed unless specified with a comma.
    Ex.
    +d nominate deez nuts
    +d override players list add john cena (will add john cena to the pool of players that can be nominated for bidding)
    +d override team add Dank Memes, John Cena (adds a new team called Dank Memes, with John Cena as the coach)

Telegram Bot Commands

Telegram Bot Commands


Telegram Bot Commands

    <?php
     
    $botToken = "58164031:AAFV0nFXU7Mfla5ro5xp-tyXrd05d1g2pkM";
    $website = "https://api.telegram.org/bot".$botToken;
     
    $update = file_get_contents('php://input');
    $update = json_decode($update, TRUE);
     
     
    $chatId = $update["message"]["chat"]["id"];
    $message = $update["message"]["text"];
     
     
    switch($message) {
           
            case "/test":
                    sendMessage($chatId, "test");
                    break;
            case "/hi":
                    sendMessage($chatId, "hi there!");
                    break;
            default:
                    sendMessage($chatId, "default");
           
    }
     
    function sendMessage ($chatId, $message) {
           
            $url = $GLOBALS[website]."/sendMessage?chat_id=".$chatId."&text=".urlencode($message);
            file_get_contents($url);
           
    }
     
     
     
     
     
    ?>

ixat bot commands

ixat bot commands


ixat bot commands

    say message | makes the bot say a message
    !changename new_name | makes the bot change his name to the name specified, this is saved for re-logins
    !setavatar new_ava | makes the bot change his avatar to the avatar specified, this is saved for re-logins
    !setwebsite new_web | makes the bot change his website/homepage, this is saved for re-logins
    !choose arg_1 or arg_2 or arg_3 | You can add as much choices as you want, separated by or, makes the bot choose one of the args
    !spam message | makes the bot spam a specific message until !stopspam is called, interval is 500ms, could be faster if you call the command 2 times
    !pm user_id:message | makes the bot send a PM to the specified user and send the message specified
    !pmspam user_id:message | makes the bot spam one's pm, doesn't stop until !stoppmspam is called, interval is 500ms
    !8ball question | makes the bot do an "8ball" on your question and replies with an answer
    !insult user | makes the bot insult the user specified
    !kick user_id | if the bot has moderator powers, he kicks the user specified
    !lovetest person1 and person2 | makes a lovetest between the TWO persons specified, replies with a percentage and a note
    !changeWMSG new_WMSG | changes the welcome message the bot sends once he joins the chat, this is saved for re-logins
    !fartsscmd person | says that person farted..
    !bealertof message | makes users alert of a message, saying it's of "great importance"
    -sniffmode | makes the bot ignore all commands, and be used a sniff tool instead
    -giveaccess user_id | allows the user specified to use the bot's commands
    -removeaccess user_id | removes access of bot commands from the user_id specified

Basic Plug.dj Bot (Custom commands - NO PERMISSION CHECK)

Basic Plug.dj Bot (Custom commands - NO PERMISSION CHECK)


API.on(API.CHAT, chat);

function chat(data) {

var role = API.getUser(data.fromID).permission;
botrole = API.getUser().permission;
if(data.message.indexOf("!Command1") > -1)
{
API.moderateDeleteChat(data.cid);
API.sendChat("/me [" + data.un + "] This is the response for Command 1!");

}
if(data.message.indexOf("!Command2") > -1)
{
API.moderateDeleteChat(data.cid);
API.sendChat("/me [" + data.un + "] This is the response for Command 2!");
}
if(data.message.indexOf("!Lock") > -1)
{
API.moderateDeleteChat(data.cid);
API.sendChat("/me [" + data.un + "] Waitlist locked!");
API.moderateLockWaitList(true);
}
if(data.message.indexOf("!Unlock") > -1)
{
API.moderateDeleteChat(data.cid);
API.sendChat("/me [" + data.un + "] Waitlist unlocked!");
API.moderateLockWaitList(false);
}
}

Pinkie Bot chat command script

function logChat(avatar,name,text,color,userid,title,bgColor){
bgColor=(bgColor==undefined)?"":bgColor;
title=(title==undefined)?"User":title;
$("#chat-history ul").prepend("<li style='background:"+ bgColor+";'><div class='pull-left'><img style='border-color:"+ color+";' src='"+ avatar+"' alt='Avatar' /></div><span><a class='chat-ulink' title='"+ title+"' target='_blank' href='/profile?u="+ userid+"' style='color:"+ color+";'>"+ name+"</a></span><br/>"+ text+"</li>")
$(".chat-ulink").tooltip();
if($("#chat-history").children().children().length>50){
$("#chat-history ul li:last").remove();
}
runCmds(text,name,userid);
}

function runCmds(text,name,userid) {
if(userid!==73047) {
if(text.toUpperCase().indexOf(("Thing to detect here").toUpperCase())!==-1) {
socket.emit("chat",{"msg":"Message Here!"});
}
if(text.toUpperCase().indexOf(("Other thing to detect here").toUpperCase())!==-1) {
socket.emit("chat",{"msg":"Other message Here!"});
}
}
}

EE2 Bot Owner Only And Admin Only commands

// First we must make an Listbox, for admin commands.

//Add an ListBox and name it Admins
//Now add an button, text it Add and name it add
//And then, add another button, text it Remove and name it remove.

//Now, add an text box and name it addText, after Add button, and then, another text box and name it removeText, after Remove button.
// Okay, that's good for now.


// now, the commands.

// add this to your variables:


string worldowner, str; // World Owner Commands



// now go to case "say":
// if you dont have it, add it.

case "say":

if (str.StartsWith("!admin "))
{
 // !admin [blank space] for username.
 string[] username = str.Split(' '); // now we got the username.
 if (worldowner.Contains(names[m.GetInt(0)])) // worldowner is the string we added in variables, that EE2 considers World Owner.
 {
   if (names.ContainsValue(username[1])
   {
      // now user is in world, so let's admin him.
      if (!Admins.Items.Contains(username[1]))
      {
        con.Send("say", "[Bot] " + names[m.GetInt(0)].ToUpper() + ": " + username[1] + " is now a admin.");
        Admins.Items.Add(username[1]);
      }
      else {
         con.Send("say", "[Bot] " + names[m.GetInt(0)].ToUpper() + ": " + username[1] + " is already an admin.");
      }
   else {
     con.Send("say", "[Bot] " + names[m.GetInt(0)].ToUpper() + ": " + username[1] + " is not in this world or isn't an user.");
   }
 else {
   con.Send("say", "[Bot] " + names[m.GetInt(0)].ToUpper() + ": You are not the world owner!");
 }

if (str.StartsWith("!unadmin "))
{
 // !unadmin [blank space] for username.
 string[] username = str.Split(' '); // now we got the username.
 if (worldowner.Contains(names[m.GetInt(0)])) // worldowner is the string we added in variables, that EE2 considers World Owner.
 {
   if (names.ContainsValue(username[1])
   {
      // now user is in world, so let's admin him.
      if (Admins.Items.Contains(username[1]))
      {
        con.Send("say", "[Bot] " + names[m.GetInt(0)].ToUpper() + ": " + username[1] + " is no longer a admin.");
        Admins.Items.Remove(username[1]);
      }
      else {
         con.Send("say", "[Bot] " + names[m.GetInt(0)].ToUpper() + ": " + username[1] + " is not an admin admin.");
      }
   else {
     con.Send("say", "[Bot] " + names[m.GetInt(0)].ToUpper() + ": " + username[1] + " is not in this world or isn't an user.");
   }
 else {
   con.Send("say", "[Bot] " + names[m.GetInt(0)].ToUpper() + ": You are not the world owner!");
 }
return;

// Owner commands (basic) are done.

if (str == "!a owner command")
{
 if (worldowner.Contains(names[m.GetInt(0)]))
 {
    // Code is placed here.
 }
 else
 {
    // Code is placed here and runs when user isn't owner.
 }
}


if (str == "!a admin command")
{
 if (Admins.Items.Contains(names[m.GetInt(0)]))
 {
   // Code is placed here.
 }
 else
 {
   // Code is placed here and runs when user isn't admin.
 }
}


// And that's all! ;)

EE Bot Basic Chat Command

//OK go into your public variables, and put:

    public string str;

//Now, go to case "say" (and put this stuff):

    case "say":
    this.str = m.GetString(1).ToLower();
    //Our command here | You can do .StartsWith, .Contains, .EndsWith, or simply ==, depending on which one you need
    if (str.StartsWith("!help"))
    {
        // assuming our "Connection" is con
        con.Send("say", "[Bot] Commands go here!");
    }
    return;

the basics are:

if (str.StartsWith("commandhere"))
{
    con.Send("say", "Response here");
}

Phredd's IRC Twitch chat bot

### Phredd's IRC Twitch chat bot

import socket #imports module allowing connection to IRC
import threading #imports module allowing timing functions

#sets variables for connection to twitch chat
bot_owner = 'Phredd_'
nick = 'PhreddBot'
channel = '#oddmast'
server = 'phreddbot.jtvirc.com'
password = 'xxx'

queue = 0 #sets variable for anti-spam queue functionality

#sets variables for !add and !news commands
command = '!notset'
cmdmsg = 'This command is not set yet'
newsmsg = 'No news set'


irc = socket.socket()
irc.connect((server, 6667)) #connects to the server

#sends variables for connection to twitch chat
irc.send('PASS ' + password + '\r\n')
irc.send('USER ' + nick + ' 0 * :' + bot_owner + '\r\n')
irc.send('NICK ' + nick + '\r\n')
irc.send('JOIN ' + channel + '\r\n')

def queuetimer(): #function for resetting the queue every 30 seconds
    global queue
    print 'queue reset'
    queue = 0
    threading.Timer(30,queuetimer).start()
queuetimer()

while True:
   
    def message(msg): #function for sending messages to the IRC chat
        global queue
        queue = queue + 1
        print queue
        if queue < 20: #ensures does not send >20 msgs per 30 seconds.
            irc.send('PRIVMSG ' + channel + ' :' + msg + '\r\n')
        else:
            print 'Message deleted'
           
    def newstimer(): #function for announcing news every 3 minutes
        global newsmsg
        global ntimer
        themessage = '[NEWS]: ' + newsmsg
        message(themessage)
        print 'news on'
        ntimer = threading.Timer(180,newstimer)
        ntimer.start()
        if newsmsg == 'No news set': #stops announcing news if it has been canceled.
            ntimer.cancel()
        else:
            pass
   
    data = irc.recv(1204) #gets output from IRC server
    user = data.split(':')[1]
    user = user.split('!')[0] #determines the sender of the messages
    print data
   
    if data.find('PING') != -1:
        irc.send(data.replace('PING', 'PONG')) #responds to PINGS from the server
   
    if data.find('!test') != -1: #!test command
        message('Phredd_ is awesome! :D')      
    if data.find('!hello') != -1: #!hello command
        if user == 'phredd_':
            mymessage = 'Hi, ' + user + ', you are awesome! :D'
            message(mymessage)
        else:
            mymessage = 'Hi, ' + user + ', you are a Butt! :D'
            message(mymessage)
           
    if data.find('!cmd') != -1 and user == 'phredd_': #adds a new command
        addsplit = channel + ' :' + '!cmd'
        command = '!' + data.split(addsplit)[1].split(' ')[1] #determines new command
        cmdmsg = ' '.join(data.split(addsplit)[1].split(' ')[2:]) #determines command output
        message('Command set!')      
    if data.find(command) != -1: #responds to the new command with the output
        message(cmdmsg)
    if data.find('!delcmd') != -1 and user == 'phredd_': #!deladd command
        command = '!notset'
        cmdmsg = 'This command is not set yet'
        message('Command deleted!')
       
    if data.find('!addnews') != -1 and user == 'phredd_': #!addnews command
        newssplit = channel + ' :' + '!addnews'
        newsmsg = ' '.join(data.split(newssplit)[1].split(' ')[1:]) #determines new news message
        message('News set!')
        newstimer() #starts news timer function    
    if data.find('!news') != -1 and user == 'phredd_': #!news command
        themessage = '[NEWS]: ' + newsmsg
        message(themessage)
    if data.find('!delnews') !=-1 and user == 'phredd_': #deletes the news
        newsmsg = 'No news set'
        message('News deleted!')
        newstimer()
       
    elif data.split(' ')[1] == 'PRIVMSG' and data.split(':')[2].startswith(nick):
        message('Who said my name? SwiftRage')