80 lines
6.6 KiB
TypeScript
80 lines
6.6 KiB
TypeScript
/* This plugin is licensed under the GPLv3
|
|
* (c)2025 kxtzownsu
|
|
*/
|
|
import definePlugin from "@utils/types";
|
|
|
|
// TODO: Allow the user to specify their own product list via settings
|
|
const products = [
|
|
"Apple iPhone 15 Pro", "Samsung Galaxy S23 Ultra", "Google Pixel 8 Pro", "OnePlus 11", "Xiaomi 13 Pro",
|
|
"Oppo Find X6 Pro", "Sony Xperia 1 IV", "Huawei P50 Pro", "Asus ROG Phone 7", "Motorola Edge+ (2023)",
|
|
"Apple iPad Pro 12.9 (2024)", "Samsung Galaxy Tab S9 Ultra", "Microsoft Surface Pro 9", "Apple iPad Air (2024)", "Lenovo Tab P11 Pro",
|
|
"Huawei MatePad Pro 12.6", "Google Pixel Tablet", "Amazon Fire HD 10", "Microsoft Surface Go 4", "Apple MacBook Pro 16 (2024)",
|
|
"Dell XPS 15", "Lenovo ThinkPad X1 Carbon Gen 11", "HP Spectre x360 14", "Asus ZenBook 14 OLED", "Razer Blade 17",
|
|
"LG Gram 17", "Apple MacBook Air M2", "Microsoft Surface Laptop 5", "Samsung Galaxy Book3 Ultra", "Acer Swift 5",
|
|
"HP Envy 13", "Mac mini with M2", "Dell Alienware X17", "Asus ROG Strix G15", "MSI GE76 Raider",
|
|
"Lenovo Legion 5 Pro", "Huawei MateBook X Pro", "Xiaomi Mi Notebook Pro 15", "Acer Predator Helios 300", "Google Pixelbook Go",
|
|
"HP Omen 15", "Apple Mac Studio", "Sony VAIO Z", "Microsoft Surface Studio 2", "Samsung Odyssey G9",
|
|
"Apple iPhone 14 Pro Max", "Google Pixel 7 Pro", "Samsung Galaxy Z Fold 5", "Asus ZenFone 10", "Xiaomi Mi 13",
|
|
"OnePlus 10 Pro", "Oppo Reno 9 Pro", "Realme GT 2 Pro", "Huawei Mate 50 Pro", "Apple iPhone SE (2024)",
|
|
"Samsung Galaxy S22 Ultra", "Samsung Galaxy Z Flip 5", "Google Pixel 7", "Asus ROG Phone 6 Pro", "Apple iPad Pro 11 (2024)",
|
|
"Samsung Galaxy Tab S8", "Microsoft Surface Duo 2", "Lenovo Yoga 9i", "Google Pixelbook 12.3", "Huawei MatePad 11",
|
|
"Samsung Galaxy Book 3 Pro", "Acer Chromebook Spin 713", "Apple MacBook Pro 13 (2024)", "HP Spectre x360 13", "Dell XPS 13 Plus",
|
|
"Lenovo ThinkPad X1 Yoga Gen 8", "Razer Blade Stealth 13", "Asus VivoBook 15", "HP Elite Dragonfly", "Apple MacBook Air M1",
|
|
"Microsoft Surface Laptop 4", "Samsung Galaxy Book Pro 360", "Acer Aspire 5", "Apple iPhone 13 Pro", "Samsung Galaxy S21 Ultra",
|
|
"OnePlus 9 Pro", "Xiaomi Mi 11 Ultra", "Oppo Find X3 Pro", "Realme GT", "Sony Xperia 5 III",
|
|
"Huawei P40 Pro", "Apple iPad Mini 6", "Samsung Galaxy Tab S7+", "Microsoft Surface Pro 7", "Google Pixel Slate",
|
|
"Lenovo Tab P11", "Huawei MatePad T8", "Apple iPad 10.2 (2024)", "Microsoft Surface Go 3", "Dell Inspiron 15 5000",
|
|
"Asus TUF Gaming F15", "Apple MacBook Pro 14 (2024)", "LG Gram 14", "Razer Blade Advanced 17", "MSI GE66 Raider",
|
|
"Lenovo Legion 5i", "HP Omen 16", "Acer Nitro 5", "Dell XPS 17", "Asus ProArt Studiobook Pro 16",
|
|
"Apple Mac Studio M1 Ultra", "Lenovo ThinkPad X1 Nano", "Microsoft Surface Laptop Go", "Google Pixelbook", "HP Spectre x360 13t",
|
|
"Samsung Galaxy Book Flex2 5G", "Asus ZenBook Flip 14", "Apple iPhone 12 Pro Max", "OnePlus 8 Pro", "Xiaomi Mi 10 Ultra",
|
|
"Google Pixel 5", "Oppo Find X2 Pro", "Realme X50 Pro", "Apple iPad Pro 12.9 (2023)", "Microsoft Surface Pro 8",
|
|
"Samsung Galaxy Tab S7 FE", "Acer Chromebook 14", "HP Elite Dragonfly G2", "Apple MacBook Pro 16-inch (2023)", "Dell Latitude 9420",
|
|
"Lenovo ThinkPad X1 Extreme Gen 4", "Razer Blade 14", "Asus TUF Dash F15", "MSI Creator Z16", "Apple iPhone 11 Pro",
|
|
"Samsung Galaxy Note 20 Ultra", "Google Pixel 4 XL", "Oppo Find X", "Xiaomi Mi Mix 4", "Apple iPad Pro 11 (2023)",
|
|
"Samsung Galaxy Tab S7", "Microsoft Surface Pro X", "Lenovo ThinkPad L14", "Huawei MateBook D14", "Asus ZenBook Duo 14",
|
|
"Acer Swift 3", "HP Pavilion x360", "Dell Alienware M15", "Razer Blade Stealth 13", "Apple MacBook Air M1 (2023)",
|
|
"MSI GP66 Leopard", "Apple iPhone X", "OnePlus 6T", "Xiaomi Mi 9", "Realme X2 Pro",
|
|
"Oppo Find X3 Neo", "Huawei Mate 20 Pro", "Apple iPad Air 4", "Samsung Galaxy Tab S6", "Microsoft Surface Book 3",
|
|
"Lenovo Yoga 920", "HP Spectre x360 13", "Microsoft Surface Laptop 3", "Apple iPad 10.2 (2023)", "Samsung Galaxy Book2 Pro",
|
|
"Google Pixelbook 2", "Lenovo Legion 7i", "Acer Aspire 7", "Dell XPS 13 9310", "HP Spectre x360 15",
|
|
"Asus TUF Gaming A15", "Lenovo ThinkPad P Series", "Apple MacBook Pro M1", "Microsoft Surface Go 2", "Razer Blade 15 Base",
|
|
"MSI GE75 Raider", "Xiaomi Redmi Note 10 Pro", "Samsung Galaxy M32", "Oppo F19 Pro+", "Apple iPhone SE 3",
|
|
"Google Pixel 6a", "Huawei P40 Lite", "OnePlus Nord 2T", "Sony Xperia 10 III", "Realme Narzo 50 Pro",
|
|
"Motorola Edge 20 Pro", "Xiaomi Poco X3 Pro", "Samsung Galaxy A54 5G", "Asus ROG Flow Z13", "Microsoft Surface Pro 7+",
|
|
"Acer ConceptD 3", "HP Envy x360 13", "Apple MacBook Air M2", "Apple iPhone 13 Mini", "Samsung Galaxy S20 FE",
|
|
"Oppo Reno 6 Pro", "OnePlus Nord CE 2", "Google Pixel 5a", "Realme 8 Pro", "Vivo X60 Pro",
|
|
"Xiaomi Mi 10T Pro", "Motorola One 5G Ace", "Huawei Nova 8 Pro", "Honor Magic 4 Pro", "Nokia X20",
|
|
"Sony Xperia 5 II", "Apple iPad Mini 5", "Asus ZenFone 8", "Acer Chromebook Spin 14", "Lenovo Legion 7",
|
|
"Xiaomi Mi Note 10", "Apple iPhone XR", "Google Pixel 4a 5G", "Motorola Edge 5G", "Oppo A94",
|
|
"Huawei MatePad 10.4", "Apple iPad Pro 9.7", "Xiaomi Mi Mix 3", "Huawei P30", "Apple iPhone 6s Plus",
|
|
"Samsung Galaxy S5", "Nokia Lumia 1020", "HTC One M8", "Sony Xperia Z3", "LG G3",
|
|
"Huawei Mate 9", "Apple iPhone 5s", "Samsung Galaxy S4", "Nokia N95", "Motorola Moto X",
|
|
"LG G2", "HTC One M7", "Google Nexus 5", "Asus ZenFone 2", "Microsoft Lumia 950 XL",
|
|
"Lenovo ThinkPad X1 Carbon Gen 9", "Asus ZenBook 13 OLED", "Apple iPhone 13 Pro Max", "Samsung Galaxy S21 FE", "Google Pixel 6 Pro",
|
|
"Oppo Find X5 Pro", "Xiaomi Mi 11X Pro", "Realme GT 5G", "Huawei Nova 9", "Motorola Edge 30",
|
|
"Sony Xperia 10 IV", "Apple iPad Pro 11-inch (2024)", "Samsung Galaxy Tab S7 FE", "Microsoft Surface Laptop 4",
|
|
"Lenovo ThinkPad X13 Gen 2", "Acer Predator Helios 700", "Dell Latitude 9520", "Apple MacBook Pro M1 Max",
|
|
"Huawei MatePad Pro", "Google Pixel 4a", "Xiaomi Mi 9T Pro", "OnePlus 7 Pro", "Asus TUF F17",
|
|
"Oppo F21 Pro", "Realme GT Master Edition", "Xiaomi Poco F3", "Motorola Moto G100", "Apple iPhone 12 Mini",
|
|
"Samsung Galaxy Z Flip 4", "Google Pixel 6", "Oppo Reno 6 5G", "Huawei Mate 40 Pro", "OnePlus 8T",
|
|
"Lenovo Yoga 7i", "Asus ZenFone 9", "HP Spectre x360 15t", "Xiaomi Mi 10T", "Razer Blade 15 Advanced"
|
|
];
|
|
|
|
|
|
function getRandomProduct() {
|
|
return products[Math.floor(Math.random() * products.length)];
|
|
}
|
|
|
|
export default definePlugin({
|
|
name: "SentFromMyDevice",
|
|
description: "Adds 'Sent from my <random device>' to the end of your message.",
|
|
authors: [{ name: "kxtzownsu", id: 952792525637312552n }],
|
|
dependencies: [],
|
|
|
|
onBeforeMessageSend(channelId, msg) {
|
|
const newContent = msg.content + "\n" + "-# Sent from my " + getRandomProduct();
|
|
msg.content = newContent;
|
|
},
|
|
});
|