-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtools.js
More file actions
32 lines (32 loc) · 1.2 KB
/
Copy pathtools.js
File metadata and controls
32 lines (32 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
export const tools = [
{
name: "create_ticket",
triggers: ["تذكرة","!new","/ticket"],
run: async (client, msg) => {
// delegate to tickets module by sending '!new' or letting ticket module catch it
await msg.channel.send("جاري فتح تذكرتك...").catch(()=>{});
// ticket module will handle creation based on message content
}
},
{
name: "give_role",
triggers: ["اعطني رتبة","!role","!giverole"],
run: async (client, msg) => {
const role = msg.guild.roles.cache.find(r => r.name === "Member");
if (!role) return msg.reply("ما فيه رتبة Member");
try {
await msg.member.roles.add(role);
msg.reply("تم إعطاءك رتبة Member");
} catch(e) { msg.reply("ما قدرت أعطيك الرتبة."); }
}
},
{
name: "announce",
triggers: ["أعلن","announce","!announce"],
run: async (client, msg) => {
const text = msg.content.replace(/أعلن|announce|!announce/gi, "").trim();
if (!text) return msg.reply("اكتب نص الإعلان بعد الأمر.");
if (msg.guild.systemChannel) msg.guild.systemChannel.send(`📢 إعلان:\n${text}`);
}
}
];