i was trying to change nicknames on discord.py 1.7.3 but i'd tried some times in different ways but don't have success
import discord
from discord.ext import commands
import urllib.request
import json
import datetime as DT
import configparser
import os
from discord.utils import get
class Search(commands.Cog):
@commands.command()
async def search(self, ctx, option, *, name):
for member in ctx.guild.members:
if(member.nick == name):
await member.edit(nick="teste")
also, i tried start with:
@commands.command(pass_context=True)
async def search(self, ctx, option, *, name, discMember: discord.Member):
and fail too, when i use "discMember: dscord.Member", the code stop running, don't know why doesn't work