Skip to content

Commit 8d75312

Browse files
authored
poll-shrunk (#129)
Co-authored-by: Aaron Neugebauer <72529530+PantomInach@users.noreply.github.com> (Resolved merge conflict)
1 parent 9e905b5 commit 8d75312

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

cogs/commandlistener.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ async def on_ready(self):
5252
# Sends message to mods, when bot is online
5353
print("Now Online")
5454
await self.utils.sendModsMessage(
55-
"Bot is now online.\nVersion:\tDiscordBot DataBot v2.6.3"
55+
"Bot is now online.\nVersion:\tDiscordBot DataBot v2.6.4"
5656
)
5757
# Sets the bot's presence to "Online" or "Do not Disturb" to indicate if it's logging or not.
5858
if self.ch.getFromConfig("log") == "True":

cogs/commandpoll.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ async def pollCreate(self, ctx, pollName):
192192
Sends an overview of the poll.
193193
"""
194194
message = ""
195-
if len(pollName) <= 71:
195+
if len(pollName) <= 27:
196196
pollID = self.poll.newPoll(pollName)
197197
datum = self.poll.getDate(pollID)
198198
status = self.poll.getStatus(pollID)
@@ -288,7 +288,7 @@ async def optionAdd(self, ctx, pollID, optionName):
288288
"""
289289
message = ""
290290
if self.poll.isAPollID(pollID):
291-
if len(optionName) <= 112:
291+
if len(optionName) <= 70:
292292
if not self.poll.optionAdd(pollID, str(optionName), 0):
293293
message = (
294294
"ERROR: Option Name is already taken or poll is "

datahandler/poll.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ def pollHeader(self, pollID):
478478
datum = str(self.getDate(pollID))[:10]
479479
status = str(self.getStatus(pollID))
480480
sumVotes = str(self.getSumVotes(pollID))
481-
text = f"```md\n{' '*(3-len(str(pollID)))}{pollID} {name}{' '*(72-len(name))} Date: {datum} Status: {status}{' '*(9-len(status))} Votes:{' '*(5-len(sumVotes))}{sumVotes}\n```\n"
481+
text = f"```md\n{' '*(3-len(str(pollID)))}{pollID} {name}{' '*(28-len(name))} Date: {datum} Status: {status}{' '*(9-len(status))} Votes: {' '*(5-len(sumVotes))}{sumVotes}\n```\n"
482482
return text
483483
return ""
484484

@@ -506,5 +506,5 @@ def pollStringSortBy(self, pollID, sortBy):
506506
optionName = str(option[0])
507507
optionVotes = str(option[1])
508508
optionNumber = str(option[2])
509-
message += f"```md\n {optionNumber}. {optionName}{' '*(112-len(optionName))} Votes: {' '*(4-len(optionVotes))}{optionVotes}\n```\n"
509+
message += f"```md\n {optionNumber}. {optionName}{' '*(64-len(optionName))} Votes: {' '*(4-len(optionVotes))}{optionVotes}\n```\n"
510510
return message

0 commit comments

Comments
 (0)