(topgg): Name and wording tweaks.
This commit is contained in:
@@ -1,2 +1,2 @@
|
|||||||
CONFIG_FILE = "config/bot.conf"
|
CONFIG_FILE = "config/bot.conf"
|
||||||
DATA_VERSION = 8
|
DATA_VERSION = 9
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ meta = RowTable(
|
|||||||
|
|
||||||
user_config = RowTable(
|
user_config = RowTable(
|
||||||
'user_config',
|
'user_config',
|
||||||
('userid', 'timezone', 'remaind_upvote'),
|
('userid', 'timezone', 'topgg_vote_reminder'),
|
||||||
'userid',
|
'userid',
|
||||||
cache=TTLCache(5000, ttl=60*5)
|
cache=TTLCache(5000, ttl=60*5)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -4,19 +4,23 @@ from settings.setting_types import Boolean
|
|||||||
from modules.reminders.reminder import Reminder
|
from modules.reminders.reminder import Reminder
|
||||||
from modules.reminders.data import reminders
|
from modules.reminders.data import reminders
|
||||||
|
|
||||||
from .utils import create_remainder, remainder_content
|
from .utils import create_remainder, remainder_content, topgg_upvote_link
|
||||||
|
|
||||||
|
|
||||||
@UserSettings.attach_setting
|
@UserSettings.attach_setting
|
||||||
class topgg_vote_remainder(Boolean, UserSetting):
|
class topgg_vote_remainder(Boolean, UserSetting):
|
||||||
attr_name = 'vote_remainder'
|
attr_name = 'vote_remainder'
|
||||||
_data_column = 'remaind_upvote'
|
_data_column = 'topgg_vote_reminder'
|
||||||
|
|
||||||
_default = True
|
_default = True
|
||||||
|
|
||||||
display_name = 'Upvote Reminder'
|
display_name = 'vote_reminder'
|
||||||
desc = "Turn on/off DM Reminders to Upvote me."
|
desc = r"Toggle automatic reminders to support me for a 25% LionCoin boost."
|
||||||
long_desc = ("Enable or disable DM boost reminders.",)
|
long_desc = (
|
||||||
|
"Did you know that you can [vote for me]({vote_link}) to help me help other people reach their goals? "
|
||||||
|
"And you get a **25% boost** to all LionCoin income you make across all servers!\n"
|
||||||
|
"Enable this setting if you want me to let you know when you can vote again!"
|
||||||
|
).format(vote_link=topgg_upvote_link)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def success_response(self):
|
def success_response(self):
|
||||||
@@ -25,8 +29,8 @@ class topgg_vote_remainder(Boolean, UserSetting):
|
|||||||
create_remainder(self.id)
|
create_remainder(self.id)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
" I will send you boost reminders.\n\n"
|
"Thank you for supporting me! I will remind in your DMs when you can vote next! "
|
||||||
"`Please make sure your DMs are open.`"
|
"(Please make sue your DMs are open, otherwise I can't reach you!)"
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
# Check if reminder is already running and get its id
|
# Check if reminder is already running and get its id
|
||||||
@@ -42,5 +46,5 @@ class topgg_vote_remainder(Boolean, UserSetting):
|
|||||||
Reminder.delete(r['reminderid'])
|
Reminder.delete(r['reminderid'])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
" I won't send you boost reminders."
|
"I will no longer send you voting reminders."
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
ALTER TABLE user_config
|
ALTER TABLE user_config
|
||||||
ADD COLUMN remaind_upvote BOOLEAN DEFAULT TRUE
|
ADD COLUMN topgg_vote_reminder BOOLEAN;
|
||||||
|
|
||||||
ALTER TABLE reminders
|
ALTER TABLE reminders
|
||||||
ADD COLUMN title TEXT DEFAULT NULL,
|
ADD COLUMN title TEXT,
|
||||||
ADD COLUMN footer TEXT DEFAULT NULL
|
ADD COLUMN footer TEXT;
|
||||||
|
|
||||||
-- Topgg Data {{{
|
-- Topgg Data {{{
|
||||||
CREATE TABLE IF NOT EXISTS topgg(
|
CREATE TABLE IF NOT EXISTS topgg(
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ CREATE TABLE global_guild_blacklist(
|
|||||||
CREATE TABLE user_config(
|
CREATE TABLE user_config(
|
||||||
userid BIGINT PRIMARY KEY,
|
userid BIGINT PRIMARY KEY,
|
||||||
timezone TEXT,
|
timezone TEXT,
|
||||||
remaind_upvote BOOLEAN DEFAULT TRUE
|
topgg_vote_reminder
|
||||||
);
|
);
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
@@ -168,8 +168,8 @@ CREATE TABLE reminders(
|
|||||||
message_link TEXT,
|
message_link TEXT,
|
||||||
interval INTEGER,
|
interval INTEGER,
|
||||||
created_at TIMESTAMP DEFAULT (now() at time zone 'utc'),
|
created_at TIMESTAMP DEFAULT (now() at time zone 'utc'),
|
||||||
title TEXT DEFAULT NULL,
|
title TEXT,
|
||||||
footer TEXT DEFAULT NULL
|
footer TEXT
|
||||||
);
|
);
|
||||||
CREATE INDEX reminder_users ON reminders (userid);
|
CREATE INDEX reminder_users ON reminders (userid);
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|||||||
Reference in New Issue
Block a user