This repository has been archived by the owner on Jul 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
9th commit - January 23, 2021 (01R8-210123)
- Loading branch information
Showing
7 changed files
with
74 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
from .tnews_list import tnews_list | ||
async def get_tnews(bot, discord, message, botconfig, platform, os, datetime, one_result, localization, args, unix_time_millis, connection, cursor, embed_color): | ||
news_title = "" | ||
news_text = "" | ||
tnews_content = discord.Embed(title=localization[1][6][0], description=localization[1][6][1] + tnews_list['title']['one'] + "\n" + tnews_list['title']['two'], color=embed_color) | ||
tnews_content.set_footer(text=tnews_list['footer']) | ||
msg = await message.channel.send(embed=tnews_content) | ||
await msg.add_reaction(emoji="1⃣") | ||
await msg.add_reaction(emoji="2⃣") | ||
@bot.event | ||
async def on_reaction_add(reaction, user): | ||
channel = reaction.message.channel | ||
if reaction.emoji == "1⃣" and user.id != bot.user.id: | ||
news_title = tnews_list['title']['non-unicode']['one'] | ||
news_text = tnews_list['news']['one'] | ||
tnews_text_content = discord.Embed(title=news_title, description=news_text, color=embed_color) | ||
tnews_text_content.set_image(url=tnews_list['images']['one']) | ||
await msg.edit(embed=tnews_text_content) | ||
if reaction.emoji == "2⃣" and user.id != bot.user.id: | ||
news_title = tnews_list['title']['non-unicode']['two'] | ||
news_text = tnews_list['news']['two'] | ||
tnews_text_content = discord.Embed(title=news_title, description=news_text, color=embed_color) | ||
tnews_text_content.set_image(url=tnews_list['images']['two']) | ||
await msg.edit(embed=tnews_text_content) | ||
if reaction.emoji == "3⃣" and user.id != bot.user.id: | ||
news_title = tnews_list['title']['non-unicode']['three'] | ||
news_text = tnews_list['news']['three'] | ||
tnews_text_content = discord.Embed(title=news_title, description=news_text, color=embed_color) | ||
tnews_text_content.set_image(url=tnews_list['images']['three']) | ||
await msg.edit(embed=tnews_text_content) | ||
if reaction.emoji == "4️⃣" and user.id != bot.user.id: | ||
news_title = tnews_list['title']['non-unicode']['four'] | ||
news_text = tnews_list['news']['four'] | ||
tnews_text_content = discord.Embed(title=news_title, description=news_text, color=embed_color) | ||
tnews_text_content.set_image(url=tnews_list['images']['four']) | ||
await msg.edit(embed=tnews_text_content) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
tnews_list = { | ||
'title': { | ||
'non-unicode': { | ||
'one': 'Релиз Vision 01R5 (8 января 2021 г.)', | ||
'two': 'Бот теперь доступен в одном из мониторингов', | ||
'three': 'Падение сервисов Google и его последствия', | ||
'four': 'Чем отличается бот Vision от фейков (или клонов)?' | ||
}, | ||
'one': '1⃣ Скоро новый релиз - VisionOne 01R8 (21 января 2021 г.)', | ||
'two': '2⃣ Наш саппорт-сервер VisionOne уже открыт!', | ||
}, | ||
'news': { | ||
'one': 'Скоро будет размещен новый релиз бота VisionOne - 01R8, сегодня или завтра, пока все будет полностью протестировано.\n\n**Изменения**:\n1. Будет добавлена ручная смена префикса бота.\n2. Будет добавлена глобальная система уровней\n3. Станет возможным задавать свои приветственные и прощальные сообзения для Вашего сервера.', | ||
'two': 'Перейти можно по нашей ссылке в `=info`.', | ||
}, | ||
'images': { | ||
'one': '', | ||
'two': 'https://cdn.discordapp.com/attachments/787270057952542720/797275961337839716/Screenshot_2021-01-09-08-29-34.png', | ||
}, | ||
'footer': 'Актуально на 21 января 2020 г.' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters