Skip to content

Commit 8890986

Browse files
committed
Merge branch 'development'
2 parents 1f6ac16 + dcf9a4d commit 8890986

20 files changed

Lines changed: 85 additions & 63 deletions

File tree

bot/plugins/admin/ban.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
async def ban(update: Update, context: ContextTypes.DEFAULT_TYPE):
1515
target = await extract_user(update)
1616
if not target:
17-
await update.effective_message.reply_text("Usage: /ban <reply|@user|id>")
17+
await update.effective_message.reply_html("🔍 <b>Usage:</b> <code>/ban &lt;reply|@user|id&gt;</code>")
1818
return
1919

2020
user_id, name = target
@@ -37,7 +37,7 @@ async def ban(update: Update, context: ContextTypes.DEFAULT_TYPE):
3737
async def unban(update: Update, context: ContextTypes.DEFAULT_TYPE):
3838
target = await extract_user(update)
3939
if not target:
40-
await update.effective_message.reply_text("Usage: /unban <reply|@user|id>")
40+
await update.effective_message.reply_html("🔍 <b>Usage:</b> <code>/unban &lt;reply|@user|id&gt;</code>")
4141
return
4242

4343
user_id, name = target

bot/plugins/admin/kick.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
async def kick(update: Update, context: ContextTypes.DEFAULT_TYPE):
1515
target = await extract_user(update)
1616
if not target:
17-
await update.effective_message.reply_text("Usage: /kick <reply|@user|id>")
17+
await update.effective_message.reply_html("🔍 <b>Usage:</b> <code>/kick &lt;reply|@user|id&gt;</code>")
1818
return
1919

2020
user_id, name = target

bot/plugins/admin/mute.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@
1616
async def mute(update: Update, context: ContextTypes.DEFAULT_TYPE):
1717
target = await extract_user(update)
1818
if not target:
19-
await update.effective_message.reply_text("Usage: /mute <reply|@user|id> [duration: 30m/2h/1d]")
19+
await update.effective_message.reply_html(
20+
"🔍 <b>Usage:</b> <code>/mute &lt;reply|@user|id&gt; [duration]</code>\n"
21+
"<b>Example:</b> <code>/mute @user 30m</code>"
22+
)
2023
return
2124

2225
user_id, name = target
@@ -75,7 +78,7 @@ async def mute(update: Update, context: ContextTypes.DEFAULT_TYPE):
7578
async def unmute(update: Update, context: ContextTypes.DEFAULT_TYPE):
7679
target = await extract_user(update)
7780
if not target:
78-
await update.effective_message.reply_text("Usage: /unmute <reply|@user|id>")
81+
await update.effective_message.reply_html("🔍 <b>Usage:</b> <code>/unmute &lt;reply|@user|id&gt;</code>")
7982
return
8083

8184
user_id, name = target

bot/plugins/admin/purge.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ async def purge(update: Update, context: ContextTypes.DEFAULT_TYPE):
4242
else:
4343
args = update.effective_message.text.split()
4444
if len(args) < 2 or not args[1].isdigit():
45-
await update.effective_message.reply_text(
46-
"Usage:\n"
47-
"• Reply to a message with /purge to delete from that point\n"
48-
"/purge <number> to delete last N messages"
45+
await update.effective_message.reply_html(
46+
"🔍 <b>Usage:</b>\n"
47+
" • Reply to a message with <code>/purge</code> to delete from that point\n"
48+
" • <code>/purge &lt;number&gt;</code> to delete last N messages"
4949
)
5050
return
5151
count = int(args[1])

bot/plugins/admin/timeout.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@
1515
async def timeout(update: Update, context: ContextTypes.DEFAULT_TYPE):
1616
target = await extract_user(update)
1717
if not target:
18-
await update.effective_message.reply_text("Usage: /timeout <reply|@user|id> <duration: 30m/2h/1d>")
18+
await update.effective_message.reply_html(
19+
"🔍 <b>Usage:</b> <code>/timeout &lt;reply|@user|id&gt; &lt;duration&gt;</code>\n"
20+
"<b>Example:</b> <code>/timeout @user 1d</code>"
21+
)
1922
return
2023

2124
user_id, name = target

bot/plugins/admin/warn.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ async def _do_warn(update, context, user_id, name, reason, chat_id):
6969
async def warn(update: Update, context: ContextTypes.DEFAULT_TYPE):
7070
target = await extract_user(update)
7171
if not target:
72-
await update.effective_message.reply_text("Usage: /warn <reply|@user|id> [reason]")
72+
await update.effective_message.reply_html("🔍 <b>Usage:</b> <code>/warn &lt;reply|@user|id&gt; [reason]</code>")
7373
return
7474

7575
user_id, name = target
@@ -150,7 +150,7 @@ async def warns(update: Update, context: ContextTypes.DEFAULT_TYPE):
150150
async def resetwarns(update: Update, context: ContextTypes.DEFAULT_TYPE):
151151
target = await extract_user(update)
152152
if not target:
153-
await update.effective_message.reply_text("Usage: /resetwarns <reply|@user|id>")
153+
await update.effective_message.reply_html("🔍 <b>Usage:</b> <code>/resetwarns &lt;reply|@user|id&gt;</code>")
154154
return
155155

156156
user_id, name = target
@@ -169,7 +169,7 @@ async def resetwarns(update: Update, context: ContextTypes.DEFAULT_TYPE):
169169
async def unwarn(update: Update, context: ContextTypes.DEFAULT_TYPE):
170170
target = await extract_user(update)
171171
if not target:
172-
await update.effective_message.reply_text("Usage: /unwarn <reply|@user|id>")
172+
await update.effective_message.reply_html("🔍 <b>Usage:</b> <code>/unwarn &lt;reply|@user|id&gt;</code>")
173173
return
174174

175175
user_id, name = target
@@ -193,10 +193,10 @@ async def warnlimit(update: Update, context: ContextTypes.DEFAULT_TYPE):
193193

194194
if len(args) < 2:
195195
settings = await Repository.get_or_create_settings(chat_id)
196-
await update.effective_message.reply_text(
197-
f"📋 Current warn limit: {settings.warn_limit}\n"
198-
f"Action on limit: {settings.warn_action}\n\n"
199-
f"Usage: /warnlimit <number>"
196+
await update.effective_message.reply_html(
197+
f"📋 <b>Current warn limit:</b> {settings.warn_limit}\n"
198+
f"<b>Action on limit:</b> {settings.warn_action.capitalize()}\n\n"
199+
f"🔍 <b>Usage:</b> <code>/warnlimit &lt;number&gt;</code>"
200200
)
201201
return
202202

@@ -226,11 +226,11 @@ async def strongwarn(update: Update, context: ContextTypes.DEFAULT_TYPE):
226226

227227
if len(args) < 2:
228228
current = "🔨 Ban" if settings.warn_action == "ban" else "👢 Kick"
229-
await update.effective_message.reply_text(
230-
f"📋 Current action on warn limit: {current}\n\n"
231-
f"Usage:\n"
232-
f" /strongwarn on — ban on limit\n"
233-
f" /strongwarn off — kick on limit"
229+
await update.effective_message.reply_html(
230+
f"📋 <b>Current action on warn limit:</b> {current}\n\n"
231+
f"🔍 <b>Usage:</b>\n"
232+
f" <code>/strongwarn on</code> — ban on limit\n"
233+
f" <code>/strongwarn off</code> — kick on limit"
234234
)
235235
return
236236

@@ -254,9 +254,9 @@ async def addwarn(update: Update, context: ContextTypes.DEFAULT_TYPE):
254254
args = update.effective_message.text.split(None, 1)
255255

256256
if len(args) < 2:
257-
await update.effective_message.reply_text(
258-
'Usage: /addwarn <keyword> <reason>\n'
259-
'Use quotes for multi-word keywords: /addwarn "bad word" reason here'
257+
await update.effective_message.reply_html(
258+
"🔍 <b>Usage:</b> <code>/addwarn &lt;keyword&gt; &lt;reason&gt;</code>\n"
259+
"<b>Example:</b> <code>/addwarn \"bad word\" Don't say that!</code>"
260260
)
261261
return
262262

@@ -286,7 +286,7 @@ async def rmwarn(update: Update, context: ContextTypes.DEFAULT_TYPE):
286286
args = update.effective_message.text.split(None, 1)
287287

288288
if len(args) < 2:
289-
await update.effective_message.reply_text("Usage: /nowarn <keyword>")
289+
await update.effective_message.reply_html("🔍 <b>Usage:</b> <code>/nowarn &lt;keyword&gt;</code>")
290290
return
291291

292292
keyword = args[1].strip().lower()

bot/plugins/entertainment/ball8.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ async def ball8(update: Update, context: ContextTypes.DEFAULT_TYPE):
1414
]
1515

1616
if not context.args:
17-
await update.effective_message.reply_text("Usage: /8ball <question>")
17+
await update.effective_message.reply_html("🔍 <b>Usage:</b> <code>/8ball &lt;question&gt;</code>")
1818
return
1919

2020
await update.effective_message.reply_html(f"🔮 <b>Magic 8-Ball:</b> {random.choice(responses)}")

bot/plugins/entertainment/decide.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66

77
async def decide(update: Update, context: ContextTypes.DEFAULT_TYPE):
88
if not context.args:
9-
await update.effective_message.reply_text("Usage: /decide <question or choices>")
9+
await update.effective_message.reply_html(
10+
"🔍 <b>Usage:</b> <code>/decide &lt;question or choices&gt;</code>\n"
11+
"<b>Example:</b> <code>/decide pizza or burger</code>"
12+
)
1013
return
1114

1215
query = " ".join(context.args)

bot/plugins/entertainment/mock.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ async def mock(update: Update, context: ContextTypes.DEFAULT_TYPE):
1111
elif context.args:
1212
text = " ".join(context.args)
1313
else:
14-
await message.reply_text("Reply to a message or provide text to mock it!")
14+
await message.reply_html("🔍 <b>Usage:</b> Reply to a message or provide text with <code>/mock</code>")
1515
return
1616

1717
mocked = "".join(c.upper() if i % 2 == 0 else c.lower() for i, c in enumerate(text))

bot/plugins/entertainment/rate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
async def rate(update: Update, context: ContextTypes.DEFAULT_TYPE):
77
if not context.args:
8-
await update.effective_message.reply_text("Usage: /rate item to rate")
8+
await update.effective_message.reply_html("🔍 <b>Usage:</b> <code>/rate &lt;item&gt;</code>")
99
return
1010

1111
item = " ".join(context.args)

0 commit comments

Comments
 (0)