send messages

This commit is contained in:
lickthecheese 2020-04-17 16:12:50 -04:00
parent 23944bd256
commit 5e096bd050
2 changed files with 9 additions and 1 deletions

View file

@ -39,6 +39,11 @@ async def ev(self, chan, source, msg):
exec(' '.join(msg)) exec(' '.join(msg))
await self.message(chan, 'ok') await self.message(chan, 'ok')
async def send(self, c, n, m):
msg = m.split(' ')
await self.message(msg.pop(0), ' '.join(msg))
await self.message(c, 'ok')
commands = { commands = {
'quit': quit, 'quit': quit,
'reload': reloadmods, 'reload': reloadmods,
@ -46,6 +51,7 @@ commands = {
'part': part, 'part': part,
'join': join, 'join': join,
'eval': ev, 'eval': ev,
'send': send,
'joins': joins 'joins': joins
} }
@ -65,7 +71,7 @@ async def init(self):
self.cmd['admin'] = adminHandle self.cmd['admin'] = adminHandle
self.joins = ["#chaos", "#lickthecheese", "#windowsloser", "#cminecraft", "#team", "#meta", "#rscmakerspace", "#archlinux", "#tildetel", "#one", "#starlanes"] self.joins = ["#chaos", "#lickthecheese", "#windowsloser", "#cminecraft", "#team", "#meta", "#rscmakerspace", "#archlinux", "#tildetel", "#one", "#starlanes"]
self.help['admin'] = ['admin - various bot owner commands (more for subcommands)', 'sub-commands of admin, for more info do help admin <command>: quit reload commit part join joins eval'] self.help['admin'] = ['admin - various bot owner commands (more for subcommands)', 'sub-commands of admin, for more info do help admin <command>: quit reload commit part join joins eval send']
self.help['admin quit'] = ['admin quit <message> - make the bot disconnect','no'] self.help['admin quit'] = ['admin quit <message> - make the bot disconnect','no']
self.help['admin reload'] = ['admin reload - reload the modules and configs', 'nothing to see here'] self.help['admin reload'] = ['admin reload - reload the modules and configs', 'nothing to see here']
self.help['admin commit'] = ['admin commit <action> - oh no (more)', 'suggested with <3 by khux'] self.help['admin commit'] = ['admin commit <action> - oh no (more)', 'suggested with <3 by khux']
@ -73,6 +79,8 @@ async def init(self):
self.help['admin join'] = ['admin join <channel> - make the bot join a channel','...'] self.help['admin join'] = ['admin join <channel> - make the bot join a channel','...']
self.help['admin joins'] = ['admin joins - join more channels', 'dont reconnect to a bunch of chans when the bots crashing etc'] self.help['admin joins'] = ['admin joins - join more channels', 'dont reconnect to a bunch of chans when the bots crashing etc']
self.help['admin eval'] = ['admin eval <command> - absolute power corrupts absolutely', 'lmao'] self.help['admin eval'] = ['admin eval <command> - absolute power corrupts absolutely', 'lmao']
self.help['admin send'] = ['admin send <channel> <message> - send a message', 'lmao']