From 5e096bd050841095e3eae91468eec2a38ce76414 Mon Sep 17 00:00:00 2001 From: lickthecheese Date: Fri, 17 Apr 2020 16:12:50 -0400 Subject: [PATCH] send messages --- modules/__pycache__/admin.cpython-36.pyc | Bin 3230 -> 3526 bytes modules/admin.py | 10 +++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/__pycache__/admin.cpython-36.pyc b/modules/__pycache__/admin.cpython-36.pyc index 1080430794896dae48684ca47dc8db2c5924e3ac..de55ee4550bfba13a9a95c67b858a51b62d93520 100644 GIT binary patch delta 579 zcmY*VJx?1!5Z&3^v)A?+j4=j7f{riC1_4E&L6(&W2|+09lSvwN2qka4KJC^1__F0Cp7xreQ zh<~OX>9eWTCCuT#G24=gD@TD6%2i1vRRZ%Daw~;{SRglzLs+CUgYcbIhku=JxaJQO zkLpyW?F0-VhC|V20klQHk;i}#IBgL_%r_Xabq1{K0y?h>GAbs%>Jh4KN9U#7AEHu%p>%h>tuF$h4d&#z#vEYBajCH1t@b}A+2fKw9B5h!+YA%mHC}K zADqU?9Zpj^I8&pUX|}RCk#`W7&6IL|+uH3-s>Ht>EH<#U7j_lD*4%A`q54txYb_N; zjU83@=X+Me|F0aRUlZtiD&{FOUtY5>+pn=>e&BuZK6IX(s%Ly}AyFnuS>L?5$}~~w SP`J{Qq8qMEaCjT!dj9~Cz-z$( delta 273 zcmX>mJx@~En3tEU<62ML0xkxI#|%h-1ITs&;^K^n%FbG;OsUMNjHxWCtf}m&Y$*bB z*rPa71XF}s7@{~+gi}O-G*=2^FoUM(##x@Mikj?2OhCOwf*=BDGDDFlh!6u3w^&lk z5_2{mXKQ9;y~SLRUohF9!(7?~C{ru|Bp4V47`YfF7=;*F7)2P>n2J;;FXWJ9oHcnj z$1GL`pam+EGdTA%rcT!2O5Hq(OOlC2lLe^e4UaCH1IP@K$@0A7>_tLAwkG#vdtN<8 fmC41t+A0b_0S;y$WaZ%DU;#rmCPoAV%J2XH`e!iD diff --git a/modules/admin.py b/modules/admin.py index 0a1ec92..6fb6017 100644 --- a/modules/admin.py +++ b/modules/admin.py @@ -39,6 +39,11 @@ async def ev(self, chan, source, msg): exec(' '.join(msg)) 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 = { 'quit': quit, 'reload': reloadmods, @@ -46,6 +51,7 @@ commands = { 'part': part, 'join': join, 'eval': ev, + 'send': send, 'joins': joins } @@ -65,7 +71,7 @@ async def init(self): self.cmd['admin'] = adminHandle 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 : 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 : quit reload commit part join joins eval send'] self.help['admin quit'] = ['admin quit - make the bot disconnect','no'] self.help['admin reload'] = ['admin reload - reload the modules and configs', 'nothing to see here'] self.help['admin commit'] = ['admin commit - oh no (more)', 'suggested with <3 by khux'] @@ -73,6 +79,8 @@ async def init(self): self.help['admin join'] = ['admin join - 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 eval'] = ['admin eval - absolute power corrupts absolutely', 'lmao'] + self.help['admin send'] = ['admin send - send a message', 'lmao'] +