randydev commited on
Commit
32ee630
·
verified ·
1 Parent(s): eb62b1d

Update chatbot/plugins/chat.py

Browse files
Files changed (1) hide show
  1. chatbot/plugins/chat.py +20 -0
chatbot/plugins/chat.py CHANGED
@@ -61,6 +61,18 @@ You are my name Akeno AI and python language powered by @xtdevs on telegram supp
61
  {datetime.datetime.now()}
62
  """
63
 
 
 
 
 
 
 
 
 
 
 
 
 
64
  DISABLE_COMMAND = [
65
  "start",
66
  "offchat",
@@ -104,6 +116,8 @@ I am ready to be a GPT-4 bot developer
104
  & ~filters.forwarded
105
  )
106
  async def startbot(client: Client, message: Message):
 
 
107
  buttons = [
108
  [
109
  InlineKeyboardButton(
@@ -134,6 +148,8 @@ async def startbot(client: Client, message: Message):
134
  & ~filters.forwarded
135
  )
136
  async def okon_(client: Client, message: Message):
 
 
137
  buttons = [
138
  [
139
  InlineKeyboardButton(
@@ -212,6 +228,8 @@ async def on_mode(client: Client, cb: CallbackQuery):
212
  )
213
  @force_sub
214
  async def askcmd(client: Client, message: Message):
 
 
215
  pro = await message.reply("Processing your request...", quote=True)
216
  chat_user = await db.get_chatbot(message.chat.id)
217
  user_id = message.from_user.id
@@ -285,6 +303,8 @@ async def askcmd(client: Client, message: Message):
285
  @force_sub
286
  @akeno_log.log_performance
287
  async def chatbot_talk(client: Client, message: Message):
 
 
288
  chat_user = await db.get_chatbot(message.chat.id)
289
  user_id = message.from_user.id
290
  user = await users_collection.find_one({"user_id": user_id})
 
61
  {datetime.datetime.now()}
62
  """
63
 
64
+ NOT_ALLOWED_NON_PROGRAMMER = [
65
+ 466019692, # @myexcid,
66
+ 1423479724, # tonic,
67
+ 883761960, # ari
68
+ 6824458358, # None
69
+ 1982318761, # paman
70
+ 6477856957, # test
71
+ 5575183435, #suku
72
+ 948247711, # akay
73
+ ]
74
+
75
+
76
  DISABLE_COMMAND = [
77
  "start",
78
  "offchat",
 
116
  & ~filters.forwarded
117
  )
118
  async def startbot(client: Client, message: Message):
119
+ if message.from_user.id in NOT_ALLOWED_NON_PROGRAMMER:
120
+ return
121
  buttons = [
122
  [
123
  InlineKeyboardButton(
 
148
  & ~filters.forwarded
149
  )
150
  async def okon_(client: Client, message: Message):
151
+ if message.from_user.id in NOT_ALLOWED_NON_PROGRAMMER:
152
+ return
153
  buttons = [
154
  [
155
  InlineKeyboardButton(
 
228
  )
229
  @force_sub
230
  async def askcmd(client: Client, message: Message):
231
+ if message.from_user.id in NOT_ALLOWED_NON_PROGRAMMER:
232
+ return
233
  pro = await message.reply("Processing your request...", quote=True)
234
  chat_user = await db.get_chatbot(message.chat.id)
235
  user_id = message.from_user.id
 
303
  @force_sub
304
  @akeno_log.log_performance
305
  async def chatbot_talk(client: Client, message: Message):
306
+ if message.from_user.id in NOT_ALLOWED_NON_PROGRAMMER:
307
+ return
308
  chat_user = await db.get_chatbot(message.chat.id)
309
  user_id = message.from_user.id
310
  user = await users_collection.find_one({"user_id": user_id})