A plugins repo for Hellbot.
"""
A sample code to display hello without taking input.
"""
# this is a mandatory import
from . import *
# assigning command
@hell_cmd(pattern="hii$")
async def hi(event):
# command body
await eor(event, "Hello!")
# to display in help menu
CmdHelp("hii").add_command(
"hii", None, "Says Hello!"
).add()
"""
A sample code to display hello with input.
"""
# this is a mandatory import
from . import *
# assigning command
@hell_cmd(pattern="hii(?:\s|$)([\s\S]*)")
async def hi(event):
# command body
_input = event.pattern_match.group(1)
if _input:
await eor(event, f"Hello! {_input}")
else:
await eor(event, "Hello!")
# to display in help menu
CmdHelp("hii").add_command(
"hii", "<text>", "Display Hello with a input!"
).add()
Project HellBot is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.