Compare commits
18 Commits
98ac531a36
...
v2.1
Author | SHA1 | Date | |
---|---|---|---|
91eecb4b0b | |||
740c6a1464 | |||
3ca44dcd2d | |||
301439f144 | |||
3435d59d96 | |||
d560bce8c6 | |||
528604b6b4 | |||
76c7812284 | |||
8e48334cea | |||
bc9cebbec6 | |||
a178aa2af9 | |||
fb3e291d77 | |||
75c1889477 | |||
5329b4c727 | |||
0f3a6121d6 | |||
7f1f86ca03 | |||
c600747848 | |||
a2bd55dcdf |
6
.renovaterc
Normal file
6
.renovaterc
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
|
"extends": [
|
||||||
|
"config:base"
|
||||||
|
]
|
||||||
|
}
|
@@ -7,7 +7,7 @@
|
|||||||
<a href="https://crowdin.com/project/yusarinbot">
|
<a href="https://crowdin.com/project/yusarinbot">
|
||||||
<img alt="Crowdin" src="https://badges.crowdin.net/yusarinbot/localized.svg">
|
<img alt="Crowdin" src="https://badges.crowdin.net/yusarinbot/localized.svg">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://git.end-play.xyz/profitroll/TelegramPoster">
|
<a href="https://git.end-play.xyz/profitroll/YusarinBot">
|
||||||
<img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg">
|
<img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://discord.com/invite/2zpzErtnNT">
|
<a href="https://discord.com/invite/2zpzErtnNT">
|
||||||
|
@@ -42,23 +42,16 @@ class CogChannel(commands.Cog):
|
|||||||
vc_to = after.channel
|
vc_to = after.channel
|
||||||
|
|
||||||
# If user left vc
|
# If user left vc
|
||||||
if vc_to is None:
|
if before.channel is not None and len(before.channel.members) == 0:
|
||||||
if isUserVoice(vc_from):
|
if isUserVoice(vc_from):
|
||||||
if isVoiceOfUser(vc_from, member):
|
if isVoiceOfUser(vc_from, member):
|
||||||
await removeUserVoice(vc_from)
|
await removeUserVoice(vc_from)
|
||||||
return
|
|
||||||
else:
|
else:
|
||||||
if loadJson("config.json")["enable_nomic"]:
|
if loadJson("config.json")["enable_nomic"]:
|
||||||
await changeNomicPerms("deny", vc_from, member)
|
await changeNomicPerms("deny", vc_from, member)
|
||||||
|
|
||||||
# If user joined vc
|
# If user joined vc
|
||||||
else:
|
if after.channel is not None and after.channel.id == guildConfGet(member.guild, "channel"):
|
||||||
if isUserVoice(vc_from):
|
|
||||||
if isVoiceOfUser(vc_from, member):
|
|
||||||
await removeUserVoice(vc_from)
|
|
||||||
else:
|
|
||||||
if loadJson("config.json")["enable_nomic"]:
|
|
||||||
await changeNomicPerms("deny", vc_from, member)
|
|
||||||
if isUserVoice(vc_to):
|
if isUserVoice(vc_to):
|
||||||
if loadJson("config.json")["enable_nomic"]:
|
if loadJson("config.json")["enable_nomic"]:
|
||||||
await changeNomicPerms("allow", vc_to, member)
|
await changeNomicPerms("allow", vc_to, member)
|
||||||
|
@@ -1,2 +1,2 @@
|
|||||||
ujson~=5.7.0
|
ujson==5.7.0
|
||||||
py-cord[speed]~=2.3.2
|
py-cord[speed]==2.4.1
|
@@ -1,2 +1,2 @@
|
|||||||
py-cord~=2.3.2
|
py-cord==2.4.1
|
||||||
requests~=2.28.2
|
requests==2.29.0
|
16
yusarin.py
16
yusarin.py
@@ -12,7 +12,7 @@ from os import getpid
|
|||||||
from functions import *
|
from functions import *
|
||||||
|
|
||||||
pid = getpid()
|
pid = getpid()
|
||||||
version = 1.8
|
version = 2.1
|
||||||
|
|
||||||
if (
|
if (
|
||||||
loadJson("config.json")["owner"] == "SET-OWNER-ID"
|
loadJson("config.json")["owner"] == "SET-OWNER-ID"
|
||||||
@@ -24,17 +24,15 @@ if (
|
|||||||
exit()
|
exit()
|
||||||
|
|
||||||
if loadJson("config.json")["check_for_updates"]:
|
if loadJson("config.json")["check_for_updates"]:
|
||||||
|
appendLog(f"Currently using YusarinBot v{str(version)}")
|
||||||
try:
|
try:
|
||||||
release = loads(
|
releases = get(
|
||||||
get(
|
"https://git.end-play.xyz/api/v1/repos/profitroll/YusarinBot/releases?draft=false&pre-release=false&page=1&limit=1"
|
||||||
"https://git.end-play.xyz/api/v1/repos/profitroll/YusarinBot/releases?draft=false&pre-release=false&page=1&limit=1"
|
).json()
|
||||||
).json()
|
if float(releases[0]["tag_name"].replace("v", "")) > version:
|
||||||
)[0]
|
|
||||||
if float(release["tag_name"].replace("v", "")) > version:
|
|
||||||
appendLog(
|
appendLog(
|
||||||
f"YusarinBot version {release['tag_name']} is available. Download new version here: {release['html_url']}"
|
f"YusarinBot version {releases[0]['tag_name']} is available. Download new version here: {releases[0]['html_url']}"
|
||||||
)
|
)
|
||||||
appendLog(f"Currently using YusarinBot v{str(version)}")
|
|
||||||
except Exception as exp:
|
except Exception as exp:
|
||||||
appendLog(
|
appendLog(
|
||||||
f"Could not get YusarinBot cloud version due to {exp}. Currently using {str(version)}"
|
f"Could not get YusarinBot cloud version due to {exp}. Currently using {str(version)}"
|
||||||
|
Reference in New Issue
Block a user