[PR #9339/6e84c137 backport][stable-9] t*: normalize docs (#9355)

t*: normalize docs (#9339)

* t*: normalize docs

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>

* break long line to regain sanity

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 6e84c1375e)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2024-12-24 14:05:39 +01:00 committed by GitHub
parent 8031011497
commit e120c64a21
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 109 additions and 134 deletions

View file

@ -9,22 +9,21 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = '''
DOCUMENTATION = r"""
module: telegram
author:
- "Artem Feofanov (@tyouxa)"
- "Nikolai Lomov (@lomserman)"
- "Artem Feofanov (@tyouxa)"
- "Nikolai Lomov (@lomserman)"
short_description: Send notifications via telegram
description:
- Send notifications via telegram bot, to a verified group or user.
- Also, the user may try to use any other telegram bot API method, if you specify O(api_method) argument.
- Send notifications via telegram bot, to a verified group or user.
- Also, the user may try to use any other telegram bot API method, if you specify O(api_method) argument.
notes:
- You will require a telegram account and create telegram bot to use this module.
- You will require a telegram account and create telegram bot to use this module.
extends_documentation_fragment:
- community.general.attributes
- community.general.attributes
attributes:
check_mode:
support: full
@ -49,11 +48,9 @@ options:
- Any parameters for the method.
- For reference to default method, V(SendMessage), see U(https://core.telegram.org/bots/api#sendmessage).
version_added: 2.0.0
"""
'''
EXAMPLES = """
EXAMPLES = r"""
- name: Send notify to Telegram
community.general.telegram:
token: '9999999:XXXXXXXXXXXXXXXXXXXXXXX'
@ -75,15 +72,14 @@ EXAMPLES = """
message_id: '{{ saved_msg_id }}'
"""
RETURN = """
RETURN = r"""
msg:
description: The message you attempted to send
description: The message you attempted to send.
returned: success
type: str
sample: "Ansible task finished"
telegram_error:
description: Error message gotten from Telegram API
description: Error message gotten from Telegram API.
returned: failure
type: str
sample: "Bad Request: message text is empty"