diff --git a/bot_newest_version/susmain4.py b/bot_newest_version/susmain4.py new file mode 100644 index 0000000..d479750 --- /dev/null +++ b/bot_newest_version/susmain4.py @@ -0,0 +1,288 @@ +import discord, time, datetime, random, os +from discord import app_commands +from discord.ext import commands, tasks +from config import slova, sus_responses, greetings, main_channels_ids, bot_messages, bot_reply_messages + +t_h = 0 +t_s = 0 + +client = commands.Bot(command_prefix="~", intents=discord.Intents.all()) +dtime = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") + +############################################################################################################## +########################################## FUNCTIONS SCRIPTS ################################################# +############################################################################################################## +async def chat_participation(): #randmonly sends messages into main channels function + for idd in main_channels_ids: + channel = client.get_channel(idd) + + print("jo") + + members = channel.members + members_ids = [] + for member in members: + members_ids.append(member.id) + members_ids.remove(client.user.id) + rnid = random.choice(members_ids) + + msg = (random.choice(bot_messages)).strip() + + if "@random" in msg: + msg = msg.replace("@random", f"<@{rnid}>") + + if "