This repository was archived by the owner on Jul 17, 2020. It is now read-only.
File tree 4 files changed +24
-15
lines changed
4 files changed +24
-15
lines changed Original file line number Diff line number Diff line change 2
2
// @name ChatBot auto-loader
3
3
// @author Zirak
4
4
// @namespace ZirakInSpace
5
- // @version 0.1
5
+ // @version 0.2
6
6
// @description Loads the bot when you visit a room
7
7
// @include /http://chat\.stack(overflow|exchange)\.com/rooms/\d+/
8
8
// ==/UserScript==
9
9
10
10
var s = document . createElement ( 'script' ) ;
11
+ s . onload = runConfigs ;
11
12
s . src = 'https://rawgit.com/Zirak/SO-ChatBot/master/master.js' ;
12
13
document . head . appendChild ( s ) ;
14
+
15
+ function runConfigs ( ) {
16
+ var config = bot . config ;
17
+ config . weatherKey = '' ;
18
+ config . githubToken = '' ;
19
+ bot . memory . set ( 'config' , config ) ;
20
+ bot . memory . save ( ) ;
21
+ }
Original file line number Diff line number Diff line change @@ -2109,13 +2109,13 @@ module.exports = function (bot) {
2109
2109
pattern : '!!' ,
2110
2110
welcomeMessage : welcomeFmt . supplant ( rulesLink ) ,
2111
2111
2112
- // visit OpenWeatherMap site to obtain a key.
2113
- // the sample key no longer works.
2114
- weatherKey : 'sample' ,
2112
+ // these must be set for the weather
2113
+ // command and backup command respectivly.
2114
+ // I've removed the sample keys so I can easily
2115
+ // change them with the bot loader script.
2115
2116
2116
- // visit github to obtain a key
2117
- // no public keys work.
2118
- githubToken : 'sample'
2117
+ //weatherKey: '',
2118
+ //githubToken: ''
2119
2119
} ,
2120
2120
bot . memory . get ( 'config' , { } )
2121
2121
) ;
Original file line number Diff line number Diff line change @@ -12,13 +12,13 @@ module.exports = function (bot) {
12
12
pattern : '!!' ,
13
13
welcomeMessage : welcomeFmt . supplant ( rulesLink ) ,
14
14
15
- // visit OpenWeatherMap site to obtain a key.
16
- // the sample key no longer works.
17
- weatherKey : 'sample' ,
15
+ // these must be set for the weather
16
+ // command and backup command respectivly.
17
+ // I've removed the sample keys so I can easily
18
+ // change them with the bot loader script.
18
19
19
- // visit github to obtain a key
20
- // no public keys work.
21
- githubToken : 'sample'
20
+ //weatherKey: '',
21
+ //githubToken: ''
22
22
} ,
23
23
bot . memory . get ( 'config' , { } )
24
24
) ;
You can’t perform that action at this time.
0 commit comments