2026.4.0-alpha.0
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import client from "@/lib/client";
|
||||
import ueuseModule from "better-uwuzu-sdk/types/1.6.8/types/modules/ueuse";
|
||||
import i18next from "i18next";
|
||||
|
||||
export default async function followCommand(ueuse: ueuseModule) {
|
||||
const follow = await client.request("users/follow", {
|
||||
userid: ueuse.account.userid,
|
||||
});
|
||||
|
||||
if (!follow.success) {
|
||||
console.warn("フォローに失敗:", follow.error_code);
|
||||
return;
|
||||
}
|
||||
|
||||
console.log("フォロー:", follow.userid);
|
||||
|
||||
const notice = await client.request("ueuse/create", {
|
||||
text: i18next.t("followedNotification", { username: ueuse.account.username }),
|
||||
replyid: ueuse.uniqid,
|
||||
});
|
||||
|
||||
if (!notice.success) {
|
||||
console.warn("フォロー通知に失敗:", notice.error_code);
|
||||
}
|
||||
|
||||
console.log("フォロー通知:", notice.uniqid);
|
||||
}
|
||||
Reference in New Issue
Block a user