patch 2-1
This commit is contained in:
parent
72c070ff4f
commit
b64ecd0133
@ -49,7 +49,7 @@ class Help:
|
||||
if page == '🏠':
|
||||
## POLL CREATION SHORT
|
||||
embed.add_field(name='🆕 Making New Polls',
|
||||
value=f'`{pre}quick` | `{pre}new` | `{pre}prepared`', inline=False)
|
||||
value=f'`{pre}quick` | `{pre}new` | `{pre}prepare`', inline=False)
|
||||
# embed.add_field(name='Commands', value=f'`{pre}quick` | `{pre}new` | `{pre}prepared`', inline=False)
|
||||
# embed.add_field(name='Arguments', value=f'Arguments: `<poll question>` (optional)', inline=False)
|
||||
# embed.add_field(name='Examples', value=f'Examples: `{pre}new` | `{pre}quick What is the greenest color?`',
|
||||
@ -183,7 +183,7 @@ class Help:
|
||||
inline=False)
|
||||
embed.add_field(name='🔹 **Support Server**',
|
||||
value='If you need help with pollmaster, want to try him out or would like to give feedback '
|
||||
'to the developer, feel free to join the support server: ',
|
||||
'to the developer, feel free to join the support server: https://discord.gg/Vgk8Nve',
|
||||
inline=False)
|
||||
embed.add_field(name='🔹 **Github**',
|
||||
value='The full python source code is on my Github: https://github.com/matnad/pollmaster',
|
||||
|
||||
@ -254,7 +254,7 @@ class Poll:
|
||||
except InputError:
|
||||
pass
|
||||
|
||||
text = ("This poll will we created inactive. You can either schedule activation at a certain date or activate "
|
||||
text = ("This poll will be created inactive. You can either schedule activation at a certain date or activate "
|
||||
"it manually. **Type `0` to activate it manually or tell me when you want to activate it** by "
|
||||
"typing an absolute or relative date. You can specify a timezone if you want.\n"
|
||||
"Examples: `in 2 days`, `next week CET`, `may 3rd 2019`, `9.11.2019 9pm EST` ")
|
||||
@ -419,7 +419,7 @@ class Poll:
|
||||
elif number == 3:
|
||||
return ['😍', '👍', '🤐', '👎', '🤢']
|
||||
elif number == 4:
|
||||
return ['in favour', 'against', 'abstain']
|
||||
return ['in favour', 'against', 'abstaining']
|
||||
|
||||
|
||||
try:
|
||||
|
||||
@ -74,10 +74,6 @@ class PollControls:
|
||||
|
||||
# Activate Poll
|
||||
p.active = True
|
||||
if p.duration_type == 'timespan':
|
||||
# add the the time between creation and activation to the duration
|
||||
# -> "restart" the duration
|
||||
p.duration += (p.get_activation_date() - p.time_created) / 60
|
||||
await p.save_to_db()
|
||||
await ctx.invoke(self.show, short)
|
||||
else:
|
||||
|
||||
@ -3,7 +3,6 @@ import logging
|
||||
import aiohttp
|
||||
import discord
|
||||
|
||||
|
||||
from discord.ext import commands
|
||||
from motor.motor_asyncio import AsyncIOMotorClient
|
||||
|
||||
@ -56,6 +55,7 @@ async def on_ready():
|
||||
await bot.change_presence(game=discord.Game(name=f'V2 IS HERE >> pm!help'))
|
||||
|
||||
# check discord server configs
|
||||
try:
|
||||
db_server_ids = [entry['_id'] async for entry in bot.db.config.find({}, {})]
|
||||
for server in bot.servers:
|
||||
if server.id not in db_server_ids:
|
||||
@ -65,8 +65,15 @@ async def on_ready():
|
||||
{'$set': {'prefix': 'pm!', 'admin_role': 'polladmin', 'user_role': 'polluser'}},
|
||||
upsert=True
|
||||
)
|
||||
import_old_database(bot, server)
|
||||
try:
|
||||
await import_old_database(bot, server)
|
||||
print(str(server), "updated.")
|
||||
except:
|
||||
print(str(server.id), "failed.")
|
||||
except:
|
||||
print("Problem verifying servers.")
|
||||
|
||||
print("Servers verified. Bot running.")
|
||||
|
||||
|
||||
@bot.event
|
||||
|
||||
Loading…
Reference in New Issue
Block a user