Skip to content

Commit 74e8793

Browse files
committed
fast forward to release 0.1.5
1 parent 8ff765c commit 74e8793

File tree

8 files changed

+47
-16
lines changed

8 files changed

+47
-16
lines changed

Source/Bot.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,12 @@
77
#
88

99
import chatexchange as ce
10-
from Chatcommunicate import *
11-
from CommandAlive import *
12-
from CommandStop import *
13-
from CommandListRunningCommands import *
14-
from CommandManager import *
15-
from BackgroundTaskManager import *
16-
from BackgroundTask import *
17-
from ChatRoom import *
18-
from Utilities import *
19-
import Utilities
10+
from .Chatcommunicate import *
11+
from .CommandManager import *
12+
from .BackgroundTaskManager import *
13+
from .BackgroundTask import *
14+
from .ChatRoom import *
15+
from . import Utilities
2016
import os
2117

2218
class Bot:

Source/ChatRoom.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
#
88

99
import chatexchange as ce
10-
from PrivilegeType import *
11-
from PrivilegedChatUser import *
10+
from .PrivilegeType import *
11+
from .PrivilegedChatUser import *
1212
import os
1313
import pickle
1414

Source/Command.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
import chatexchange as ce
99

1010
class Command:
11-
def __init__(self, command_manager, message, arguments, usage_index=0):
11+
def __init__(self, command_manager, chat_room, message, arguments, usage_index=0):
1212
self.command_manager = command_manager
13+
self.chat_room = chat_room
1314
self.message = message
1415
self.arguments = arguments
1516
self.usage_index = usage_index

Source/CommandManager.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,12 @@ def handle_command(self, message):
7171
match = False
7272

7373
if match:
74-
self.run_command(command(self, message, args, usage_index))
74+
for each_room in self.rooms:
75+
if each_room.room_id == command.message.room.id:
76+
command_room = each_room
77+
break
78+
79+
self.run_command(command(self, message, command_room, args, usage_index))
7580
return
7681

7782
def cleanup_finished_commands(self):

Source/CommandPrivilegeUser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#
77
#
88

9-
from Command import *
9+
from .Command import *
1010

1111
class CommandPrivilegeUser(Command):
1212
def usage():
@@ -16,4 +16,4 @@ def privileges(self):
1616
return 1
1717

1818
def run(self):
19-
19+

Source/init.bk

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
from . import BackgroundTask
2+
from . import BackgroundTaskManager
3+
from . import Bot
4+
from . import ChatRoom
5+
from . import Chatcommunicate
6+
from . import Command
7+
from . import CommandAlive
8+
from . import CommandListRunningCommands
9+
from . import CommandManager
10+
from . import CommandStop
11+
from . import PrivilegeType
12+
from . import PrivilegedChatUser
13+
from . import Utilities
14+
15+
CommandListRunningCommands = CommandListRunningCommands.CommandListRunningCommands
16+
CommandStop = CommandStop.CommandStop
17+
CommandAlive = CommandAlive.CommandAlive

__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from .Source/Bot import Bot

setup.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from distutils.core import setup
2+
3+
setup (
4+
name = "BotpySE",
5+
packages = ["BotpySE"],
6+
version = "0.1.5",
7+
description = "A python framework to create chatbots on the StackExchange network.",
8+
author = "Ashish Ahuja",
9+
author_email = "ashish.ahuja@sobotics.org",
10+
url = "https://github.com/SOBotics/Botpy",
11+
)

0 commit comments

Comments
 (0)