本文整理汇总了Python中telethon.errors.MessageNotModifiedError方法的典型用法代码示例。如果您正苦于以下问题:Python errors.MessageNotModifiedError方法的具体用法?Python errors.MessageNotModifiedError怎么用?Python errors.MessageNotModifiedError使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类telethon.errors
的用法示例。
在下文中一共展示了errors.MessageNotModifiedError方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: set_codename_handler
# 需要导入模块: from telethon import errors [as 别名]
# 或者: from telethon.errors import MessageNotModifiedError [as 别名]
def set_codename_handler(event):
"""Send a message when the command /set_codename is sent"""
locale = DATABASE.get_locale(event.chat_id)
if not await subscription_allowed(event):
return
device = event.pattern_match.group(1)
if device not in PROVIDER.miui_codenames:
await event.reply(await wrong_codename_message(locale))
return
if DATABASE.set_codename(event.chat_id, device):
try:
await event.reply(await set_codename_message(device, PROVIDER.codenames_names, locale))
except (MessageNotModifiedError, ChannelPrivateError, ChatWriteForbiddenError):
pass
raise events.StopPropagation
示例2: show_settings
# 需要导入模块: from telethon import errors [as 别名]
# 或者: from telethon.errors import MessageNotModifiedError [as 别名]
def show_settings(event):
"""Send a message when the command /settings is sent."""
locale = DATABASE.get_locale(event.chat_id)
if not await subscription_allowed(event):
return
message, buttons = await settings_main_message(locale)
try:
await event.respond(message, buttons=buttons)
except (MessageNotModifiedError, ChannelPrivateError, ChatWriteForbiddenError):
pass
raise events.StopPropagation
示例3: settings_callback
# 需要导入模块: from telethon import errors [as 别名]
# 或者: from telethon.errors import MessageNotModifiedError [as 别名]
def settings_callback(event):
"""settings buttons callback for back button"""
locale = DATABASE.get_locale(event.chat_id)
message, buttons = await settings_main_message(locale)
try:
await event.edit(message, buttons=buttons)
except (MessageNotModifiedError, ChannelPrivateError, ChatWriteForbiddenError):
pass
示例4: subscriptions_help
# 需要导入模块: from telethon import errors [as 别名]
# 或者: from telethon.errors import MessageNotModifiedError [as 别名]
def subscriptions_help(event):
"""subscriptions settings callback handler"""
locale = DATABASE.get_locale(event.chat_id)
subscriptions = DATABASE.get_chat_subscriptions(event.chat_id)
try:
await event.edit(await subscriptions_message(subscriptions, locale), buttons=[
[Button.inline(LOCALIZE.get_text(locale, "Back"), data="settings")],
])
except (MessageNotModifiedError, ChannelPrivateError, ChatWriteForbiddenError):
pass
示例5: lang_help
# 需要导入模块: from telethon import errors [as 别名]
# 或者: from telethon.errors import MessageNotModifiedError [as 别名]
def lang_help(event):
"""language help callback handler"""
locale = DATABASE.get_locale(event.chat_id)
try:
await event.edit(await lang_settings_message(locale), buttons=[
[Button.inline(LOCALIZE.get_text(locale, "change_language"),
data="change_language")],
[Button.inline(LOCALIZE.get_text(locale, "Back"), data="settings")]
])
except (MessageNotModifiedError, ChannelPrivateError, ChatWriteForbiddenError):
pass
示例6: help_callback
# 需要导入模块: from telethon import errors [as 别名]
# 或者: from telethon.errors import MessageNotModifiedError [as 别名]
def help_callback(event):
"""help buttons callback for back button"""
locale = DATABASE.get_locale(event.chat_id)
message, buttons = await help_main_message(locale)
try:
await event.edit(message, buttons=buttons)
except MessageNotModifiedError:
pass
示例7: miui_help
# 需要导入模块: from telethon import errors [as 别名]
# 或者: from telethon.errors import MessageNotModifiedError [as 别名]
def miui_help(event):
"""miui help callback handler"""
locale = DATABASE.get_locale(event.chat_id)
try:
await event.edit(await miui_help_message(locale), buttons=[
[Button.inline(LOCALIZE.get_text(locale, "Back"), data="help")],
])
except MessageNotModifiedError:
pass
示例8: firmware_help
# 需要导入模块: from telethon import errors [as 别名]
# 或者: from telethon.errors import MessageNotModifiedError [as 别名]
def firmware_help(event):
"""firmware help callback handler"""
locale = DATABASE.get_locale(event.chat_id)
try:
await event.edit(await firmware_help_message(locale), buttons=[
[Button.inline(LOCALIZE.get_text(locale, "Back"), data="help")],
])
except MessageNotModifiedError:
pass
示例9: vendor_help
# 需要导入模块: from telethon import errors [as 别名]
# 或者: from telethon.errors import MessageNotModifiedError [as 别名]
def vendor_help(event):
"""vendor help callback handler"""
locale = DATABASE.get_locale(event.chat_id)
try:
await event.edit(await vendor_help_message(locale), buttons=[
[Button.inline(LOCALIZE.get_text(locale, "Back"), data="help")],
])
except MessageNotModifiedError:
pass
示例10: eu_help
# 需要导入模块: from telethon import errors [as 别名]
# 或者: from telethon.errors import MessageNotModifiedError [as 别名]
def eu_help(event):
"""eu help callback handler"""
locale = DATABASE.get_locale(event.chat_id)
try:
await event.edit(await eu_help_message(locale), buttons=[
[Button.inline(LOCALIZE.get_text(locale, "Back"), data="help")],
])
except MessageNotModifiedError:
pass
示例11: specs_help
# 需要导入模块: from telethon import errors [as 别名]
# 或者: from telethon.errors import MessageNotModifiedError [as 别名]
def specs_help(event):
"""specs help callback handler"""
locale = DATABASE.get_locale(event.chat_id)
try:
await event.edit(await specs_help_message(locale), buttons=[
[Button.inline(LOCALIZE.get_text(locale, "Back"), data="help")],
])
except MessageNotModifiedError:
pass
示例12: info_help
# 需要导入模块: from telethon import errors [as 别名]
# 或者: from telethon.errors import MessageNotModifiedError [as 别名]
def info_help(event):
"""info help callback handler"""
locale = DATABASE.get_locale(event.chat_id)
try:
await event.edit(await info_help_message(locale), buttons=[
[Button.inline(LOCALIZE.get_text(locale, "Back"), data="help")],
])
except MessageNotModifiedError:
pass
示例13: misc_help
# 需要导入模块: from telethon import errors [as 别名]
# 或者: from telethon.errors import MessageNotModifiedError [as 别名]
def misc_help(event):
"""misc help callback handler"""
locale = DATABASE.get_locale(event.chat_id)
try:
await event.edit(await miscellaneous_help_message(locale), buttons=[
[Button.inline(LOCALIZE.get_text(locale, "Back"), data="help")],
])
except MessageNotModifiedError:
pass
示例14: subscriptions_help
# 需要导入模块: from telethon import errors [as 别名]
# 或者: from telethon.errors import MessageNotModifiedError [as 别名]
def subscriptions_help(event):
"""subscriptions help callback handler"""
locale = DATABASE.get_locale(event.chat_id)
try:
await event.edit(await subscriptions_help_message(locale), buttons=[
[Button.inline(LOCALIZE.get_text(locale, "Back"), data="help")],
])
except MessageNotModifiedError:
pass
示例15: preferred_device_help
# 需要导入模块: from telethon import errors [as 别名]
# 或者: from telethon.errors import MessageNotModifiedError [as 别名]
def preferred_device_help(event):
"""preferred device help callback handler"""
locale = DATABASE.get_locale(event.chat_id)
try:
await event.edit(await preferred_device_help_message(locale), buttons=[
[Button.inline(LOCALIZE.get_text(locale, "Back"), data="help")],
])
except MessageNotModifiedError:
pass