Created
November 9, 2021 19:34
-
-
Save DaShoe/172d3da1f13a56222982d28cd25fa32c to your computer and use it in GitHub Desktop.
auto rename bot for discord.py
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
import discord | |
from discord import guild | |
from discord import embeds | |
from discord import message | |
from discord.ext import commands | |
from discord.ext.commands.core import has_guild_permissions | |
from threading import Thread | |
from time import sleep | |
client = commands.Bot(command_prefix = '.') | |
@client.event | |
async def on_ready(): | |
print("online") | |
def q1(): | |
@client.command(pass_content=True) | |
async def changenick(ctx, member: discord.Member, nick): | |
while True: | |
await member.edit(nick=nick) | |
sleep(10) | |
print("1") | |
def q2(): | |
@client.command(pass_content=True) | |
async def changenick1(ctx, member1: discord.Member, nick1): | |
while True: | |
await member1.edit(nick=nick1) | |
sleep(10) | |
print("2") | |
if __name__ == '__main__': | |
sleep(20) | |
Thread(target = q1).start() | |
Thread(target = q2).start() | |
client.run('Token') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment