randydev commited on
Commit
3078923
1 Parent(s): 98719e5

Update chatbot/plugins/web.py

Browse files
Files changed (1) hide show
  1. chatbot/plugins/web.py +5 -2
chatbot/plugins/web.py CHANGED
@@ -49,8 +49,11 @@ async def askwebcmd(client: Client, message: Message):
49
  is_trans="True",
50
  lang=lang
51
  )
52
- data = await akeno_api.get_json(response=response)
53
- await pro.edit_text(data.randydev.message)
 
 
 
54
 
55
  @Client.on_message(filters.command("setlang"))
56
  async def setlang_cmd(client: Client, message: Message):
 
49
  is_trans="True",
50
  lang=lang
51
  )
52
+ try:
53
+ data = await akeno_api.get_json(response=response)
54
+ await pro.edit_text(data.randydev.message)
55
+ except Exception as e:
56
+ await pro.edit_text(f"Error: {e}")
57
 
58
  @Client.on_message(filters.command("setlang"))
59
  async def setlang_cmd(client: Client, message: Message):