huequica / DiscordTrashedDiver

100% typescript clean(?) discord bot implementation
3 stars 3 forks source link

添付ファイルをTwitterへUploadする際に、Content-Typeを指定する #223

Open SawadaReverse opened 6 months ago

SawadaReverse commented 6 months ago
Apr 30 16:12:50 discord-trashed-diver node[8151]: [twitter-api-v2] Deprecation warning: In TwitterApiv1ReadWrite.uploadMedia() call, options.mimeType is missing and filename couldn't help to resolve MIME type, so it will fallback to image/jpeg.
Apr 30 16:12:50 discord-trashed-diver node[8151]: If you except to give filenames without extensions, please specify explicitlty the MIME type using options.mimeType.
Apr 30 16:12:50 discord-trashed-diver node[8151]: To disable this message, import variable TwitterApiV2Settings from twitter-api-v2 and set TwitterApiV2Settings.deprecationWarnings to false.
huequica commented 6 months ago

https://github.com/huequica/DiscordTrashedDiver/blob/cc92d251b4e5dd51f7ccab78af0a03536c1b4186/src/lib/repositories/twitter.ts#L39-L46 Content-Type を拾って受け付けるようにしないとまずそう