Commit Graph

42 Commits (master)

Author SHA1 Message Date
Dan Elkouby cc98721120 Improve command support
- Support commands with the bot's username
- Make matching case-insensitive by default
- Merge cmd and admin_cmd for better maintainability
2020-08-02 15:32:44 +00:00
Dan Elkouby b97d1649a4 Port tl plugin to bots 2020-08-02 15:08:46 +00:00
Dan Elkouby dd49e13fbf Merge "plugins" plugin into _core 2020-08-02 14:47:19 +00:00
Dan Elkouby 475c3aebfd Rework admin_cmd to work for actual bots 2020-08-02 14:35:18 +00:00
Lonami 168ee165b9 await the now async remove_plugin 2019-04-30 20:44:08 +02:00
Lonami 93cbb44459 Make unload_plugin async for reasons 2019-04-30 20:42:32 +02:00
Lonami febe3c4bac Be more careful when unloading plugin 2019-04-30 20:34:05 +02:00
Lonami c8b5179cb5 Allow plugins to define an unload function 2019-04-30 20:32:35 +02:00
Dan Elkouby 88a8b4e0d3 Add a timeout for sed 2019-02-26 22:27:01 +00:00
Lonami 2c75fb25a3 Support .reload to reload commands 2018-12-19 15:50:12 +01:00
Lonami 5438f95f34 Actually write the method name to mkdir on storage 2018-12-17 17:55:53 +01:00
Lonami ddcb347527 Alias remove as "disable" too
We're bad at remembering names.
2018-09-17 19:14:39 +02:00
Dan Elkouby c1e3b2f3c3 Don't allow unloading _core
Prevents getting stuck with no way of administrating the bot
2018-07-01 17:44:56 +03:00
Dan Elkouby 65277214fe Use connection_retries 2018-06-21 18:57:06 +03:00
Dan Elkouby 1d3ac0a215 fix 2018-06-17 20:06:31 +00:00
Dan Elkouby 23971d8a6a Fix missing await 2018-06-17 17:54:33 +00:00
Dan Elkouby b34b1c516f Quit failing
wank.party seems to have a garbage tier connection to Telegram, so work
around this by looping reconnects indefinitely, without crashing to
preserve runtime state.
2018-06-17 17:48:21 +00:00
Dan Elkouby 88fd76653a Update for newest Telethon master 2018-06-15 00:09:25 +03:00
Tanuj 2e82c440d0 Style enhancements (#7) 2018-06-10 19:12:53 +02:00
Dan Elkouby d54015e1b7 Allow overriding API ID and key 2018-06-10 08:16:49 +00:00
Dan Elkouby 80ba9bebb3 Use pathlib instead of os.path 2018-06-10 11:06:56 +03:00
Lonami Exo a99848267f Support .unload as an alias for .remove 2018-05-11 12:45:57 +02:00
Dan Elkouby 20886757ad Revert "Fix missing _loop in newer Telethon"
This reverts commit 5b80fb7c5b.

am rarted
2018-05-06 11:29:09 +00:00
Dan Elkouby e718245cdc Change API key
telethon.errors.rpc_error_list.ApiIdPublishedFloodError: This API id was published somewhere, you can't use it now
2018-05-06 11:29:09 +00:00
Dan Elkouby 694048ecfc Use per-instance path for persistent storage 2018-05-05 16:16:41 +03:00
Dan Elkouby 5310c55a93 Use a reversed range instead of while 2018-05-05 16:03:49 +03:00
Dan Elkouby 5b80fb7c5b Fix missing _loop in newer Telethon 2018-05-05 14:48:58 +03:00
Lonami Exo 9c3b67f503 Fix storage wouldn't actually load back saved items 2018-04-23 13:39:57 +02:00
Lonami Exo 50d83c6538 Add missing copyright notice 2018-04-23 13:28:01 +02:00
Lonami Exo c5d5b2d6fa Rename telethon.py -> uniborg.py 2018-04-23 13:22:29 +02:00
Lonami Exo 15169e0bb6 Create a Storage class and inject storage on plugins 2018-04-23 13:19:55 +02:00
udf 98bdf910e4 make await_event stop propagation only if the filter raises 2018-04-08 22:13:37 +02:00
Dan Elkouby cd36ccf552 🎨 2018-04-08 17:44:09 +03:00
Dan Elkouby 3cdb595b55 Handle bot tokens 2018-04-08 17:30:50 +03:00
Dan Elkouby 881266f96e Stop propagation of awaited events 2018-04-08 16:09:57 +03:00
Dan Elkouby 4c7923dd44 Cache own user object 2018-04-08 15:43:51 +03:00
Dan Elkouby 3660e22036 Partial port of ninja.py from kateborg 2018-04-08 15:43:23 +03:00
Dan Elkouby 1ec12184fe Add await_event 2018-04-08 15:42:31 +03:00
Dan Elkouby 3f39e88394 Add core plugin with basic admin commands 2018-04-08 01:09:02 +03:00
Dan Elkouby 251900eef9 Add missing license headers 2018-04-07 23:30:30 +03:00
Dan Elkouby ad5c3f2d18 \m/ 2018-04-07 23:20:16 +03:00
Dan Elkouby 8c610b95e6 Initial commit 2018-04-06 18:47:57 +03:00