Guest User

Untitled

a guest
Feb 15th, 2021
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.08 KB | None | 0 0
  1.             msgsss = await message.channel.send(embed=embed)
  2.             [..]
  3.             mycursor.execute(f"SELECT * FROM servers")
  4.             myresult = mycursor.fetchall()
  5.             msgids = []
  6.             for server in myresult:
  7.                 try:
  8.                     x1 = [server]
  9.                     guild = bot.get_guild(int(x1[0][0]))
  10.                     channel = bot.get_channel(int(x1[0][1]))
  11.                     async with channel.typing():
  12.                         if channel and channel.id != notchannel.id:
  13.                             msg = await channel.send(embed=embed)
  14.                             msgids.append(str(msg.id))
  15.                 except:
  16.                     pass
  17.             new = " ".join(msgids)
  18.             now = datetime.now()
  19.             zeit = 1
  20.             unmute = now + timedelta(days=zeit)
  21.             unmutestr = unmute.strftime("%Y-%m-%d %H:%M:%S")
  22.             sql = f"INSERT INTO messeges (messageID, code, ids, time) VALUES ({msgsss.id}, '{CODE}', '{new}', '{unmutestr}')"
  23.             mycursor.execute(sql)
  24.             mydb.commit()
Advertisement
Add Comment
Please, Sign In to add comment