fix #10 choose upload path in config.js

This commit is contained in:
lesion
2019-06-11 17:44:11 +02:00
parent a557348b21
commit 5778c64108
16 changed files with 99 additions and 95 deletions

View File

@@ -48,7 +48,7 @@ ${event.description.length > 200 ? event.description.substr(0, 200) + '...' : ev
let media
if (event.image_path) {
const file = path.join(__dirname, '..', '..', '..', 'uploads', event.image_path)
const file = path.join(config.upload_path, event.image_path)
if (fs.statSync(file)) {
media = await bot.post('media', { file: fs.createReadStream(file) })
}