File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 11{
2- "name" : " kaatisbot " ,
3- "version" : " 1.0 .0" ,
2+ "name" : " kaatisbotti " ,
3+ "version" : " 1.1 .0" ,
44 "description" : " hyvää kontenttia/good content" ,
55 "type" : " module" ,
66 "main" : " index.js" ,
Original file line number Diff line number Diff line change @@ -21,6 +21,11 @@ const htaccessPath = process.env.HTACCESS_PATH || 'public/.htaccess'
2121
2222const client = new Client ( )
2323
24+ client . on ( 'ready' , async ( ) => {
25+ // Notice: npm_package_version is only available if the application is launched with npm start
26+ client . user . setActivity ( `v${ process . env . npm_package_version } ` )
27+ } )
28+
2429client . on ( 'message' , async ( message ) => {
2530 if ( message . channel . id !== memeChannelId ) return
2631
@@ -71,6 +76,8 @@ client.on('message', async (message) => {
7176 // The name of the uploader of the file is shown in Apache directory listing
7277 fsp . appendFile ( htaccessPath ,
7378 `AddDescription "${ utils . alphanum ( message . author . username ) } " ${ availableFilename } \n` )
79+
80+ console . log ( `Successfully uploaded ${ availableFilename } by ${ message . author . tag } ` )
7481 }
7582 } catch ( e ) {
7683 const errorMessage = await message . reply ( `Kuvaasi ei voitu lähettää kaatikseen: ${ e . message } ` )
You can’t perform that action at this time.
0 commit comments