Skip to content

Commit

Permalink
fast forward to release 0.1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
double-fault committed Sep 21, 2017
1 parent 8ff765c commit 74e8793
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 16 deletions.
16 changes: 6 additions & 10 deletions Source/Bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,12 @@
#

import chatexchange as ce
from Chatcommunicate import *
from CommandAlive import *
from CommandStop import *
from CommandListRunningCommands import *
from CommandManager import *
from BackgroundTaskManager import *
from BackgroundTask import *
from ChatRoom import *
from Utilities import *
import Utilities
from .Chatcommunicate import *
from .CommandManager import *
from .BackgroundTaskManager import *
from .BackgroundTask import *
from .ChatRoom import *
from . import Utilities
import os

class Bot:
Expand Down
4 changes: 2 additions & 2 deletions Source/ChatRoom.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#

import chatexchange as ce
from PrivilegeType import *
from PrivilegedChatUser import *
from .PrivilegeType import *
from .PrivilegedChatUser import *
import os
import pickle

Expand Down
3 changes: 2 additions & 1 deletion Source/Command.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
import chatexchange as ce

class Command:
def __init__(self, command_manager, message, arguments, usage_index=0):
def __init__(self, command_manager, chat_room, message, arguments, usage_index=0):
self.command_manager = command_manager
self.chat_room = chat_room
self.message = message
self.arguments = arguments
self.usage_index = usage_index
Expand Down
7 changes: 6 additions & 1 deletion Source/CommandManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,12 @@ def handle_command(self, message):
match = False

if match:
self.run_command(command(self, message, args, usage_index))
for each_room in self.rooms:
if each_room.room_id == command.message.room.id:
command_room = each_room
break

self.run_command(command(self, message, command_room, args, usage_index))
return

def cleanup_finished_commands(self):
Expand Down
4 changes: 2 additions & 2 deletions Source/CommandPrivilegeUser.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
#

from Command import *
from .Command import *

class CommandPrivilegeUser(Command):
def usage():
Expand All @@ -16,4 +16,4 @@ def privileges(self):
return 1

def run(self):

17 changes: 17 additions & 0 deletions Source/init.bk
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from . import BackgroundTask
from . import BackgroundTaskManager
from . import Bot
from . import ChatRoom
from . import Chatcommunicate
from . import Command
from . import CommandAlive
from . import CommandListRunningCommands
from . import CommandManager
from . import CommandStop
from . import PrivilegeType
from . import PrivilegedChatUser
from . import Utilities

CommandListRunningCommands = CommandListRunningCommands.CommandListRunningCommands
CommandStop = CommandStop.CommandStop
CommandAlive = CommandAlive.CommandAlive
1 change: 1 addition & 0 deletions __init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .Source/Bot import Bot
11 changes: 11 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from distutils.core import setup

setup (
name = "BotpySE",
packages = ["BotpySE"],
version = "0.1.5",
description = "A python framework to create chatbots on the StackExchange network.",
author = "Ashish Ahuja",
author_email = "[email protected]",
url = "https://github.com/SOBotics/Botpy",
)

0 comments on commit 74e8793

Please sign in to comment.