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
|
window.ReactDOM = (window["Reac"+"tDOM"] || // If in Lightcord
|
||||||
(()=>{ // If in Standard BetterDiscord
|
(()=>{ // If in Standard BetterDiscord
|
||||||
try{
|
try{
|
||||||
return window.BdApi.findModule(ReactDOMSelector as any)
|
return window.BdApi.ReactDOM
|
||||||
}catch(e){
|
}catch(e){
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ window.ReactDOM = (window["Reac"+"tDOM"] || // If in Lightcord
|
||||||
})() ||
|
})() ||
|
||||||
(()=>{ // If in EnhancedDiscord
|
(()=>{ // If in EnhancedDiscord
|
||||||
try{
|
try{
|
||||||
return window.EDApi.findModule(ReactDOMSelector as any)
|
return window.EDApi.ReactDOM
|
||||||
}catch(e){
|
}catch(e){
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { ReactSelector } from "./selectors";
|
||||||
window.React = (window.React || // If in Lightcord
|
window.React = (window.React || // If in Lightcord
|
||||||
(()=>{ // If in Standard BetterDiscord
|
(()=>{ // If in Standard BetterDiscord
|
||||||
try{
|
try{
|
||||||
return window.BdApi.findModule(ReactSelector as any)
|
return window.BdApi.React
|
||||||
}catch(e){
|
}catch(e){
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ window.React = (window.React || // If in Lightcord
|
||||||
})() ||
|
})() ||
|
||||||
(()=>{ // If in EnhancedDiscord
|
(()=>{ // If in EnhancedDiscord
|
||||||
try{
|
try{
|
||||||
return window.EDApi.findModule(ReactSelector as any)
|
return window.EDApi.React
|
||||||
}catch(e){
|
}catch(e){
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,6 +48,8 @@ declare global {
|
||||||
EDApi: typeof bandagedbdApi.BdApi
|
EDApi: typeof bandagedbdApi.BdApi
|
||||||
}
|
}
|
||||||
var Lightcord:LightcordGlobal
|
var Lightcord:LightcordGlobal
|
||||||
|
var BdApi: typeof bandagedbdApi.BdApi
|
||||||
|
var EDApi: typeof bandagedbdApi.BdApi
|
||||||
}
|
}
|
||||||
|
|
||||||
export default LightcordApi
|
export default LightcordApi
|
||||||
|
|
Loading…
Reference in New Issue