add /admins command

This commit is contained in:
2026-03-18 13:43:28 +03:00
parent bfb6fe33db
commit 3700f61393
3 changed files with 64 additions and 4 deletions
+7 -4
View File
@@ -49,6 +49,7 @@ import {EditOptions} from "../model/edit-options";
import VideoInfo from "youtubei.js/dist/src/parser/youtube/VideoInfo";
import {DownloadYtVideo} from "../callback_commands/download-yt-video";
import {TryAgain} from "../callback_commands/try-again";
import {StoredUser} from "../model/stored-user";
export const ignore = () => {
};
@@ -389,11 +390,13 @@ export function chatCommandToString(cmd: Command): string {
return `${cmd.title ? `${cmd.title}: ` : ""}${cmd.description ? `${cmd.description}` : ""}`;
}
export function fullName(from: User): string {
let fullName = from.first_name;
export function fullName(from: User | StoredUser): string {
const isStored = "isBot" in from;
if (from.last_name) {
fullName += " " + from.last_name;
let fullName = isStored ? from.firstName : from.first_name;
if (isStored ? from.lastName : from.last_name) {
fullName += " " + (isStored ? from.lastName : from.last_name);
}
return fullName;