@@ -83,10 +83,12 @@ def load_notitext() -> str:
8383
8484def save_is_target_channel (channel_id : int , is_target : bool ):
8585 """チャンネル設定をD1に保存"""
86- execute_d1_query (
86+ print (f"[DB] Saving is_target_channel: channel_id={ channel_id } , is_target={ is_target } " )
87+ result = execute_d1_query (
8788 "INSERT OR REPLACE INTO is_target_channel (channel_id, is_target) VALUES (?, ?)" ,
8889 [channel_id , 1 if is_target else 0 ]
8990 )
91+ print (f"[DB] save_is_target_channel result: { result } " )
9092
9193
9294def load_is_target_channels () -> Dict [int , bool ]:
@@ -102,10 +104,12 @@ def load_is_target_channels() -> Dict[int, bool]:
102104
103105def save_channel_id (channel_id : int ):
104106 """通知先チャンネルIDをD1に保存"""
105- execute_d1_query (
107+ print (f"[DB] Saving channel_id: { channel_id } " )
108+ result = execute_d1_query (
106109 "INSERT OR REPLACE INTO bot_settings (key, value) VALUES (?, ?)" ,
107110 ["channel_id" , str (channel_id )]
108111 )
112+ print (f"[DB] save_channel_id result: { result } " )
109113
110114
111115def load_channel_id () -> Optional [int ]:
@@ -121,10 +125,12 @@ def load_channel_id() -> Optional[int]:
121125
122126def save_call_end_notification_enabled (enabled : bool ):
123127 """終了通知設定をD1に保存"""
124- execute_d1_query (
128+ print (f"[DB] Saving is_call_end_notification_enabled: { enabled } " )
129+ result = execute_d1_query (
125130 "INSERT OR REPLACE INTO bot_settings (key, value) VALUES (?, ?)" ,
126131 ["is_call_end_notification_enabled" , "1" if enabled else "0" ]
127132 )
133+ print (f"[DB] save_call_end_notification_enabled result: { result } " )
128134
129135
130136def load_call_end_notification_enabled () -> Optional [bool ]:
0 commit comments