• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

WolferyScripting / WolferyJS / #17

01 Sep 2025 09:19PM UTC coverage: 63.335% (+3.5%) from 59.799%
#17

push

DonovanDMC
0.0.6

95 of 253 branches covered (37.55%)

Branch coverage included in aggregate %.

7592 of 11884 relevant lines covered (63.88%)

1.32 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

78.72
/lib/models/Bot.ts
1
import BaseModel from "./BaseModel.js";
1✔
2
import type WolferyJS from "../WolferyJS.js";
1✔
3
import type { BotProperties } from "../generated/models/types.js";
1✔
4
import { BotDefinition } from "../generated/models/definitions.js";
1✔
5
import ResourceIDs from "../generated/ResourceIDs.js";
1✔
6
import type { ResClient } from "resclient-ts";
1✔
7

1✔
8
declare interface Bot extends BaseModel, BotProperties {}
1✔
9
// do not edit the first line of the class comment
1✔
10
/**
1✔
11
 * A bot.
1✔
12
 * @resourceID {@link ResourceIDs.BOT | BOT}
1✔
13
 */
1✔
14
class Bot extends BaseModel implements BotProperties {
1✔
15
    constructor(client: WolferyJS, api: ResClient, rid: string) {
1✔
16
        super(client, api, rid, { definition: BotDefinition });
×
17
    }
×
18

1✔
19
    get charId(): string {
1✔
20
        return this.char.id;
×
21
    }
×
22

1✔
23
    get userId(): string {
1✔
24
        return ResourceIDs.BOT.parts(this.rid).user;
×
25
    }
×
26

1✔
27
    /**
1✔
28
     * Delete this bot.
1✔
29
     * @playerRequired
1✔
30
     * @calls {@link MiscCommands.deleteBot}
1✔
31
     */
1✔
32
    async delete(): Promise<null> {
1✔
33
        return this.client.commands.misc.deleteBot(this.userId, this.charId);
×
34
    }
×
35

1✔
36
    /**
1✔
37
     * Renew this bot.
1✔
38
     * @playerRequired
1✔
39
     * @note The client attempts to call this but it always returns `system.notImplemented`.
1✔
40
     * @calls {@link MiscCommands.renewBot}
1✔
41
     */
1✔
42
    async renew(): Promise<null> {
1✔
43
        return this.client.commands.misc.renewBot(this.userId, this.charId);
×
44
    }
×
45
}
1✔
46

1✔
47
export default Bot;
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc