mirror of
https://github.com/Genshin-bots/gsuid_core.git
synced 2025-05-12 06:55:49 +08:00
🐛 自动上传图片
提供开关关闭
This commit is contained in:
parent
bdcb830d85
commit
18d2bc8fec
@ -24,17 +24,19 @@ text2pic_limit = core_plugins_config.get_config('TextToPicThreshold').data
|
||||
enable_pic_srv = core_plugins_config.get_config('EnablePicSrv').data
|
||||
pic_srv = core_plugins_config.get_config('PicSrv').data
|
||||
SERVER = pic_upload_config.get_config('PicUploadServer').data
|
||||
IS_UPLOAD = pic_upload_config.get_config('PicUpload').data
|
||||
|
||||
if SERVER == 'smms':
|
||||
|
||||
pclient = None
|
||||
if IS_UPLOAD:
|
||||
if SERVER == 'smms':
|
||||
from gsuid_core.utils.upload.smms import SMMS
|
||||
|
||||
pclient = SMMS()
|
||||
elif SERVER == 's3':
|
||||
elif SERVER == 's3':
|
||||
from gsuid_core.utils.upload.s3 import S3
|
||||
|
||||
pclient = S3()
|
||||
else:
|
||||
pclient = None
|
||||
|
||||
|
||||
class MessageSegment:
|
||||
|
@ -46,3 +46,5 @@ class SMMS:
|
||||
data = raw_data['data']
|
||||
asyncio.create_task(self.delete(data['hash']))
|
||||
return data['url']
|
||||
else:
|
||||
logger.info('[sm.ms / upload] 上传失败!')
|
||||
|
Loading…
x
Reference in New Issue
Block a user