-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplugin-uwu_virus.py
30 lines (23 loc) · 1.19 KB
/
plugin-uwu_virus.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import uwuify
from xander_plugin import *
def onload():
help_menu_edit("T-T virus plugin", "A plugin that spreads the T-T virus.")
log("UwU virus plugin loaded")
async def onmessage(message):
if ("uwu" in message.content.replace(" ", "").lower()) and (not "uwu virus" in [y.name.lower() for y in message.author.roles]):
await message.author.add_roles(discord.utils.get(message.author.guild.roles, name="UwU virus"))
await message.channel.send("The power of the UwU virus has spread and you are now infected!")
elif ("wuw" in message.content.lower()) and ("uwu virus" in [y.name.lower() for y in message.author.roles]):
await message.author.remove_roles(discord.utils.get(message.author.guild.roles, name="UwU virus"))
if message.content == "!virus":
role = discord.utils.get(message.author.guild.roles, name="UwU virus")
infected = 0
members = [m for m in message.guild.members]
for member in members:
if role in member.roles:
infected += 1
await message.channel.send(f"{infected} people are infected in this server.")
return False
return True
def onexit():
log("UwU virus exit run")