We can basically use react from bdapi
This commit is contained in:
parent
fc6f916f39
commit
68f6898003
|
@ -4,7 +4,7 @@ import { ReactDOMSelector } from "./selectors"
|
|||
window.ReactDOM = (window["Reac"+"tDOM"] || // If in Lightcord
|
||||
(()=>{ // If in Standard BetterDiscord
|
||||
try{
|
||||
return window.BdApi.findModule(ReactDOMSelector as any)
|
||||
return window.BdApi.ReactDOM
|
||||
}catch(e){
|
||||
return null
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ window.ReactDOM = (window["Reac"+"tDOM"] || // If in Lightcord
|
|||
})() ||
|
||||
(()=>{ // If in EnhancedDiscord
|
||||
try{
|
||||
return window.EDApi.findModule(ReactDOMSelector as any)
|
||||
return window.EDApi.ReactDOM
|
||||
}catch(e){
|
||||
return null
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ import { ReactSelector } from "./selectors";
|
|||
window.React = (window.React || // If in Lightcord
|
||||
(()=>{ // If in Standard BetterDiscord
|
||||
try{
|
||||
return window.BdApi.findModule(ReactSelector as any)
|
||||
return window.BdApi.React
|
||||
}catch(e){
|
||||
return null
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ window.React = (window.React || // If in Lightcord
|
|||
})() ||
|
||||
(()=>{ // If in EnhancedDiscord
|
||||
try{
|
||||
return window.EDApi.findModule(ReactSelector as any)
|
||||
return window.EDApi.React
|
||||
}catch(e){
|
||||
return null
|
||||
}
|
||||
|
|
|
@ -48,6 +48,8 @@ declare global {
|
|||
EDApi: typeof bandagedbdApi.BdApi
|
||||
}
|
||||
var Lightcord:LightcordGlobal
|
||||
var BdApi: typeof bandagedbdApi.BdApi
|
||||
var EDApi: typeof bandagedbdApi.BdApi
|
||||
}
|
||||
|
||||
export default LightcordApi
|
||||
|
|
Loading…
Reference in New Issue