Added labels to verifybars (improved accesibility)
This commit is contained in:
@@ -17,8 +17,11 @@ export async function registerAllButtons(){
|
||||
if (params.verifyButtonId.length > 40) throw new api.ODSystemError("ODButton:opendiscord:verifybar-button => verifyButtonId '"+verifyButtonId+"' exceeds 40 characters limit!")
|
||||
|
||||
const color = ("customColor" in params && params.customColor) ? params.customColor : "gray"
|
||||
const label = ("customLabel" in params && params.customLabel) ? params.customLabel : null
|
||||
const defaultEmoji = ("buttonStyle" in params && params.buttonStyle && params.buttonStyle == "✅") ? "✅" : "❌"
|
||||
//TODO TRANSLATION!!!
|
||||
const defaultLabel = (params.defaultButtonType == "✅") ? "Accept" : "Cancel"
|
||||
const defaultEmoji = (params.defaultButtonType == "✅") ? "✅" : "❌"
|
||||
|
||||
const label = ("customLabel" in params && params.customLabel) ? params.customLabel : (params.useDefaultLabels ? defaultLabel : null)
|
||||
const emoji = ("customEmoji" in params && params.customEmoji) ? params.customEmoji : defaultEmoji
|
||||
|
||||
instance.setCustomId("od:verifybar|"+verifybar.id.value+"|"+verifyButtonId)
|
||||
|
||||
Reference in New Issue
Block a user