Skip to content

Commit 862cb8d

Browse files
authored
Fix field length in embed (#21)
1 parent da6bda9 commit 862cb8d

7 files changed

Lines changed: 11 additions & 14 deletions

File tree

slao_bot/cogs/bomberman.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def print_engineers(self) -> str:
9494

9595
value = ''
9696
for raider_name, raider_damage in self._bomb_damage.items():
97-
if len(value) > 950:
97+
if len(value) > 940:
9898
return value + 'И исчо немного народа.'
9999
if len(value) > 0:
100100
value += ', '
@@ -104,7 +104,7 @@ def print_engineers(self) -> str:
104104

105105
if len(self._engineers) > 0:
106106
for _raider_id, raider_name in self._engineers.items():
107-
if len(value) > 950:
107+
if len(value) > 940:
108108
return value + 'И исчо немного народа.'
109109
if len(value) > 0:
110110
value += ', '
@@ -119,7 +119,7 @@ def print_others(self) -> str:
119119

120120
value = ''
121121
for raider_name, raider_damage in self._other_damage.items():
122-
if len(value) > 950:
122+
if len(value) > 940:
123123
return value + 'И исчо немного народа.'
124124
if len(value) > 0:
125125
value += ', '

slao_bot/cogs/damage.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ async def process_damage(self, ctx: Context, report_id: str) -> None:
7171
def print_pumpers(self, raiders: Dict[int, Raider]) -> str:
7272
result = ''
7373
for _int, raider in raiders.items():
74-
if len(result) > 950:
74+
if len(result) > 940:
7575
return result + 'И исчо немного народа.'
7676
if (raider.total / self.combat_time * 1000) >= self.dps_threshold:
7777
if len(result) > 0:
@@ -83,7 +83,7 @@ def print_pumpers(self, raiders: Dict[int, Raider]) -> str:
8383
def print_low_dps(self, raiders: Dict[int, Raider]) -> str:
8484
result = ''
8585
for _int, raider in raiders.items():
86-
if len(result) > 950:
86+
if len(result) > 940:
8787
return result + 'И исчо немного народа.'
8888
if (raider.total / self.combat_time * 1000) < self.dps_threshold:
8989
if len(result) > 0:

slao_bot/cogs/gear.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def _print_raiders(gear_issues: Dict[str, Set]) -> Optional[str]:
142142
value = ''
143143

144144
for index, raider in enumerate(gear_issues):
145-
if len(value) > 950:
145+
if len(value) > 940:
146146
return value + 'И исчо немного вагонов.'
147147
if index > 0:
148148
value += ', '

slao_bot/cogs/potions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ async def process_pots(self, ctx: Context, report_id: str) -> None:
143143
def _print_pot_usage(entries: Dict[str, int]) -> str:
144144
result = ''
145145
for key, value in entries.items():
146-
if len(result) > 950:
146+
if len(result) > 940:
147147
return result + 'И исчо немного народа.'
148148
if len(result) > 0:
149149
result += ', '
@@ -155,7 +155,7 @@ def _print_pot_usage(entries: Dict[str, int]) -> str:
155155
def _print_pot_total(entries: Dict[str, List]) -> str:
156156
result = ''
157157
for key, value in entries.items():
158-
if len(result) > 950:
158+
if len(result) > 940:
159159
return result + 'И исчо немного народа.'
160160
if len(result) > 0:
161161
result += ', '

slao_bot/cogs/signup.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,8 @@ async def emit_join(self, ctx: Context) -> None:
105105
"""Emit member_join event."""
106106
self.bot.dispatch('member_join', ctx.author)
107107

108-
@app_commands.command(description='SignUp Form')
108+
@app_commands.command(description='Немного о себе')
109109
async def signup(self, interaction: discord.Interaction):
110-
# Send the modal with an instance of our `Feedback` class
111-
# Since modals require an interaction, they cannot be done as a response to a text command.
112-
# They can only be done as a response to either an application command or a button press.
113110
await interaction.response.send_modal(SignUpModal())
114111

115112

slao_bot/slaobot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def __init__(self):
2727
message_content=True,
2828
reactions=True,
2929
)
30-
logging.basicConfig(level=logging.INFO)
30+
logging.basicConfig(level=logging.WARN)
3131

3232
super().__init__(
3333
command_prefix=f'{settings.command_prefix}',

slao_bot/utils/report.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def make_spec(raiders: List[Raider], show_trophy: bool = False) -> str:
2828
raiders = sorted(raiders, key=attrgetter('total'), reverse=True)
2929

3030
for place, raider in enumerate(raiders):
31-
if len(result) > 950:
31+
if len(result) > 940:
3232
return result + 'И исчо немного народа.'
3333

3434
key = raider.class_ + '_' + raider.spec

0 commit comments

Comments
 (0)