diff --git a/plugins/HideGiftButton/src/index.ts b/plugins/HideGiftButton/src/index.ts index 0b653cb..1d495d8 100644 --- a/plugins/HideGiftButton/src/index.ts +++ b/plugins/HideGiftButton/src/index.ts @@ -10,9 +10,11 @@ let unpatch: () => boolean; export default { onLoad() { const blockList = ["ic_thread_normal_24px", "ic_gift"].map(n => getAssetIDByName(n)); + const blockTypeList = [6]; unpatch = after("render", ChatInput.prototype, (_, ret) => { const input = findInReactTree(ret, t => "forceAnimateButtons" in t.props && t.props.actions); - input.props.actions = input.props.actions.filter(a => !blockList.includes(a.source)); + input.props.actions = input.props.actions.filter(a => + !blockList.includes(a.source) && !blockTypeList.includes(a.type)); }); }, onUnload: unpatch