forked from breakdowns/slam-mirrorbot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- /list command now results will be uploaded to telegra.ph - Auto generate Telegraph Token - Added Inline Buttons - Update /stats command
- Loading branch information
1 parent
01bfc52
commit 35ad3e5
Showing
9 changed files
with
159 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from telegram import InlineKeyboardButton | ||
|
||
class ButtonMaker: | ||
def __init__(self): | ||
self.button = [] | ||
|
||
def buildbutton(self, key, link): | ||
self.button.append(InlineKeyboardButton(text = key, url = link)) | ||
|
||
def build_menu(self, n_cols, footer_buttons=None, header_buttons=None): | ||
menu = [self.button[i:i + n_cols] for i in range(0, len(self.button), n_cols)] | ||
if header_buttons: | ||
menu.insert(0, header_buttons) | ||
if footer_buttons: | ||
menu.append(footer_buttons) | ||
return menu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,3 +19,5 @@ natsort | |
aiohttp | ||
speedtest-cli>=2.1.2 | ||
messages | ||
lxml | ||
telegraph |