-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.ts
88 lines (82 loc) · 2.06 KB
/
settings.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
export interface Settings {
//// SETUP ////
/**
* Matrix Homeserver
* Eg. "https://matrix-federation.matrix.org"
*/
homeserverUrl: string;
/**
* Access Token of the bot account
* See https://t2bot.io/docs/access_tokens/ for a simple way to generate
*/
matrixAccessToken: string;
/**
* Strava API Application Client ID
* Found at https://www.strava.com/settings/api
*/
stravaClientId: string;
/**
* Strava API Application Client Secret
*/
stravaClientSecret: string;
/**
* Strava API Application Access Token
* The bot will refresh the token when appropriate and store it in bot-storage.json
*/
stravaAccessToken: string;
/**
* Strava API Application Refresh Token
*/
stravaRefreshToken: string;
/**
* Strava Club ID, also known as "Vanity Club URL"
* Eg. For the url https://www.strava.com/clubs/YOUR-ID-HERE -> YOUR-ID-HERE
*/
stravaClub: string;
/**
* File used as temporary storage by the bot
* Defaults to `bot-storage.json`
*/
storageFile?: string;
//// OPERATIONS ////
/**
* Dry run indicates that no messages will be sent to Matrix
* Defaults to `false`
*/
dryRun?: boolean;
/**
* Frequency of the bot polling Strava's API (in seconds)
*/
pollFrequency: number;
/**
* Should the bot auto accept invites to rooms?
* (Probably not if you want your Strava Club private)
* Defaults to `false`
*/
autoJoin?: boolean;
//// CUSTOMIZATION ////
/**
* Include emoji's in the club activity message
*/
emoji: boolean;
/**
* Optional Message outputted on bot startup and joining rooms
*/
onBotJoinRoomMessage: string | undefined;
/**
* Display the club activity message in miles
* Defaults to `false`
*/
useMiles?: boolean;
/**
* Display club activity elevation
* Defaults to `true`
*/
includeElevation?: boolean;
/**
* Display club activity average speed (distance/moving_time)
* Defaults to `true`
*/
includeSpeed?: boolean;
}
export type SettingsWithDefaults = Required<Settings>;