MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / saveUserSettings

Method saveUserSettings

autochangename/autochangename.ts:206–214  ·  view source on GitHub ↗
(settings: UserSettings)

Source from the content-addressed store, hash-verified

204
205 static async saveUserSettings(settings: UserSettings): Promise<boolean> {
206 if (!settings?.user_id) return false;
207 await this.init();
208 try {
209 this.db!.data.users[settings.user_id.toString()] = { ...settings };
210 await this.db!.write();
211 return true;
212 } catch { return false; }
213 }
214
215 static async getRandomTexts(): Promise<string[]> {
216 await this.init();
217 return this.db?.data?.random_texts ?? [];

Callers 14

saveCurrentNicknameMethod · 0.80
getWeatherCompactMethod · 0.80
updateUserProfileMethod · 0.80
handleToggleMethod · 0.80
handleModeMethod · 0.80
handleShowMethod · 0.80
handleTimezoneMethod · 0.80
handleTimezoneFormatMethod · 0.80
handleToggleSettingMethod · 0.80
handleTextStyleMethod · 0.80
handleWeatherMethod · 0.80
handleDisplayOrderMethod · 0.80

Calls 2

initMethod · 0.95
writeMethod · 0.80

Tested by

no test coverage detected