如何解决AttributeError:“ str”对象没有属性“ seek”

时间:2019-05-10 12:35:04

标签: discord.py

import discord
from discord.ext import commands
import os

@client.event
async def on_message(message):

    author = message.author
    content = message.content
    Idline = open("D:/CreateAlts/ID.txt", 'r').readline()


    if message.content == "!g":
        embed = discord.Embed(colour = discord.Colour.green())

        embed.add_field(name="ID : %s", value=Idline)

        await message.author.send(content=None, embed=embed)

        Idline.seek(2, 1)

我是discord.py的菜鸟 阅读此代码并回复它 我不明白为什么会发生attributeError。

0 个答案:

没有答案