hikariatama / Hikka

The most fresh and updateable developer-oriented Telegram userbot
https://hikka.pw
GNU Affero General Public License v3.0
315 stars 506 forks source link

obj:`PointerDict` does not support generic dictionary methods #125

Closed MuRuLOSE closed 7 months ago

MuRuLOSE commented 9 months ago

To Reproduce Steps to reproduce the behavior:

  1. In self.pointer, specify a dictionary (e.g something = self.pointer("dict",{}))
  2. Use pointer (try update or something)
  3. See error

Expected behavior I thought pointer would have methods for the dictionary, but it turns out there are none

Screenshots изображение

Userbot installation info:

hikariatama commented 7 months ago

Judging by the error messages, you tried to invoke .keys() method on PointerList, which is kinda non-default behavior. You cannot change the type of pointer after it is created. Added additional check in 1.6.4 to avoid such bugs in the future.