/[sudobot]/trunk/src/services/RandomStatus.ts
ViewVC logotype

Diff of /trunk/src/services/RandomStatus.ts

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 226 by rakin, Mon Jul 29 17:29:06 2024 UTC revision 300 by rakin, Mon Jul 29 17:29:26 2024 UTC
# Line 10  export default class RandomStatus extend Line 10  export default class RandomStatus extend
10          console.log(status);          console.log(status);
11                    
12          await this.client.user?.setActivity({          await this.client.user?.setActivity({
13              type: type ?? 'WATCHING',              type: type ?? this.client.config.props.global.status.name ?? 'WATCHING',
14              name: name ?? 'over the server'              name: name ?? this.client.config.props.global.status.type ?? 'over the server'
15          });          });
16    
17            this.client.config.props.global.status = type || name ? {} : null;
18    
19            if (name) {
20                this.client.config.props.global.status.name = name;
21            }
22    
23            if (type) {
24                this.client.config.props.global.status.type = type;
25            }
26    
27          await this.client.user?.setStatus(status!);          await this.client.user?.setStatus(status!);
28            await this.client.config.write();
29      }      }
30  }  }

Legend:
Removed from v.226  
changed lines
  Added in v.300

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26