You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow this format to make your own plugin for HellBot.
"""A sample code to display hello without taking input."""# this is a mandatory importfrom . importon_message, hellbot, HelpMenu# assigning command@on_message("hii")asyncdefhi(_, message):
# command bodyawaithellbot.edit(message, "Hello!")
# to display in help menuHelpMenu("hii").add(
"hii", None, "Says Hello!"
).done()
"""A sample code to display hello with input."""# this is a mandatory importfrom . importon_message, hellbot, HelpMenu# assigning command@on_message("hii", allow_stan=True)asyncdefhi(_, message):
# command bodymsg=awaithellbot.input(message)
ifmsg:
awaithellbot.edit(message, f"Hello! {msg}")
else:
awaithellbot.edit(message, "Hello!")
# to display in help menuHelpMenu("hii").add(
"hii", "<text>", "Display Hello with a input!"
).done()