Skip to content

Commit

Permalink
chore: fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed Apr 11, 2024
1 parent a99d844 commit 2e12d9e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion adapters/qq/src/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,11 @@ export class QQMessageEncoder<C extends Context = Context> extends MessageEncode
if (onlineFile) this.attachedFile = onlineFile
} else {
if (!this.bot.ctx.get('ffmpeg')) return this.bot.logger.warn('missing ffmpeg service, cannot send non-silk audio except wav')
const wavBuf = await this.bot.ctx.get('ffmpeg').builder().input(Buffer.from(data)).outputOption('-ar', '24000', '-ac', '1', '-f', 's16le').run('buffer')
const wavBuf = await this.bot.ctx.get('ffmpeg')
.builder()
.input(Buffer.from(data))
.outputOption('-ar', '24000', '-ac', '1', '-f', 's16le')
.run('buffer')
const result = await silk.encode(wavBuf, 24000)
const onlineFile = await this.sendFile(type, {
src: `data:audio/amr;base64,` + Buffer.from(result.data).toString('base64'),
Expand Down
2 changes: 1 addition & 1 deletion adapters/satori/src/bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function createInternal(bot: SatoriBot, prefix = '') {
return new Proxy(() => {}, {
apply(target, thisArg, args) {
const key = snakeCase(prefix.slice(1))
bot.logger.debug("[request.internal]", key, args)
bot.logger.debug('[request.internal]', key, args)
return bot.http.post('/v1/internal/' + key, args)
},
get(target, key, receiver) {
Expand Down

0 comments on commit 2e12d9e

Please sign in to comment.