You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For more information Discord-Button's visit the `Discord-API Documentation <https://discord.com/developers/docs/interactions/message-components#buttons>`_.
'The maximum length of Button-custom_id\'s are 100; youre one is %s long. (%s Characters to long)'% (len(self.custom_id), len(self.custom_id) -100))
96
+
'The maximum length of Button-custom_id\'s are 100; your one is %s long. (%s Characters to long)'% (len(self.custom_id), len(self.custom_id) -100))
94
97
ifself._custom_idandself.url:
95
98
raiseURLAndCustomIDNotAlowed(self.custom_id)
96
99
self._label: str=kwargs.get('label', kwargs.get('name', 'I\'m an Button'))
97
100
ifself._labelandlen(self._label) >80:
98
-
raiseInvalidArgument(f'The maximum length of Button-Labels\'s are 80; youre one is {len(self.label)} long. ({len(self.label) -100} Characters to long)')
101
+
raiseInvalidArgument(f'The maximum length of Button-Labels\'s are 80; your one is {len(self.label)} long. ({len(self.label) -100} Characters to long)')
raiseInvalidData("DropdownMenue-Options have to bee an Dict like `{'label': 'that wath should show up in Discord', 'value': 'that wath the Discord-API sends to your Application if the option is choosen'}`, or usaly an :function:`discord.components.create_option`.")
244
+
raiseInvalidData("DropdownMenue-Options have to bee an Dict like `{'label': 'that what should show up in Discord', 'value': 'that what the Discord-API sends to your Application if the option is chosen'}`, or usually an :function:`discord.components.create_option`.")
For more information about ActionRow's visit the `Discord-API Documentation <https://discord.com/developers/docs/interactions/message-components#actionrow>`_.
264
275
"""
265
-
self.base: dict= {'type': 1, 'components': []}
266
276
self.components= []
267
277
self.force=kwargs.get('force', False)
268
278
forobjinargs:
269
279
ifisinstance(obj, Button):
270
-
self.base['components'].append(obj.to_dict())
271
280
self.components.append(obj)
272
281
elifisinstance(obj, DropdownMenue):
273
-
self.base['components'].append(obj.to_dict())
274
282
self.components.append(obj)
275
283
elifisinstance(obj, dict):
276
284
ifnotobj.get('type', None) in [2, 3]:
277
-
raiseInvalidData('if you use an Dict instad of Button, DropdownMenue you have to pass an type')
0 commit comments