Skip to content

Commit

Permalink
Update ToEnWikipediaBot.py
Browse files Browse the repository at this point in the history
message reply command and improved license text
  • Loading branch information
jnton authored Sep 15, 2024
1 parent 46d4d67 commit 36eff28
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions ToEnWikipediaBot.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,8 @@ async def inline_query(update: Update, context: ContextTypes.DEFAULT_TYPE) -> No

async def source(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
await update.message.reply_text(
"You can find my source code here: https://github.com/JnTon/English-Wikipedia-Link-Converter-Telegram-Bot\n\nFeel free to contribute or fork to create your own version!"
"You can find my source code here: https://github.com/JnTon/English-Wikipedia-Link-Converter-Telegram-Bot\n\nFeel free to contribute or fork to create your own version!",
reply_to_message_id=update.message.message_id
)

def setup_handlers(application):
Expand All @@ -245,17 +246,26 @@ def setup_handlers(application):

async def license(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
license_text = """
The code in this repository is licensed under the [GNU Affero General Public License v3.0 (AGPL-3.0)](https://www.gnu.org/licenses/agpl-3.0.en.html), except where otherwise specified.
*License*
The icon for the 'English Wikipedia Link Converter' Telegram Bot is licensed under a [Creative Commons Attribution-ShareAlike 4.0 International License (CC BY-SA 4.0)](http://creativecommons.org/licenses/by-sa/4.0/). See the [icon directory](https://github.com/JnTon/English-Wikipedia-Link-Converter-Telegram-Bot/tree/main/Telegram-Bot-Icon) for more details.
The code in this repository is licensed under the [GNU Affero General Public License v3\\.0 \\(AGPL\\-3\\.0\\)](https://www.gnu.org/licenses/agpl-3.0.en.html), except where otherwise specified.
**Image Credits**
The icon for the *English Wikipedia Link Converter* Telegram Bot is licensed under a [Creative Commons Attribution\\-ShareAlike 4\\.0 International License \\(CC BY\\-SA 4\\.0\\)](http://creativecommons.org/licenses/by-sa/4.0/). See the [icon directory](https://github.com/JnTon/English-Wikipedia-Link-Converter-Telegram-Bot/tree/main/Telegram-Bot-Icon) for more details.
*Image Credits*
The bot's icon incorporates images from the following sources:
- **Wikipedia logo**, Version2 by Vanished user 24kwjf10h32h, Version 1 by Nohat (concept by Paullusmagnus); Wikimedia., is used under a [Creative Commons Attribution-ShareAlike 3.0 Unported License (CC BY-SA 3.0)](https://creativecommons.org/licenses/by-sa/3.0/) and can be found [here on Wikimedia Commons](https://commons.wikimedia.org/wiki/File:Wikipedia-logo-v2-square.svg).
- **Left arrow**, by Icons8 is licensed under [CC0](https://creativecommons.org/share-your-work/public-domain/cc0/) and is available [here on Wikimedia Commons](https://commons.wikimedia.org/wiki/File:Left-arrow_(61413)_-_The_Noun_Project.svg).
\- *Wikipedia logo*, Version2 by Vanished user 24kwjf10h32h, Version 1 by Nohat \\(concept by Paullusmagnus\\); Wikimedia., is used under a [Creative Commons Attribution\\-ShareAlike 3\\.0 Unported License \\(CC BY\\-SA 3\\.0\\)](https://creativecommons.org/licenses/by-sa/3.0/) and can be found [here on Wikimedia Commons](https://commons.wikimedia.org/wiki/File:Wikipedia-logo-v2-square.svg).
\- *Left arrow*, by Icons8 is licensed under [CC0](https://creativecommons.org/share-your-work/public-domain/cc0/) and is available [here on Wikimedia Commons](https://commons.wikimedia.org/wiki/File:Left-arrow_%2861413%29_-_The_Noun_Project.svg).
"""
await update.message.reply_text(license_text, parse_mode='Markdown', disable_web_page_preview=True)
await update.message.reply_text(
license_text,
parse_mode='MarkdownV2',
disable_web_page_preview=True,
reply_to_message_id=update.message.message_id
)

async def async_lambda_handler(event, context):
"""Asynchronous handler for processing Telegram updates."""
Expand Down

0 comments on commit 36eff28

Please sign in to comment.